Cloudflare Sandbox vs Replit

Cloudflare Sandbox is a sandbox SDK: your Worker starts containers that run code, sleep when idle, wake on the next request, and keep files through snapshots or R2 that your code sets up. Replit is an AI app builder: Replit Agent writes an app from a description, and Replit hosts it with Postgres and storage.

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.

Replit

Replit is an AI app builder and hosting platform: you describe an app in chat, Replit Agent writes it, and Replit publishes it.

You work in a browser workspace where Replit Agent sets up the project, writes the code, tests it and fixes problems, with system packages managed by Nix. When the app is ready you publish it as an Autoscale, Static, Scheduled or Reserved VM deployment, with Postgres and object storage next to it. It is built for people and teams who want a working app, not for programs that need to create many machines by API. This page compares the parts where the two overlap.

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 rankReplit: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A software factory starts many agents from code. Cloudflare starts a fresh disk after sleep unless your code restores a snapshot (beta, 30 days) or mounts an R2 bucket. Replit drives Replit Agent through its MCP server, with up to 10 parallel Agent tasks on Pro. boat saves the disk with no code and runs Docker and a desktop.
192nd of 365, with limits
$1,543 a month
204th of 365, with limits
$2,000 a month
5th cheapest of 365
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An always-on assistant needs its files to stay put. Cloudflare starts a fresh disk after sleep unless your code restores a snapshot (beta, 30 days) or mounts an R2 bucket. On Replit it is one Reserved VM billed all month. On boat you turn auto-stop off on a paid plan, and the disk is saved every minute.
43rd cheapest of 361
$2,188 a month
246th of 361, with limits
$2,033 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. Replit's Autoscale also bills only while it serves requests, but you set up the code runner yourself as an HTTP app.
17th cheapest of 336
$144 a month
225th of 336, with limits
$146 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
Cloudflare and boat both fit sandboxes for your users. On Replit each machine is a published app, and Replit does not publish how many can run at once.
19th cheapest of 349
$731 a month
229th of 349, with limits
$825 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
253rd of 349, with limits
$4,226 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
266th of 359, with limits
$685 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. Cloudflare runs Docker with iptables turned off and has 20 GB of disk at most. Replit's Nix-based docs do not describe Docker. boat has Docker with BuildKit on every sandbox.
303rd of 374, with limits
$704 a month
278th of 374, with limits
$425 a month
2nd cheapest of 374
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Replit's workspace is good for coding by hand in the browser, with SSH on paid plans. 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
181st of 371, with limits
$109 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
Replit's VNC pane streams a desktop to a person; its docs describe no computer-use API. On Cloudflare you build a desktop into your image, or use the separate Browser Run service. boat ships a 60 fps desktop with computer tools for agents.
207th of 367, with limits
$460 a month
225th of 367, with limits
$619 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
277th of 356, with limits
$317 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
282nd of 343, with limits
$217 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
147th of 327, with limits
$4,378 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
Red-team runs need root networking and raw TCP. Cloudflare containers cannot change iptables or take raw TCP inbound, and Replit's docs describe neither. boat has root and raw ports over public IPv6.
25th cheapest of 351
$325 a month
241st of 351, with limits
$215 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
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement

Key features

