Railway vs Modal VM Sandboxes
Railway is an app platform whose sandboxes are VMs that live next to your apps and databases. Railway destroys a sandbox after its idle timeout, and files survive in checkpoints you take. Modal VM Sandboxes are VMs with their own kernel and Docker inside a serverless AI cloud. Each one runs up to 24 hours, and filesystem snapshots carry its files to a new sandbox.
The companies and products
Railway
Railway is a cloud platform for deploying web apps, servers and databases. It 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 that you create from the CLI or a TypeScript SDK, run commands in and destroy. It also added Cloud Agents: a personal VM for a coding agent that keeps its disk and sleeps or wakes. Cloud Agents are in Priority Boarding, and breaking changes may occur. Railway suits teams that already host on Railway and want sandboxes next to their apps.
Modal VM Sandboxes
Modal is a serverless cloud for AI work, and VM Sandboxes are the version of its sandboxes that run in a virtual machine with their own Linux kernel.
You create a VM Sandbox from Python, TypeScript or Go code with runtime="vm", run commands in it, and terminate it when the job is done. Modal built the runtime on the Rust-based Cloud Hypervisor, so Docker, FUSE, systemd and nested cgroups work, with the same API, images and prices as its gVisor sandboxes. It became generally available on 1 October 2026. It suits teams that want many agent machines next to Modal's inference and training.
- Funding
- Over $1.2B raised
- Generally available
- 1 October 2026; early customers launched over 20 million VMs before that
- Compliance
- SOC 2 on every plan; HIPAA on Enterprise
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. “28th cheapest of 365” means 27 of the other 364 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 | Railway: price rank | Modal VM Sandboxes: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month On both, you set up persistence. Railway keeps files in checkpoints you take, or in a Cloud Agent (Priority Boarding). On Modal you snapshot the filesystem before the 24-hour end and boot a new sandbox from it, or use a Volume. boat saves the disk at each stop with no code and has a built-in desktop to check the app. | 28th cheapest of 365 $1,481 a month | 27th cheapest of 365 $633 a month | 5th cheapest of 365 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB Railway can keep an assistant running with the idle timeout set to 0, and memory then bills the whole time. A Modal VM stops at 24 hours, so you snapshot the filesystem and boot a new sandbox each day; running programs start again. boat runs with no session cap once auto-stop is off on a paid plan (default 1 hour). | 21st cheapest of 361 $3,977 a month | Not ranked: misses a requirement | 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 Railway fits short code runs well: a sandbox bills for CPU used and is gone when the job ends. Modal bills per second and allows 5,000 containers at once on Team. boat's $20 plan includes 12 starts per minute and 200 per day. | 42nd cheapest of 336 $413 a month | Not ranked: misses a requirement | 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 Modal Team runs 5,000 containers at once, and you snapshot each user's filesystem to bring it back later. Railway allows 100 sandboxes per environment on Pro. A stopped boat sandbox keeps its disk for at least 14 days with no code, and each start counts against the plan's start cap. | 46th of 349, with limits $290 a month | Not ranked: misses a requirement | 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 Huge bursts of short rollouts fit Modal: Team allows 5,000 containers at once with no per-start fee. Railway caps sandboxes per environment. boat's $2,000 plan includes 90 starts a minute and refuses starts above 270 a minute with 429. | 84th of 349, with limits $4,450 a month | 163rd of 349, with limits $11,982 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 | 113th of 359, with limits $364 a month | Not ranked: misses a requirement | 10th cheapest of 359 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month Modal VMs run Docker builds; you start dockerd yourself. Railway's sandbox docs do not mention Docker, so you install and verify it yourself. boat documents Docker and /dev/kvm on every plan, and each CI job counts as a start. | 116th cheapest of 374 $1,210 a month | 170th of 374, with limits $655 a month | 2nd cheapest of 374 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB | 69th cheapest of 371 $89 a month | Not ranked: misses a requirement | 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 Railway nor Modal includes a desktop, but both let you set one up. On Railway you add Xvfb and noVNC with the template builder. Modal's runnable example installs Xvfb, x11vnc, noVNC and Chromium. boat includes a 60 fps desktop with Chrome and computer-use tools. | 47th cheapest of 367 $407 a month | Not ranked: misses a requirement | 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 | 53rd of 356, with limits $93 a month | Not ranked: misses a requirement | 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 | 65th cheapest of 343 $570 a month | Not ranked: misses a requirement | 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 | 111th of 327, with limits $2,988 a month | Not ranked: misses a requirement | 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 Many parallel agents need machines that keep state and run Docker. Modal VMs run Docker and keep state through filesystem snapshots. Railway does not document Docker. boat documents Docker and keeps the disk with no code, with start limits per plan. | 71st of 351, with limits $574 a month | 27th cheapest of 351 $464 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 | Railway | Modal VM Sandboxes | boat |
|---|---|---|---|
| Isolation | Sandboxes and Cloud Agents are isolated Linux VMs; app services are containers | VM with its own Linux kernel on Cloud Hypervisor | Full VM with its own kernel, on physical hosts dedicated to boat; vCPUs are shared |
| How long a sandbox lives | No maximum, but destroyed after the idle timeout (30 minutes by default, 0 for never) | Default 5 minutes, maximum 24 hours; a filesystem snapshot carries work to a new sandbox | Auto-stop defaults to 1 hour, up to 30 days; no session cap once auto-stop is off on a paid plan |
| Stop and resume | No paused sandbox; files survive in checkpoints you take, which boot new sandboxes. Cloud Agents sleep and keep their disk. | No paused state; files survive in a filesystem snapshot you take before the end (kept 30 days by default, or with no expiry), which boots a new sandbox, or in a Volume | Stop saves the disk with no code; resume is like a reboot; disk kept at least 14 days, longer with a saved snapshot |
| Memory snapshots | No; checkpoints are disk only | Yes, in alpha: snapshotting ends the sandbox, and snapshots expire after 7 days | No; a resume is like a reboot |
| Docker and systemd | Root shell on an Ubuntu VM; Docker is not documented, so you install and verify it yourself | Yes; you start dockerd yourself | Docker, root and systemd documented in every sandbox |
| Nested virtualization | Not documented | Enterprise plan only, as an experimental option | /dev/kvm on every plan |
| CPU benchmark (V8 Web Tooling, 4 vCPU / 8 GB, StarSling run of 3 October 2026) | Not in the public benchmarks we use | VM runtime 15.48 runs/s, gVisor 12.60 (measured with cpu=4) | 28.06 runs/s, second of 15, on a Ryzen 9 9950X host |
| Coding agents | Claude Code, Codex, OpenCode and Pi in the image, run through exec | You install the harness in the image; official examples cover the Claude Agent SDK and OpenCode | Seven harnesses installed, with a prompt, steer and events API |
| Keeping keys out of the sandbox | Secrets are environment variables inside the sandbox | You set it up: a credential-injecting proxy in a Sidecar (experimental), from an official example | Optional paid proxy ($1 a day when on, plus $1 per 1,000 requests) keeps real keys of supported model providers out; other secrets still enter |
| Desktop and computer use | No desktop included; you can add Xvfb and noVNC with the template builder and publish the port on a sandbox domain | Not built in; Modal's runnable example installs Xvfb, x11vnc, noVNC, Chromium and a Browser Use agent | Built-in desktop and Chrome stream at 1920x1080, 60 fps, with computer-use tools |
| Reaching the sandbox | Up to 10 public HTTPS domains, set only at creation, with no built-in auth; SSH | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | Up to 50 HTTPS URLs, token-gated by default; SSH; raw ports over IPv6 on sandboxes with no IPv4 of their own |
| Sandboxes at once | Per environment: 10 on Free, 50 on Hobby, 100 on Pro; no published start limit | 100 containers on Starter, 5,000 on Team; no per-start fee | 100 to 2,000 by plan; starts limited per minute, hour and day (12 / 60 / 200 on $20) |
| Outbound network rules | No egress allowlist | Block all, IP-range allowlist, domain allowlist (beta) | No provider-side allowlist; you add firewall rules inside the sandbox |
| Disk | Size not published | Fixed 512 GiB root filesystem on VMs | 51 GB on 2 and 4 vCPU sizes, up to 251 GB on xlarge; fixed per size |
| Next to your other workloads | Postgres, Redis and app services in the same project and private network | Inference, training and GPU functions on the same account (GPUs need gVisor sandboxes) | Sandboxes only; host your own services inside a VM |
| Regions | US West, US East, Amsterdam and Singapore | US, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75x | Germany, Finland and France; you cannot pick a region; no US or Asia region |
Every feature Battleships tracks (43)
| Feature | Railway | Modal VM Sandboxes | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Not published | Yes | Yes |
| Nested virtualization | Not published | Yes | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Yes | Yes |
| Desktop GUI | With your own setup | With your own setup | Yes |
| Browser | Yes | With your own setup | Yes |
| Computer-use API | No documented way | With your own setup | Yes |
| SSH | Yes | With your own setup | Yes |
| Persistent disk | Yes | With your own setup | Yes |
| Pause/resume | Yes | No documented way | Yes |
| Automatic snapshots | No documented way | No documented way | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | Yes | Not published | Yes |
| Memory fork | No documented way | Yes | 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 | No documented way | No documented way | No documented way |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No documented way | Yes | Yes |
| Public IPv4 | No documented way | No documented way | No documented way |
| Egress allowlist | No documented way | Yes | No documented way |
| Secret proxy | No documented way | With your own setup | Yes |
| Secret proxy for any API | No documented way | No documented way | Yes |
| Preinstalled agents | Yes | With your own setup | Yes |
| Agent harness API | Yes | No documented way | Yes |
| MCP server | Yes | No documented way | 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 | No documented way | No documented way |
| Self-hosting | No documented way | No documented way | No documented way |
| BYOC | Yes | No documented way | No documented way |
| Open source | No documented way | No documented way | No documented way |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Yes | Not published | Yes |
| Usage per sandbox (API) | No documented way | Not published | Yes |
| Audit logs | Yes | Yes | No documented way |
| SSO | Yes | Yes | No documented way |
| SOC 2 | Yes | Yes | No documented way |
| HIPAA | Yes | Yes | No documented way |
| EU data residency | Yes | Yes | No documented way |
| Zero data retention | Not published | Not published | Yes |
Performance
Railway is not in the public benchmarks we use, so we cannot say how it compares. In StarSling's run of 3 October 2026 (run 37073680030), on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, boat did 28.06 runs/s, second of 15. Modal's VM runtime did 15.48 and its gVisor runtime 12.60. StarSling ran Modal with cpu=4 and the sandbox saw 4 CPUs (PR #121); sized that way, Modal bills 4 cores, $0.76/h. Every boat sandbox in that run ran on an AMD Ryzen 9 9950X host. boat also places sandboxes on other hosts and does not promise a CPU model. Providers ran on different hardware in different regions.
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. Modal VM Sandboxes measured on: VM Sandbox, request = size. 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. Railway is 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 | Railway, a month | Modal VM Sandboxes, 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 | $16 · Hobby · with limits | $0 · Starter | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $70 · Hobby · with limits | $109 · Starter · 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 | $739 · Hobby · with limits | $1,480 · Starter | $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 | $223 · Pro · with limits | $579 · Team | $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 | $781 · Pro · with limits | $1,911 · Team · with limits | $8,800 · $2000/mo · with limits |
Railway: Railway bills sandboxes per second at about $50 per vCPU-month on CPU actually used and $50 per GB-month on memory in use, and memory keeps billing while a sandbox waits until it is destroyed. Plans: Free ($0 with $1 of usage a month), Hobby ($5) and Pro ($20 per workspace); the Hobby and Pro fees count toward usage. Railway publishes no sandbox disk price, so our numbers leave disk out.
Modal VM Sandboxes: Modal bills by the second for the larger of the CPU and memory you request and what you use, until the sandbox ends. Modal prices CPU per physical core, and one core equals two vCPUs, so 4 vCPU / 8 GiB is 2 cores + 8 GiB: $0.476 an hour. Starter is $0 with $30 of monthly credit, Team is $250 a month with $100 of credit, and pinning a region multiplies the price by 1.15x to 1.75x. Our scenario bills assume a minimal request that bursts, which is not guaranteed.
Modal VM Sandboxes: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. A 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. A stopped sandbox has no compute charge, but saved snapshots above the included count and the AI credentials proxy still charge. The $20 plan allows 100 sandboxes at once and 12 starts per minute, 60 per hour, 200 per day. Extra starts cost $0.03 to $0.07 each.
Limits in those scenarios
We mark every Railway scenario as not a clean fit because Railway publishes no sandbox disk price, so its bills count CPU and memory only. Its cap of 100 sandboxes per environment on Pro means 300 user sandboxes or 1,000 jobs at once need several environments or an Enterprise limit. A Modal VM Sandbox runs 24 hours at most, and files carry over only through a filesystem snapshot or a Volume that your code sets up, so the 24/7 scenario is marked as not fitting as-is. It does fit sandboxes for your users on Team. On boat, the 1,000-job burst needs more starts than the $2,000 plan includes, and starts above 270 a minute fail with 429, so boat does not fit that scenario. A boat resume is like a reboot, and if a boat machine fails you lose what was written after the last good snapshot.
| Scenario | Railway | Modal VM Sandboxes | boat |
|---|---|---|---|
| One coding agent, workdays |
| None for this scenario | None for this scenario |
| One agent that never stops |
|
| 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 Railway when
your app and databases already live on Railway and you want sandboxes on the same private network, billed for the CPU they use.
- Sandboxes next to your apps. Useful if your app already runs on Railway: a sandbox can join the same private network as your Postgres and services.
- No hard session limit. Useful for agents that run past a day: set the idle timeout to 0 and a Railway sandbox runs until you destroy it. Memory bills the whole time.
- Billing on CPU actually used. Useful for many quick code runs: Railway meters the CPU a sandbox uses and destroys it when the job ends.
Use Modal VM Sandboxes when
you need Docker in a real kernel for huge bursts of short jobs that finish within a day, memory snapshots, a large disk, strict outbound rules, or your models already run on Modal.
- Docker in a real kernel, with snapshots. Useful for builds and tests: each Modal VM has its own Linux kernel, so Docker, FUSE and systemd work, and filesystem snapshots boot new sandboxes.
- Huge bursts and strict egress. Useful for big parallel runs: Team runs 5,000 containers at once, and you can allow only chosen domains out.
- One platform with your models. Useful if you already serve or train models on Modal: sandboxes and GPUs sit on one account and one bill.
Where boat fits
For coding agents that work for hours or come back the next day, Railway and Modal both ask your code to save and restore the machine: checkpoints on Railway, filesystem snapshots or Volumes on Modal. boat gives each agent a full VM that saves its disk with no code, runs Docker and has a desktop. boat runs only in Germany, Finland and France, and limits starts by plan.
A machine that keeps its work with no code
A Railway sandbox is destroyed after 30 idle minutes by default, and only the checkpoints you took survive. On Modal, files outside a Volume survive the 24-hour end only if you take a filesystem snapshot first, and the snapshot boots a new sandbox. A boat sandbox saves its disk every minute and at each stop. It has no compute charge while stopped, and memory and running programs are not saved.
Desktop, Docker and KVM ready
Railway's sandbox docs do not mention Docker. Neither Railway nor Modal includes a desktop, though you can install one on both, and Modal ships a runnable example. Modal gives /dev/kvm only on Enterprise, as an experimental option. boat has Docker, /dev/kvm and a 60 fps desktop with Chrome on every plan.
Agents you drive, keys kept outside
On Railway you run agents through exec and parse the output, and on Modal you install them yourself. Railway puts API keys in environment variables, and on Modal you build a Sidecar proxy to keep them out. boat adds a prompt, steer and events API, and an optional paid proxy keeps real keys of supported model providers outside.
Use boat when your agents work for hours or days in a machine they come back to: a full VM that saves its disk with no code, with Docker, /dev/kvm, a desktop and coding agents you drive by API. boat runs only in the EU and limits starts by plan. Compare it one to one: boat vs Railway and boat vs Modal VM Sandboxes.
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 Railway cheaper than Modal VM Sandboxes?
In most of our scenarios, yes. One always-on agent costs $70 a month on Railway against $109 on Modal, and 50 parallel agents cost $739 against $1,480. For one agent on workdays, Modal costs $0 inside Starter's $30 credit and Railway $16. Railway's numbers leave out disk, and Modal's assume a minimal CPU request that bursts. boat comes to $20, $26 and $317 for those three jobs.
Which is faster, Railway or Modal VM Sandboxes?
We cannot say, because Railway is not in the public benchmarks we use. In StarSling's run of 3 October 2026, Modal's VM runtime did 15.48 V8 Web Tooling runs/s at 4 vCPU / 8 GB and its gVisor runtime 12.60. boat did 28.06 in the same run, on a Ryzen 9 9950X host. boat does not promise a CPU model.
Can Railway sandboxes run Docker?
Railway's sandbox docs give you a root shell on an Ubuntu VM but do not mention Docker or /dev/kvm, so you install and verify them yourself. Modal VM Sandboxes run Docker if you start dockerd yourself. boat documents Docker and /dev/kvm in every sandbox.
How long can a sandbox run on Railway and on Modal?
Railway has no maximum, but destroys a sandbox once its idle timeout runs out, 30 minutes by default or never if set to 0. A Modal VM Sandbox defaults to 5 minutes and stops at 24 hours; a filesystem snapshot carries its files to a new sandbox. boat has no session cap once auto-stop is off on a paid plan (the default is 1 hour).
Do Railway and Modal come with coding agents?
Railway's default image includes Claude Code, Codex, OpenCode and Pi, run through exec. On Modal you install the harness in the image, with official examples for the Claude Agent SDK and OpenCode. boat installs seven coding agents and lets you prompt, steer and watch them through an API.
Where do Railway and Modal run?
Railway has regions in California, Virginia, Amsterdam and Singapore. Modal runs in the US, EU and Asia-Pacific, and pinning a region costs 1.15x to 1.75x. boat runs only in Germany, Finland and France, and you cannot pick a region.
Try boat
Install the CLI, then run boat new.
7-day free trial