boxd with sudo, Docker, Node, Python, Go and git) with a persistent
disk and a public HTTPS URL. Connect an account with an API key from
boxd auth keys create <name> --org <org> or the boxd console. A key
belongs to one org: machines are created and listed there unless an
operation gets org, or the plugin is set up with boxd({ org: 'acme' }).
boxd({ region: 'fra' }) pins the region the same way.
- The SDK. Everything goes over gRPC through boxd’s official SDK, so the
plugin runs on Node 20 or newer. The SDK loads the first time an operation
runs; each call makes its own client from the account’s key and closes it
after. The host’s
BOXD_API_KEY,BOXD_TOKEN,BOXD_BASE_URLandBOXD_REGIONare never used for an account. - Money. A machine bills while it runs.
machines.create,fork,start,wake,resumeandexec(it can wake a hibernated machine) aredestructive, as arestop(memory is lost), every delete,files.removeandsnapshots.create(saving over a name changes what later restores get). A hibernated machine keeps its memory and processes on disk and stops using compute;machines.hibernateiswrite. - Isolation.
machines.createmakes isolated machines unless it getsisolated: false: they join no network with the org’s other machines and hold no boxd credentials, so code they run can’t reach either. - Ready means ready.
machines.create,fork,startandwakewait until the machine runs and answers a command, unlesswaitUntilReadyis false. If the wait fails, the error (504 on timeout) carries themachineIdof the machine that exists: wait again or delete it.snapshots.createwaits until the version it saved isready. - Commands.
machines.execruns a shell line or an argv array as userboxd, withenvandcwd, and returns the exit code, stdout and stderr (each capped atmaxOutputBytes, 1 MB by default, while it streams). It ends the command aftertimeoutMs(5 minutes by default, 30 at most) with a 504. stdin is closed. A machine in standby or hibernated wakes by itself; a stopped one answers 409 untilmachines.start. - Files go as text or base64.
files.downloadrefuses a file larger thanmaxBytes(5 MB by default) with a 413. - Publishing.
proxies.createputs a port of the machine on its own HTTPS URL (https://<name>.<machine>.boxd.sh), which answers once its certificate is issued, about 15 seconds. The machine’s default URL has bot protection (botProtectionon a machine): browsers pass, API clients and webhooks don’t, so give those a named route.ports.exposeforwards a raw TCP or UDP port (at most 3 per machine). - Checkpoints save one machine in place, memory and disk:
checkpoints.restorereboots it into the checkpoint, and everything since is lost. Snapshots instead make new machines. - Retries. Only reads are retried: by the SDK on a connection failure, and by the plugin on a plain rate limit. Writes and multi-step operations (create, fork, start, wake, snapshots.create) are sent once.
- Not wrapped: machine specs and settings (resize, rename, reboot, delete-after timers, bot protection, SSH), custom domains, networks and egress rules, backups, disks, snapshot versions, the desktop and computer use API, coding agent sessions, env vars and secrets, org and account settings, and API keys.
- 35 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the boxd API key before the first call: More: API Key
pnpm corsair setup --plugin=boxd --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List machines with a labelWhat’s next
API reference
Every
boxd.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.