Overview
Persistent volumes store data that survives sandbox restarts. With one volume per sandbox, the recommended approach is to mount your entire workspace.Prerequisites
- Installed the Sandbox SDK (see Quickstart)
- Created a sandbox instance
- Basic understanding of file paths
Quick start
Mount a volume at/workspace to persist your entire project:
Current limitation: only one volume per sandbox. Mount your entire workspace at
/workspace or /app to persist everything.Creating volumes
Simple volume (1GB default)
Custom volume size
Specify size in gigabytes (1-100 GB):Volume lifecycle
- Create: Volume is created automatically on first use
- Persist: Data remains after sandbox deletion
- Reuse: Mount by name in new sandboxes
- Delete: Explicitly delete when no longer needed
Common workflows
Full workspace persistence
Mount at/workspace to persist code, dependencies, and build artifacts:
Iterative development
Database persistence
For services that only need data storage:Volume management
Volume attachment
Only one sandbox can use a volume at a time:Regional constraints
Volumes and sandboxes must be in the same region:Volume naming rules
- Lowercase letters, numbers, and underscores only
- Maximum 30 characters
Error handling
Common errors
Best practices
Limitations
- One volume per sandbox: Current limitation
- Size range: 1-100 GB per volume
- Regional binding: Volumes cannot move between regions
- Single attachment: One volume attached to one sandbox at a time
- No resizing: Volume size is fixed at creation
- Beta feature: Not currently billed (pricing TBA before GA)
Pricing
Persistent volumes are free during beta. Pricing will be announced before general availability.
Next steps
File Operations
Read and write files to mounted volumes
Command Execution
Run commands that use persistent storage
Quickstart
Get started with the Sandbox SDK
API Reference
Explore the complete API documentation