Modal vs Deno Sandbox

Modal runs sandboxes for up to 24 hours inside a big AI compute platform, with GPUs and regions around the world. Deno Sandbox gives short runs of code a small Firecracker microVM that starts in under 200 ms, locks down outbound traffic and lives up to 30 minutes.

The companies and products

Modal

Modal is a serverless cloud for AI work: inference, training, batch jobs and sandboxed code, all driven from Python, TypeScript or Go code.

Modal Sandboxes are containers you create from code, run commands in, and then terminate. By default they run under gVisor, a user-space kernel from Google; since October 2026 you can also pick a VM runtime with its own Linux kernel for Docker and FUSE (Battleships tracks that as a separate card, Modal VM Sandboxes). It suits teams that already run models on Modal and want short-lived, scalable code execution next to their GPUs.

Deno Sandbox

Deno Sandbox is part of Deno Deploy, the hosting platform from the company behind the Deno runtime, and runs untrusted or AI-generated code in Linux microVMs.

Each sandbox is a Firecracker microVM with 2 vCPU, up to 4 GB of memory and a 10 GB disk that is wiped when it ends, created from a TypeScript or Python SDK. Outbound traffic goes through a proxy that can enforce a host allowlist and swap placeholder secrets for real ones. It is built for short runs of agent or user code, and a sandbox can be promoted to a Deno Deploy app.

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. “19th cheapest of 345” means 18 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 workloadModal: price rankDeno Sandbox: price rankboat: 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 a disk that stays for hours, which Deno's 2 vCPU, 30-minute sandbox cannot give, and boat ranks 3rd with a full match.
Can't run it290th of 367, with limits
$5,665 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An agent that lives on its machine all month outlasts both: Modal ends a sandbox within 24 hours and Deno within 30 minutes, while boat has no session cap on paid plans.
196th of 366, with limits
$1,924 a month
287th of 366, with limits
$5,803 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
Both suit short code runs: Modal ranks 19th with a full match at about $181 a month, while Deno Sandbox ranks 141st at about $329 a month as a compromise, with Builder capped at 20 at once per region.
19th cheapest of 345
$181 a month
141st of 345, with limits
$329 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
Modal fits sandboxes for your users with up to 5,000 containers on Team, while Deno Builder stops at 20 at once per region; boat ranks 1st here because a stopped sandbox keeps its disk and costs nothing.
11th cheapest of 361
$811 a month
148th of 361, with limits
$1,863 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
RL rollouts launch many short sandboxes at once, which Modal is built for, and Deno's Builder plan allows only 20 at once per region.
5th cheapest of 360
$19,038 a month
122nd of 360, with limits
$7,963 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
59th cheapest of 364
$1,244 a month
296th of 364, with limits
$1,563 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 jobs that build Docker images need the VM runtime on Modal and are not documented on Deno, while every boat sandbox runs Docker.
126th cheapest of 377
$1,793 a month
304th of 377, with limits
$731 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
138th of 368, with limits
$23 a month
179th of 368, with limits
$200 a month
18th cheapest of 368
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Neither Modal nor Deno has a desktop for computer use; boat ships a 60fps desktop with Chromium in every sandbox.
98th of 369, with limits
$183 a month
280th of 369, with limits
$1,583 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
177th of 367, with limits
$136 a month
284th of 367, with limits
$783 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
267th of 346, with limits
$394 a month
286th of 346, with limits
$573 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
223rd of 338, with limits
$8,795 a month
247th of 338, with limits
$11,923 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
Can't run it251st of 360, with limits
$367 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
Modal has GPUs from T4 to B300, and neither Deno Sandbox nor boat has any, so Modal is the pick for GPU jobs.
19th cheapest of 98
$1,187 a month
Can't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureModalDeno Sandboxboat
IsolationgVisor by default; VM runtime with its own kernel availableFirecracker microVM with its own kernelFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Machine sizeYou pick CPU and memory per sandbox; the maximum is not published2 vCPU fixed, 768 MB to 4 GB memory, 10 GB disk4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB on the $100 plan and above
Longest session24 hours (default 5 minutes)Up to 30 minutes; longer work can be promoted to a Deno Deploy appNo cap on paid plans (default TTL 1 h, changeable)
Disk that persistsRoot disk gone when the sandbox ends; only Volumes keep filesRoot disk wiped when the sandbox ends; opt-in volumes of 300 MB to 20 GB, Chicago onlyWhole disk saved every minute and on stop; a stopped sandbox costs nothing
Snapshots and forkFilesystem snapshots into an image; memory snapshots in alpha that end the sandboxRead-only snapshots of a volume that new sandboxes can boot fromAutomatic disk snapshots; fork a running sandbox without stopping it
Docker and nested virtualizationDocker only with the VM runtime; nested virtualization on request for Team and EnterpriseRoot access; Docker and nested virtualization not documentedDocker, systemd and /dev/kvm in every sandbox
GPUsT4 to B300, on the gVisor runtime; 10 at once on Starter, 50 on TeamNoneNone
Desktop, browser, computer useNot offered; an example shows how to set up VNC yourselfNo desktop; a VS Code editor in the browser and SSH60fps desktop, Chromium and computer-use API built in
Sandboxes at once100 containers on Starter, 5,000 on Team3 per region on Pro, 20 per region on BuilderSet by plan, with start limits per minute, hour and day
Inbound accessEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistHTTPS URL per exposed port, public without authentication; SSHHTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP
Outbound rulesBlock all, IP-range allowlist, domain allowlist (beta)Host allowlist per sandbox, enforced by a proxy outside the VMOpen internet, no provider-side allowlist
Keeping API keys out of the sandboxSecrets are environment variables, or you run your own proxy in a sidecarSecrets swapped in on outbound requests to approved hosts; the sandbox sees a placeholderCredentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Coding agentsExamples onlyA root image with Claude Code, run through the shell command APIClaude Code, Codex and five other agents preinstalled, with a prompt, steer and events API
Start time and regionsFast starts; US, EU and Asia-Pacific, pinning a region costs 1.15x to 1.75xUnder 200 ms; Amsterdam and ChicagoBoots a full VM; EU only (Germany, Finland, France)
Every feature Battleships tracks (43)
FeatureModalDeno Sandboxboat
Full VM (own kernel)NoYesYes
Docker insideNoNot publishedYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdYesNot publishedYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeNoNoYes
Automatic snapshotsNoNoYes
Fork/cloneYesNoYes
Live fork (no pause)NoNoYes
Memory forkYesNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesNoYes
Idle auto-stopYesNoNo
Wake on requestNoNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundYesNoYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyNoYesYes
Secret proxy for any APINoYesYes
Preinstalled agentsNoYesYes
Agent harness APINoNoYes
MCP serverNoNoNo
GPUYesNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedYesYes
Usage per sandbox (API)Not publishedNoYes
Audit logsYesNot publishedNo
SSOYesNoNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Modal12.79 runs/s
Deno SandboxNot measured
boat26.69 runs/s

