Usage
Connection Methods
You can connect to the remote machine using different schemas:ssh://user@host- Use built-in SSH library (default, no prefix required)ssh+cli://user@host- Use system SSH command (supports ProxyJump, SSH config)
Flags
Name of the new context to be created in the Uncloud config to manage the cluster.
API endpoint for the Uncloud DNS service.
Assign a name to the machine. If not specified, a name will be generated.
IPv4 network CIDR to use for machines and services.
--no-caddy
Don’t deploy Caddy reverse proxy service to the machine. You can deploy it later with
uc caddy deploy.--no-dns
Don’t reserve a cluster domain in Uncloud DNS. You can reserve it later with
uc dns reserve.--no-install
Skip installation of Docker, Uncloud daemon, and dependencies on the machine. Assumes they’re already installed and running.
Public IP address of the machine for ingress configuration.
auto- Automatic detectionnoneor blank - Disable ingress on this machine- IP address - Specify an explicit IP
Path to SSH private key for remote login (if not already added to SSH agent).Default:
~/.ssh/id_rsaVersion of the Uncloud daemon to install on the machine.
-y, --yes
Auto-confirm prompts (for example, resetting an already initialized machine). Should be explicitly set when running non-interactively, like in CI/CD pipelines.Can also be set with the
UNCLOUD_AUTO_CONFIRM environment variable.Examples
Initialize a cluster with default settings
Initialize with a custom context and machine name
Initialize with a non-root user and custom SSH settings
Initialize without Caddy and DNS
You can deploy Caddy withuc caddy deploy and reserve a domain with uc dns reserve later:
Initialize using system SSH with ProxyJump
This is useful when you need to use SSH config features like ProxyJump:What Happens During Initialization
- SSH Connection - Connects to the remote machine via SSH
- Installation - Installs Docker and the Uncloud daemon (unless
--no-installis used) - Cluster Setup - Initializes the cluster on the machine
- Config Update - Creates a new context in
~/.config/uncloud/config.yaml - DNS Setup - Reserves a
*.uncld.devdomain (unless--no-dnsis used) - Caddy Deployment - Deploys the Caddy reverse proxy (unless
--no-caddyis used) - DNS Records - Updates DNS records to point to the machine’s public IP
Output
Related Commands
uc machine add- Add more machines to the clusteruc machine ls- List machines in the clusteruc dns reserve- Reserve a cluster domain
