uc) is the main tool for managing your cluster. It lets you deploy services, manage machines, and control your infrastructure from the command line.
Installation
Download and install the latest version of the Uncloud CLI:Command Structure
All Uncloud commands follow this pattern:Global Flags
These flags work with any command:Connect to a remote cluster machine without using the config file.Supported formats:
ssh://user@host[:port]- Use built-in SSH library (default)ssh+cli://user@host[:port]- Use system SSH command (supports ProxyJump)tcp://host:port- Direct TCP connectionunix:///path/to/uncloud.sock- Unix socket connection
UNCLOUD_CONNECT environment variable.Path to the Uncloud configuration file.Can also be set with the
UNCLOUD_CONFIG environment variable.Name of the cluster context to use. Defaults to the current context.Can also be set with the
UNCLOUD_CONTEXT environment variable.--version
Print the version of the Uncloud CLI.
--help
Show help for any command.
Command Groups
Service Management
Deploy and manage containerized services:uc run- Run a service from an imageuc deploy- Deploy services from a Compose fileuc service ls- List servicesuc service scale- Scale a serviceuc service logs- View service logsuc service exec- Execute commands in containersuc service start- Start stopped servicesuc service stop- Stop running servicesuc service rm- Remove services
Machine Management
Manage cluster machines:uc machine init- Initialize a new clusteruc machine add- Add a machine to the clusteruc machine ls- List machinesuc machine update- Update machine configurationuc machine rm- Remove a machine
Context Management
Switch between clusters:uc context ls- List available contextsuc context use- Switch to a different context
Volume Management
Manage persistent data volumes:uc volume create- Create a volumeuc volume ls- List volumesuc volume rm- Remove volumes
DNS Management
Manage cluster domain names:uc dns reserve- Reserve a cluster domainuc dns show- Show the cluster domainuc dns release- Release the cluster domain
Other Commands
uc build- Build service images from Compose filesuc images- List images on cluster machinesuc ps- List all service containers
Getting Help
You can get help for any command by adding--help:
Examples
Initialize a new cluster
Deploy a service
Deploy from a Compose file
View logs from all services
Environment Variables
The CLI respects these environment variables:UNCLOUD_CONNECT- Default connection stringUNCLOUD_CONFIG- Path to config fileUNCLOUD_CONTEXT- Default context nameUNCLOUD_AUTO_CONFIRM- Auto-confirm prompts (set totruefor CI/CD)