In the StarSling hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB on 29 September 2026, Modal's default gVisor sandbox finished 12.79 runs per second and boat finished 26.69, about twice as much work. Deno Sandbox has no comparable measurement: it is not in that benchmark, and its fixed 2 vCPU shape could not run the 4 vCPU test as set up. Deno says a sandbox starts in under 200 ms, which is a start time, not a CPU score.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal measured on: Sandbox (gVisor), request = size, any region. Deno Sandbox has 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.

ScenarioModal, a monthDeno Sandbox, 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
$15 · Starter · with limits$53 · Pro · with limits$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$178 · Starter · with limits$200 · Builder · 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
$2,229 · Starter · with limits$2,779 · Builder · 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
$792 · Team$783 · Builder · 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
$3,193 · Team · with limits$1,563 · Builder · with limits$2,000 · $2000/mo · with limits

Modal: Modal bills by the second for the higher of the CPU and memory you request or what you use, and an idle sandbox pays until it is terminated. Starter is free with $30 of monthly credit, and Team is $250 a month with $100 of credit.

Deno Sandbox: Sandboxes need Deno Deploy Pro at $20 a month or Builder at $200 a month; the fee is not credit but includes CPU, memory and egress allowances shared with your Deploy apps. Past those, CPU costs $0.10 per hour of active CPU time and memory $0.025 per GiB-hour for the whole life of the sandbox.

Deno Sandbox: boat charges one hourly rate per machine size, by the second, only while the sandbox runs. Plans start at $20 a month and the whole fee becomes usage credit; a stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

Modal fits only the sandboxes-for-your-users scenario: elsewhere its files survive only in Volumes, Starter caps a session at 24 hours, the 50-agent fleet needs Docker the default sandbox lacks, and 1,000 short jobs land on shared vCPUs. Deno Sandbox fits none of the five, because a sandbox lives up to 30 minutes, is fixed at 2 vCPU / 4 GiB and Builder allows 20 at once per region. boat fits four of the five; at 1,000 short jobs at once its top plan queues starts above 90 a minute and allows 2,400 starts a day.

ScenarioModalDeno Sandboxboat
One coding agent, workdays
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • Pro: sessions capped at 0.5 h
  • capped at 2 vCPU / 4 GiB
  • largest size is 2 vCPU / 4 GiB
  • disk beyond 10 GiB: price unknown
None that bite
One agent that never stops
  • Starter: sessions capped at 24 h
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • Builder: sessions capped at 0.5 h
  • capped at 2 vCPU / 4 GiB
  • largest size is 2 vCPU / 4 GiB
  • disk beyond 10 GiB: price unknown
