Cloudflare Sandbox vs Beam

Cloudflare Sandbox runs each sandbox as a container in its own Firecracker microVM, driven from a Worker, that sleeps when idle and wakes on the next request. Beam is a serverless GPU platform whose sandboxes are fast gVisor containers, with a separate line of CPU VMs that keep their disk.

The companies and products

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.

Beam

Beam is a serverless cloud for GPU inference, sandboxes and background jobs, built on its open-source runtime Beta9.

Beam runs functions, REST endpoints, task queues, pods, sandboxes and VMs on CPUs and GPUs, all from a Python or TypeScript SDK. A sandbox is a container isolated with gVisor that starts in a second or two, lives until you terminate it or its time to live runs out, and can be saved as a filesystem image or a memory snapshot. Beam VMs are a separate CPU product: a microVM with its own kernel, systemd and a root disk that stays when it stops. Much of Beam is a GPU serverless platform for AI teams.

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. “13th cheapest of 345” means 12 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 workloadCloudflare Sandbox: price rankBeam: price rankbochka: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A software factory needs Docker, systemd and a disk that survives between runs; Cloudflare resets the disk on sleep, Beam sandboxes end with their time to live, and bochka keeps it.
162nd of 367, with limits
$1,543 a month
69th of 367, with limits
$551 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
207th of 366, with limits
$2,188 a month
115th of 366, with limits
$651 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: Beam sandboxes start in a second or two and end on a timer, and Cloudflare bills CPU only while it is busy.
13th cheapest of 345
$144 a month
8th cheapest of 345
$117 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; Cloudflare adds egress rules you write as Worker code, Beam gives each user a quick container, and bochka gives each one a full VM with hosting.
9th cheapest of 361
$731 a month
3rd cheapest of 361
$290 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
144th of 360, with limits
$9,428 a month
341st of 360, with limits
$939 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
45th cheapest of 364
$818 a month
13th cheapest of 364
$251 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
Beam fits CI runners, while Cloudflare's 20 GB disk and Docker with iptables turned off make image builds a squeeze; bochka adds /dev/kvm for Android and VM builds.
301st of 377, with limits
$704 a month
12th cheapest of 377
$171 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
A dev box should keep its files: a Beam VM keeps its 50 GiB root disk while stopped, Cloudflare starts from a fresh disk after sleep, and bochka saves the disk every minute and on stop.
70th cheapest of 368
$93 a month
13th cheapest of 368
$21 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 Cloudflare nor Beam ships a desktop or browser for computer use, so you would build one into your image; bochka ships a 60fps desktop with Chromium.
166th of 369, with limits
$460 a month
111th of 369, with limits
$237 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
210th of 367, with limits
$233 a month
195th of 367, with limits
$176 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
250th of 346, with limits
$286 a month
200th of 346, with limits
$131 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
169th of 338, with limits
$5,741 a month
42nd of 338, with limits
$923 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
239th of 360, with limits
$325 a month
175th of 360, with limits
$155 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
Only Beam has GPUs here, from RTX 4090 up to H100 and B200; Cloudflare Sandbox and bochka are CPU only.
Can't run itCheapest of 98
$458 a month
Can'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

FeatureCloudflare SandboxBeambochka
IsolationFirecracker microVM per container, own kernel and networkgVisor container by default for sandboxes; separate Beam VMs are CPU microVMs with their own kernelFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Largest machine4 vCPU / 12 GiB / 20 GB disk by default (can be raised)Max sandbox size not publishedUp to 16 vCPU / 32 GB, depending on plan
Files between sessionsDisk is fresh after sleep; snapshots (public beta, 30 days) or R2 backups when your code saves themA sandbox ends with its time to live unless you save an image or use a volume; a Beam VM keeps a 50 GiB root disk while stoppedDisk saved every minute and on stop; a stopped sandbox costs nothing and keeps it
Snapshots and forkFilesystem snapshot or backup restored into a new sandbox; no forkMemory snapshot of a running sandbox with its processes, restored into new sandboxesFork a running sandbox with its disk, without stopping it
Docker insidedocker:dind with iptables and IP forwarding turned offDocker inside sandboxes with docker_enabledFull Docker, root and systemd
systemdNot documentedOnly in Beam VMs, not in sandboxesYes, like a normal Ubuntu server
Nested virtualizationNot documentedNot documentedYes, /dev/kvm for Android emulators and VMs
GPUsNoGPU sandboxes and serverless GPUs up to H100, H200 and B200No, CPU only
Desktop and browserBuilt-in desktop removed in SDK 0.10.2; bring your ownNo desktop or browser product60fps desktop with Chromium, computer-use API, embeddable stream
Inbound accessHTTP and WebSocket previews routed through your Worker; no raw TCP or public IPPublic HTTPS URL per exposed port with no built-in auth; no raw TCP or dedicated IPHTTPS URLs for up to 50 ports, token-protected; raw TCP; own IPv4 or IPv6
Outbound rulesallowedHosts deny-by-default list plus outbound handlers you write in Worker codeBlock all outbound traffic, or allow up to 10 CIDR ranges, changeable while runningOpen internet, no provider-side allowlist
Keeping API keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeSecrets are exposed as environment variables inside the sandboxManaged proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Coding agentsRun Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helperNone preinstalled; you install and run them through process execClaude Code, Codex, OpenCode and more built in, with a prompt, steer and events API
Regions and self-hostingSeveral regions across Cloudflare's network; not self-hostableUS only; Beta9 runtime is AGPL-3.0 and free to self-host, or bring your own cloud for a feeEU only (Germany, Finland, France); not self-hostable
Every feature Battleships tracks (43)
FeatureCloudflare SandboxBeambochka
Full VM (own kernel)YesNoYes
Docker insideYesYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdNot publishedNoYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskNoYesYes
Pause/resumeNoNoYes
Automatic snapshotsNoNoYes
Fork/cloneNoYesYes
Live fork (no pause)NoYesYes
Memory forkNoYesNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesNoNo
Wake on requestYesNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyYesNoYes
Secret proxy for any APIYesNoYes
Preinstalled agentsYesNoYes
Agent harness APIYesNoYes
MCP serverNoYesNo
GPUNoYesNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoYesNo
BYOCNoYesNo
Open sourceYesYesNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNoNot publishedYes
Usage per sandbox (API)Not publishedNoYes
Audit logsYesNot publishedNo
SSOYesNoNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesNot publishedYes
Zero data retentionNot publishedNot publishedYes

Performance

Cloudflare SandboxNot measured
BeamNot measured
bochka26.69 runs/s

There is no comparable CPU measurement for Cloudflare Sandbox or Beam: neither has a result on the StarSling hpc-sandbox-benchmarks Node.js test, so we cannot say which of the two is faster. bochka did 26.69 runs per second on that test at 4 vCPU / 8 GB. Beam's own guide says its sandboxes cold-boot in 1 to 3 seconds.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Cloudflare Sandbox and Beam have 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.

ScenarioCloudflare Sandbox, a monthBeam, 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
$39 · Workers Paid · with limits$5 · Developer$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$148 · Workers Paid · with limits$22 · Developer$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
$1,660 · Workers Paid · with limits$410 · Team$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
$476 · Workers Paid$191 · Team$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
$1,889 · Workers Paid · with limits$259 · Team$2,000 · $2000/mo · with limits

Cloudflare Sandbox: You need Workers Paid ($5 a month minimum). CPU is billed only while busy; memory and disk are billed on the instance size you picked until the container sleeps, and 4 vCPU always comes with 12 GiB.

Beam: Beam sandboxes bill per second for each CPU core (two vCPU) and GiB of RAM you request until they end, so an idle tail is billed too. Developer has no fee; Team is $89 a month plus usage, with no usage credit.

Beam: Plans start at $20 a month, and all of it is usage credit, billed per second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

Cloudflare's disk resets after sleep and is 20 GB by default, so the scenarios that keep 50 GB of files between days do not fit without your own snapshot or backup code. A Cloudflare account can run 1,500 vCPU at once by default, short of the 2,000 vCPU the 1,000-job burst needs, though the limit can be raised. Beam's Developer plan allows 30 CPU containers at once, so 50 parallel agents need Team, and Beam publishes no disk price, so its estimates count no disk cost. bochka's $2,000 plan queues the burst's starts, while Beam's Team plan fits it.

ScenarioCloudflare SandboxBeambochka
One coding agent, workdays
  • missing persistent disk
  • disk beyond 0 GiB: price unknown
None that bite
One agent that never stops
  • missing persistent disk
  • disk beyond 0 GiB: price unknown
None that bite
50 agents in parallel
  • missing persistent disk
  • disk beyond 0 GiB: price unknown
None that bite
Sandboxes for your usersNone that bite
  • disk beyond 0 GiB: price unknown
None that bite
1,000 short jobs at once
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • disk beyond 0 GiB: price unknown
  • 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 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 in code.

  • Sleeps when idle, wakes on request. For many short, spiky sessions, a sandbox sleeps after a quiet spell, wakes on the next request, and bills CPU only while busy.
  • Egress rules you can program. For teams that must control traffic, Cloudflare blocks every host not on your list and runs your own code on each outbound request.
  • Next to the rest of your Workers app. If your app already runs on Workers, sandboxes sit beside Durable Objects and R2, in several regions of Cloudflare's network.

Use Beam when

your agents need GPUs, when you want memory snapshots of running sandboxes, when you want low-cost CPU in the US, or when you must self-host.

  • GPUs in the same platform. For workloads that need a GPU, Beam offers GPU sandboxes and serverless GPUs from RTX 4090 to H100, H200 and B200.
  • Memory snapshots of running sandboxes. For agents that should resume mid-task, Beam can snapshot a running sandbox with its processes and restore it into new sandboxes.
  • Open source and your own cloud. For teams that must self-host, the Beta9 runtime is AGPL-3.0 and free to run, or Beam can run in your own cloud.

Where bochka fits

Both Cloudflare Sandbox and Beam give you a container to drive from code. If what you are really running is coding agents that work for hours, build with Docker, run emulators or a browser, and need their files the next day, look at bochka: every sandbox is a full VM that keeps its disk.

Files that are still there tomorrow

On Cloudflare the disk starts fresh after sleep, and a Beam sandbox ends with its time to live. Either way an agent loses its repo and installs unless your code saves a snapshot, backup or image first.

A whole machine, not a container

Cloudflare runs Docker with iptables turned off and tops out at 20 GB of disk by default; Beam sandboxes have no systemd. Neither documents /dev/kvm, so Android emulators and nested VMs have nowhere to start.

Agents, desktop and keys built in

On both you bake each agent into your image and build any desktop yourself. On Beam secrets sit as environment variables inside the sandbox; on Cloudflare you write the outbound handler that adds every token.

Use bochka when your agents do real work for hours or days: builds, full Docker, emulators and a desktop, on a full VM whose disk is still there the next time it starts. Compare it one to one: bochka vs Cloudflare Sandbox and bochka vs Beam.

Questions people ask

Is Cloudflare Sandbox cheaper than Beam?

Not in these scenarios. Beam costs less in all five, such as $22 against $148 a month for one agent that never stops, and $191 against $476 a month for sandboxes for your users. Beam's estimates count no disk cost, because Beam publishes no disk price.

Which is faster, Cloudflare Sandbox or Beam?

We have no comparable CPU measurement for either, so we cannot say. Beam's guide says its sandboxes cold-boot in 1 to 3 seconds, and a Cloudflare sandbox wakes on the next request after it sleeps.

Is either one a VM?

Cloudflare runs each container in its own Firecracker microVM with its own kernel. A Beam sandbox is a gVisor container by default, though Beam also sells separate CPU VMs with their own kernel and systemd. Every bochka sandbox is a full VM with /dev/kvm.

Can Cloudflare Sandbox or Beam run Docker?

Yes. Cloudflare supports docker:dind with iptables and IP forwarding turned off, and Beam supports Docker inside a sandbox with docker_enabled. bochka runs full Docker with systemd in a full VM.

Do they keep my files?

A Cloudflare sandbox starts from a fresh disk after sleep unless your code saved a snapshot or R2 backup. A Beam sandbox ends with its time to live, 10 minutes by default, unless you save an image or use a volume, while a Beam VM keeps its root disk while stopped.

Which one has GPUs?

Only Beam. It offers GPU sandboxes and serverless GPUs from RTX 4090 up to H100, H200 and B200. Cloudflare Sandbox and bochka are CPU only.

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.