FeatureCloudflare SandboxReplitboat
Kind of productSandbox SDK: containers your Worker creates and drives by codeAI app builder with browser workspaces and app hostingSandboxes you create, stop and fork by API, SDK or CLI
IsolationFirecracker microVM per container, own kernel and networkNot documented; the security page says strong logical separation between usersFull VM with its own kernel, on a physical host dedicated to boat (AMD Ryzen 7 9700X or Ryzen 9 9950X); vCPUs are shared
Creating machines from codeYes, from a Worker, each sandbox backed by a Durable ObjectMCP server tools to create, update and publish apps; the docs describe no API to start many machinesAPI, SDK and CLI to create, stop, resume and fork sandboxes, within each plan's start limits
Largest machine4 vCPU / 12 GiB / 20 GB diskReserved VM sizes such as 4 vCPU / 16 GB with dedicated vCPUs; workspace sizes not published16 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 directory backups or a mounted R2 bucketWorkspace files persist, and Agent checkpoints save files, database and settings for rollback; published apps keep data in Postgres or App StorageDisk saved every minute and at each stop, with no code; kept at least 14 days after a stop, longer as a saved snapshot; memory and running programs are not saved
Fork a running sandboxSnapshot or back up a running sandbox, then start new sandboxes from it; no one-call forkNo fork of a running machine documentedOne call, without stopping it; the fork uses the last 1-minute snapshot
Docker and nested virtualizationdocker:dind with iptables and IP forwarding turned off; nested virtualization not documentedSystem packages come from Nix; the docs do not describe Docker, systemd or /dev/kvmDocker with BuildKit and Compose, root, systemd and /dev/kvm
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 browsersVNC pane that streams a desktop to your browser; the docs describe no computer-use API1920x1080, 60 fps desktop and Chrome, computer tools, embeddable stream; no GPU
Coding agentsGuides for Claude Code, Codex, OpenCode and Pi in your imageReplit Agent, which you can also drive from an MCP clientSeven installed (Claude Code, Codex, OpenCode and more), with a prompt, steer and events API
Keeping keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeReplit manages keys for OpenAI, Anthropic, Google, Grok and OpenRouter models; other keys are secrets in the appOptional paid proxy ($1 a day while on, plus $1 per 1,000 requests) for model providers and HTTPS APIs you register
Egress controlallowedHosts deny-by-default list plus outbound handlers in Worker codeNo egress allowlist documentedNo provider-side allowlist; filter inside the VM with root
Inbound trafficHTTP and WebSocket previews routed through your Worker; SSH; no raw TCP inbound or public IPPublished apps on HTTPS domains and custom domains; SSH into the workspace on paid plansUp to 50 HTTPS URLs, token-gated by default; SSH; raw ports over public IPv6; the IP changes at each resume
Sleep when idleStops after inactivity and wakes on the next requestAutoscale apps wake on the first request and go idle after 15 minutesAuto-stop 1 h after create or resume by default; no idle timer and no wake on request
Databases and storageNext to Durable Objects and R2Postgres and App Storage built into each appNo hosted databases; run your own inside a sandbox
RegionsSeveral regions across Cloudflare's network; pin to a region or jurisdictionNorth America, Europe, Asia, South America and Australia for published apps on Core and upGermany, Finland and France; no US or Asia region; you cannot pick one
Every feature Battleships tracks (43)
FeatureCloudflare SandboxReplitboat
Full VM (own kernel)YesYesYes
Docker insideYesNot publishedYes
Nested virtualizationNo documented wayNo documented wayYes
RootYesNot publishedYes
SystemdNot publishedNot publishedYes
Desktop GUINo documented wayYesYes
BrowserWith your own setupNo documented wayYes
Computer-use APINo documented wayNo documented wayYes
SSHYesYesYes
Persistent diskWith your own setupYesYes
Pause/resumeNo documented wayNo documented wayYes
Automatic snapshotsWith your own setupYesYes
Fork/cloneWith your own setupYesYes
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 wayNot publishedYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistYesNo documented wayNo documented way
Secret proxyYesYesYes
Secret proxy for any APIYesNo documented wayYes
Preinstalled agentsYesYesYes
Agent harness APIWith your own setupYesYes
MCP serverNo documented wayYesNo documented way
GPUNo documented wayNo documented wayNo documented way
WindowsNo documented wayNo documented wayNo documented way
Arm64No documented wayNot publishedNo 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 publishedYesYes
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
ReplitNot measured
boat28.06 runs/s

Neither Cloudflare Sandbox nor Replit is in StarSling's run of 3 October 2026 (run 37073680030), so we cannot say which is faster. 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.

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 Replit 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.

ScenarioCloudflare Sandbox, a monthReplit, 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$122 · Pro $100 (annual) · 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$122 · Pro $100 (annual) · 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$6,092 · Pro $2,500 (annual) · 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$403 · Pro $250 (annual) · 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$825 · Pro $1,000 (annual) · 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. Snapshot pricing is not published.

Replit: Replit plans (Core $20, or $18 billed annually; Pro from $100) turn into monthly credits for Agent work and hosting. A Reserved VM has a fixed monthly price per size, such as $130 for 4 vCPU / 16 GB with dedicated vCPUs, and bills busy or idle. Autoscale charges a $2 monthly base fee plus usage while it serves. Our bills price agents as Reserved VMs and leave out Agent usage.

Replit: 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 50 GB of files between sessions 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 vCPU the 1,000-job burst needs, raised on request. Replit does not fully fit any scenario because it is an app platform: each always-on agent is a Reserved VM billed all month, and it does not publish how many can run at once. 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 SandboxReplitboat
One coding agent, workdaysNone for this scenario
  • different kind of product: app platform
  • monthly / always-on product: priced as 1 machines kept on and reused
None for this scenario
One agent that never stopsNone for this scenario
  • different kind of product: app platform
None for this scenario
50 agents in parallelNone for this scenario
  • not confirmed: Docker inside
  • different kind of product: app platform
  • monthly / always-on product: priced as 50 machines kept on and reused
  • how many machines can run at once: limit not published, probably fine at 50 (the typical published limit is 50)
None for this scenario
Sandboxes for your usersNone for this scenario
  • adjacent product, not a like-for-like sandbox
  • different kind of product: app platform
  • not confirmed: how many machines can run at once (you need 300; the typical published limit is 50)
None for this scenario
1,000 short jobs at once
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • adjacent product, not a like-for-like sandbox
  • different kind of product: app platform
  • not confirmed: how many machines can run at once (you need 1,000; the typical published limit is 50)
  • 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 runs on Workers and needs short sandboxes, started by code, that sleep when idle and only reach hosts you allow.

  • Sandboxes your code starts. Useful for apps that need many short sandboxes: your Worker creates each one by code, and it sleeps when idle.
  • Egress rules you can program. Useful when sandboxes run untrusted code: block every host except the ones you list, and run your own code on each request.
  • Fits next to Workers. If your app already runs on Workers, sandboxes sit next to Durable Objects and R2, in a region you can pick.

Use Replit when

you want Replit Agent to build a web app from a description and host it for you, with Postgres and storage built in.

  • An app built and hosted for you. Useful if you want a working app from a description: Replit Agent builds, tests and publishes it for you.
  • Databases and storage built in. Useful for full web apps: each app gets Postgres and App Storage next to it, with no setup.
  • A workspace for people. Useful for teams that code by hand in the browser, with Replit Agent and collaborators in the same workspace.

Where boat fits

If what you run is coding agents that work for hours, Cloudflare containers keep their files through snapshot or R2 code you write, and Replit hosts apps rather than giving your code machines by API. boat gives each agent a full VM that saves its disk with no code, runs Docker and a desktop, and comes with agents you drive from outside. boat runs only in the EU, has no GPU and limits starts per plan.

Files that stay put with no code

On Cloudflare your code saves snapshots (kept 30 days), automatic saves or R2. On Replit an always-on machine is a Reserved VM app billed all month. boat saves the disk every minute and at each stop, and can fork a running sandbox. Memory is not saved, so a resume is like a reboot.

Docker, root and /dev/kvm

Cloudflare runs Docker with iptables turned off on 20 GB of disk. Replit's Nix setup does not document Docker or systemd. boat's VM runs docker compose, systemd services and Android emulators.

Agents driven from outside

On Cloudflare you bake each agent into your image and write the outbound handler for every token. Replit drives Replit Agent through its MCP server. boat ships Claude Code, Codex and more with a prompt, steer and events API.

Use boat when your agents work for hours on a VM that saves its disk with no code, with Docker, a desktop and coding agents you drive from outside. Compare it one to one: boat vs Cloudflare Sandbox and boat vs Replit.

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 Replit?

It depends on the job. One coding agent on workdays is $39 on Cloudflare and $122 on Replit, and 50 agents in parallel are $1,660 against $6,092. For an agent that never stops Replit is lower, $122 against $148, and for 300 user sandboxes $403 against $476. Replit is priced as Reserved VMs, which bill all month. boat comes to $20, $317, $26 and $200 for those four.

Which is faster, Cloudflare Sandbox or Replit?

We cannot say. Neither is in StarSling's run of 3 October 2026. boat did 28.06 V8 Web Tooling runs/s in that run at 4 vCPU / 8 GB, on an AMD Ryzen 9 9950X host; boat also places some sandboxes on other hosts.

Can I run Docker on Cloudflare Sandbox or Replit?

On Cloudflare, yes, as docker:dind with iptables and IP forwarding turned off. Replit's docs set up environments with Nix packages and do not describe running Docker. Every boat sandbox runs Docker with BuildKit and Compose, root and systemd.

Do they keep my files?

Yes, in different ways. Cloudflare keeps files with a snapshot (public beta, 30 days), scheduled automatic saves, an R2 backup or a mounted R2 bucket. Replit keeps workspace files and Agent checkpoints, and published apps keep data in Postgres or App Storage. boat saves the disk every minute and at each stop with no code, and keeps it at least 14 days after a stop.

Is Replit a sandbox for AI agents like Cloudflare Sandbox?

Not in the same sense. Cloudflare Sandbox gives your code containers to run work in. Replit is an app builder whose outside entry point is an MCP server that drives Replit Agent one app at a time.

Where do they run?

Cloudflare places containers in several regions of its network and lets you pin a region or jurisdiction. Replit hosts data mainly in the United States and publishes apps on five continents on Core and up. 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