Cloudflare Sandbox vs Docker Cloud Sandboxes
Both run each sandbox in its own small VM with its own kernel. Cloudflare's is a container inside the Workers platform that sleeps when idle and wakes with a fresh disk, while Docker's is the same sbx microVM you run on your laptop, kept with its memory when it stops but ended 24 hours after creation.
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
Docker Cloud Sandboxes
Docker Cloud Sandboxes runs Docker's sbx coding-agent microVMs on Docker-managed compute instead of your laptop.
Each sandbox is a microVM with its own Linux kernel and its own Docker Engine, started from the same sbx CLI you use locally, with Claude Code, Codex and other agents ready to run. You can move a sandbox from your laptop to the cloud and back, publish HTTPS ports and SSH in. It launched on September 24, 2026, is billed pay-as-you-go on a personal Docker account, and is built for developers who want their local agent sandboxes to keep going off their machine.
- Launched
- September 24, 2026
- Session length
- 1 hour by default, extendable to 24 hours from creation
- Default quota
- 10 concurrent and 50 stored sandboxes per account
- Regions
- Not published
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 | Docker Cloud Sandboxes: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Agents that build for days need their files and time; Cloudflare wipes the disk on sleep and Docker ends a sandbox after 24 hours, while boat keeps the disk and has no session cap. | 162nd of 367, with limits $1,543 a month | 280th of 367, with limits $4,928 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An assistant that lives on one machine all month fits neither: Cloudflare loses its files on sleep and Docker stops it 24 hours after creation; boat keeps both running. | 207th of 366, with limits $2,188 a month | 276th of 366, with limits $5,110 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 fits short code runs best here: CPU is billed only while busy and a sandbox wakes on the next request, while Docker's 10-at-once default gets in the way. | 13th cheapest of 345 $144 a month | 119th of 345, with limits $233 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 Serving your own users needs many sandboxes at once; Cloudflare's account limit is 1,500 vCPU running, while Docker allows 10 sandboxes at once by default. | 9th cheapest of 361 $731 a month | 136th of 361, with limits $1,628 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 | 114th of 360, with limits $7,000 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 Eval runs fan out wide; Cloudflare handles that width, while Docker's default of 10 concurrent sandboxes queues the rest. | 45th cheapest of 364 $818 a month | 167th of 364, with limits $1,400 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 CI that builds Docker images needs room and a full Docker setup; Cloudflare caps disk at 20 GB by default and turns off iptables, Docker has its own engine, and boat adds /dev/kvm. | 301st of 377, with limits $704 a month | 172nd of 377, with limits $672 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB | 70th cheapest of 368 $93 a month | 127th of 368, with limits $204 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 Computer-use agents need a screen; Cloudflare removed its built-in desktop and Docker's cloud sandboxes are terminal only, while boat ships a 60fps desktop. | 166th of 369, with limits $460 a month | 268th of 369, with limits $1,400 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 | 277th of 367, with limits $700 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 | 262nd of 346, with limits $350 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 | 190th of 338, with limits $7,000 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 need raw TCP and full root networking; neither Cloudflare nor Docker takes raw TCP from outside, and boat does. | 239th of 360, with limits $325 a month | 248th of 360, with limits $350 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 it | Can't run it | 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 | Docker Cloud Sandboxes | boat |
|---|---|---|---|
| Isolation | Firecracker microVM per container, own kernel and network | MicroVM per sandbox with its own Linux kernel and Docker Engine; hypervisor not named | 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 16 vCPU / 32 GiB, amd64 or arm64 by account | Up to 16 vCPU / 32 GB, depending on plan |
| Session length | No fixed maximum, but stops after inactivity and runtime is not guaranteed | 1 hour by default, at most 24 hours from creation | No cap on paid plans; you set the time to live |
| Files between sessions | Fresh disk after sleep; snapshots (public beta, 30 days) or R2 backups when your code saves them | Stop keeps memory and files; that saved state is deleted after 7 days of non-use | Disk saved every minute and on stop; a stopped sandbox costs nothing and keeps its disk |
| Snapshot and fork | No fork; restore a saved snapshot or backup into a new sandbox | Snapshot a running sandbox with disk and memory, then restore it as a new one | Fork a running sandbox with its disk, without stopping it |
| Sandboxes at once | Limited by account resources: 1,500 vCPU running at once by default | 10 concurrent and 50 stored by default; no published way to raise it | 100 on the $20 plan, up to 2,000 on higher plans, self-serve |
| Docker inside | docker:dind with iptables and IP forwarding turned off | Its own Docker Engine; agent runs as a non-root user with sudo | Full Docker, root and systemd |
| Nested virtualization | Not documented | Not documented | Yes, /dev/kvm for Android emulators and VMs |
| Desktop and browser | Built-in desktop removed in SDK 0.10.2; bring your own | Terminal sessions only | 60fps Linux desktop with Chromium, computer-use API, embeddable stream |
| Inbound traffic | HTTP and WebSocket previews routed through your Worker; no raw TCP or public IP | Public HTTPS URL per published port, not protected by Docker sign-in; not a TCP tunnel; SSH | 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 | Allow and deny rules by host, with allow-all, balanced and deny-all presets | Open internet, no provider-side allowlist |
| Keeping keys out of the sandbox | Your outbound handler adds the token for any HTTP or HTTPS host; you write the code | Cloud proxy sets the auth header for built-in AI services and custom hosts | Managed proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Coding agents | Run Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helper | Claude Code, Codex, Copilot, OpenCode and more, attached to from the sbx CLI | Seven agents preinstalled, with a prompt, steer and events API to drive them from outside |
| Regions | Several regions across Cloudflare's network, nearest free one picked | Not published | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Cloudflare Sandbox | Docker Cloud Sandboxes | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | 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 | Yes | 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 | Not published | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Not published | 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 | Yes | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | Yes | No |
| Self-hosting | No | No | No |
| BYOC | No | No | 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 | No | Yes |
| Audit logs | Yes | Not published | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | No | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | No | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
Neither Cloudflare Sandbox nor Docker Cloud Sandboxes has a result on the hpc-sandbox-benchmarks runs, so there is no measured CPU number to compare between them. boat did 26.69 runs per second on that Node.js build-and-test benchmark 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 Docker Cloud Sandboxes 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 | Docker Cloud Sandboxes, a month | boat, 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 | $49 · Docker Agentic Platform (pay-as-you-go) | $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 | $204 · Docker Agentic Platform (pay-as-you-go) · 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 | $2,464 · Docker Agentic Platform (pay-as-you-go) · 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 | $700 · Docker Agentic Platform (pay-as-you-go) · 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 | $1,400 · Docker Agentic Platform (pay-as-you-go) · 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.
Docker Cloud Sandboxes: Docker bills per second for the size you pick, from $0.07 an hour for 1 vCPU / 2 GiB to $1.12 an hour for 16 vCPU / 32 GiB, with no monthly fee. A stopped sandbox costs nothing.
Docker Cloud Sandboxes: Plans start at $20 a month, and the whole fee 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, so no scenario that keeps 50 GB of files between days fits without your own snapshot or backup code, and its 1,500 vCPU account limit is short of the 2,000 vCPU the 1,000-job burst needs. Docker ends every sandbox 24 hours after creation and allows 10 at once by default, which rules it out for the always-on agent, 50 agents in parallel, sandboxes for your users and the burst. boat fits every scenario but the burst, where its start limits queue the jobs.
| Scenario | Cloudflare Sandbox | Docker Cloud Sandboxes | boat |
|---|---|---|---|
| One coding agent, workdays |
| None that bite | 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 many 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. Good for many short, spiky sessions: a sandbox sleeps when quiet, wakes on the next request, and bills CPU only while busy.
- Room for many sandboxes at once. An account can run 1,500 vCPU at once by default, far more than Docker's default of 10 sandboxes.
- Egress rules you can program. Teams on Workers can block every host but a list, and run their own code on each outbound request.
Use Docker Cloud Sandboxes when
you already run agents in sbx on your laptop and want a few of them to keep going in the cloud for up to a day, with memory kept across stops.
- Stop and fork with memory. Useful for agents that pause between steps: a stopped sandbox comes back with its memory, and a running one can be forked with it.
- The same sandbox on your laptop. If you already run sbx locally, the cloud is the same microVM and CLI, and you can move a sandbox either way.
- Bigger machines. Sizes go up to 16 vCPU / 32 GiB, with arm64 on some accounts, while Cloudflare stops at 4 vCPU by default.
Where boat fits
Both are built for short or bounded agent sessions: Cloudflare's sandboxes lose their disk when they sleep, and Docker's end 24 hours after creation, 10 at a time by default. If your agents work for days, need a desktop or nested VMs, or have to be driven from your own app, look at boat.
Files and time that last
On Cloudflare a sleeping sandbox comes back with an empty disk unless your code saved a snapshot. On Docker your code must stop and restart work before the 24-hour mark. boat keeps the disk and has no session cap.
A whole machine, screen included
Neither documents /dev/kvm, Cloudflare runs Docker with iptables off, and neither ships a desktop, so testing a mobile app or clicking through a UI means adding a separate service. boat has full Docker, /dev/kvm and a 60fps desktop.
Agents driven from outside
On Cloudflare you bake each agent into your image and write the token-adding code; on Docker you attach to an agent's terminal and parse its text. boat ships seven agents with a prompt, steer and events API.
Use boat when your agents work for days or by the dozen, need full Docker, Android emulators or a desktop, or have to be driven from your own app through an API. Compare it one to one: boat vs Cloudflare Sandbox and boat vs Docker Cloud Sandboxes.
Questions people ask
Is Cloudflare Sandbox cheaper than Docker Cloud Sandboxes?
On these estimates Cloudflare is lower in four of five scenarios, for example $476 against $700 a month for sandboxes for your users. But Cloudflare only fits that one scenario, because its disk resets after sleep, and Docker fits only the workday agent at $49 a month.
Which one keeps my files?
Docker keeps memory and files when a sandbox stops, though the saved state is deleted after 7 days of non-use. Cloudflare starts from a fresh disk after sleep unless your code saved a snapshot or an R2 backup. boat saves the disk every minute and on stop.
Which is faster?
There is no measured CPU result for either one on the hpc-sandbox-benchmarks runs, so we cannot say. boat scored 26.69 runs per second on that benchmark at 4 vCPU / 8 GB.
Can Cloudflare Sandbox or Docker Cloud Sandboxes run Docker?
Both can. Docker gives each sandbox its own Docker Engine, and Cloudflare supports docker:dind with iptables and IP forwarding turned off. boat runs full Docker with root and systemd, plus /dev/kvm for nested VMs.
How many sandboxes can each run at once?
Cloudflare limits an account to 1,500 vCPU running at once by default, and says the limit can be raised. Docker allows 10 concurrent sandboxes by default and publishes no way to raise it. boat runs 100 at once on the $20 plan and up to 2,000 on higher plans.
Does either have a desktop for computer-use agents?
No. Cloudflare removed its built-in desktop in SDK 0.10.2, and Docker's cloud sandboxes are terminal sessions. boat ships a 60fps Linux desktop with Chromium and a computer-use API.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs Cloudflare Sandbox
- boat vs Docker Cloud Sandboxes
- 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 Northflank