Skip to main content

SSH CLI (from outside)

All commands via SSH to boxd.sh. All accept --json for structured output.
ssh boxd.sh <command>
Or interactively:
ssh boxd.sh
boxd> <command>

Machine management

CommandDescription
new [--name] [--image] [--restart=always]Create a machine
listList your machines
destroy <name>Permanently destroy a machine
fork <source> [--name]Copy a machine with full disk state

new

Create a machine. Blocks until running (up to 30s timeout).
ssh boxd.sh new --name=myapp
FlagDefaultDescription
--nameauto-generatedMachine name. Must be unique. Becomes the HTTPS subdomain.
--imagecluster defaultContainer image for the root filesystem.
--restartalwaysRestart policy: always or never.
Aliases: list can also be written as ls. destroy can also be written as rm.

destroy

Destroy a machine permanently. The name and IP are reserved for reuse.
ssh boxd.sh destroy myapp
Accepts a machine name or VM ID. Alias: rm.

fork

Copy a machine with its full disk state. See Fork for details.
ssh boxd.sh fork myapp --name=myapp-v2
FlagDefaultDescription
--name{source}-forkName for the new machine.

Execution

CommandDescription
exec <name> [--tty] -- <command>Run a command inside a machine
connect <name>Open an interactive shell session

exec

Run a command inside a machine. Commands execute as the boxd user with passwordless sudo.
ssh boxd.sh exec myapp -- uname -a
ssh boxd.sh exec myapp -- sudo systemctl start nginx
ssh boxd.sh exec myapp -- "cd /app && python3 server.py"
Add --tty for interactive commands:
ssh boxd.sh exec myapp --tty -- bash

connect

Open a full interactive shell session.
ssh boxd.sh connect myapp
Requires PTY support. Alias: ssh. For automation, use exec instead.

Proxy management

CommandDescription
proxy list [--vm=NAME]List proxies (all if --vm omitted)
proxy new <name> --vm=NAME --port=PORTCreate a subdomain proxy
proxy delete <name> --vm=NAMERemove a proxy
proxy set-port [name] --vm=NAME --port=PORTChange proxy port

proxy list

ssh boxd.sh proxy list --vm=myapp
ssh boxd.sh proxy list              # all proxies
--vm is optional — omit to list all proxies across all machines.

proxy new

Create a subdomain proxy. api.myapp.boxd.sh → port 3001:
ssh boxd.sh proxy new api --vm=myapp --port=3001

proxy delete

ssh boxd.sh proxy delete api --vm=myapp
Alias: proxy rm.

proxy set-port

Change the port for a proxy. Omit the name to change the default proxy.
ssh boxd.sh proxy set-port --vm=myapp --port=3000       # default proxy
ssh boxd.sh proxy set-port api --vm=myapp --port=3001   # named proxy
ssh boxd.sh proxy set-port --vm=myapp --port=auto       # auto-detect
auto detects the port your app is listening on (default proxy only).

Other

CommandDescription
domain [--name=NAME]List HTTPS domains
whoamiYour user ID and SSH keys
exit / quitClose the interactive shell

Global flags

FlagDescription
--jsonOutput as JSON instead of formatted text

In-VM CLI

Every machine has the boxd command pre-installed. Auth is automatic by source IP — no SSH keys needed. All commands accept --json.
boxd <command>

Commands

CommandDescription
infoCurrent VM name, status, image, proxies
listList all your VMs
new [--name] [--image]Create a VM
fork [source] [--name]Fork a VM (defaults to current VM)
destroy <name>Destroy a VM (cannot destroy self)
exec <name> -- <cmd>Run command in another VM
connect <name>Interactive shell in another VM
Aliases: list/ls, destroy/rm, connect/ssh.

Proxy commands (in-VM)

Default to current VM when --vm is omitted.
CommandDescription
proxy list [--vm] [--all]List proxies
proxy new <name> --port=PORT [--vm]Create subdomain proxy
proxy remove <name> [--vm]Remove proxy
proxy set-port [name] --port=PORT [--vm]Change proxy port
boxd proxy set-port --port=3000            # change default port for this VM
boxd proxy new api --port=3001             # create api.name.boxd.sh
boxd proxy list                            # list proxies for this VM
boxd proxy rm api                          # remove (alias for remove)