When To Use Volumes
| Need | Use Volumes? |
|---|---|
| Persist files after a sandbox is destroyed | Yes. Volume data is external to VM memory and rootfs snapshots. |
| Share files across sandboxes | Yes, mount the same volume where supported by deployment configuration. |
| Keep live VM memory or process state | No. Use hibernate/auto-resume for VM state. |
| Move large datasets in and out | Yes, use volume upload/download or direct volume file APIs. |
| Store application database state | Use a database when you need transactional semantics. |
Quick Example
The Python SDK and CLI snippets below are equivalent ways to create a volume, write data, and mount it into a new sandbox. Use one control plane unless you are intentionally handing a volume name or sandbox ID between tools.Mounts Vs Direct File APIs
| Operation | Use |
|---|---|
| Sandbox code reads and writes data | Mount the volume into the sandbox. |
| Your controller app manages durable files | Use volume.files.* APIs directly. |
| Attach data to an already running sandbox | Use runtime volume attachment. |
| Inspect or transfer data without compute | Use volume list, read, write, upload, and download commands. |
Volume Tasks
Managing volumes
Create, list, inspect, field-select, and delete volume metadata.
Mounting volumes
Attach volumes at create time or runtime, including read-only and subpath mounts.
Read and write
Read, write, batch-write, move, remove, and edit direct volume files.
File and directory metadata
List directories, stat paths, check existence, search, replace, and watch changes.
Upload data
Upload files, directories, stdin streams, and resumable transfers into volumes.
Download data
Download files, directories, archives, and signed URLs from volumes.
Behavior
Shared volume data is external to VM memory and mutable rootfs snapshots. Hibernate, resume, and fork remount shared volumes; they do not make external storage part of VM memory snapshots. Runtime attachment operations return attachment records withmounted,
released, or failed state. Destroying the sandbox releases remaining
attachments. Hibernating or pausing a sandbox releases live mount leases while
the VM is stopped, but it preserves attachment intent and remounts those
volumes on resume.
In hosted private beta, auto-grow is currently disabled and the default cap is
2 GiB per volume unless an operator has applied a tenant-specific override.
There is no public resize API for private beta.