Cloudflare Sandbox vs Namespace

Cloudflare Sandbox gives you containers inside the Workers platform. They sleep when idle, wake on the next request, and keep files through snapshots or R2 that your code sets up. Namespace is a build and dev platform: CI runners, caches and Devboxes on Linux, macOS and Windows that keep their storage but stop after 3 to 24 hours by plan.

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. 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. The disk resets when the container stops, and your code keeps files with snapshots, automatic saves, R2 backups or R2 bucket mounts. It suits teams already on Workers who want sandboxes that sleep when idle. For code that only calls known methods, Cloudflare also offers Dynamic Workers, which run JavaScript in V8 isolates.

Namespace

Namespace is a dev platform for fast builds, tests and coding environments: CI runners, build caches and Devboxes, on its own hardware.

Most of Namespace is CI: a faster drop-in for GitHub Actions runners, with Docker, Bazel, Turborepo and Nix caching. Its Devboxes are remote Linux and macOS machines with persistent storage, made for people and AI coding agents. You run Claude Code, Codex, OpenCode, Amp, Copilot or Cursor in persistent Devbox sessions, and Namespace also hosts sessions for Claude Managed Agents, Cursor Cloud Agents, Devin and Amp. It is a different kind of product from boat, so this page compares the part where they overlap: a machine an agent works on.

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. “43rd cheapest of 361” means 42 of the other 360 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 rankNamespace: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A long build session needs its files and room for Docker. Cloudflare has 20 GB of disk and keeps files through snapshots or R2 your code sets up. Namespace keeps storage but needs the Business plan for an 8-hour session. boat saves the disk with no code.
192nd of 365, with limits
$1,543 a month
74th of 365, with limits
$3,745 a month
5th cheapest of 365
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An assistant that never stops needs work on both. On Cloudflare your code saves snapshots or mounts R2. Namespace stops a Devbox at its plan's limit, so your code restarts it. On a paid boat plan you turn auto-stop off.
43rd cheapest of 361
$2,188 a month
316th of 361, with limits
$6,645 a month
6th cheapest of 361
$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-interpreter calls well: CPU is billed only while busy, and a container wakes on the next request. Namespace caps Devboxes at 50 per workspace, and its compute instances are CI machines.
17th cheapest of 336
$144 a month
244th of 336, with limits
$250 a month
189th of 336, 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
For sandboxes you hand to your users, Cloudflare fits, and so does boat. Namespace Devboxes are dev machines, capped at 50 per workspace, stopped ones included.
19th cheapest of 349
$731 a month
279th of 349, with limits
$2,068 a month
3rd cheapest of 349
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
147th of 349, with limits
$9,428 a month
345th of 349, with limits
$9,012 a month
39th of 349, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
60th cheapest of 359
$818 a month
282nd of 359, with limits
$1,093 a month
10th cheapest of 359
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
CI is Namespace's main product, with runners and caches for Docker, Bazel and more. Cloudflare has 20 GB of disk and runs Docker with iptables off. boat runs CI jobs on full VMs with Docker and /dev/kvm, but sells no managed runner or build cache.
303rd of 374, with limits
$704 a month
87th cheapest of 374
$765 a month
2nd cheapest of 374
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
A Namespace Devbox keeps its storage, stops when idle and starts when you connect, but it stops at 3, 5 or 24 hours by plan. Cloudflare starts from a fresh disk after sleep unless your code snapshots it or mounts R2. boat stays up once auto-stop is off and bills at full rate while it runs.
123rd cheapest of 371
$93 a month
201st of 371, with limits
$250 a month
19th cheapest of 371
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Namespace's screenshot and click API and VNC desktop work on macOS Devboxes; on Linux you install a desktop and VNC in your image. On Cloudflare you build a desktop into your image. boat streams a built-in 60 fps Linux desktop.
207th of 367, with limits
$460 a month
108th of 367, with limits
$1,032 a month
7th cheapest of 367
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
68th of 356, with limits
$233 a month
191st of 356, with limits
$789 a month
7th cheapest of 356
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
102nd cheapest of 343
$286 a month
191st of 343, with limits
$332 a month
6th cheapest of 343
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
168th of 327, with limits
$5,741 a month
225th of 327, with limits
$9,012 a month
73rd of 327, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
25th cheapest of 351
$325 a month
112th of 351, with limits
$339 a month
3rd cheapest of 351
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Namespace runs macOS Devboxes and instances on Apple Silicon. Cloudflare Sandbox and boat have no macOS.
Not ranked: misses a requirement6th cheapest of 35
$1,255 a month
Not ranked: misses a requirement

