Railway vs Modal VM Sandboxes
Railway is an app platform whose sandboxes are VMs that live next to your apps and databases and are destroyed when they go idle. Modal VM Sandboxes are short-lived VMs with their own kernel and Docker inside a serverless AI cloud, and each one ends within 24 hours.
The companies and products
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.
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 and suits teams that want many short-lived agent machines next to Modal's inference and training.
- Funding
- Over $466M raised
- Generally available
- 1 October 2026; early customers launched over 20 million VMs before that
- Session length
- Default 5 minutes, maximum 24 hours
- 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. “16th cheapest of 366” means 15 of the other 365 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 | bochka: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Railway sandboxes are destroyed when idle and Modal VMs end within 24 hours, so on both you save the work yourself; bochka keeps the disk and adds a desktop to check the app. | 51st of 367, with limits $342 a month | 84th of 367, with limits $759 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB Railway can keep an assistant running by setting the idle timeout to 0, while a Modal VM Sandbox stops at 24 hours and does not fit an agent that lives on its machine. | 16th cheapest of 366 $3,977 a month | Can't run it | 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 Railway fits short code runs well because a sandbox bills for CPU used and is gone when the job ends; bochka limits starts per minute by plan. | 36th cheapest of 345 $413 a month | Can't run it | 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 Team runs 5,000 containers at once, while Railway caps sandboxes at 100 per environment on Pro; bochka keeps each user's disk between visits. | 42nd of 361, with limits $290 a month | Can't run it | 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 Huge bursts of short rollouts are what Modal is built for, but its VMs cost more here than Railway's metered CPU, and bochka queues very large bursts. | 78th of 360, with limits $4,450 a month | 171st of 360, with limits $16,322 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 | 108th of 364, with limits $364 a month | Can't run it | 10th cheapest of 364 $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, and Railway's sandbox docs do not mention Docker; bochka documents Docker and /dev/kvm on every plan. | 113th cheapest of 377 $1,210 a month | 188th of 377, with limits $1,064 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB | 66th cheapest of 368 $89 a month | Can't run it | 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 Railway nor Modal ships a desktop, so you install Xvfb, VNC and a browser yourself; bochka has a 60fps desktop and a computer-use API built in. | 77th of 369, with limits $103 a month | Can't run it | 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 | 53rd of 367, with limits $93 a month | Can't run it | 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 | 60th cheapest of 346 $570 a month | Can't run it | 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 | 109th of 338, with limits $2,988 a month | Can't run it | 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 Many parallel agents need machines that keep state and run Docker, which bochka gives by default and Railway and Modal only partly cover. | 43rd of 360, with limits $574 a month | 294th of 360, with limits $642 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 it | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | Railway | Modal VM Sandboxes | bochka |
|---|---|---|---|
| Isolation | Sandboxes are isolated Linux VMs; app services are containers | VM with its own Linux kernel on Cloud Hypervisor | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| 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 | No session cap on paid plans; you set the time to live |
| Stop and resume | No paused sandbox; files survive only in checkpoints you take | No paused state; only Volumes and snapshots keep files | Stop for free and resume with the whole disk; saved every minute and on stop |
| Docker and systemd | Root shell on Ubuntu; the sandbox docs do not mention Docker | Yes; start dockerd yourself as the entrypoint | Docker, root and systemd in every sandbox |
| Nested virtualization | Not mentioned in the sandbox docs | Team and Enterprise plans only, on request | /dev/kvm on every plan |
| CPU benchmark (4 vCPU / 8 GB) | Not measured | 15.54 runs/s | 26.69 runs/s |
| Coding agents | Claude Code, Codex, OpenCode and Pi preinstalled; you run them through exec | Examples only; you install the agent yourself | Claude Code, Codex and others preinstalled, with a prompt, steer and events API |
| Keeping keys out of the sandbox | Secrets are environment variables inside the sandbox | Environment variables, or your own proxy in a sidecar | AI credentials proxy for model providers and any HTTPS API; real keys never enter the sandbox |
| Desktop and computer use | Headless: terminal, exec and SSH only | Not offered; an example shows Xvfb and VNC set up by hand | 60fps desktop, Chromium and computer-use API built in |
| Reaching the sandbox | Up to 10 public HTTPS domains, set only at creation; SSH | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | HTTPS URLs for up to 50 ports, token-protected, plus raw TCP |
| Sandboxes at once | 50 per environment on Hobby, 100 on Pro | 100 containers on Starter, 5,000 on Team | 100 to 2,000 by plan |
| Outbound network rules | No egress allowlist | Block all, IP-range allowlist, domain allowlist (beta) | Open internet, no provider-side allowlist |
| 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 | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Railway | Modal VM Sandboxes | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Not published | Yes | Yes |
| Nested virtualization | No | Yes | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Yes | Yes |
| Desktop GUI | No | No | Yes |
| Browser | Yes | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | No | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | Yes | Yes | Yes |
| Memory fork | No | Yes | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | No | Yes | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | Yes | No | Yes |
| Agent harness API | Yes | No | Yes |
| MCP server | Yes | No | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | No | No |
| BYOC | Yes | No | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Yes | Not published | Yes |
| Usage per sandbox (API) | No | Not published | Yes |
| Audit logs | Yes | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
In StarSling's public Node.js build-and-test benchmark at 4 vCPU / 8 GB, bochka did 26.69 runs per second and Modal's VM runtime did 15.54, so bochka did about 1.7 times the CPU work in the same time. Railway has no result in that benchmark yet, so we cannot say how it compares to either.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal VM Sandboxes measured on: VM Sandbox, request = size. Railway 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.
| Scenario | Railway, a month | Modal VM Sandboxes, a month | bochka, 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 | $15 · Starter · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $70 · Hobby · with limits | $178 · 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 | $2,229 · Starter · 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 | $223 · Pro · with limits | $792 · 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 | $3,193 · Team · with limits | $2,000 · $2000/mo · with limits |
Railway: Railway bills sandboxes per second at $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. The Hobby ($5) and Pro ($20) fees count toward usage, and Railway publishes no sandbox disk price, so our numbers leave disk out.
Modal VM Sandboxes: Modal bills by the second for whichever is higher, the CPU and memory you request or what you use, until the sandbox ends. Starter is free 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.
Modal VM Sandboxes: bochka plans start at $20 a month and the whole fee becomes usage credit, spent per second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
Railway is marked as a different kind of product in every scenario because it is an app platform first and does not price sandbox disk, and its cap of 100 sandboxes per environment on Pro blocks 300 user sandboxes or 1,000 jobs at once. A Modal VM Sandbox lives at most 24 hours and keeps files only in Volumes, so the workday, always-on and fleet scenarios do not fit there, while it does fit sandboxes for your users on Team. On bochka, the 1,000-job burst is queued above 90 starts a minute and needs more starts a day than the $2,000 plan allows.
| Scenario | Railway | Modal VM Sandboxes | bochka |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users |
| None that bite | None that bite |
| 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.
- 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, strict outbound rules, or your models already run on Modal.
- Docker in a real kernel. Useful for builds and tests: each Modal VM has its own Linux kernel, so Docker, FUSE and systemd work.
- 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 bochka fits
If what you are running is coding agents that work for hours or come back the next day, both Railway and Modal make you save and rebuild the machine yourself. bochka gives each agent a full VM that stops for free, keeps its disk, runs Docker and has a desktop, so the agent picks up where it left off.
A machine that keeps its work
A Railway sandbox is destroyed after 30 idle minutes and a Modal VM ends within 24 hours. On both, the agent's installs vanish unless you take checkpoints or use Volumes. A bochka sandbox stops, keeps its disk and costs nothing while stopped.
Desktop, Docker and KVM ready
Railway's sandbox docs do not mention Docker, and neither Railway nor Modal ships a desktop. Modal gives /dev/kvm only on Team or Enterprise on request. bochka has Docker, /dev/kvm and a 60fps desktop with Chromium 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. Both put API keys in environment variables. bochka adds a prompt, steer and events API and a credentials proxy that keeps real keys outside.
Use bochka when your agents work for hours or days in a machine they come back to: a faster full VM that keeps its disk, with Docker, /dev/kvm, a desktop and coding agents you drive from outside. Compare it one to one: bochka vs Railway and bochka vs Modal VM Sandboxes.
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 $178 on Modal, and 50 parallel agents cost $739 against $2,229. Railway's numbers leave out disk, which it does not price, and bochka comes to $26 and $317 for the same two jobs.
Which is faster, Railway or Modal VM Sandboxes?
We cannot say, because Railway has no result in the StarSling CPU benchmark yet. Modal's VM runtime did 15.54 runs per second at 4 vCPU / 8 GB, and bochka did 26.69 in the same run.
Can Railway sandboxes run Docker?
Railway's sandbox docs give you a root shell on Ubuntu but do not mention Docker or /dev/kvm. Modal VM Sandboxes run Docker if you start dockerd yourself, and bochka has 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. bochka has no session cap on paid plans.
Do Railway and Modal come with coding agents?
Railway's default image includes Claude Code, Codex, OpenCode and Pi, run headless through exec. Modal offers examples, so you install the agent yourself. bochka preinstalls 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. bochka runs only in the EU, in Germany, Finland and France.
Try bochka
Install the CLI, then run bochka new.
Product preview