Modal vs Fly.io Machines

Modal runs short-lived sandboxes inside an AI compute platform, with GPUs and a 24-hour session limit. Fly.io Machines are microVMs for hosting your own apps near users, with no session cap but a root disk that resets.

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.

Fly.io Machines

Fly.io is an app hosting platform, and Machines are the microVMs underneath it that you can also start and stop through a REST API.

A Fly Machine boots your Docker image as a Firecracker microVM on Fly's own servers, in one of 17 regions. You pick a shared or performance CPU preset, attach at most one Volume for data that must last, and Fly Proxy can stop, suspend and wake Machines as traffic comes and goes. It is built for teams that host web apps and services worldwide; it is not a sandbox product, so this page compares the parts that overlap with agent work.

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 rankFly.io Machines: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
Can't run it92nd of 367, with limits
$836 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An always-on agent hits Modal's 24-hour sandbox limit, and a Fly Machine keeps only what sits on its one Volume; boat runs with no session cap and keeps the whole disk.
196th of 366, with limits
$1,924 a month
125th of 366, with limits
$816 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
Modal ranks higher for code interpreter bursts, with fast starts and high concurrency, and Fly is cheaper on paper thanks to shared CPUs with no plan fee.
19th cheapest of 345
$181 a month
75th of 345, with limits
$94 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 fully, while Fly's API creates about one Machine per second per app; boat ranks first here because stopped sandboxes keep their disk for free.
11th cheapest of 361
$811 a month
69th of 361, with limits
$600 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 is what Modal is built for.
5th cheapest of 360
$19,038 a month
48th of 360, with limits
$2,838 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
117th of 364, with limits
$457 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 keeps the CPU busy, which drains a shared Fly vCPU's burst balance, and Docker builds on Modal need its VM runtime; boat runs Docker in every sandbox.
126th cheapest of 377
$1,793 a month
152nd of 377, with limits
$288 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
118th of 368, with limits
$53 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 Fly ships a desktop, so you build and stream one yourself; boat has a 60fps desktop, Chromium and computer use built in.
98th of 369, with limits
$183 a month
95th of 369, with limits
$173 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
160th of 367, with limits
$90 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
161st of 346, with limits
$67 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
Fly ranks well above Modal for mass scraping, since it can spread scrapers across 17 regions and pay only for the seconds they run.
223rd of 338, with limits
$8,795 a month
44th of 338, with limits
$1,232 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 it118th of 360, with limits
$63 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; Fly discontinued its GPU Machines and boat has none, 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

FeatureModalFly.io Machinesboat
Kind of productServerless AI cloud with sandboxes you create from codeApp hosting platform; you boot your own image as a microVMAgent sandbox: a full VM per agent, ready to use
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
Docker insideOnly with the VM runtimeYes, if you install it yourselfYes, in every sandbox, with root and systemd
Nested virtualizationVM runtime only, Team and Enterprise plans, on requestNot offered (no /dev/kvm)Yes, /dev/kvm on every machine (Android emulator works)
Longest session24 hours (default 5 minutes)No documented capNo cap on paid plans (default TTL 1 h, changeable)
Files after a stopNo paused state; only Volumes keep filesRoot file system is ephemeral; one Volume per Machine, billed for its full size all monthWhole disk kept, saved every minute and on stop; a stopped sandbox costs nothing
Memory snapshotsYes, in alpha: snapshotting ends the sandbox, snapshots expire after 7 daysSuspend keeps memory for Machines up to 2GBNo (resume reboots from disk)
ForkSnapshot the filesystem into an image and boot new sandboxes from itClone copies a Machine's config; a cloned Volume starts emptyFork a running sandbox without stopping it, disk included
Wake on requestNoFly Proxy stops idle Machines and wakes them when a request arrivesYou start and stop machines through the API
GPUsT4 to B300; 10 at once on Starter, 50 on TeamNone (GPU Machines discontinued in 2026)None
Desktop and computer useNot offered; an example shows how to set up VNC yourselfNone built in; you add it to your own image60fps desktop, Chromium, computer use and browser control built in
Coding agents and keysExamples only; secrets are environment variables or your own sidecar proxyNone built in; secrets are environment variables, or deploy Fly's tokenizer proxy yourselfClaude Code, Codex and more preinstalled, driven from outside; credentials proxy for any HTTPS API
Outbound rulesBlock all, IP-range allowlist, domain allowlist (beta)Network policies allow chosen ports and protocolsOpen internet; no provider-side allowlist
RegionsUS, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75x17 regions on six continentsEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureModalFly.io Machinesboat
Full VM (own kernel)NoYesYes
Docker insideNoYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdYesNoYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeNoYesYes
Automatic snapshotsNoYesYes
Fork/cloneYesYesYes
Live fork (no pause)NoYesYes
Memory forkYesNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestNoYesNo
HTTPS preview URLsYesYesYes
Raw TCP inboundYesYesYes
Public IPv4NoYesNo
Egress allowlistYesYesNo
Secret proxyNoNoYes
Secret proxy for any APINoNoYes
Preinstalled agentsNoNoYes
Agent harness APINoNoYes
MCP serverNoYesNo
GPUYesNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoYesNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNoYes
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
Fly.io MachinesNot measured
boat26.69 runs/s