Key features

FeatureCloudflare SandboxNamespaceboat
IsolationFirecracker microVM per container, own kernel and networkLinux Devboxes run a container image; the docs do not say if each has its own kernel (a third-party benchmark reports Firecracker)Full VM with its own kernel, on a physical host dedicated to boat (AMD Ryzen 7 9700X or Ryzen 9 9950X); vCPUs are shared
CPU benchmark (V8 Web Tooling, 4 vCPU / 8 GB, StarSling run of 3 October 2026)Not in this run24.90 runs/s, rank 2 of 15 (shared)28.06 runs/s, rank 2 of 15 (shared), on a Ryzen 9 9950X host; the run cannot separate them
Real repo builds (same run, total seconds, lower is better)Not in this runBetter-Auth 150.5, Mastra 1,051, OpenClaw 570Better-Auth 135.8, Mastra 980, OpenClaw 428
Largest machine4 vCPU / 12 GiB / 20 GB disk; no 4 vCPU / 8 GB sizeLinux shapes up to 64 vCPU, inside a vCPU pool per plan16 vCPU / 32 GB / 251 GB disk (needs the $100 plan or higher)
Files between sessionsDisk is fresh after sleep; keep files with snapshots (public beta, 30 days), scheduled automatic saves, R2 backups or a mounted R2 bucketA stopped Devbox keeps its storage until you delete it, billed at $0.20 per GB-month usedDisk saved every minute and at each stop, with no code; kept at least 14 days after a stop, longer as a saved snapshot
How long a session can runNo fixed maximum; stops after an inactivity timeout and wakes on the next request; runtime not guaranteedDevboxes stop at 3 hours on Developer and Devbox Plus, 5 on Team, 24 on Business, even while you workAuto-stop 1 h by default; up to 30 days, or off on a paid plan with no session cap
Idle stop and wakeStops after inactivity and wakes on the next requestDevboxes stop after an idle timeout (15 minutes to 8 hours) and start again when you connectAuto-stop on a timer (1 h by default), not on idle; full rate while running
Docker insidedocker:dind with iptables and IP forwarding turned offDocker in Linux DevboxesDocker with BuildKit and Compose, root and systemd
Nested virtualizationNot documented/dev/kvm on Linux compute instances, not on macOS or Windows/dev/kvm on every sandbox (Android emulators, VMs)
Desktop and computer useBuilt-in desktop removed in SDK 0.10.2; build one into your own image, or use the separate Browser Run service for headless browsersScreenshot and click API and VNC on macOS Devboxes; on Linux Devboxes you install a desktop and VNC; VNC and RDP on compute instances1920x1080, 60 fps Linux desktop and Chrome, computer tools, embeddable stream; no GPU
Reaching the sandboxHTTP and WebSocket previews routed through your Worker; SSH; no raw TCP inbound or public IPHTTPS URLs that need a Namespace login, TCP through a running CLI port-forward; no public IPUp to 50 HTTPS URLs, token-gated by default; SSH; raw ports over public IPv6; no dedicated IPv4
Egress controlallowedHosts deny-by-default list plus outbound handlers you write in Worker codeEgress policies per Devbox blueprint, runner or instance: block, advisory or allow by domainNo provider-side allowlist
Keeping keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeEgress rules inject a header from Namespace Vault, resolved outside the workloadOptional paid proxy ($1 a day while on, plus $1 per 1,000 requests) for model providers and HTTPS APIs you register
Coding agentsGuides for Claude Code, Codex, OpenCode and Pi in your image, plus integrationsRun Claude Code, Codex, OpenCode, Amp, Copilot or Cursor in Devbox sessions; hosts Claude Managed Agents, Cursor, Devin and Amp sessions; no prompt or steer APISeven installed (Claude Code, Codex, OpenCode and more), with a prompt, steer and events API
Operating systemsLinux (linux/amd64 images)Linux, macOS on Apple Silicon, and Windows on Team plans and upLinux only; Windows programs through Wine on the desktop
Every feature Battleships tracks (43)
FeatureCloudflare SandboxNamespaceboat
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNo documented wayYesYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUINo documented wayYesYes
BrowserWith your own setupWith your own setupYes
Computer-use APINo documented wayYesYes
SSHYesYesYes
Persistent diskWith your own setupYesYes
Pause/resumeNo documented wayYesYes
Automatic snapshotsWith your own setupYesYes
Fork/cloneWith your own setupNo documented wayYes
Live fork (no pause)With your own setupNo documented wayYes
Memory forkNo documented wayNo documented wayNo documented way
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo documented way
Wake on requestYesYesNo documented way
HTTPS preview URLsYesYesYes
Raw TCP inboundNo documented wayYesYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistYesYesNo documented way
Secret proxyYesYesYes
Secret proxy for any APIYesYesYes
Preinstalled agentsYesYesYes
Agent harness APIWith your own setupNo documented wayYes
MCP serverNo documented wayYesNo documented way
GPUNo documented wayNo documented wayNo documented way
WindowsNo documented wayYesNo documented way
Arm64No documented wayYesNo documented way
Self-hostingNo documented wayNo documented wayNo documented way
BYOCNo documented wayNo documented wayNo documented way
Open sourceYesNo documented wayNo documented way
Scoped API keysNot publishedNot publishedYes
Spend limitsNo documented wayYesYes
Usage per sandbox (API)Not publishedNo documented wayYes
Audit logsYesYesNo documented way
SSOYesYesNo documented way
SOC 2YesYesNo documented way
HIPAAYesNo documented wayNo documented way
EU data residencyYesYesNo documented way
Zero data retentionNot publishedNot publishedYes

Performance

Cloudflare SandboxNot measured
Namespace24.90 runs/s
boat28.06 runs/s

In StarSling's run of 3 October 2026 (run 37073680030), on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, boat did 28.06 runs/s and Namespace 24.90. Both share rank 2 of 15, so the run cannot separate them. On real repo builds in the same run, boat took 135.8 s for Better-Auth against 150.5 s, 980 s for Mastra against 1,051 s, and 428 s for OpenClaw against 570 s. StarSling does not name the Namespace product it tested. Every boat sandbox in the run ran on an AMD Ryzen 9 9950X host; boat also places some sandboxes on other hosts. Providers ran on different hardware in different regions. Cloudflare is not in that run, so we cannot compare its CPU.

V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Namespace measured on: Linux compute instance (unit-minutes, PAYG/overage $0.0015). Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. Cloudflare Sandbox is not in the public benchmarks we use, so we cannot say which is faster.

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. Start limits, per-start fees and plan minimums are in the price, boat's included.

ScenarioCloudflare Sandbox, a monthNamespace, a monthboat, 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$300 · Devbox on Business$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$148 · Workers Paid$426 · Devbox on Business · 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$2,448 · Devbox on Business$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$1,264 · Devbox Plus · 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$3,287 · Devbox Plus · with limits$8,800 · $2000/mo · with limits

Cloudflare Sandbox: You need Workers Paid ($5 a month minimum). CPU is billed only while busy, at $0.072 per vCPU-hour. Memory and disk are billed on the instance size in 10 ms steps until the container sleeps. 4 vCPU always comes with 12 GiB. Durable Object and Worker requests are billed on top. Snapshot pricing is not published.

Namespace: Devboxes are billed in Devbox Minutes at $0.004 each: a 4 vCPU / 8 GB Devbox uses one a minute, $0.24 an hour. Pay as you go, or Devbox Plus at $250 a month for 50,000 minutes. Team ($100) and Business ($250) plan minutes do not cover Devboxes, but you need those plans for longer sessions. Storage costs $0.20 per GB-month used.

Namespace: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. A default 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. The $20 plan includes 12 starts a minute, 60 an hour and 200 a day; extra starts cost $0.03 to $0.07. A stopped sandbox has no compute charge and keeps its disk at least 14 days. Saved snapshots above the included count ($0.056 a day each) and the AI proxy, if on, still bill while stopped.

Limits in those scenarios

Cloudflare keeps files between sessions only through snapshots, automatic saves or R2 that your code sets up, and its default account cap of 1,500 vCPU running at once is short of the 2,000 the 1,000-job burst needs, though Cloudflare raises it on request. A Namespace Devbox stops at 3 to 24 hours by plan, so one 8-hour session needs Business and the agent that never stops restarts at least once a day. Namespace caps Devboxes at 50 per workspace, so 300 user sandboxes and 1,000 jobs at once do not fit, and it publishes no egress price. boat does not fit the burst either: the $2,000 plan includes 90 starts a minute and 600 an hour, charges $0.03 to $0.07 for extra starts, and refuses starts above 270 a minute.

ScenarioCloudflare SandboxNamespaceboat
One coding agent, workdaysNone for this scenario
  • egress price not published
None for this scenario
One agent that never stopsNone for this scenario
  • Devbox on Business: sessions capped at 24 h
  • egress price not published
None for this scenario
50 agents in parallelNone for this scenario
  • egress price not published
