---
title: Migrate to Vercel Sandbox
description: Move sandbox workloads to Vercel Sandbox from Cloudflare Sandbox, E2B, Freestyle VMs, Modal Sandboxes, or Upstash Box with a migration guide for each...
url: "https://vercel.com/docs/sandbox/migrate"
last_updated: 2018-10-20
related:
  - /docs/sandbox/sdk/javascript
  - /docs/sandbox/sdk/python
  - /docs/sandbox/concepts/authentication
  - /docs/sandbox/concepts/persistent-sandboxes
  - /docs/sandbox/concepts/images
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# Migrate to Vercel Sandbox

To move sandbox workloads to Vercel Sandbox, replace your current provider's SDK calls with the [JavaScript](/docs/sandbox/sdk/javascript) or [Python](/docs/sandbox/sdk/python) SDK, then adapt your image setup, file persistence, and network rules.

Your application doesn't have to move to Vercel. A backend on any host can create sandboxes with an [access token](/docs/sandbox/concepts/authentication#access-tokens).

## What changes when you migrate

These behaviors apply whichever provider you migrate from:

- **Files persist, processes don't**: Sandboxes are [persistent](/docs/sandbox/concepts/persistent-sandboxes) by default. Stopping a sandbox saves its files. Look it up by name later, and the next command or file operation resumes it. Restart your processes after each resume, for example with the [`onResume` hook](/docs/sandbox/concepts/persistent-sandboxes#lifecycle-hooks).
- **Images don't start processes**: Vercel Sandbox doesn't run a [custom image's](/docs/sandbox/concepts/images#custom-images) `ENTRYPOINT` or `CMD`. Start processes with `sandbox.runCommand()` after you create the sandbox.
- **Outbound traffic is allowed by default**: The default [network policy](/docs/sandbox/concepts/firewall#network-policies) is `allow-all`. If your current provider blocks outbound traffic by default, set `deny-all` or an allow list when you create the sandbox.
- **Sessions end at a timeout**: A session stops after 5 minutes unless you set `timeout`. Set a timeout that covers the work, within your plan's [runtime limit](/docs/sandbox/pricing#runtime-limits).
- **Memory scales with vCPUs**: Each vCPU includes 2 GB of [memory](/docs/sandbox/pricing#provisioned-memory), so choose a vCPU count that covers your peak memory use.

## Migration guides by provider

Each guide maps the provider's features to Vercel Sandbox, lists the features that need a different design, and walks through a cutover that runs both providers side by side. Each guide also includes a prompt that has your coding agent prepare the migration.

To compare providers before you migrate, see [Vercel Sandbox vs other AI sandbox providers](/docs/sandbox/concepts#vercel-sandbox-vs-other-ai-sandbox-providers).

### Cloudflare Sandbox

Cloudflare Sandbox runs containers that a Durable Object controls, and a stopped instance loses its disk unless your code saved a snapshot or a backup. [Migrate from Cloudflare Sandbox to Vercel Sandbox](/kb/guide/migrate-from-cloudflare-sandbox-to-vercel-sandbox) moves the container calls to a Node.js or Python backend and replaces snapshot IDs and R2 backups with named persistent sandboxes and Drives.

### E2B

E2B deletes a sandbox and its files at the timeout unless you pause it, and a pause keeps memory and running processes. [Migrate from E2B to Vercel Sandbox](/kb/guide/migrate-from-e2b-to-vercel-sandbox) maps templates to images, pause and resume to named persistent sandboxes, and Volumes to Drives.

### Freestyle VMs

Freestyle pauses keep memory and running processes, and a VM has no network access until a firewall rule allows it. [Migrate from Freestyle VMs to Vercel Sandbox](/kb/guide/migrate-from-freestyle-vms-to-vercel-sandbox) rebuilds snapshots as images and maps lifecycle fields, domains, and firewall rules to session timeouts, public ports, and a network policy.

### Modal Sandboxes

Modal discards a Sandbox's root filesystem changes when it terminates unless you take a snapshot. [Migrate from Modal Sandboxes to Vercel Sandbox](/kb/guide/migrate-from-modal-sandboxes-to-vercel-sandbox) maps Apps to Vercel projects, Volumes to Drives, and tunnels to public ports, and covers alternatives for GPUs and memory snapshots.

### Upstash Box

Upstash Box also preserves files by default, but a standard box pauses when idle and wakes when new work arrives. [Migrate from Upstash Box to Vercel Sandbox](/kb/guide/migrate-from-upstash-box-to-vercel-sandbox) maps runtimes to images and box IDs to named sandboxes, and covers alternatives for Box's coding agent API, schedules, and managed browser.

If your provider isn't listed, start with the [quickstart](/docs/sandbox/quickstart) and the [SDK reference](/docs/sandbox/sdk).

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
