CLI
CLI Commands
Complete reference for all AutoHost CLI commands.
autohost up
Authenticate and register the current node with AutoHost Cloud using a browser-based flow.
autohost up [--cloud <URL>] [--name <node-name>]
| Flag | Default | Description |
|---|---|---|
| --cloud | https://cloud.autohst.dev | URL of the AutoHost Cloud dashboard |
| --name | System hostname | Custom name for this node |
The command starts a temporary local HTTP server, opens a browser for authentication, and waits for a callback with the node token. The resulting agent configuration is saved to /etc/autohost/config.yaml.
autohost setup
Configure the system for self-hosting.
- autohost setup docker — Install Docker, add your user to the docker group, and create the AutoHost Docker network.
- autohost setup tailscale — Install and authenticate Tailscale for private network access.
autohost enroll link
Manually enroll a node with the cloud API using an enrollment token.
autohost enroll link --api <API_URL> --token <ENROLLMENT_TOKEN> [--name <node-name>]
| Flag | Required | Description |
|---|---|---|
| --api | Yes | URL of the AutoHost Cloud API |
| --token | Yes | Enrollment token generated from the dashboard |
| --name | No | Custom node name (defaults to hostname) |
The command auto-detects the node's hostname, local IP, OS, and architecture, then calls POST /v1/enrollments/enroll. The returned agent token is saved to /etc/autohost/config.yaml.
autohost agent install
Download and install the AutoHost Agent as a systemd service. This downloads the agent binary, configuration template, and systemd unit file. Requires root or sudo.
autohost agent install sudo systemctl enable autohost-agent sudo systemctl start autohost-agent
autohost app
Manage self-hosted applications via Docker Compose.
- autohost app install <app> — Install an application from the catalog interactively (e.g., nextcloud, bookstack, joplin, postgres). Shortcut: autohost install <app>
- autohost app ls — List all installed applications.
- autohost app start <name> — Start a stopped application.
- autohost app stop <name> — Stop a running application.
- autohost app status <name> — Show the status of an application.
- autohost app remove <name> — Remove an application and its Docker resources.
autohost cc
Manage custom commands that can be triggered remotely from the dashboard.
autohost cc create backup-db --description "Backup the PostgreSQL database"
This creates a bash script template at /var/lib/autohost/commands/backup-db.sh that you can edit with your custom logic. The command is registered with the API so it appears in the dashboard.
The AutoHost CLI provides a comprehensive set of commands for managing your infrastructure.
Global Flags
--config, -c Path to config file (default: ~/.autohost/config.yaml) --verbose, -v Enable verbose output --json Output in JSON format --help, -h Show help for any command