None for this scenario
Sandboxes for your usersNone for this scenario
  • Devbox Plus: max 50 concurrent
  • egress price not published
None for this scenario
1,000 short jobs at once
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • Devbox Plus: max 50 concurrent
  • egress price not published
  • 2,400 starts/day included, paid above that (needs ~6,667)
  • 600 starts/hour included, paid above that (needs ~1,000)
  • starts above 90/min are paid, and starts above 270/min fail with 429

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. Useful 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. Useful if you need control per request: block every host not on your list and run your own code on each outbound call.
  • Next to the rest of Workers. If your app already runs on Workers, sandboxes sit next to Durable Objects and R2, in a region you can pick.

Use Namespace when

you need macOS or Windows machines, faster GitHub Actions runners with build caches, or dev boxes for people that keep their storage and stop when idle.

  • macOS and Windows. Useful if you build iOS or Mac apps or test on Windows: Namespace runs macOS on Apple Silicon and Windows machines.
  • CI runners and build caches. Useful if you want faster GitHub Actions: Namespace is a drop-in runner with Docker, Bazel, Turborepo and Nix caching.
  • Dev machines that keep their storage. Useful for people and agents who come back to the same box: a stopped Devbox keeps its files and starts when you connect.

Where boat fits

Cloudflare Sandbox is built for short sandboxes inside Workers, and Namespace is built for CI and dev machines with a session cap. If you run agents that work on Linux for hours or days, boat gives each one a full VM that saves its disk with no code, runs Docker and a desktop, and has no session cap once auto-stop is off. boat has no macOS, no Windows VM and runs only in the EU.

Work that survives a stop and a long day

On Cloudflare your code saves snapshots, automatic saves or R2 to keep files across sleep. On Namespace a Devbox stops at 3 to 24 hours by plan, even mid-task. boat saves the disk every minute and at each stop. Memory is not saved.

A whole Linux machine

Cloudflare runs Docker with iptables off on 20 GB of disk. Namespace offers /dev/kvm on compute instances and a computer-use API on macOS Devboxes. boat has Docker, systemd, /dev/kvm and a 60 fps Linux desktop on every sandbox.

Agents you drive from outside

On Cloudflare you bake each agent into your image and write the outbound handler for every token. On Namespace you run agents in Devbox sessions, or a partner hosts them. boat ships seven agents with a prompt, steer and events API.

Use boat when your agents work on Linux for hours or days: a full VM that saves its disk, with no session cap once auto-stop is off, Docker and /dev/kvm, a 60 fps desktop and coding agents you drive from outside. Compare it one to one: boat vs Cloudflare Sandbox and boat vs Namespace.

boat's own limits
  • Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
  • Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
  • A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
  • Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
  • boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
  • Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
  • Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
  • Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source

Questions people ask

Is Cloudflare Sandbox cheaper than Namespace?

In all five of our scenarios, Cloudflare's estimate is lower: for example $39 against $300 for one coding agent on workdays, because an 8-hour Devbox session needs Namespace Business, and $476 against $1,264 for sandboxes for your users. boat comes to $20 and $200 for those two.

Which is faster, Cloudflare Sandbox or Namespace?

Only Namespace is in StarSling's run of 3 October 2026: 24.90 V8 Web Tooling runs/s at 4 vCPU / 8 GB. Cloudflare is not in that run. boat did 28.06 on an AMD Ryzen 9 9950X host; boat and Namespace share rank 2, so the run cannot separate them on that test.

Can I run Docker inside Cloudflare Sandbox or Namespace?

Yes, both. Cloudflare supports docker:dind with iptables and IP forwarding turned off, because containers cannot change iptables. Namespace Linux Devboxes include Docker. boat runs Docker with BuildKit, root and systemd.

How long can a session run on each?

Cloudflare sets no fixed maximum but does not guarantee any runtime. A Namespace Devbox stops at 3 hours on Developer and Devbox Plus, 5 on Team and 24 on Business, even while you work in it. boat stops after 1 hour by default; on a paid plan you turn auto-stop off for no session cap.

Do they keep my files?

Namespace does: a stopped Devbox keeps its storage, billed at $0.20 per GB-month used. Cloudflare starts from a fresh disk after sleep, unless your code saves a snapshot (public beta, kept 30 days), schedules automatic saves or works in a mounted R2 bucket. boat saves the disk every minute and at each stop, and keeps it at least 14 days after a stop.

Does either one run macOS?

Namespace does, on Apple Silicon machines with Xcode, and it also runs Windows on Team plans and up. Cloudflare Sandbox and boat are Linux only.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons