Fly.io Machines vs Railway

Fly.io Machines are fast microVMs that boot your own image in 17 regions, and you build the sandbox around them yourself. Railway is an app platform that sells ready sandbox VMs with an SDK, forks and coding agents, but it destroys them when they sit idle.

The companies and products

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.

Railway

Railway is a cloud platform for deploying web apps, servers and databases, which now also sells sandboxes and cloud agents.

Railway's main product is app hosting: you deploy services and databases as containers on its own hardware. In 2026 it added Sandboxes, isolated Linux VMs you create from the CLI or a TypeScript SDK, run commands in and destroy, and Cloud Agents, a personal VM for running a coding agent, in early access. It suits teams already hosting on Railway who want throwaway machines next to their apps.

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. “92nd cheapest of 367” means 91 of the other 366 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 workloadFly.io Machines: price rankRailway: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
Neither is a clean fit for a software factory: Fly resets the root disk on restart and Railway destroys idle sandboxes, while boat keeps the whole disk and has Docker and /dev/kvm on every machine.
92nd of 367, with limits
$836 a month
51st of 367, with limits
$342 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
Railway fits an always-on assistant once its idle timeout is set to 0, though memory bills the whole time; on Fly only the files on the one attached Volume last.
125th of 366, with limits
$816 a month
16th cheapest of 366
$3,977 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 bursts better than boat: Fly bills per second with no plan fee, and Railway bills for CPU used and destroys the sandbox when the job ends.
75th of 345, with limits
$94 a month
36th cheapest of 345
$413 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
Railway caps sandboxes at 100 per environment on Pro, and Fly's API creates about one Machine per second per app, so both need workarounds for 300 users at once.
69th of 361, with limits
$600 a month
42nd of 361, with limits
$290 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
48th of 360, with limits
$2,838 a month
78th of 360, with limits
$4,450 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
117th of 364, with limits
$457 a month
108th of 364, with limits
$364 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; Railway sandbox docs do not mention Docker, which boat ships on every machine.
152nd of 377, with limits
$288 a month
113th cheapest of 377
$1,210 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Railway's Cloud Agents keep a disk and sleep or wake but are early access; a Fly Machine keeps only its Volume across restarts.
118th of 368, with limits
$53 a month
66th cheapest of 368
$89 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 has a desktop: Fly Machines run the image you build and Railway sandboxes are headless, while boat ships a 60fps desktop with Chromium and computer use.
95th of 369, with limits
$173 a month
77th of 369, with limits
$103 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
160th of 367, with limits
$90 a month
53rd of 367, with limits
$93 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
161st of 346, with limits
$67 a month
60th cheapest of 346
$570 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 fits mass scraping best of the three: it can spread scrapers across 17 regions and pay only for the seconds they run.
44th of 338, with limits
$1,232 a month
109th of 338, with limits
$2,988 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
118th of 360, with limits
$63 a month
43rd of 360, with limits
$574 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
Can't run itCan'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

FeatureFly.io MachinesRailwayboat
Kind of productApp hosting platform; Machines are microVMs you boot from your own image through a REST APIApp platform that added a sandbox product in 2026, driven from a CLI or TypeScript SDKAgent sandbox: a full VM per agent, ready to use
IsolationFirecracker microVM with its own kernelSandboxes are isolated Linux VMs; app services are containersFull VM with its own kernel on dedicated AMD Ryzen 9 9950X (Zen 5) hosts
Docker, systemd and nested virtualizationRoot and Docker you install yourself; Fly's own init, no systemd; /dev/kvm not offeredRoot shell on Ubuntu; the sandbox docs do not mention Docker or /dev/kvmDocker, root, systemd and /dev/kvm on every machine
Files after a stopRoot file system is ephemeral; lasting data goes on one Volume, billed for its full size around the clockDestroyed after the idle timeout (30 minutes by default); files survive only in checkpoints you takeThe whole disk is kept, with snapshots every minute and on stop; a stopped sandbox costs nothing
Pause and memorySuspend keeps memory for Machines up to 2GB; the snapshot is dropped on deploy or host moveCheckpoints save the disk only, no memoryResume reboots from disk (no memory snapshots)
ForkClone copies a Machine's config; a cloned Volume starts emptyFork a running sandbox's filesystem; boot many from one named checkpointFork a running sandbox, disk included; named snapshots to start new ones
Wake on requestFly Proxy stops or suspends idle Machines and wakes them when a request arrivesSandboxes are not woken by traffic; idle ones are destroyedYou start and stop machines through the API
Coding agentsNone built in; you install and run agents yourselfClaude Code, Codex, OpenCode and Pi preinstalled; you run them headless through execClaude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API
Keeping keys out of the sandboxSecrets arrive as environment variables; Fly's open-source tokenizer proxy can be deployed yourselfSecrets are baked in as environment variables, or signed in and saved in a checkpointAI credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Desktop and computer useNone built in; you add a desktop and browser to your own imageHeadless: terminal, exec and SSH only60fps desktop and Chromium, computer use and browser control, embeddable stream
Reaching the sandboxPublic HTTPS and TCP through Fly Proxy, Anycast IPs, custom domains, private network between MachinesUp to 10 public HTTPS domains, set only at creation; SSH and port forwardingHTTPS URLs for up to 50 ports, token-protected; raw TCP; dedicated IPv6 or IPv4
Apps and databases next to the sandboxHost your own apps on Machines with a private network, Anycast IPs and custom domainsDeploy Postgres, Redis and services in the same project; a sandbox can join their private networkNo hosted databases or app services; host your own inside a sandbox
CPUShared vCPUs guarantee 6.25% of a core plus bursts; performance vCPUs get the full core at a higher rateBilled on CPU actually used; sandboxes up to 8 vCPU on Hobby and 32 vCPU on ProOne CPU class on every plan, with no baseline quota or burst balance
Regions17 regions on six continentsUS West, US East, Amsterdam and SingaporeEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureFly.io MachinesRailwayboat
Full VM (own kernel)YesYesYes
Docker insideYesNot publishedYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdNoNot publishedYes
Desktop GUINoNoYes
BrowserNoYesYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeYesYesYes
Automatic snapshotsYesNoYes
Fork/cloneYesYesYes
Live fork (no pause)YesYesYes
Memory forkNoNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestYesNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundYesNoYes
Public IPv4YesNoNo
Egress allowlistYesNoNo
Secret proxyNoNoYes
Secret proxy for any APINoNoYes
Preinstalled agentsNoYesYes
Agent harness APINoYesYes
MCP serverYesYesNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoYesNo
Open sourceYesNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNoYesYes
Usage per sandbox (API)NoNoYes
Audit logsNot publishedYesNo
SSONoYesNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Fly.io MachinesNot measured
RailwayNot measured
boat26.69 runs/s

There is no comparable measurement for either: Fly.io Machines and Railway were not part of the public StarSling run where boat did 26.69 Node.js build-and-test runs per second at 4 vCPU / 8 GB. On Fly, speed also depends on the CPU class, since shared vCPUs guarantee only 6.25% of a core and get throttled under long load.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Fly.io Machines and Railway have 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.

ScenarioFly.io Machines, a monthRailway, 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 · Pay As You Go · with limits$16 · Hobby · with limits$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$36 · Pay As You Go · with limits$70 · Hobby · 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
$487 · Pay As You Go · with limits$739 · Hobby · 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
$110 · Pay As You Go · with limits$223 · Pro · 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
$232 · Pay As You Go · with limits$781 · Pro · with limits$2,000 · $2000/mo · with limits

Fly.io Machines: Fly bills each Machine per second while it runs, by CPU preset and memory, with no plan fee; Volumes bill for their full size all month. The figures here use shared vCPUs bought in 1-year reservation blocks, Fly's lowest rate.

Railway: Railway bills sandboxes per second at $50 per vCPU-month on CPU used and $50 per GB-month on memory in use, which keeps billing while a sandbox waits. The Hobby ($5) and Pro ($20) fees count toward usage, and sandbox disk has no published price, so it is left out.

Railway: You pick a monthly plan from $20, and all of it becomes usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

Both are marked as a different kind of product, an app platform, in every scenario. Fly's lowest figures need a 1-year reservation and use shared vCPUs that guarantee 6.25% of each core, so long builds get throttled, and its API starts about one Machine per second per app. Railway caps sandboxes at 50 per environment on Hobby and 100 on Pro, has no published disk price, and does not confirm Docker inside for the 50-agent fleet. On boat the 1,000-job burst is queued above 90 starts a minute and needs more starts per day than the $2,000 plan allows.

ScenarioFly.io MachinesRailwayboat
One coding agent, workdays
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
None that bite
One agent that never stops
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
None that bite
50 agents in parallel
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
  • not confirmed: Docker inside
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
None that bite
Sandboxes for your users
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
  • Pro: max 100 concurrent
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
None that bite
1,000 short jobs at once
  • different kind of product: app platform
  • 1-year commitment
  • burstable CPU: 6.25% of each vCPU guaranteed, throttled above that
  • Pro: max 100 concurrent
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
  • 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 Fly.io Machines when

you want to build your own machines from a Docker image, run them near users in many regions, and let them sleep and wake on traffic.

  • 17 regions worldwide. Useful if users are spread around the world: Fly runs Machines in 17 regions, from the US to Sydney and Johannesburg.
  • Wake on request and memory suspend. Useful for services that sleep between requests: Fly Proxy wakes a Machine on traffic, and small Machines resume with memory kept.
  • Build any machine you want. Useful if you want full control: you boot your own Docker image, and network policies limit which ports it can reach.

Use Railway when

your app and databases already live on Railway and you want ready sandboxes with an SDK, forks and coding agents for short jobs on the same private network.

  • A sandbox API out of the box. Useful if you want sandboxes without building them: Railway gives you an SDK, templates, forks and checkpoints, with coding agents preinstalled.
  • Your apps and databases in one place. Useful if your app already runs on Railway: sandboxes can join the same private network as your Postgres and services.
  • Short jobs that bill for CPU used. Useful for many quick code runs: a Railway sandbox bills for CPU used and is gone when the job ends.

Where boat fits

Fly.io Machines and Railway are both app platforms first, and their sandboxes either lose files on restart or get destroyed when idle. If what you are really running is agents that work for hours, look at boat: a full VM per agent whose disk survives every stop, with Docker, /dev/kvm, a desktop and coding agents you drive from outside.

A disk that survives every stop

A Fly Machine's root disk is ephemeral, so lasting files need a Volume billed for its full size all month. Railway destroys a sandbox after 30 idle minutes unless you checkpoint it or turn the timeout off and keep paying for memory.

Docker, /dev/kvm and a desktop ready

Fly offers no /dev/kvm or systemd and no desktop, so you build the image yourself. Railway sandboxes are headless and their docs do not mention Docker, so browser tests, docker compose and emulators need extra work on both.

Agents driven from outside, keys kept out

On Fly you install agents and run your own tokenizer app to keep keys out. On Railway you shell each agent through exec and its API key sits in the VM, where code the agent runs can read it.

Use boat when your agents work for hours or days: a full VM that keeps its disk, with Docker, /dev/kvm, a desktop and coding agents you drive by API while their keys stay outside. Compare it one to one: boat vs Fly.io Machines and boat vs Railway.

Questions people ask

Is Fly.io Machines cheaper than Railway?

In our scenarios, yes. One agent running all month is $36 on Fly and $70 on Railway, 50 agents in parallel are $487 versus $739, and 1,000 short jobs at once are $232 versus $781. Fly's figures assume a 1-year reservation of shared vCPUs, and Railway's leave out disk, which it does not price.

Which is faster, Fly.io Machines or Railway?

We cannot say: neither has a result in the StarSling benchmark we use, where boat did 26.69 runs per second. On Fly, shared vCPUs are throttled after their burst balance runs out, so pick performance vCPUs for long CPU-heavy work.

Can Fly.io Machines or Railway run Docker?

You can install and run Docker inside a Fly Machine yourself, but Fly offers no /dev/kvm for nested VMs. Railway's sandbox docs do not mention Docker or /dev/kvm. boat has Docker, systemd and /dev/kvm ready on every machine.

Do they keep my files when a machine stops?

On Fly, only what is on the one Volume a Machine can mount; the root file system is ephemeral. Railway destroys a sandbox after its idle timeout, 30 minutes by default, so you keep files with checkpoints. A boat sandbox keeps its whole disk and costs nothing while stopped.

Which one has coding agents built in?

Railway's default sandbox image includes Claude Code, Codex, OpenCode and Pi, which you run headless through exec. Fly Machines have none; you add them to your own image. boat preinstalls coding agents and lets you prompt, steer and watch them through an API.

Where do Fly.io Machines and Railway run?

Fly runs Machines in 17 regions on six continents. Railway runs in California, Virginia, Amsterdam and Singapore, and new sandboxes start in US West unless you pick a region. boat runs only in the EU, in Germany, Finland and France.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons