Stop & Start
Warm-stop a persistent sandbox to free compute, and start it again later.
Stopping a sandbox shuts down its virtual machine and releases the CPU, memory, and network identity it was using, while keeping its filesystem intact on durable storage. Starting it later boots the same filesystem again, so everything you installed or wrote to disk is exactly where you left it. This makes stop/start the cheapest way to keep an environment around between work sessions without paying for idle compute.
Stop and start are available only for persistent sandboxes — sandboxes created with persistent: true. See Persistent Sandboxes for what that flag does and what it costs.
How stop works
POST /vms/:id/stop kills the sandbox's compute but preserves its write layer. The sandbox moves through running → stopping → stopped, and stays stopped indefinitely — Daytona never auto-deletes a stopped persistent sandbox.
Two things to keep in mind:
- Processes do not survive a stop. Stop is a shutdown, not a freeze. If you need running processes and in-memory state to survive, use Pause & Resume instead.
- Ephemeral sandboxes cannot stop. A sandbox created without
persistent: truehas no durable write layer, so the API refuses the stop with409 Conflict(the SDKs surface this as a not-supported error). Delete it and recreate instead.
How start works
POST /vms/:id/start boots the stopped sandbox again. Because the filesystem lives on durable storage rather than on any particular machine, the sandbox may come back on different hardware than it ran on before, and it always gets a fresh IP address. Anything that cached the old network identity (long-lived connections, addresses you wrote down) needs to reconnect after a start; preview endpoint URLs and tokens stay stable across a warm stop/start.
The SDK start() call waits until the sandbox is running (or raises after timeout seconds).
Billing while stopped
A stopped sandbox bills storage only — you pay for the disk space its filesystem occupies, and nothing for CPU or memory. This is what makes stop/start a good fit for environments you use intermittently.
Examples
Stop a persistent sandbox at the end of a task and start it again the next day:
Note:
daytona.stop(sandbox)anddaytona.start(sandbox, timeout)are equivalent client-level helpers if you prefer calling through the top-level client.
Choosing the right lifecycle operation
Stop/start is one of three ways to put a sandbox aside. Pick based on what you need to survive:
| You need to keep | Use | Survives | Billing while parked |
|---|---|---|---|
| Filesystem only | Stop / Start | Disk contents | Storage only |
| Filesystem + memory + running processes | Pause / Resume | Disk + RAM + processes | Storage only |
| Nothing | Delete (+ recreate later) | Nothing | Nothing |
Stop/start also works in cases pause refuses in v1 — sandboxes with attached volumes or a Docker data device can always warm stop/start.
See also
- Persistent Sandboxes — the
persistent: trueflag and its tradeoffs. - Pause & Resume — when processes must survive.
- Fork — duplicate instead of parking.