> ## Documentation Index
> Fetch the complete documentation index at: https://e2b.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://e2b.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://e2b.manicule.dev/api/mcp.
> Every agent surface: https://e2b.manicule.dev/.well-known/llms-manifest.json

# Volumes (/docs/volumes)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 470 · updated: 2026-07-30 -->
Related: [API key](/docs/api-key.md), [Billing & limits](/docs/billing.md), [E2B CLI](/docs/cli.md), [Running commands in sandbox](/docs/commands.md), [Cookbook](https://github.com/e2b-dev/e2b-cookbook), [Filesystem](/docs/filesystem.md)

> Persistent storage that exists independently of sandboxes and can be mounted across multiple sandboxes.

<Note>Volumes are currently in private beta.
If you'd like access, please reach out to us at [support@e2b.dev](mailto:support@e2b.dev).</Note>

Volumes provide persistent storage that exists independently of sandbox lifecycles. Data written to a volume persists even after a sandbox is shut down, and volumes can be mounted to multiple sandboxes over time.

**One volume shared across multiple sandboxes**

```mermaid actions={false}
graph LR
  V1[Volume A] --- S1[Sandbox 1]
  V1 --- S2[Sandbox 2]
  V1 --- S3[Sandbox 3]
```

**Each sandbox with its own volume**

```mermaid actions={false}
graph LR
  V2[Volume A] --- S4[Sandbox 1]
  V3[Volume B] --- S5[Sandbox 2]
```

**Standalone usage via SDK**

```mermaid actions={false}
graph LR
  SDK[SDK] --- V4[Volume A]
  SDK --- V5[Volume B]
```

When a volume is mounted to a sandbox, files can be read and written directly at the mount path. The SDK methods are meant to be used when the volume is not mounted to any sandbox.

With E2B SDK you can:

* [Manage volumes.](/docs/volumes/manage)
* [Mount volumes to sandboxes.](/docs/volumes/mount)
* [Read and write files to a volume.](/docs/volumes/read-write)
* [Get file and directory metadata.](/docs/volumes/info)
* [Upload data to a volume.](/docs/volumes/upload)
* [Download data from a volume.](/docs/volumes/download)

## Example

<CodeGroup>
```js title="JavaScript & TypeScript"
import { Volume, Sandbox } from 'e2b'

const volume = await Volume.create('my-volume')

const sandbox = await Sandbox.create({
  volumeMounts: {
    '/mnt/my-data': volume,
  },
})
```

```python title="Python"
from e2b import Volume, Sandbox

volume = Volume.create('my-volume')

sandbox = Sandbox.create(
    volume_mounts={
        '/mnt/my-data': volume,
    },
)
```
</CodeGroup>
