vps9 CLI cheat sheet
Every vps9 command on one page, by task: servers, SSH, snapshots, the firewall, rDNS, rescue, keys, billing, tickets, JSON and scripting.
This is every vps9 command on one page, grouped by what you want to do. <server> is always a hostname or a server id (srv_…), and every command takes --json for output a script can read.
What you need
vps9installed and logged in: Install the vps9 command-line tool.- A read-and-write API token for anything that changes something; read-only is enough for the listing commands.
Log in and look around
| Command | Does |
|---|---|
vps9 init --token-file ~/.vps9-token |
Log in and offer to add your SSH public key, step by step |
vps9 login < ~/.vps9-token |
Check a token and save it |
vps9 logout |
Forget the saved token (revoke it in the panel too if it leaked) |
vps9 whoami |
The account the token belongs to |
vps9 status |
Service status, no login needed |
vps9 prices |
Plans and add-ons, monthly and yearly, no login needed |
vps9 images |
The images --image takes |
vps9 apps |
The one-click apps --app takes |
vps9 open [<server>] [--print] |
Open the panel, or a server's page, in your browser |
vps9 help |
The full usage |
vps9 version |
The version you have |
Servers
| Command | Does |
|---|---|
vps9 servers |
List your servers: id, hostname, state, IPv4, plan |
vps9 servers show <server> |
One server, its tags and its recent events |
vps9 servers start <server> |
Start it (also stop, reboot) |
vps9 servers label <server> "Website" --tags prod,web |
Set its display name and tags (--notes-file F for notes, --clear to clear) |
vps9 servers create --plan budget --image debian-12 --hostname web-2 --key key_… |
Order a server (see the options below) |
vps9 servers reinstall <server> [--image ubuntu-24.04] |
Wipe and reinstall; asks you to type the hostname |
vps9 servers delete <server> |
Delete it for good; asks you to type the hostname |
vps9 servers addons <server> |
Its add-ons now and at the next renewal |
vps9 servers addons <server> set --ram-gb 2 --apply reboot |
Change add-ons; asks before it invoices |
Options for servers create: --key ID (repeat it), --app ID, --package NAME (repeat it) or --packages a,b, --setup-script FILE (setup scripts), --term month|year, --vcpu N, --ram-gb N, --disk-gb N, --transfer-tb N, --ipv4 N, --root-password generate or --root-password-file FILE, and --idempotency-key K (why). servers reinstall takes --image, --app ID or --no-app, --package, --setup-script and the root password options.
SSH
| Command | Does |
|---|---|
vps9 ssh <server> |
Run your own ssh as root@ the server's IPv4 |
vps9 ssh --user deploy <server> |
Log in as another user (flags go before the server) |
vps9 ssh <server> -- -L 8080:localhost:80 |
Pass options to ssh after -- |
Snapshots
| Command | Does |
|---|---|
vps9 snapshots <server> |
List its snapshots: id, name, manual or automatic, state |
vps9 snapshots <server> create before-upgrade |
Take one (a running server shuts down for about a minute) |
vps9 snapshots <server> revert before-upgrade |
Go back to it; asks you to type the hostname |
vps9 snapshots <server> rm before-upgrade |
Delete it; asks you to type the hostname |
vps9 snapshots <server> schedule daily --at 3 --tz Europe/Berlin --keep 3 |
Automatic snapshots (weekly --day sun too) |
vps9 snapshots <server> schedule |
Show the schedule |
vps9 snapshots <server> schedule off |
Turn automatic snapshots off (taken ones are kept) |
A server keeps 3 snapshots you take yourself, plus up to 4 automatic ones. Automate snapshots before risky changes wraps these into one command.
Firewall
| Command | Does |
|---|---|
vps9 firewall <server> |
The rules, numbered, and whether they're applied |
vps9 firewall <server> allow tcp 22 from 198.51.100.0/24 |
Add a rule (deny, and udp, icmp, any too) |
vps9 firewall <server> allow tcp 8000-8100 |
A port range, from anywhere |
vps9 firewall <server> rm 2 |
Remove rule 2 |
vps9 firewall <server> policy deny |
Drop anything no rule allows |
vps9 firewall <server> set rules.json --policy deny |
Replace every rule from a file (- reads stdin) |
Each change saves with the version it read, so it never overwrites someone else's edit. The panel firewall guide explains the rules.
Reverse DNS, rescue, keys
| Command | Does |
|---|---|
vps9 rdns <server> |
Reverse DNS for each address |
vps9 rdns <server> set 203.0.113.10 mail.example.com |
Set it (the name must already resolve to the address) |
vps9 rdns <server> rm 203.0.113.10 |
Clear it |
vps9 rescue on <server> |
Boot into rescue mode; prints a one-time root password |
vps9 rescue status <server> |
Where rescue stands |
vps9 rescue off <server> |
Boot from its own disk again |
vps9 keys |
Your SSH keys |
vps9 keys add laptop ~/.ssh/id_ed25519.pub |
Add one (- reads stdin) |
vps9 keys rm laptop |
Remove one; asks you to type its name |
Billing and invoices
| Command | Does |
|---|---|
vps9 billing |
Your credit, what is due in the next 30 days, each server's next charge and your open invoices (vps9 billing upcoming too) |
vps9 billing credit |
Credit movements, newest first, with the balance after each (--limit 500 for more) |
vps9 billing topup 25 |
Add funds: makes a $25.00 top-up invoice and prints its checkout link (--method paypal or btcpay) |
vps9 billing profile |
The name, address and VAT or tax ID your invoices are made out to |
vps9 billing profile set --company "Acme Ltd" --tax-id GB123456789 |
Change only the fields you give (--name, --address1, --address2, --city, --region, --postal-code, --country) |
vps9 billing redeem GIFT-7K2M-Q9XD-4HNP-R3TB |
Redeem a gift card into account credit |
vps9 invoices |
Your invoices, newest first |
vps9 invoices show VPS9-000042 |
One invoice with its lines |
Tickets
| Command | Does |
|---|---|
vps9 tickets |
Your support tickets |
vps9 tickets open --subject "Port 25" --category technical --server web-1 "message" |
Open one (- reads the message from stdin) |
vps9 tickets show <id> |
One ticket |
vps9 tickets reply <id> "message" |
Reply |
vps9 tickets close <id> |
Close it |
Scripting
| Use | How |
|---|---|
| JSON instead of a table | vps9 --json servers (lists print the array) |
| No questions | --yes (destructive commands otherwise ask for the hostname) |
| Another token | VPS9_TOKEN=vps9_… vps9 servers (wins over the saved login) |
| Tab completion | source <(vps9 completion bash) (also zsh, fish, powershell) |
With jq, the running servers' IPv4 addresses, and a loop that waits until a server's action has finished:
vps9 --json servers | jq -r '.[] | select(.state == "running") | .ipv4'
until [ "$(vps9 --json servers show web-1 | jq -r .pendingAction)" = "null" ]; do sleep 5; doneExit codes: 0 worked, 1 failed (the API's message and request id go to stderr), 2 the command line was wrong.
Check it worked
vps9 whoami && vps9 serversYour email, then a table of your servers, means the token and the API address are right.
Troubleshooting
vps9: not logged in: run vps9 login (or set VPS9_TOKEN). There's no saved token and no VPS9_TOKEN. Run vps9 login < ~/.vps9-token.
vps9: This token does not have the write scope. The token is read-only. Make a read-and-write one for commands that change things.
vps9: no server named "web-1". No server on this account has that hostname. vps9 servers lists the names; on a team, vps9 whoami shows which account the token acts on.
vps9: Too many requests: 60 a minute per token. A loop is calling too fast; each command makes one to three requests. See Rate limits and request ids.
Doing it on VPSNine
Every command here works on the plans you can order, and the developer hub links the API and SDK that the CLI is built on.