Cloudflare Sandbox vs Upstash Box
Cloudflare Sandbox runs each sandbox in its own Firecracker microVM inside the Workers platform. Its disk starts fresh after sleep unless your code saves a snapshot or uses R2. Upstash Box is a Docker container with a coding agent built in. It pauses when idle, keeps its files with no code, and bills only the CPU it uses.
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.
- Largest instance
- 4 vCPU, 12 GiB memory, 20 GB disk
- Compliance
- Cloudflare holds a SOC 2 Type II report
Upstash Box
Upstash Box is a cloud computer for AI agents from Upstash, the company known for serverless Redis, Vector and QStash.
Each box is a Docker container with its own filesystem, shell, git and an optional coding agent such as Claude Code, Codex, OpenCode or Cursor, which you drive from TypeScript or Python SDKs. A box pauses when it sits idle, keeps its files, and you pay for the CPU it actually uses. Upstash built it to run its own Context7 service and opened it to everyone in March 2026.
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 workload | Cloudflare Sandbox: price rank | Upstash Box: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month A software factory needs Docker and files that survive a break. Cloudflare runs Docker with iptables off, and your code keeps files with snapshots, automatic saves or R2. Upstash keeps files with no code but does not document Docker inside a box. boat has Docker and saves the disk with no code. | 192nd of 365, with limits $1,543 a month | 98th of 365, with limits $464 a month | 5th cheapest of 365 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB | 43rd cheapest of 361 $2,188 a month | 170th of 361, with limits $450 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 Both fit short code runs well: each bills CPU only while busy and wakes on the next request. Upstash's EphemeralBox is ready at once and deletes itself after at most 3 days. | 17th cheapest of 336 $144 a month | 13th cheapest of 336 $119 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 Both fit sandboxes for your users. Upstash wakes a user's paused box on the next request and runs 1,000 boxes at once on Pay as You Go. Cloudflare allows 1,500 vCPU per account by default. boat gives each user a full VM, with starts limited per plan. | 19th cheapest of 349 $731 a month | 4th cheapest of 349 $222 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 | 343rd of 349, with limits $8,000 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 Both fit agent evals. Upstash snapshots a running box and starts many boxes from it. Cloudflare starts new sandboxes from a saved snapshot or backup. boat forks a running sandbox from its last 1-minute snapshot. | 60th cheapest of 359 $818 a month | 67th cheapest of 359 $1,011 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 jobs that build images need Docker and room on disk. Upstash does not document Docker inside a box, and its disks stop at 30 GB. Cloudflare has 20 GB at most, with iptables off. boat has Docker with BuildKit and 51 GB of disk at the default size. | 303rd of 374, with limits $704 a month | 122nd cheapest of 374 $1,480 a month | 2nd cheapest of 374 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box must keep its files when you log off. An Upstash keep-alive box does that for a flat monthly price. Cloudflare starts a fresh disk after sleep unless your code restores a snapshot (beta, 30 days) or mounts an R2 bucket. boat keeps a stopped disk at least 14 days with no compute charge. | 123rd cheapest of 371 $93 a month | 8th cheapest of 371 $19 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 Neither ships a desktop. On Cloudflare you build one into your image, or use the separate Browser Run service. Upstash runs Chromium on a virtual display with a view-only live view. boat streams a Linux desktop at 60 fps with computer tools. | 207th of 367, with limits $460 a month | 123rd of 367, with limits $76 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 Upstash ships a managed Chromium with AI page actions and CDP. On Cloudflare you bake a browser into your image, or use the separate Browser Run service. boat gives the agent Chrome on a desktop it can see and click. | 68th of 356, with limits $233 a month | 48th of 356, with limits $38 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 | 41st cheapest of 343 $400 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 | 201st of 327, with limits $8,000 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 | 255th of 351, with limits $259 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 requirement | Not ranked: misses a requirement | Not ranked: misses a requirement |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Not ranked: misses a requirement | Not ranked: misses a requirement | Not ranked: misses a requirement |
Key features
| Feature | Cloudflare Sandbox | Upstash Box | boat |
|---|---|---|---|
| Isolation | Firecracker microVM per container, own kernel and network | Docker container per box on AWS, with its own filesystem, process tree and network stack | Full VM with its own kernel, on a physical host dedicated to boat (AMD Ryzen 7 9700X or Ryzen 9 9950X); vCPUs are shared |
| Files after a pause | Disk is fresh after sleep; keep files with snapshots (public beta, 30 days), scheduled automatic saves, R2 directory backups or a mounted R2 bucket | Pauses when idle and keeps its files with no code; storage keeps billing while paused | Disk saved every minute and at each stop, with no code; kept at least 14 days after a stop, longer as a saved snapshot |
| Largest machine | 4 vCPU / 12 GiB / 20 GB disk | Large: 8 vCPU / 16 GB / 30 GB disk on self-serve plans; custom sizes on Enterprise | 16 vCPU / 32 GB / 251 GB disk (needs the $100 plan or higher); 51 GB disk at 4 vCPU / 8 GB |
| Docker inside | docker:dind with iptables and IP forwarding turned off | Not documented; the box is itself a Docker container, and custom images are listed as coming soon | Docker with BuildKit and Compose, root and systemd |
| Nested virtualization | Not documented | Not documented; boxes are containers | Yes, /dev/kvm for Android emulators and VMs |
| Fork | Snapshot or back up a running sandbox, then start new sandboxes from it; no one-call fork | Snapshot a running box and start many new boxes from it | Fork a running sandbox in one call from its last 1-minute snapshot |
| Wake on request | Stops after inactivity and wakes on the next request | A request to a public URL resumes a paused box | No; a stopped sandbox is started by API |
| Desktop and browser | Built-in desktop removed in SDK 0.10.2; build one into your own image, or use the separate Browser Run service for headless browsers | Managed Chromium with AI page actions, CDP and a view-only live view; no desktop or VNC | 1920x1080, 60 fps desktop and Chrome, computer tools, embeddable stream; no GPU |
| Coding agents | Guides for Claude Code, Codex, OpenCode and Pi in your image | Claude Code, Codex, OpenCode and Cursor built in, with run and stream APIs, webhooks and scheduled prompts | Seven installed (Claude Code, Codex, pi, OpenCode and more), with a prompt, steer and events API |
| Inbound traffic | HTTP and WebSocket previews routed through your Worker; SSH; no raw TCP inbound or public IP | HTTPS URL per port, public unless you add a token or basic auth; SSH through a gateway; no raw TCP documented | Up to 50 HTTPS URLs, token-gated by default; SSH; raw ports over public IPv6 |
| Outbound rules | allowedHosts deny-by-default list plus outbound handlers you write in Worker code | Allow all, deny all, or allow and deny by domain and CIDR, changeable on a running box | Open internet, no provider-side allowlist; filter inside the VM with root |
| Keeping keys out of the sandbox | Your outbound handler adds the token for any HTTP or HTTPS host; you write the code | Host proxy injects headers into outbound HTTPS on port 443 for any host; set when the box is created | Optional paid proxy ($1 a day while on, plus $1 per 1,000 requests) for model providers and HTTPS APIs you register |
| Running at once | 1,500 vCPU, 6 TiB memory and 30 TB disk per account by default; higher on request; no per-start fee | 1,000 boxes on Pay as You Go, raised on request; no start limit published | 100 to 2,000 by plan; $2,000 plan includes 90 starts a minute; extra starts $0.03 to $0.07; starts above 270 a minute fail, and boat never queues a start |
| Regions | Several regions across Cloudflare's network; pin to a region or jurisdiction | AWS us-east-1; custom regions on Enterprise | Germany, Finland and France; no US or Asia region; you cannot pick one |
Every feature Battleships tracks (43)
| Feature | Cloudflare Sandbox | Upstash Box | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | No documented way | Yes |
| Docker inside | Yes | Not published | Yes |
| Nested virtualization | No documented way | No documented way | Yes |
| Root | Yes | Not published | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | No documented way | No documented way | Yes |
| Browser | With your own setup | Yes | Yes |
| Computer-use API | No documented way | No documented way | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | With your own setup | Yes | Yes |
| Pause/resume | No documented way | Yes | Yes |
| Automatic snapshots | With your own setup | No documented way | Yes |
| Fork/clone | With your own setup | Yes | Yes |
| Live fork (no pause) | With your own setup | Yes | Yes |
| Memory fork | No documented way | No documented way | No documented way |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No documented way |
| Wake on request | Yes | Yes | No documented way |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No documented way | No documented way | Yes |
| Public IPv4 | No documented way | No documented way | No documented way |
| Egress allowlist | Yes | Yes | No documented way |
| Secret proxy | Yes | Yes | Yes |
| Secret proxy for any API | Yes | Yes | Yes |
| Preinstalled agents | Yes | Yes | Yes |
| Agent harness API | With your own setup | Yes | Yes |
| MCP server | No documented way | Yes | No documented way |
| GPU | No documented way | No documented way | No documented way |
| Windows | No documented way | No documented way | No documented way |
| Arm64 | No documented way | Yes | No documented way |
| Self-hosting | No documented way | No documented way | No documented way |
| BYOC | No documented way | No documented way | No documented way |
| Open source | Yes | No documented way | No documented way |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | No documented way | Not published | Yes |
| Usage per sandbox (API) | Not published | Yes | Yes |
| Audit logs | Yes | Not published | No documented way |
| SSO | Yes | No documented way | No documented way |
| SOC 2 | Yes | Yes | No documented way |
| HIPAA | Yes | No documented way | No documented way |
| EU data residency | Yes | No documented way | No documented way |
| Zero data retention | Not published | Not published | Yes |
Performance
Neither Cloudflare Sandbox nor Upstash Box is in StarSling's run of 3 October 2026 (run 37073680030), so we cannot say which has faster CPU. In that run boat did 28.06 runs/s on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, second of 15. 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. In ComputeSDK's run of 6 November 2026, with 100 started at once at each provider's default size, the median time to first command was 671 ms for Cloudflare and 2.34 s for Upstash Box. boat is not in ComputeSDK.
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. 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 and Upstash Box are 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.
| Scenario | Cloudflare Sandbox, a month | Upstash Box, 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 | $21 · 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 | $21 · Pay as You Go | $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 | $900 · 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 | $306 · Pay as You Go | $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,822 · Pay as You Go | $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. Snapshot pricing is not published.
Upstash Box: A standard box is billed for the CPU it uses, at $0.10, $0.20 or $0.40 per active CPU hour for Small, Medium and Large, plus $0.10 per GB-month of storage, snapshots included. RAM is free, and Pay as You Go has no monthly fee. A keep-alive box costs a flat $8, $16 or $32 a month, busy or not. The egress price is not published.
Upstash Box: 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 days only through snapshot, automatic-save or R2 code, and its local disk tops out at 20 GB. Its 1,500 vCPU account limit is short of the 2,000 the 1,000-job burst needs, raised on request. Upstash fits that burst, but it does not document Docker inside a box, so it misses the 50-agent scenario; its disks stop at 30 GB and its egress price is not published. boat fits the 50-agent scenario at $317 a month but not the burst: 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.
| Scenario | Cloudflare Sandbox | Upstash Box | boat |
|---|---|---|---|
| One coding agent, workdays | None for this scenario |
| None for this scenario |
| One agent that never stops | None for this scenario |
| None for this scenario |
| 50 agents in parallel | None for this scenario |
| None for this scenario |
| Sandboxes for your users | None for this scenario |
| None for this scenario |
| 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 with their own kernel that wake on request, with egress rules you write as code.
- A microVM with its own kernel. Each container runs in its own Firecracker microVM, and Docker works inside it, with iptables turned off.
- Egress you can program. Useful when every outbound request must pass your own Worker code, on top of a deny-by-default host list.
- Close to your Workers app. If your app already runs on Workers, sandboxes sit next to Durable Objects and R2, in a region you can pick.
Use Upstash Box when
your agents mostly wait, need to keep their files between pauses with no code, come with a coding agent built in, start in big bursts, and can run in the US.
- Files stay through a pause. A box pauses when idle and comes back with its files, with no code, so an agent can pick up where it stopped.
- Agents ready out of the box. Claude Code, Codex, OpenCode and Cursor come built in, with streaming, webhooks and scheduled prompts.
- Pay only for CPU you use. Good for agents that wait a lot: idle CPU and RAM cost nothing, and a keep-alive box has a flat price.
Where boat fits
Look at boat if your agents need more than a short run: Docker, a disk larger than 30 GB that is saved with no code, emulators or a desktop. Cloudflare keeps files through snapshot or R2 code, and Upstash does not document Docker inside a box, which is why Upstash does not fit the 50-agent scenario on this page. boat runs only in the EU, has no GPU and limits starts per plan.
A full machine with Docker and /dev/kvm
Upstash does not document Docker inside a box, and Cloudflare runs Docker with iptables off and documents no nested virtualization. boat gives each agent root, systemd, Docker with BuildKit and /dev/kvm for emulators and VMs.
Files saved with no code, and room for them
On Cloudflare your code saves snapshots (kept 30 days), automatic saves or R2, on 20 GB of disk; Upstash stops at 30 GB. boat saves the disk every minute, has 51 GB at 4 vCPU / 8 GB, and keeps a stopped disk at least 14 days. A boat resume is like a reboot.
A desktop and real hosting
Neither ships a desktop, and neither takes raw TCP from outside. boat streams a 60 fps desktop for computer-use agents, serves up to 50 HTTPS URLs and takes raw ports over public IPv6.
Use boat when your agents need a real machine for hours: Docker, emulators, a desktop, a disk above 30 GB saved with no code, and hosting on many ports. Compare it one to one: boat vs Cloudflare Sandbox and boat vs Upstash Box.
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 Upstash Box?
Not in the scenarios on this page: Upstash's estimate is lower in all five, though it does not fit the 50-agent one because Docker inside a box is not documented. One always-on agent is $21 a month on Upstash against $148 on Cloudflare, and 300 user sandboxes are $306 against $476. boat costs $26 and $200 for the same two, and $8,800 for 1,000 short jobs at once, because it bills extra starts.
Which one keeps my files?
Both can. An Upstash box pauses when idle and resumes with its files, with no code, and storage keeps billing while paused. Cloudflare keeps files with a snapshot (public beta, 30 days), scheduled automatic saves, an R2 backup or a mounted R2 bucket. boat saves the disk every minute and at each stop with no code, and keeps it at least 14 days after a stop.
Can I run Docker inside Cloudflare Sandbox or Upstash Box?
On Cloudflare, yes, through docker:dind with iptables and IP forwarding turned off. Upstash does not document Docker inside a box, since each box is itself a Docker container. boat runs Docker with BuildKit and Compose, and systemd.
Which is faster?
We cannot compare CPU: neither is in StarSling's run of 3 October 2026. For start time with 100 at once, ComputeSDK measured a median of 671 ms for Cloudflare and 2.34 s for Upstash Box (2026-11-06). boat did 28.06 V8 Web Tooling runs/s in StarSling's run, on an AMD Ryzen 9 9950X host; boat is not in ComputeSDK.
Which has stronger isolation?
Cloudflare runs each container in its own Firecracker microVM with its own kernel. An Upstash box is a Docker container with its own filesystem, process tree and network stack. boat sandboxes are full VMs with their own kernel.
Where do they run?
Cloudflare places containers in several regions of its network and lets you pin a region or jurisdiction. Upstash Box runs in AWS us-east-1, with custom regions on Enterprise. boat runs on machines in Germany, Finland and France, and you cannot pick a region.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs Cloudflare Sandbox
- boat vs Upstash Box
- 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