Typical workflow
Typical workflow
Section titled “Typical workflow”# 1. Start the server (one-time, or as a service)../dist/swarm-server --config swarm-server.json# First start prints a one-time enrollment token.
# 2. One-time CLI setup: point at the server, enroll, save VM defaults.swarm config set server https://localhost:8800swarm login --token <token-from-server>swarm config set zone fi-hel1swarm config set plan 1xCPU-1GBswarm config set template 01000000-0000-4000-8000-000030200364
# 3. Create a VM (or several).swarm vm create --name server-1swarm vm create --name server-2
# 4. Deploy a devcontainer (bootstraps the VM automatically on first deploy).swarm container deploy --repo https://github.com/example/project --alias dev
# 4b. Or deploy multiple at once — auto-placed across VMs.swarm container deploy --repo https://github.com/example/project --alias dev --count 3
# 5. Check on things — status is live from the agent.swarm container listswarm container info dev # single deployswarm container info dev-1 # batch deploy
# 6. Tear down.swarm container rm devswarm vm destroy server-1swarm vm destroy server-2Interactive access (a shell into a container, port forwarding) is not
part of the CLI in this release — use ssh root@<vm-ip> "docker exec -it <docker-id> bash" or the container HTTP proxy
for HTTP services.
Command reference
Section titled “Command reference”swarm config set <key> <value> Set a configuration default show Show current configuration login Enroll this machine (one-time token) vm create Create a new virtual machine list List virtual machines info <name-or-id> Show details of a virtual machine destroy <name-or-id> Destroy a virtual machine bootstrap <name-or-id> Re-bootstrap a VM (push agent binary, restart services) templates List available OS templates plans List available server plans zones List available datacenter zones networks List private networks available for VMs container deploy Deploy a devcontainer on a VM (--count N for batch) list List deployed devcontainers info <alias-or-id> Show details of a devcontainer rename <id-or-alias> <new-alias> Rename a devcontainer alias rm <alias-or-id> Remove a devcontainer user list List enrolled users and revocation status revoke <serial> Revoke a user's client certificate server log-level Get or set the server log level token Print a fresh one-time enrollment token ssh-key add <name> Register a public key for VM access list List registered VM access keys remove <name> Remove a registered VM access key git-credential add <host> Register a git credential (token from stdin) list List registered git credentials remove <host> Remove a registered git credential secret set <name> Register or update a named secret (value from stdin) list List registered secrets remove <name> Remove a named secret tui Launch the interactive dashboard version Print version information