Skip to main content
Beta Feature: Persistent volumes are in beta and currently free (not billed). Pricing will be announced before general availability.

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

  1. Create: Volume is created automatically on first use
  2. Persist: Data remains after sandbox deletion
  3. Reuse: Mount by name in new sandboxes
  4. 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

Mount at /workspace or /app: With one volume per sandbox, mount your entire project to persist code, dependencies, and build artifacts together.
Use descriptive names: Name volumes by project or purpose (ml_project, api_backend) rather than generic names (volume1, data).
Right-size volumes: Start with 1-5 GB and increase if needed. Volumes cannot be resized after creation.
One volume per sandbox: You can only mount one volume per sandbox. Choose your mount point carefully.
Single attachment: A volume can only be attached to one sandbox at a time. Delete the sandbox to release the volume.

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