Cloudflare Sandbox vs Northflank

Both run each sandbox in a microVM with its own kernel. Cloudflare Sandbox is a container inside the Workers platform that sleeps when idle and wakes on the next request, while Northflank is a full cloud platform where a sandbox runs until you pause it, with GPUs, many regions and your own cloud account.

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.

Northflank

Northflank is a London developer platform for running services, jobs and databases on Kubernetes, and Sandboxes is its product for running untrusted code.

A Northflank sandbox is a container image deployed as a service: CPU sandboxes run in Kata microVMs with their own kernel, and GPU sandboxes run under gVisor. You create and drive them from the JavaScript or Python SDK, the CLI or the dashboard, on Northflank's cloud or inside your own. It suits teams that already want one platform for apps, databases, GPUs and sandboxes.

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 rankNorthflank: price rankbochka: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
Neither keeps a coding agent's whole disk: Cloudflare starts from a fresh disk after sleep and Northflank keeps only attached volumes, while bochka keeps the whole disk and ranks 3rd.
162nd of 367, with limits
$1,543 a month
159th of 367, with limits
$1,477 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
173rd of 366, with limits
$1,365 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
Cloudflare Sandbox ranks 13th for short code-interpreter calls, since it wakes on the next request and bills CPU only while busy; Northflank ranks 84th.
13th cheapest of 345
$144 a month
84th of 345, with limits
$115 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
Cloudflare Sandbox ranks 9th for sandboxes you give your users and Northflank ranks 89th, because Northflank does not publish how many sandboxes can run at once; bochka ranks 1st.
9th cheapest of 361
$731 a month
89th of 361, with limits
$815 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
342nd of 360, with limits
$1,762 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
134th of 364, with limits
$689 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
Northflank ranks 38th for CI runners and Cloudflare Sandbox ranks 301st, held back by its 20 GB default disk and Docker with iptables turned off.
301st of 377, with limits
$704 a month
38th cheapest of 377
$352 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 when you log off; Cloudflare resets the disk after sleep, Northflank keeps only volumes, and bochka stops at no cost with its disk.
70th cheapest of 368
$93 a month
151st of 368, with limits
$59 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: Cloudflare removed its built-in one and Northflank sandboxes are headless, while bochka has a 60fps desktop and a computer-use API.
166th of 369, with limits
$460 a month
151st of 369, with limits
$371 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
200th of 367, with limits
$194 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
196th of 346, with limits
$117 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
83rd of 338, with limits
$2,049 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
Red-team runs often want raw TCP and nested VMs; Cloudflare takes no raw TCP from outside, Northflank needs a separate load balancer for it, and bochka has both plus /dev/kvm.
239th of 360, with limits
$325 a month
141st of 360, with limits
$99 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
Northflank ranks 4th for GPU eval jobs with cards from L4 to H100; Cloudflare Sandbox and bochka have no GPUs.
Can't run it4th cheapest of 98
$693 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 SandboxNorthflankbochka
IsolationFirecracker microVM per container, own kernel and networkKata microVM with its own kernel for CPU; gVisor for GPUFull 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)Up to 20 vCPU / 40 GB, more on request; a resize restarts the sandboxUp to 16 vCPU / 32 GB on the $100 plan and above
What survives a stopNothing by default: the disk is fresh after sleep unless your code saved a snapshot or an R2 backupOnly attached volumes, which bill while paused; the rest of the disk and all processes resetThe whole disk, saved every minute and on stop; a stopped sandbox costs nothing
Snapshots and forkSnapshots in public beta, kept 30 days; restore into a new sandbox, no forkOpt-in filesystem snapshots of a running or stopping sandbox; restore into a new oneAutomatic disk snapshots; fork a running sandbox without stopping it
Sleep when idleStops after inactivity and wakes on the next requestNo idle auto-pause; bills until you pause itTTL based (1 h default, changeable); no idle timer
Docker insidedocker:dind with iptables and IP forwarding turned offOwn kernel, so Docker can run insideFull Docker, root and systemd
Nested virtualizationNot documentedNot documented inside a sandboxYes, /dev/kvm for Android emulators and VMs
Desktop and browserBuilt-in desktop removed in SDK 0.10.2; bring your ownHeadless; access by SDK, browser terminal or SSH60fps Linux desktop, Chromium and a computer-use API, embeddable stream
Coding agentsRun Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helperHarnesses start Claude Code, Codex, Cursor, OpenCode or Pi; you reach the agent by terminal or SSHSeven agents preinstalled, with a prompt, steer and events API
Keeping API keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeHeader injection for listed hosts in the network policy APIManaged proxy for model providers and any HTTPS API; switch a credential to another account
Inbound trafficHTTP and WebSocket previews routed through your Worker; no raw TCP or public IPHTTPS ports on a code.run domain, private by default; public TCP and UDP need a separate load balancerHTTPS 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 codeNetwork policies with allow lists by IP, CIDR or domain, documented for your own clusterOpen internet, no provider-side allowlist
GPUsNoL4, A100, H100, RTX PRO 6000 and moreNo
Where it runsSeveral regions of Cloudflare's network, nearest free instance pickedUS, Europe, Asia, Australia, South America and Africa, fixed per project; or your own cloudEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureCloudflare SandboxNorthflankbochka
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoNoYes
RootYesNot publishedYes
SystemdNot publishedNot publishedYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskNoYesYes
Pause/resumeNoYesYes
Automatic snapshotsNoYesYes
Fork/cloneNoYesYes
Live fork (no pause)NoYesYes
Memory forkNoNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesNoNo
Wake on requestYesNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoYesYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyYesYesYes
Secret proxy for any APIYesYesYes
Preinstalled agentsYesYesYes
Agent harness APIYesNoYes
MCP serverNoNoNo
GPUNoYesNo
WindowsNoNoNo
Arm64NoYesNo
Self-hostingNoYesNo
BYOCNoYesNo
Open sourceYesNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNoNot publishedYes
Usage per sandbox (API)Not publishedYesYes
Audit logsYesYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Cloudflare SandboxNot measured
NorthflankNot measured
bochka26.69 runs/s

Neither Cloudflare Sandbox nor Northflank has a result on the hpc-sandbox-benchmarks test, so there is no comparable CPU number for either of them. bochka did 26.69 runs per second on that Node.js build-and-test loop at 4 vCPU / 8 GB, on dedicated AMD Ryzen 9 9950X hosts.

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 Northflank 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 monthNorthflank, 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$32 · Developer Sandbox (free tier) · with limits$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$108 · Developer Sandbox (free tier) · 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
$1,660 · Workers Paid · with limits$1,322 · Developer Sandbox (free tier) · 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
$476 · Workers Paid$361 · Developer Sandbox (free tier) · with limits$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$688 · Developer Sandbox (free tier) · with limits$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 until the container sleeps, and 4 vCPU always comes with 12 GiB.

Northflank: Northflank bills per second for the plan size you pick, with no monthly fee, until you pause the sandbox. Volumes cost $0.15 per GB a month even while paused, and outbound traffic costs $0.06 per GB.

Northflank: 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 whole disk.

Limits in those scenarios

In the scenarios that keep 50 GB of files between days, neither fits as is: Cloudflare's disk resets after sleep and Northflank keeps files only in attached volumes. Cloudflare caps an account at 1,500 vCPU running at once by default, short of the 2,000 the 1,000-job burst needs. Northflank does not publish how many sandboxes can run at once, so 300 or 1,000 at a time is not confirmed. bochka's limit is the burst too: starts above 90 a minute wait in a queue.

ScenarioCloudflare SandboxNorthflankbochka
One coding agent, workdays
  • missing persistent disk
  • files survive a stop only in attached volumes: packages installed elsewhere reset
None that bite
One agent that never stops
  • missing persistent disk
  • files survive a stop only in attached volumes: packages installed elsewhere reset
None that bite
50 agents in parallel
  • missing persistent disk
  • files survive a stop only in attached volumes: packages installed elsewhere reset
  • how many machines can run at once: limit not published, probably fine at 50 (the typical published limit is 50)
None that bite
Sandboxes for your usersNone that bite
  • not confirmed: how many machines can run at once (you need 300; the typical published limit is 50)
None that bite
1,000 short jobs at once
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • not confirmed: how many machines can run at once (you need 1,000; the typical published limit is 50)
  • 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.

  • Sleeps when idle, wakes on request. For many short, spiky sessions: a sandbox sleeps when idle, wakes on the next request, and bills CPU only while busy.
  • Egress rules you can program. For locked-down code runs: block every host except the ones you list, and run your own code on each outbound request.
  • Next to your Workers app. If your app already runs on Workers, sandboxes sit next to Durable Objects and R2 with little to wire up.

Use Northflank when

you need GPUs next to the agent, machines bigger than 4 vCPU, regions outside Europe, or sandboxes inside your own cloud account.

  • GPU sandboxes. For agents that train, fine-tune or run models: Northflank has GPU sandboxes from L4 to H100 and up.
  • Bigger machines that keep running. For long jobs: plans go up to 20 vCPU / 40 GB, and a sandbox runs until you pause it.
  • Your own cloud, and one platform. For teams that must run in their own AWS, GCP or Azure account, or want apps, databases and sandboxes together.

Where bochka fits

If your agents work on one machine for hours or days, both options make you plan around a disk that does not fully come back. bochka gives each agent a full VM that keeps its whole disk, runs full Docker, a desktop and nested VMs, and comes with coding agents you drive from your own code.

The whole disk comes back

On Cloudflare a sandbox that sleeps returns with a fresh disk unless your code saved a snapshot, kept only 30 days. On Northflank only attached volumes survive a pause, and they bill while paused. bochka saves the whole disk every minute.

Docker, a desktop and KVM inside

Cloudflare runs Docker with iptables off and no longer ships a desktop; Northflank sandboxes are headless and do not document /dev/kvm. On both you build and stream a desktop yourself. bochka has full Docker, a 60fps desktop and /dev/kvm.

Agents driven from outside

On Cloudflare you bake each agent into your image and write the handler that adds every token. Northflank Harnesses start the agent, but you reach it by terminal or SSH. bochka has a prompt, steer and events API.

Use bochka when your agents do real work for hours on one machine and should find it as they left it: installs, full Docker, emulators, a desktop and a browser, with the agent driven from your code. Compare it one to one: bochka vs Cloudflare Sandbox and bochka vs Northflank.

Questions people ask

Is Cloudflare Sandbox cheaper than Northflank?

In all five scenarios on this page, Northflank's estimate is lower: one agent that never stops is $108 a month on Northflank against $148 on Cloudflare. bochka is $26 a month for the same always-on agent.

Which is faster, Cloudflare Sandbox or Northflank?

There is no comparable CPU measurement: neither has a result on the hpc-sandbox-benchmarks test. bochka scores 26.69 runs per second on it at 4 vCPU / 8 GB.

Do they keep my files when a sandbox stops?

Not fully. Cloudflare starts from a fresh disk after sleep unless your code saved a snapshot or an R2 backup. Northflank keeps only files on attached volumes. bochka keeps the whole disk on every stop.

Can I run Docker inside Cloudflare Sandbox or Northflank?

Yes on both. Cloudflare supports docker:dind with iptables and IP forwarding turned off, and Northflank gives each sandbox its own kernel so Docker can run. bochka runs full Docker with root and systemd.

Does Cloudflare Sandbox or Northflank have GPUs?

Northflank does, with GPU sandboxes under gVisor from L4 to H100 and more. Cloudflare Sandbox and bochka run on CPUs only.

Can I run Claude Code or Codex in each?

Yes. On Cloudflare you put the agent in your image, and Northflank Harnesses start Claude Code, Codex, Cursor, OpenCode or Pi that you reach by terminal or SSH. bochka preinstalls seven agents with an API to prompt, steer and follow them.

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.