None that bite
50 agents in parallel
  • missing Docker inside
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • Builder: max 20 concurrent
  • Builder: sessions capped at 0.5 h
  • capped at 2 vCPU / 4 GiB
  • largest size is 2 vCPU / 4 GiB
None that bite
Sandboxes for your usersNone that bite
  • Builder: max 20 concurrent
None that bite
1,000 short jobs at once
  • shared vCPUs on this tier (Modal sells dedicated cores separately as “Sandbox (gVisor), request = size, any region”): heavy, sustained CPU use can be slowed by other tenants
  • Builder: max 20 concurrent
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

Which one should you use?

Use Modal when

your sandboxes need GPUs, run up to a day, must run in many regions, or come in huge bursts of thousands at once.

  • GPUs next to your sandboxes. Useful if your agent trains or runs models: Modal rents GPUs from T4 to B300 on the same platform as its sandboxes.
  • Longer runs and very large fleets. A Modal sandbox can run 24 hours, against 30 minutes on Deno, and Team runs up to 5,000 containers at once.
  • More regions and bigger machines. Modal runs in the US, EU and Asia-Pacific and lets you size CPU and memory, while Deno is fixed at 2 vCPU.

Use Deno Sandbox when

you run short pieces of untrusted code that must start in milliseconds and reach only the hosts you allow, especially if you already deploy on Deno Deploy.

  • Fast starts and active-CPU billing. Good for short bursts of code: a sandbox starts in under 200 ms and CPU bills only while code runs.
  • Locked-down traffic and hidden secrets. For untrusted code: a proxy outside the VM allows only listed hosts and swaps placeholder secrets for real ones.
  • A path to Deno Deploy. Fits teams already on Deno Deploy: a sandbox can be promoted to a Deploy app and bills on the same meters.

Where boat fits

Modal and Deno Sandbox both treat a sandbox as something that ends: within 24 hours on Modal and 30 minutes on Deno, with the root disk gone each time. If what you run is coding agents that work for hours or days, with Docker, a browser and a project that should still be there tomorrow, look at boat. It gives each agent a full VM that stops for free and comes back with its whole disk.

A machine that keeps its work

On Modal an agent loses its root disk within 24 hours, and on Deno within 30 minutes. Both offer volumes, but your code must save and restore files, and installed packages still reset. boat saves the whole disk every minute and on stop.

Docker, /dev/kvm and a desktop

Modal runs Docker only on its VM runtime, which has no GPUs, and Deno does not document Docker at all. Neither has a desktop, so on Modal you wire up VNC yourself. boat has Docker, /dev/kvm and a 60fps desktop in every sandbox.

Room and speed for builds

Deno is fixed at 2 vCPU and 4 GB, so big builds crawl or run out of memory. Modal's default sandbox did 12.79 runs per second in the same benchmark where boat did 26.69, so each build waits about twice as long.

Use boat when your agents work for hours or days: installs, builds, tests, Docker and a desktop, on a fast machine that keeps its disk and never cuts them off. Compare it one to one: boat vs Modal and boat vs Deno Sandbox.

Questions people ask

Is Modal cheaper than Deno Sandbox?

It depends on the job. One always-on agent costs $178 on Modal against $200 on Deno, and 50 parallel agents cost $2,229 against $2,779, though neither fits those as written. For 1,000 short jobs at once Deno Builder comes to $1,563 against $3,193 on Modal, but Deno allows only 20 at once.

Which is faster, Modal or Deno Sandbox?

For CPU work only Modal has a measurement: 12.79 runs per second at 4 vCPU / 8 GB, against 26.69 for boat. Deno Sandbox is not in that benchmark and is fixed at 2 vCPU. Deno says its sandboxes start in under 200 ms.

Can Modal or Deno Sandbox run Docker?

Modal runs Docker only with its VM runtime, chosen with runtime="vm", which has no GPUs. Deno's docs do not say Docker works inside a sandbox. Every boat sandbox runs Docker and systemd and exposes /dev/kvm.

How long can a sandbox run on Modal and on Deno?

A Modal sandbox defaults to 5 minutes and can run up to 24 hours. A Deno sandbox lives up to 30 minutes, and you can promote it to a Deno Deploy app for longer work. A boat sandbox has no session cap on paid plans.

Do Modal and Deno Sandbox keep files?

Not on the root disk: both wipe it when the sandbox ends. Modal keeps files you put in Volumes, and Deno offers volumes of 300 MB to 20 GB, only in Chicago. boat keeps the whole disk and charges nothing while it is stopped.

Which one has GPUs?

Modal rents GPUs from T4 to B300, with 10 at once on Starter and 50 on Team. Deno Sandbox has none, and neither does boat.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons