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.
- Largest instance
- 4 vCPU, 12 GiB memory, 20 GB disk (defaults, can be raised)
- Account limits
- 1,500 vCPU, 6 TiB memory and 30 TB disk running at once
- Compliance
- Cloudflare holds a SOC 2 Type II report
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 workload | Cloudflare Sandbox: price rank | Northflank: price rank | bochka: 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 it | 4th 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 it | Can't run it | Can't run it |
Key features
| Feature | Cloudflare Sandbox | Northflank | bochka |
|---|---|---|---|
| Isolation | Firecracker microVM per container, own kernel and network | Kata microVM with its own kernel for CPU; gVisor for GPU | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Largest machine | 4 vCPU / 12 GiB / 20 GB disk by default (can be raised) | Up to 20 vCPU / 40 GB, more on request; a resize restarts the sandbox | Up to 16 vCPU / 32 GB on the $100 plan and above |
| What survives a stop | Nothing by default: the disk is fresh after sleep unless your code saved a snapshot or an R2 backup | Only attached volumes, which bill while paused; the rest of the disk and all processes reset | The whole disk, saved every minute and on stop; a stopped sandbox costs nothing |
| Snapshots and fork | Snapshots in public beta, kept 30 days; restore into a new sandbox, no fork | Opt-in filesystem snapshots of a running or stopping sandbox; restore into a new one | Automatic disk snapshots; fork a running sandbox without stopping it |
| Sleep when idle | Stops after inactivity and wakes on the next request | No idle auto-pause; bills until you pause it | TTL based (1 h default, changeable); no idle timer |
| Docker inside | docker:dind with iptables and IP forwarding turned off | Own kernel, so Docker can run inside | Full Docker, root and systemd |
| Nested virtualization | Not documented | Not documented inside a sandbox | Yes, /dev/kvm for Android emulators and VMs |
| Desktop and browser | Built-in desktop removed in SDK 0.10.2; bring your own | Headless; access by SDK, browser terminal or SSH | 60fps Linux desktop, Chromium and a computer-use API, embeddable stream |
| Coding agents | Run Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helper | Harnesses start Claude Code, Codex, Cursor, OpenCode or Pi; you reach the agent by terminal or SSH | Seven agents preinstalled, with a prompt, steer and events API |
| Keeping API keys out of the sandbox | Your outbound handler adds the token for any HTTP or HTTPS host; you write the code | Header injection for listed hosts in the network policy API | Managed proxy for model providers and any HTTPS API; switch a credential to another account |
| Inbound traffic | HTTP and WebSocket previews routed through your Worker; no raw TCP or public IP | HTTPS ports on a code.run domain, private by default; public TCP and UDP need a separate load balancer | HTTPS URLs for up to 50 ports, token-protected; raw TCP; own IPv4 or IPv6 |
| Outbound rules | allowedHosts deny-by-default list plus outbound handlers you write in Worker code | Network policies with allow lists by IP, CIDR or domain, documented for your own cluster | Open internet, no provider-side allowlist |
| GPUs | No | L4, A100, H100, RTX PRO 6000 and more | No |
| Where it runs | Several regions of Cloudflare's network, nearest free instance picked | US, Europe, Asia, Australia, South America and Africa, fixed per project; or your own cloud | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Cloudflare Sandbox | Northflank | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Not published | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | No | Yes | Yes |
| Pause/resume | No | Yes | Yes |
| Automatic snapshots | No | Yes | Yes |
| Fork/clone | No | Yes | Yes |
| Live fork (no pause) | No | Yes | Yes |
| Memory fork | No | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | No | No |
| Wake on request | Yes | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | Yes | Yes | Yes |
| Secret proxy for any API | Yes | Yes | Yes |
| Preinstalled agents | Yes | Yes | Yes |
| Agent harness API | Yes | No | Yes |
| MCP server | No | No | No |
| GPU | No | Yes | No |
| Windows | No | No | No |
| Arm64 | No | Yes | No |
| Self-hosting | No | Yes | No |
| BYOC | No | Yes | No |
| Open source | Yes | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | No | Not published | Yes |
| Usage per sandbox (API) | Not published | Yes | Yes |
| Audit logs | Yes | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
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.
| Scenario | Cloudflare Sandbox, a month | Northflank, a month | bochka, 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.
| Scenario | Cloudflare Sandbox | Northflank | bochka |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users | None that bite |
| None that bite |
| 1,000 short jobs at once |
|
|
|
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 vs Cloudflare Sandbox
- bochka vs Northflank
- E2B vs Cloudflare Sandbox
- Daytona vs Cloudflare Sandbox
- Modal vs Cloudflare Sandbox
- Vercel Sandbox vs Cloudflare Sandbox
- Cloudflare Sandbox vs Blaxel
- Cloudflare Sandbox vs Runloop
- Cloudflare Sandbox vs Tensorlake
- Cloudflare Sandbox vs Morph Cloud
- Cloudflare Sandbox vs CodeSandbox SDK
- Cloudflare Sandbox vs Fly.io Machines