In the same public benchmark run at 4 vCPU / 8 GB, boat finished 26.69 Node.js build-and-test runs per second and Modal's default sandbox finished 12.79, so boat did about twice the work. Fly.io Machines have no comparable measurement, and their speed depends on the CPU class: shared vCPUs guarantee only 6.25% of a core, performance vCPUs get the full core.

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. Fly.io Machines 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 monthFly.io Machines, 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$15 · Pay As You Go · 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$36 · 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
$2,229 · Starter · with limits$487 · 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
$792 · Team$110 · 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
$3,193 · Team · with limits$232 · Pay As You Go · with limits$2,000 · $2000/mo · with limits

Modal: Modal bills by the second for the CPU and memory you request or use, whichever is higher, 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.

Fly.io Machines: Fly bills each Machine per second while it runs, with no plan fee; stopped Machines pay for their root file system and Volumes are billed for their full size all month. The table uses Fly's lowest rate: shared vCPUs on a 1-year reservation.

Fly.io Machines: boat plans start at $20 a month and the whole fee becomes usage credit, spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

On Modal, sessions end within 24 hours on Starter and anything outside a Volume resets, and the 50-agent fleet does not fit because Docker needs the VM runtime. Fly's lowest prices need a 1-year commitment and use shared vCPUs that guarantee only 6.25% of each core, so long builds get throttled. Modal is the only one of the three that fits the 1,000-job burst; boat queues it because of its start limits per minute and per day.

ScenarioModalFly.io Machinesboat
One coding agent, workdays
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
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
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
None that bite
50 agents in parallel
  • missing Docker inside
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
None that bite
Sandboxes for your usersNone that bite
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
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
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
  • 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, or are huge bursts of short jobs that finish within minutes.

  • GPUs next to your sandboxes. If your agent trains or runs models, Modal rents GPUs from T4 to B300 on the same platform; Fly no longer sells GPUs.
  • Built for huge bursts of short jobs. For RL rollouts and code runs, Modal starts sandboxes fast and runs up to 5,000 containers at once on Team.
  • Domain-level outbound rules. If you must limit where code can connect, Modal can block all traffic or allow only chosen IP ranges or domains.

Use Fly.io Machines when

you host web apps or light services near users around the world that sleep between requests and wake on traffic.

  • No session cap and a real VM. For long-running work, a Fly Machine runs until you stop it, as a Firecracker microVM where you can install Docker.
  • 17 regions worldwide. If your users are spread around the world, Fly runs Machines in 17 regions on six continents.
  • Wake on request. For services that sleep between requests, Fly Proxy wakes a Machine when traffic arrives, and small Machines resume with memory kept.

Where boat fits

If what you are really running is coding or computer-use agents that work for hours, both Modal and Fly make you build the sandbox yourself. boat gives each agent a full VM with Docker, /dev/kvm, a desktop and coding agents, on a disk that survives every stop.

A disk that keeps everything

On Modal a sandbox ends within 24 hours and only Volumes keep files; on Fly the root file system is ephemeral and the one Volume is billed for its full size even while stopped. boat keeps the whole disk and a stopped sandbox costs nothing.

Docker, /dev/kvm and a desktop ready

Modal needs its VM runtime for Docker, and Fly has no /dev/kvm and no systemd, so emulators and nested VMs are out. Neither ships a desktop, so you set up VNC yourself. boat has all of it in every sandbox.

Agents driven from outside, keys kept out

On both, you install the agents, write the code that drives them, and pass keys as environment variables an injected prompt can read, unless you run your own proxy. boat has agents preinstalled and a credentials proxy for any HTTPS API.

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

Questions people ask

Is Modal cheaper than Fly.io Machines?

Usually not. One agent running all month is $178 on Modal and $36 on Fly, and 50 parallel agents are $2,229 against $487. Fly's figures use shared vCPUs on a 1-year reservation, which get throttled under sustained load; boat is $26 and $317 for the same scenarios.

Which is faster, Modal or Fly.io Machines?

There is no comparable measurement for Fly. In the same benchmark run, Modal's default sandbox did 12.79 Node.js build-and-test runs per second and boat did 26.69. On Fly, speed depends on whether you choose shared or performance vCPUs.

Can Modal or Fly.io Machines run Docker?

Modal runs Docker only with its VM runtime. On Fly you can install Docker yourself, since a Machine is a microVM with root, but there is no /dev/kvm for nested VMs. Every boat sandbox has Docker, systemd and /dev/kvm ready.

How long can a session last on Modal and Fly?

A Modal sandbox lasts at most 24 hours, with a 5-minute default. A Fly Machine has no documented cap and runs until you stop it. boat has no session cap on paid plans.

Do Modal or Fly Machines keep files after a stop?

Only in Volumes on both. Modal has no paused state, and a Fly Machine's root file system is ephemeral. boat keeps the whole disk, with snapshots every minute and on stop.

Which one has GPUs?

Modal, with GPUs from T4 up to B300. Fly discontinued its GPU Machines in 2026, and boat has no GPUs.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons