Command line
The asdl-hub program is also a command line for the Hub. What the dashboard
does day to day works from a terminal too: checking on nodes and apps, reading
logs, redeploying, moving apps and maintenance.
$ sudo asdl-hub statusHub http://127.0.0.1:8080 v0.10.0 (up to date)Nodes 2/3 onlineApps 2 2 healthyJobs today 12 12 succeededWhere to run it
Section titled “Where to run it”On the Hub’s server, it’s installed as /usr/local/bin/asdl-hub. Run
commands with sudo; nothing else to set up. The Hub keeps an admin token for
the command line in /opt/asdl-hub/.cli-token, readable only by the Hub’s
user and root, and renews it daily.
On another machine (Linux, macOS or Windows), install the command with the same address as the Hub’s installer:
# Linux and macOScurl -fsSL https://get.asdl.online/asdl-hub | bash# Windows PowerShellirm https://get.asdl.online/asdl-hub | iexOn Linux (the first command) it asks whether to install the Hub or only the command line; choose
2) Command line. The Hub (the server) runs on Linux only, so on macOS and
Windows that choice is shown as unavailable and only the command line is
installed. The installer downloads the release’s build, checks it against the
release’s checksums, and puts asdl-hub in ~/.local/bin (as root,
/usr/local/bin; on Windows %LOCALAPPDATA%\Programs\asdl-hub, which it adds
to your PATH). Skip the question with ASDL_INSTALL=cli, change the folder
with ASDL_BIN_DIR, or pick a release with ASDL_CLI_VERSION=v0.14.1. Then
log in:
$ asdl-hub login https://hub.example.comOpen this page and approve the login:
https://hub.example.com/authorize?code=K3F9-X2MQ
Its code should read K3F9-X2MQ. Waiting…Logged in to https://hub.example.com as admin, token "asdl-hub CLI (admin@laptop)" (revoke it in Settings → Tokens) (admin).login opens that page in your browser (if the machine has one; otherwise
open the address on any device). Sign in to the dashboard there, as you
normally do, with two-factor if you have it
on, check that the code matches the one in your terminal, and click
Approve. Your password and codes never go through the terminal. The
request expires after 5 minutes and works once.
For admins, logging in creates a permanent token named after the machine,
which you can revoke in Settings → Tokens; asdl-hub logout revokes it and
forgets the login. Other users get a session that lasts a day. To use a token
you already have, run asdl-hub login <url> --token <token>. The login is saved
in ~/.config/asdl-hub/cli.json, readable only by you.
| Flag | Does |
|---|---|
--no-browser |
Print the address instead of opening it. |
--password |
Ask for a username and password (and a two-factor code) in the terminal instead. For machines where you can’t reach the page. |
--token <token> |
Save a token you already have. |
In scripts and CI, set ASDL_HUB_URL and ASDL_HUB_TOKEN instead; they come
before a saved login.
Commands
Section titled “Commands”| Command | Does |
|---|---|
status |
Hub version and whether an update is out, nodes online, app health, today’s jobs. |
doctor |
Check everything and say what to fix: see below. |
nodes |
Each node’s state (online, offline, maintenance), address, agent version, memory, disk, apps, last heartbeat, 7-day uptime and last outage with its likely cause. |
outages <node> |
A node’s recent outages with their likely cause, and when they tend to happen: see Node availability and load. |
apps |
Each app’s node, status, health, address and when it was last deployed. |
app <app> |
One app: node, image, ports, repository, environment variable names (never values) and plugins. |
deploy <app> |
Redeploy with the current image and settings, and wait for it. |
move <app>... [node] |
Move apps to another node, and wait for them. With no node, it shows how the nodes rank and asks before moving each to the best. Several apps are all handed to the Hub at once, so a node runs as many side by side as its parallel-jobs allows; each is reported as it finishes. |
rollback <app> |
Put the app’s previous version back: see Roll back a deploy. Shows both versions and asks first. |
restart <app> |
Restart the app’s container. |
snapshots <app> |
The app’s plugin snapshots: whether they are on, how often, and the copies the Hub holds. |
snapshot on|off <app> |
Switch snapshots on (--minutes N, default 5) or off (--delete also removes stored copies). Turning them on redeploys the plugin and asks first. |
snapshot now <app> |
Take a snapshot now. |
snapshot restore|delete <app> <generation> [plugin] |
Put a stored snapshot back (the plugin’s current data is replaced and it redeploys; asks first), or delete one. |
logs <app> [-n 100] [-f] |
The app’s last lines of output. With -f it keeps printing new lines as they come, for up to 10 minutes. |
app set <app> key=value… |
Change domain, path, image, ports (empty: the Hub picks), node or description. Image, port and node changes redeploy it. |
env <app> |
The app’s environment variable names. Values are encrypted and never shown. |
env set <app> [KEY…] |
Add or change variables. You’re asked for each value at a hidden prompt, so it never reaches the screen or your shell history. With no names, it asks which ones. The app redeploys. |
env unset <app> [KEY…] |
Remove variables (asks which, if none are given). |
node set <node> parallel-jobs=N|auto |
How many jobs (deploys, failovers, clean-ups) the node runs at once: 1 to 8, 1 for one after another, auto for what its hardware suggests (one per 4 GB of RAM and per 2 cores, up to 4). Also on the node’s page. asdl-hub nodes shows it under JOBS. |
node remove <node> |
Remove a node for good, after its apps have moved. Asks first; --yes skips the question. |
maintenance <node> on|off |
Start maintenance (apps move off the node) or end it. |
config |
The Hub’s settings in /opt/asdl-hub/.env, with secrets hidden (--show reveals them). Hub server, with sudo. |
config set [KEY…] |
Change settings: asks which and for their values (secret ones hidden), saves a .env.bak, then offers to restart the Hub. Risky settings such as SECRETS_KEY or DB_PASSWORD need --force. |
config unset [KEY…] |
Remove settings (their defaults apply). |
server status|restart|logs |
The Hub’s service. restart waits until it answers again; logs -f follows its log. |
nginx reload |
Rewrite the app routes from the current apps, check them and reload nginx. |
nginx test / nginx routes |
Run nginx -t, or print the app routes the Hub wrote. Hub server, with sudo. |
jobs [-n 15] |
Recent jobs with their node, status and duration. |
job <id> |
A job’s details and output. The short IDs jobs prints work. |
notify |
Notification channels, with when they last sent and their last error. |
notify test <channel> |
Send a test notification. |
update |
Check for a new Hub release. |
update install [--now] |
Install it (like Update now in the dashboard) and wait until the Hub runs it. If jobs are queued or running on online nodes, the Hub first waits for them to finish (at most 30 minutes) so no agent loses a result to the restart; --now skips the wait. |
login, logout, whoami |
Sign in to a Hub, sign out, show which Hub and user commands go to. |
version |
The program’s version. |
serve |
Run the Hub server; this is what the service runs. |
Apps and nodes are named by name or ID, or any start of one that is
unambiguous: macbook for macbook-pro.local, web for website. Add
--json to any command to print the API’s answer, e.g. asdl-hub apps --json | jq '.[].name'.
Commands that change something ask first (moving to a suggested node, a
rollback, a snapshot restore…). At a terminal, Enter means yes. In a script
or cron job there is no one to ask: pipe the answer in (echo n means no),
or add --yes (-y) to go ahead. With neither, nothing is done.
Commands need the role the dashboard would: anyone can look, operators and admins can deploy, move, restart and read logs, and only admins manage notifications and updates (and open a node’s terminal in the dashboard).
Secrets stay out of your shell history
Section titled “Secrets stay out of your shell history”env set and config set ask for values instead of taking them in the
command, so a token never lands in ~/.bash_history or ~/.zsh_history:
$ asdl-hub env set apiCurrent variables: DATABASE_URL, SENTRY_DSNWhich variable do you want to add or change? (Enter when done) STRIPE_KEYValue for STRIPE_KEY (hidden): ✓ 32 charactersWhich variable do you want to add or change? (Enter when done)Set STRIPE_KEY for api, then redeploy it? [Y/n] ySaved. api is redeploying with the new environment.asdl-hub env set api STRIPE_KEY asks only for that value. KEY=VALUE still
works for scripts, and in scripts you can pipe the value in:
printf '%s' "$KEY" | asdl-hub env set api STRIPE_KEY.
Doctor
Section titled “Doctor”asdl-hub doctor checks the whole setup and prints what’s wrong with the
command or step that fixes it. It exits with 1 if it found a problem, so it
also works in scripts and cron.
$ sudo asdl-hub doctorASDL Hub doctor
Hub ✓ Hub answers at http://127.0.0.1:8080, signed in as admin (admin) ✓ Running v0.11.0, the latest release
This server ✓ The asdl-hub service is running ✓ nginx's config is valid ✓ Disk: 31.2 GB (64%) free
Nodes ✓ node-1 is online (agent v2026.10.03-1a2b3c4, 2 apps) ! laptop is offline (last seen 2d ago) → If the machine is on: run asdl-agent doctor on it. If it's gone for good, remove it in the dashboard.
Apps ✓ api is healthy on node-1
Domains ✗ api.example.com (api): points at 203.0.113.9, not the Hub (198.51.100.4) → Point api.example.com at the Hub server (DNS A record 198.51.100.4; proxy off if it's on Cloudflare)
Jobs ✓ No failed jobs in the last 24 hours
Notifications ✓ Discord (discord) works
8 ok, 1 warning, 1 problem| Section | Checks |
|---|---|
| Hub | The Hub answers and accepts your login; it’s on the latest release. |
| This server | Only on the Hub’s server: the service, nginx -t, nginx running, free disk, and whether the last update finished. |
| Nodes | Offline nodes (worse if apps are still on them), WireGuard handshakes, nodes left in maintenance, nearly full disks, outdated agents, and whether there’s a second node to fail over to. |
| Apps | Failed, unhealthy or degraded apps. |
| Domains | Every app and public plugin domain resolves to the Hub and answers over HTTPS, and its certificate has more than 10 days left. |
| Jobs | Failed jobs in the last 24 hours, and jobs stuck waiting for an online node. |
| Notifications | Admins: channels whose last send failed, or none set up. |
Add --json for the findings as a list, each with section, level
(ok, info, warning, problem), message and fix.
Examples
Section titled “Examples”$ sudo asdl-hub appsAPP NODE STATUS HEALTH ADDRESS DEPLOYEDapi node-1 running healthy api.example.com 2h agoweb node-2 running healthy example.com 1d ago
$ sudo asdl-hub move api node-2Moving api to node-2…Done.
$ sudo asdl-hub logs api -n 32026-09-28T08:20:42Z GET /health 2002026-09-28T08:20:55Z GET /users 2002026-09-28T08:20:56Z POST /login 401Choosing a node for a move
Section titled “Choosing a node for a move”Name a node and the app moves there. Leave it out and the command shows where the app could go, best first, and asks:
$ asdl-hub move apiNODE SCORE UPTIME 7D FREE MEM FREE DISK NOTEStower * 96 99.86% 64% 18% masternode-2 61 84.73% 52% 31% 1 outage(s) today
Move api to tower (best match, marked *)? [Y/n] yMoving api to tower…Done.The ranking is the one failover uses. NOTES says why a node isn’t a good choice: low on memory or disk, or outages today. In a script, where there’s no terminal to ask on, it doesn’t ask and goes ahead with the best node, so name the node there if you care which.
Following logs
Section titled “Following logs”asdl-hub logs api -f prints the last lines, then new ones as they are written.
It follows for up to 10 minutes and then stops on its own. Pressing Ctrl-C
stops your terminal watching; the agent stops the follow itself at its time
limit. It runs beside the node’s other work, so a deploy isn’t held up behind
it.
It needs a recent agent: the Hub only sends it to a node
whose agent says it can follow logs, and otherwise answers that the agent is too
old, so update the agent or drop -f.
On the nodes themselves, the agent has a command line of its own:
asdl-agent.
When something doesn’t work
Section titled “When something doesn’t work”Every error the command line prints, and what to do about it, is in Troubleshooting → Command line.