Skip to main content
A Sailbox keeps running after your client disconnects. Sleep or pause it to keep its state (which includes both memory and filesystem state), or terminate it when you are done. The SDK examples below use an existing Sailbox named sb.

Sleep

Sleep an idle service that should wake on its next request:
Sail can also sleep idle Sailboxes automatically. See Autosleep to change the idle period or keep a Sailbox awake.

Pause

Pause when you want to preserve state without waking on incoming requests:

Resume

Resume a paused or sleeping Sailbox. This operation is idempotent.
Keep using the same SDK object after resuming. Use wake_at to schedule a wake. See scheduled wakes for examples and automatic wake behavior.

Limit the lifetime

Set a wall-clock deadline when creating a Sailbox. It includes time spent sleeping or paused and ends in termination, not sleep.
Omit the option for no fixed lifetime. It also works when creating a Sailbox from a checkpoint.

Checkpoints with volumes

Checkpoints save the Sailbox’s local disk and memory, not volume contents. Copies reattach the same live volumes, so volume changes remain shared. See checkpoints.

Upgrade

An upgrade installs the latest Sailbox runtime and reboots on the same disk. Processes restart. See upgrade for behavior while asleep.

Reboot

Reboot on the current disk without requesting a runtime upgrade. Use systemd for services that should start at boot.

Set limits

Limits cap what the workload can use. Ongoing charges follow actual usage. CPU and memory limits are independent, and explicit limits round up to powers of two. Disk limits can only increase. See set_limits for supported ranges and in-place updates.

Terminate

Termination is permanent. Save a checkpoint first if you need to create another Sailbox from this state. A terminated Sailbox stays visible to get and list for at least a day after its last change. After that, Sail may remove its record, and get for its id returns a not-found error. Your usage and billing history are kept.