Skip to main content
Update the configuration of an existing machine in the cluster, including its name, public IP address, or WireGuard endpoints.

Usage

uc machine update MACHINE [flags]

Arguments

MACHINE
string
required
Name or ID of the machine to update.

Flags

--name
string
New name for the machine.
--public-ip
string
Public IP address of the machine for ingress configuration.
  • IP address - Set a specific public IP
  • none or blank - Remove the public IP
--endpoint
string
WireGuard endpoint address in format: IP, IP:PORT, IPv6, or [IPv6]:PORT.Default port 51820 is used if omitted. Other machines in the cluster will use these endpoints to establish a WireGuard connection to this machine.Multiple endpoints can be specified by repeating the flag or using a comma-separated list.

Examples

Rename a machine

uc machine update machine1 --name web-server

Set the public IP address

uc machine update machine1 --public-ip 203.0.113.10

Remove the public IP address

Useful for converting a machine to internal-only:
uc machine update machine1 --public-ip none

Update WireGuard endpoints

Specify one or more endpoints:
uc machine update machine1 --endpoint 203.0.113.10 --endpoint 192.168.1.5
With custom ports:
uc machine update machine1 --endpoint 203.0.113.10:51820 --endpoint 192.168.1.5:41820
Using comma-separated list:
uc machine update machine1 --endpoint 203.0.113.10,192.168.1.5

Update multiple properties at once

uc machine update machine1 --name web-server --public-ip 203.0.113.10

Output

The command shows what changed:
Machine 'web-server' (ID: m_abc123) configuration updated:
  name: "machine1" -> "web-server"
  public IP: none -> 203.0.113.10

Use Cases

Renaming Machines

Give machines descriptive names that reflect their role:
uc machine update m_abc123 --name db-primary

Updating Public IPs

Update the public IP when your server’s IP changes:
uc machine update web1 --public-ip 203.0.113.20

Managing WireGuard Endpoints

Update endpoints when:
  • Server gets a new public IP
  • Network configuration changes
  • Adding multiple network interfaces
  • Switching between public and private networks
uc machine update worker1 --endpoint 203.0.113.10,10.0.0.5

Important Notes

At Least One Flag Required

You must specify at least one flag to update. Running the command without flags will result in an error:
Error: at least one update flag must be specified (--endpoint, --name, --public-ip)

WireGuard Endpoint Changes

When you update endpoints, other machines in the cluster will use the new endpoints to connect. Make sure the endpoints are reachable from other machines.

Public IP and DNS

If you update the public IP of a machine running Caddy, you may need to update DNS records. Run uc caddy deploy to update DNS automatically.

Build docs developers (and LLMs) love