Blog / The natbox API and command-line tool
Control your natbox servers from code: the natbox API and command-line tool
6 December 2026 · Announcement · By Mohammad AlSaraf
Until now, managing a natbox server meant opening the client area: Manage to restart it, Snapshots before an update, Reinstall for a fresh start. All of that now also works from a script, a CI job or an AI agent, with the natbox API and the natbox command-line tool. It's included on every plan, from the free trial to Box Max.

What it can do
- List your servers and see each one's state, SSH command, ports and IPv6 block.
- Start, stop and restart.
- Reset the root password.
- Reinstall with any of our ten operating systems.
- Take, restore and delete snapshots.
- Read memory, disk and traffic use, and the same CPU and network history as the Graphs tab.
Get started in a minute
In the client area, open the account menu and pick API keys. Create a key with Full access, or Read only for dashboards and monitoring. Then, on Linux or macOS:
mkdir -p ~/.local/bin
curl -fsSL https://natbox.io/assets/downloads/natbox -o ~/.local/bin/natbox
chmod +x ~/.local/bin/natbox
natbox login
natbox list
The tool is a single Python file with nothing else to install. natbox ssh vps123 connects you without looking up the port, and natbox reinstall vps123 debian13 gives you a clean server and waits until it's ready. Prefer plain HTTP? Everything is a JSON API at https://my.natbox.io/api/natbox/v1:
curl -X POST -H "Authorization: Bearer $NATBOX_API_KEY" \
https://my.natbox.io/api/natbox/v1/servers/123/restart
A few ideas
- Deploys: restart your app's server at the end of a GitHub Actions run.
- Safe updates: a nightly snapshot from cron, so a bad update is one restore away.
- Test servers: reinstall a Nano before each test run and start from a clean system every time.
- AI agents: give a coding agent a read-only key to check on your servers, or a full key for a server you use for experiments. Our API page is written so an agent can read it and use the API.
Built to be safe
- We show a key once and keep only a scrambled copy of it. Delete a key and it stops working straight away.
- We email you every time a key is created on your account.
- A key only reaches your own servers, never billing, invoices or your password.
- A reinstall needs the server's name as confirmation, and there are the same limits as in the client area: 10 changes a minute per account.
The full reference, with every endpoint and error, is on the API page. Missing something you'd use? Tell us in a ticket or on Telegram.
Get new tutorials in Telegram. Follow @natboxio: every new post, plus short server tips.
More from the blog: Is your server ready for quantum computers? We checked every natbox image, Ten operating systems on every natbox server, free trial included, November 2026 uptime report: 21 problems, and what caused them. RSS feed.