Vercel Sandbox vs Cloudflare Sandbox

Both run each sandbox in a Firecracker microVM with its own kernel. Vercel Sandbox saves your files when a session stops but ends every session after 24 hours; Cloudflare Sandbox lives inside Workers, sleeps when idle, wakes on the next request, and starts from a fresh disk after sleep.

The companies and products

Vercel Sandbox

Vercel is a cloud platform for web apps and agents, and Vercel Sandbox is its product for running untrusted or agent-written code in isolated Linux microVMs.

Each sandbox is a Firecracker microVM with its own kernel, started from a Vercel image, your own OCI image, or a saved snapshot. You drive it with the JavaScript or Python SDK or the sandbox CLI: run commands, move files, open ports, and set network rules. It is aimed at code interpreters, app builders, test runs and agent tools, and Vercel's docs say it is not meant to run nonstop.

Cloudflare Sandbox

Cloudflare Sandbox SDK runs untrusted or AI-generated code in Linux containers on Cloudflare's network, driven from a Cloudflare Worker.

Each sandbox is a Cloudflare Container backed by a Durable Object, and each container runs in its own Firecracker microVM with its own kernel and network. You build a linux/amd64 image, pick an instance type of up to 4 vCPU and 12 GiB, and reach the sandbox through your own Worker. It suits teams already on Workers who want short-lived sandboxes that sleep when idle; for code that only calls known methods, Cloudflare also offers Dynamic Workers, which run JavaScript in V8 isolates.

Which use cases each one fits

For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “22nd cheapest of 345” means 21 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.

Use case and its workloadVercel Sandbox: price rankCloudflare Sandbox: price rankbochka: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
Neither has a desktop or browser for an agent to check the UI it built, and Vercel stops at 24 hours while Cloudflare resets its disk on sleep; bochka has both and keeps its files.
244th of 367, with limits
$3,351 a month
162nd of 367, with limits
$1,543 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
Always-on assistants need to keep running and keep their files: Vercel stops each session at 24 hours, Cloudflare wipes the disk on sleep, and bochka has no session cap on paid plans.
257th of 366, with limits
$3,657 a month
207th of 366, with limits
$2,188 a month
5th cheapest of 366
$657 a month
Code interpreter bursts
100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month
Both fit short code-interpreter calls well, since each bills CPU only while code uses it; Cloudflare also wakes a sleeping sandbox on the next request.
22nd cheapest of 345
$216 a month
13th cheapest of 345
$144 a month
186th of 345, with limits
$2,000 a month
Sandboxes for your users
300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month
Both fit sandboxes for your users; on cost Cloudflare Sandbox ranks 9th, Vercel Sandbox ranks 15th and bochka ranks first.
15th cheapest of 361
$1,267 a month
9th cheapest of 361
$731 a month
Cheapest of 361
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
Vercel fits many short parallel rollouts well, while Cloudflare's 1,500 vCPU account cap makes it a compromise for large runs.
3rd cheapest of 360
$15,761 a month
144th of 360, with limits
$9,428 a month
34th of 360, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
69th cheapest of 364
$1,508 a month
45th cheapest of 364
$818 a month
10th cheapest of 364
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
Vercel runs Docker with sudo and fits CI; Cloudflare's 20 GB disk and Docker with iptables turned off make it a compromise, and bochka gives full Docker on a full VM.
107th cheapest of 377
$1,144 a month
301st of 377, with limits
$704 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
A dev box that stays up all day restarts every 24 hours on Vercel; Cloudflare has no fixed session cap, and bochka keeps its disk across free stops.
276th of 368, with limits
$145 a month
70th cheapest of 368
$93 a month
18th cheapest of 368
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Neither ships a desktop today, so you would build one into your image; bochka streams a 60fps desktop with a computer-use API.
235th of 369, with limits
$952 a month
166th of 369, with limits
$460 a month
6th cheapest of 369
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
259th of 367, with limits
$486 a month
210th of 367, with limits
$233 a month
7th cheapest of 367
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
277th of 346, with limits
$468 a month
250th of 346, with limits
$286 a month
6th cheapest of 346
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
234th of 338, with limits
$9,960 a month
169th of 338, with limits
$5,741 a month
71st of 338, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
283rd of 360, with limits
$554 a month
239th of 360, with limits
$325 a month
2nd cheapest of 360
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Can't run itCan't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureVercel SandboxCloudflare Sandboxbochka
IsolationFirecracker microVM with its own kernelFirecracker microVM per container, own kernel and networkFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Longest session24 hours on Pro and Enterprise, 45 minutes on Hobby; resume starts a new sessionNo fixed cap; stops after inactivity and on irregular host restartsNo cap on paid plans (--no-auto-stop); default TTL 1 hour, changeable
Files between sessionsFilesystem snapshot on every stop, kept 30 days after last use by defaultFresh disk after sleep; snapshots (public beta) or R2 backups when your code saves themDisk kept; snapshot every minute and on stop; a stopped sandbox costs nothing
Largest machine8 vCPU / 16 GB on Pro, 32 vCPU / 64 GB on Enterprise4 vCPU / 12 GiB / 20 GB disk by default (can be raised)Up to 16 vCPU / 32 GB, depending on plan
Docker insideYes, with sudodocker:dind with iptables and IP forwarding turned offFull Docker, root and systemd
Nested virtualizationNoNot documentedYes, /dev/kvm (Android emulators, VMs)
Desktop, browser, computer useNone; headless Linux onlyBuilt-in desktop removed in SDK 0.10.2; bring your own60fps desktop and Chromium, computer-use and browser-control APIs, embeddable stream
Coding agentsClaude Code, Codex, OpenCode and pi preinstalled; you start them as commandsRun Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helperClaude Code, Codex, pi, OpenCode and more built in, with an API to prompt, steer and stream events
Custom imagesYour own OCI images from a Dockerfile, via Vercel Container RegistryYour own linux/amd64 container imageNamed snapshots (templates), shareable by code; no Dockerfile builds
Inbound accessPublic URLs for up to 15 ports, no built-in auth; no raw TCP or public IPHTTP and WebSocket previews routed through your Worker; no raw TCP or public IPHTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv6 or IPv4
Egress rulesAllow-all, deny-all or a domain and CIDR allowlist, changeable while running; static IPs and VPC peering on EnterpriseallowedHosts deny-by-default list plus outbound handlers you write in Worker codeNo provider-side allowlist; firewall inside the VM
Keys kept outside the sandboxCredentials brokering injects headers for any HTTPS domain you allowYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeManaged proxy for model providers and any HTTPS API you register; switch a credential to another account when one runs out
Sleep when idleNo idle stop; a session runs until its timeout or stop()Stops after inactivity and wakes on the next requestTTL based (1 h default, changeable); no idle timer
Regions19 regions across the US, Europe, Asia, South America, Africa and AustraliaSeveral regions across Cloudflare's network, nearest free instance pickedEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureVercel SandboxCloudflare Sandboxbochka
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHNoYesYes
Persistent diskYesNoYes
Pause/resumeYesNoYes
Automatic snapshotsYesNoYes
Fork/cloneYesNoYes
Live fork (no pause)YesNoYes
Memory forkNoNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopNoYesNo
Wake on requestNoYesNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyYesYesYes
Secret proxy for any APIYesYesYes
Preinstalled agentsYesYesYes
Agent harness APINoYesYes
MCP serverYesNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoYesNo
Scoped API keysNot publishedNot publishedYes
Spend limitsYesNoYes
Usage per sandbox (API)NoNot publishedYes
Audit logsNot publishedYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Vercel Sandbox12.96 runs/s
Cloudflare SandboxNot measured
bochka26.69 runs/s

On the hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB, bochka did 26.69 runs per second and Vercel Sandbox did 12.96, so bochka finished about twice as many runs in the same time. Cloudflare Sandbox has no result on that benchmark, so there is no comparable CPU number for it. This measures CPU speed only, not start time.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Cloudflare Sandbox has no published run in this suite yet, so there is no like-for-like number to compare.

Pricing in five scenarios

Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.

ScenarioVercel Sandbox, a monthCloudflare Sandbox, a monthbochka, a month
One coding agent, workdays
4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days
$57 · Pro$39 · Workers Paid · with limits$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$236 · Pro · with limits$148 · Workers Paid · with limits$26 · $20/mo
50 agents in parallel
50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside
$2,884 · Pro$1,660 · Workers Paid · with limits$317 · $20/mo × 3 seats
Sandboxes for your users
2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once
$828 · Pro$476 · Workers Paid$200 · $100/mo × 2 seats
1,000 short jobs at once
2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month
$3,152 · Pro$1,889 · Workers Paid · with limits$2,000 · $2000/mo · with limits

Vercel Sandbox: Vercel bills CPU only while your code uses it, but bills memory for the whole time the sandbox runs, idle time included, plus a small fee per sandbox created and a monthly fee per GB of snapshots. The $20 Pro credit is shared with your other Vercel usage.

Cloudflare Sandbox: Cloudflare needs Workers Paid ($5 a month minimum) and bills CPU only while busy; memory and disk are billed on the instance size until the container sleeps. There is no 4 vCPU / 8 GB size, so 4 vCPU always pays for 12 GiB, and Durable Object and Worker requests are billed on top.

Cloudflare Sandbox: bochka charges a flat price per size, per second, only while the machine runs; a stopped sandbox costs nothing and keeps its disk. Plans start at $20 a month, and all of the fee is usage credit.

Limits in those scenarios

Cloudflare's disk resets after sleep, so every scenario that keeps 50 GB of files between sessions does not fit there without your own snapshot or backup code. Vercel keeps the files but ends each session at 24 hours, so one agent that never stops restarts every day. For 1,000 short jobs at once, Vercel fits, Cloudflare needs 2,000 vCPU against a 1,500 vCPU account cap that can be raised, and bochka's $2,000 plan hits its start limits of 600 an hour and 2,400 a day.

