Usage
Arguments
Current name of the machine to rename
New name for the machine
Description
Therename command changes the name of an existing machine in the cluster. This is useful when you want to improve machine naming for better organization or to follow a new naming convention.
The rename operation:
- Preserves the machine’s network configuration (subnet, WireGuard keys)
- Maintains the machine’s public IP address
- Keeps all cluster state and membership intact
- Updates DNS records and service discovery automatically
- Does not affect running containers or services
Machine names must be unique within a cluster. The rename will fail if another machine already has the target name.
Examples
Rename a machine
Adopt a naming convention
Rename machines to follow a consistent pattern:Fix a typo
What Gets Updated
When you rename a machine:- Machine name in cluster state
- Service discovery: Other machines learn the new name automatically
- Context configuration: Your local Uncloud config updates the machine name
- Container labels: Containers keep running without interruption
What Doesn’t Change
- Machine ID (stays the same)
- IP addresses (both public and mesh network)
- WireGuard configuration
- Running containers and services
- Volume data
- Network connectivity
Verification
After renaming, verify the change with:Related Commands
uc machine ls- List machines with their current namesuc machine update- Update other machine propertiesuc machine add- Add a new machine with a specific name
