Checkpoints
create
checkpoints.create
Save a running machine (memory and disk) as a named checkpoint, e.g. before a risky change; the machine keeps running. checkpoints.restore puts the machine back to it. Waits until it is “ready” unless waitUntilReady is false.
Risk: write
delete
checkpoints.delete
Delete a checkpoint of a machine. The machine is not affected.
Risk: destructive · Irreversible
list
checkpoints.list
List a machine’s checkpoints and whether each can be restored now.
Risk: read
checkpoints full type
checkpoints full type
restore
checkpoints.restore
Put a machine back to a “ready” checkpoint: it reboots into the saved memory and disk, and everything since the checkpoint is lost. Returns once the machine runs again.
Risk: destructive · Irreversible
Files
download
files.download
Read a file from a machine, as UTF-8 text or base64 for binary files.
Risk: read
list
files.list
List a directory on a machine (not recursive).
Risk: read
entries full type
entries full type
makeDirectory
files.makeDirectory
Create a directory on a machine, with any missing parents. An existing directory is fine.
Risk: write
remove
files.remove
Delete a file, or a directory with recursive. 404 if the path does not exist.
Risk: destructive · Irreversible
stat
files.stat
Get the type, size, mode and modification time of a path on a machine. 404 if it does not exist.
Risk: read
upload
files.upload
Write a file on a machine, replacing any file at that path. Missing parent directories are created.
Risk: write
Machines
create
machines.create
Create a machine: a fresh Ubuntu 24.04 VM (user boxd with sudo, Docker, Node, Python, Go, git), or a copy of a snapshot with fromSnapshot. It runs, and bills, until it is stopped, hibernated or deleted. Isolated by default.
Risk: destructive
org full type
org full type
source full type
source full type
idle full type
idle full type
delete
machines.delete
Delete a machine for good: its disk, memory and processes are gone. Its snapshots stay.
Risk: destructive · Irreversible
exec
machines.exec
Run a command on a machine as user boxd and wait for it: returns the exit code, stdout and stderr. Pass a shell line (“cd app && npm test”) or an argv array. A standby or hibernated machine wakes by itself; a stopped one needs machines.start first (409 otherwise). stdin is closed.
Risk: destructive
fork
machines.fork
Fork a running machine: a new machine with a copy of its disk, memory and running processes. The fork keeps the source’s labels (merged with labels) and its isolation.
Risk: destructive
org full type
org full type
source full type
source full type
idle full type
idle full type
get
machines.get
Get one machine by id or name: status, size, region, labels, URL and where it came from.
Risk: read
org full type
org full type
source full type
source full type
idle full type
idle full type
hibernate
machines.hibernate
Hibernate a running or standby machine: memory and running processes go to disk and it stops using compute. machines.wake, machines.exec or a request to its URL bring it back as it was. The status can read “suspended” for a moment before “hibernated”.
Risk: write
org full type
org full type
source full type
source full type
idle full type
idle full type
list
machines.list
List the org’s machines in one region, optionally only those with given labels.
Risk: read
machines full type
machines full type
elsewhere full type
elsewhere full type
pause
machines.pause
Put a running machine in standby: memory stays in place and it resumes in about a millisecond, by itself on the next request or with machines.resume.
Risk: write
org full type
org full type
source full type
source full type
idle full type
idle full type
resume
machines.resume
Resume a machine in standby (see machines.pause). Fails with 409 if it is not in standby.
Risk: destructive
org full type
org full type
source full type
source full type
idle full type
idle full type
start
machines.start
Boot a stopped machine (a cold boot: the disk is kept, memory is not). Does nothing to a running one.
Risk: destructive
org full type
org full type
source full type
source full type
idle full type
idle full type
stop
machines.stop
Shut a machine down. The disk is kept; memory and running processes are lost. machines.start boots it again. To keep processes, use machines.hibernate.
Risk: destructive
org full type
org full type
source full type
source full type
idle full type
idle full type
updateLabels
machines.updateLabels
Add, change or remove a machine’s labels in one change. Returns the labels now in effect.
Risk: write
waitUntilReady
machines.waitUntilReady
Wait until a machine is running and answers a command, e.g. after create or fork with waitUntilReady false.
Risk: read
org full type
org full type
source full type
source full type
idle full type
idle full type
wake
machines.wake
Wake a hibernated machine with its memory and processes as they were. Does nothing to a running one.
Risk: destructive
org full type
org full type
source full type
source full type
idle full type
idle full type
Ports
expose
ports.expose
Forward a raw TCP or UDP port of a machine (a database, SSH-like or game server, anything not HTTP) to a public port on the internet; at most 3 per machine. For HTTP use proxies.create. Exposing the same machine port again keeps its public port and changes only the protocol.
Risk: write
list
ports.list
List raw TCP/UDP port forwards: one machine’s, or every machine’s when machineId is omitted.
Risk: read
ports full type
ports full type
unexpose
ports.unexpose
Remove a raw port forward and free its public port; exposing it again may get another public port. Returns the forward that was removed.
Risk: destructive
Proxies
create
proxies.create
Publish a port of a machine on its own public HTTPS URL, https://<name>.<machine>.boxd.sh, e.g. an API next to the app on the default route. Anyone with the URL can reach it: unlike the default route, a named route has no bot protection, so webhooks and API clients get through. A new route answers once its TLS certificate is issued, about 15 seconds.
Risk: write
delete
proxies.delete
Remove a named HTTPS route from a machine. The default route stays; the port keeps running in the machine.
Risk: destructive
list
proxies.list
List a machine’s HTTPS routes: its default route (https://<machine>.boxd.sh) and every named one, with the port each forwards to.
Risk: read
proxies full type
proxies full type
setPort
proxies.setPort
Point a route at another port in the machine. Without name it changes the default route, which also takes “auto”: boxd then follows the port the app listens on (80, 443, 8080, 8000, 3000, 5000, 5173).
Risk: write
proxies full type
proxies full type
Snapshots
create
snapshots.create
Save a running machine’s disk and memory as a named snapshot; the machine keeps running. Saving over an existing name makes a new version that new machines get from then on, and the org keeps only its newest versions, so an old one can be dropped. machines.create with fromSnapshot makes new machines from it.
Risk: destructive
delete
snapshots.delete
Delete a snapshot and every version it keeps. Machines made from it are not affected.
Risk: destructive · Irreversible
get
snapshots.get
Get one snapshot by name or id.
Risk: read
list
snapshots.list
List the org’s snapshots in one region.
Risk: read
snapshots full type
snapshots full type
elsewhere full type
elsewhere full type