ScenarioVercel SandboxCloudflare Sandboxbochka
One coding agent, workdaysNone that bite
  • missing persistent disk
None that bite
One agent that never stops
  • Pro: sessions capped at 24 h
  • missing persistent disk
None that bite
50 agents in parallelNone that bite
  • missing persistent disk
None that bite
Sandboxes for your usersNone that biteNone that biteNone that bite
1,000 short jobs at onceNone that bite
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

Which one should you use?

Use Vercel Sandbox when

you run many short bursts of untrusted code, want files saved between sessions without extra code, or need to run close to users in 19 regions.

  • Files saved on every stop. Useful for work that spans days: each stop saves the filesystem, and the next session boots from it with no code from you.
  • Bigger machines and more regions. One Pro sandbox can reach 8 vCPU / 16 GB, and sandboxes run in 19 regions, from Virginia to Tokyo and Sydney.
  • Images from your Dockerfile. If you already have a Dockerfile, build it into an OCI image, push it to Vercel's registry and boot sandboxes into it.

Use Cloudflare Sandbox when

your app already runs on Workers and you want short sandboxes that sleep when idle, wake on the next request, and follow egress rules you write as code.

  • Sleeps when idle, wakes on request. Useful for many short, spiky sessions: a sandbox sleeps when idle, wakes on the next request, and bills CPU only while busy.
  • No fixed session cap. Cloudflare does not stop a container after a set runtime, so a busy sandbox can keep going past 24 hours.
  • Egress rules you can program. If your app already runs on Workers, you can block every host but a list and run your own code on each outbound request.

Where bochka fits

Both are built for short runs of code: Vercel ends sessions at 24 hours and Cloudflare wipes the disk when a sandbox sleeps. If your agents work for hours on one machine, with Docker, emulators, a desktop and a browser, look at bochka. It gives each agent a full VM that keeps its files and runs as long as you want on paid plans.

Agents keep running and keep their files

On Vercel a long agent task is cut off at 24 hours and every process starts over. On Cloudflare the agent's cloned repo and packages vanish when it sleeps unless you write snapshot or backup code. bochka saves the disk every minute, with no session cap.

A desktop and a full machine inside

Neither has a desktop or browser, so an agent cannot open the app it built, and neither offers /dev/kvm for emulators. Cloudflare also runs Docker with iptables off. bochka has full Docker, systemd, /dev/kvm and a 60fps desktop with Chromium.

Agents driven from outside

On Vercel you start each agent as a plain command, and on Cloudflare you bake it into your image and write the outbound handler for its keys. bochka gives you one API to prompt, steer and stream them, with keys kept in a proxy.

Use bochka when your agents work for hours on one machine: builds, tests, full Docker, emulators and a desktop with a browser, on a VM that keeps its files and comes with an API to drive the agents inside from outside. Compare it one to one: bochka vs Vercel Sandbox and bochka vs Cloudflare Sandbox.

Questions people ask

Is Vercel Sandbox cheaper than Cloudflare Sandbox?

Cloudflare's estimate is lower in all five of our scenarios, but in four of them it does not fit as priced, mostly because its disk resets on sleep. For sandboxes for your users, where both fit, Cloudflare is $476 a month against $828 on Vercel, and bochka is $200 a month.

Which is faster?

Vercel Sandbox did 12.96 runs per second on the hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB, and bochka did 26.69. Cloudflare Sandbox has no result on that benchmark, so we cannot compare its CPU speed.

Can they run 24/7?

Vercel sessions last up to 24 hours on Pro and Enterprise, then stop and resume from a snapshot with processes started over. Cloudflare sets no fixed runtime, but a sandbox stops when idle or on irregular host restarts and comes back with a fresh disk. bochka machines run with no session cap on paid plans and keep their disk.

Can Vercel Sandbox or Cloudflare Sandbox run Docker?

Yes, both. Vercel runs Docker with sudo, and Cloudflare supports docker:dind with iptables and IP forwarding turned off, because its containers cannot change iptables. bochka runs full Docker with root and systemd.

Do they keep my files?

Vercel saves a filesystem snapshot on every stop and boots the next session from it, kept 30 days after last use by default. Cloudflare starts from a fresh disk after sleep unless your code saved a snapshot (public beta) or a backup to R2. bochka saves the disk every minute and on stop.

Where do they run?

Vercel Sandbox runs in 19 regions, with iad1 in the US as the default. Cloudflare places containers in several regions of its network and picks the nearest free instance. bochka runs only in the EU, in Germany, Finland and France.

Try bochka

Install the CLI, then run bochka new.

Product preview

More comparisons

Bochka product preview · Pricing, benchmarks and commands are illustrative. Sandbox provisioning is not connected.