If you're managing more than a handful of services, the dashboard stops being the right tool. You want to script things: snapshot before a deploy, rotate an IP that landed on a blocklist, spin up a throwaway server for a load test and tear it down an hour later. That's what the CLI is for.
This tutorial walks through install, auth, and the commands you'll actually run day to day.
Install
The CLI is a single Go binary β no runtime, no dependencies.
One-line install on Linux or macOS:
curl -fsSL https://raw.githubusercontent.com/RareCloudio/rarecloud-cli/main/install.sh | sh
Or with Homebrew (macOS or Linux):
brew install rarecloudio/tap/rarecloud
Or grab a standalone build for your platform β macOS (.tar.gz), Linux (.deb, .rpm, .tar.gz) or Windows (.zip) β from the GitHub releases page, put it on your $PATH, and make it executable:
# Pick the asset matching your OS + architecture from the releases page, then:
chmod +x rarecloud
sudo mv rarecloud /usr/local/bin/
On Windows, download the .zip, extract rarecloud.exe, and drop it in a folder on your PATH. Once installed, rarecloud upgrade self-updates the binary in place.
Confirm it works:
$ rarecloud --version
rarecloud 0.1.1 (commit abc1234, built 2026-06-16)
Authenticate
Create an API token in the dashboard at Account β API tokens β New token. Scope it to what the script needs, services:read for monitoring, services:write if you'll be creating or destroying resources. Tokens are shown once; copy it immediately.
Then:
$ rarecloud login
Paste your API token (input hidden):
β Logged in as daniel@example.com (token: ****abc1)
The CLI stores the token in ~/.config/rarecloud/config.toml. For CI, skip rarecloud login and export RARECLOUD_TOKEN directly.
The commands you'll actually use
Listing your resources
$ rarecloud server list
ID NAME STATUS REGION IPV4 PLAN
srv_01H8E9... api-prod-1 active frankfurt-de 85.121.241.12 plus-vps
srv_01H8EA... worker-2 active the-hague-nl 85.121.55.41 core-vps
srv_01H8EB... test-burner suspended frankfurt-de 85.121.241.18 core-vps
Add --output json | jq for machine-readable output and you have a one-liner for any monitoring dashboard.
Back up before a deploy
The classic pattern: back up your prod VPS, deploy the new code, restore if something blows up.
$ rarecloud server backup create srv_01H8E9...
β Backup creation queued for srv_01H8E9...
Confirm it landed:
$ rarecloud server backup list srv_01H8E9...
ID CREATED STATUS
bkp_01H8EC... 2026-05-20T14:02:11Z available
Now ship your deploy. If it breaks, restore that backup from the dashboard (Servers β your VPS β Backups) to roll back to the pre-deploy state.
Spin up a throwaway server
For a load test, a CI runner, or trying a new tool:
# --ssh-key takes a registered key id/name (see `rarecloud ssh-key list`),
# not a file path. Register your key once with `rarecloud ssh-key add`.
$ rarecloud server create \
--plan core-vps \
--region frankfurt-de \
--image ubuntu-24.04 \
--ssh-key my-laptop \
--name loadtest-$(date +%s)
β Server provisioned: srv_01H8ED...
IPv4: 85.121.241.99
Use it, then:
$ rarecloud server destroy srv_01H8ED... --yes
β Server destroyed
Get an out-of-band console when SSH is down
$ rarecloud server console srv_01H8E9...
This returns a web console (noVNC) URL for the server. Handy when SSH is locked out (firewall misconfig, network-rule mistake) and you need browser-based console access to fix it.
Check your credit balance from a script
$ rarecloud credit balance --output json | jq -r '.available.amount'
127.45
Use in a CI hook to warn when you're running low.
Scripting patterns
A short bash snippet that backs up all your VPSes nightly:
#!/usr/bin/env bash
set -euo pipefail
rarecloud server list --output json | \
jq -r '.[].id' | \
while read -r SRV; do
rarecloud server backup create "$SRV"
done
Throw it in a cron, point a Healthchecks.io URL at it for monitoring, done.
Where to go next
- Terraform-managed VPS, when you want declarative infrastructure instead of imperative scripts.
- VPS API for AI agents, same API surface from Claude / Cursor / your own agents.
- Full command reference:
rarecloud --helpor docs.rarecloud.io/cli.