E2B vs Railway
E2B is built only for agent sandboxes: Firecracker microVMs that pause with their memory and wake on the next request, but stop after 24 hours on Pro. Railway is an app platform that added sandbox VMs in 2026, which run next to your apps and databases but are destroyed when they sit idle.
The companies and products
E2B
E2B calls itself the AI agent cloud: an API that gives each agent session its own isolated Linux machine.
Every E2B sandbox is a Firecracker microVM that boots from a snapshot, so it starts fast and can be paused and resumed with its memory. You build custom sandboxes from templates based on a Docker image, and drive them from Python or JavaScript SDKs. It is built for teams that run many short code, data or agent jobs, and its runtime is open source.
- Isolation
- Firecracker microVM per sandbox
- Bring your own cloud
- Enterprise data plane in your AWS, GCP or Azure account
- Compliance
- SOC 2 Type II; HIPAA BAA on request
- Machine size
- 1 to 8 vCPU and 1 to 8 GiB RAM, CPU only
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. “16th cheapest of 367” means 15 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 workload | E2B: price rank | Railway: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month E2B fits a software factory but stops each session after 24 hours, and Railway destroys idle sandboxes, so work survives only in checkpoints; boat keeps the disk and has /dev/kvm for emulators. | 16th cheapest of 367 $4,143 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 An assistant that lives on its machine all month hits E2B's 24-hour cap, while on Railway it needs the idle timeout set to 0 and memory bills the whole time; boat simply keeps running. | 51st of 366, with limits $5,348 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 runs: E2B starts fast and pauses with its memory, and Railway bills for CPU used and destroys the sandbox when the job ends. | 37th cheapest of 345 $421 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 E2B wakes a paused sandbox on the next request, while Railway caps sandboxes per environment (100 on Pro), so 300 users at once means several environments; boat fits with hosting built in. | 23rd cheapest of 361 $2,354 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 E2B suits many short rollouts: it can fork a running sandbox with its memory, up to 20 copies per call, while Railway forks only the filesystem. | 2nd cheapest of 360 $9,384 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 | 78th cheapest of 364 $1,975 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 jobs that build containers need Docker, which E2B runs and Railway's sandbox docs do not mention; neither has nested virtualization for Android or VM builds, which boat has. | 337th of 377, with limits $1,429 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 A dev box that runs all month needs no session cap; Railway's Cloud Agents keep a disk but are early access and fixed at 4 vCPU / 4 GB on Pro, and E2B stops at 24 hours. | 192nd of 368, with limits $358 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 E2B has a Linux desktop for computer use, while Railway sandboxes are headless; boat streams its desktop at 60fps and can embed it in your app. | 32nd cheapest of 369 $1,342 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 | 100th of 367, with limits $746 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 | 57th cheapest of 346 $554 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 | 227th of 338, with limits $9,223 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 | 11th cheapest of 360 $1,043 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 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 | E2B | Railway | boat |
|---|---|---|---|
| Kind of product | Agent sandbox API: one isolated Linux machine per agent session | App platform for services and databases, with sandbox VMs added in 2026 | Agent sandboxes: a full Linux VM per agent, with hosting built in |
| Isolation | Firecracker microVM with its own kernel | Sandboxes are isolated Linux VMs; app services are containers | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| CPU benchmark (4 vCPU / 8 GB) | 12.61 runs/s | Not measured | 26.69 runs/s |
| Running for days | Up to 1 hour on Hobby, 24 hours on Pro; pausing resets the clock | No documented cap while active, but destroyed after the idle timeout (30 minutes by default) unless set to 0 | No cap on paid plans; you set the time to live |
| When the sandbox goes idle | Killed by default, or paused with memory and disk if you set it to pause | Destroyed; files survive only in checkpoints you take | You stop it; the disk is saved every minute and on stop, and a stopped sandbox costs nothing |
| Pause and wake | Pause with memory, resume in about 1 second with processes running; can wake on the next request | No pause; boot a new sandbox from a disk checkpoint | Stop and resume with the disk; resume boots the machine again |
| Fork | Fork a running sandbox with its memory, up to 20 copies per call | Fork a running sandbox's filesystem (no memory) | Fork a running sandbox with its disk |
| Docker and nested virtualization | Docker inside; nested virtualization not supported | Root shell on Ubuntu; the sandbox docs do not mention Docker or /dev/kvm | Docker, root, systemd and /dev/kvm on every machine |
| Desktop and computer use | Linux desktop for computer use | Headless: terminal, exec and SSH only | 60fps desktop and Chromium, computer use and browser control, embeddable stream |
| Reaching the sandbox | HTTPS URL per port, public by default unless you turn on a token; no dedicated IP | Up to 10 public HTTPS domains, set only at creation; SSH and port forwarding | HTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv4 or IPv6 |
| Coding agents and keys | Templates and guides for many agents, run through the command API; secrets injected into outbound HTTPS headers (private beta) | Claude Code, Codex, OpenCode and Pi preinstalled, run headless through exec; secrets as environment variables | Seven agents preinstalled with a prompt, steer and events API; credentials proxy for model providers and any HTTPS API |
| Biggest sandbox | 8 vCPU / 8 GiB self-serve, more on request | 8 vCPU / 8 GB on Hobby, 32 vCPU / 32 GB on Pro | 8 vCPU / 16 GB on the $20 plan, 16 vCPU / 32 GB from $100 |
| Apps and databases nearby | Sandboxes only | Postgres, Redis and services in the same project; a sandbox can join their private network | No hosted databases; host your own inside a sandbox |
| Regions | US by default; EU and APAC on Pro and above, enabled by support | California, Virginia, Amsterdam and Singapore; new sandboxes start in US West | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | E2B | Railway | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Not published | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Not published | Yes |
| Desktop GUI | Yes | No | Yes |
| Browser | Yes | Yes | Yes |
| Computer-use API | Yes | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | No | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | Yes | Yes | Yes |
| Memory fork | Yes | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | Yes | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | No | No |
| Secret proxy | Yes | No | Yes |
| Secret proxy for any API | Yes | No | Yes |
| Preinstalled agents | Yes | Yes | Yes |
| Agent harness API | No | Yes | Yes |
| MCP server | Yes | Yes | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | Yes | No | No |
| BYOC | Yes | Yes | No |
| Open source | Yes | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Yes | Yes | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Not published | Yes | No |
| SSO | No | 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
E2B and boat were measured in the same StarSling hpc-sandbox-benchmarks run, a Node.js build-and-test loop at 4 vCPU / 8 GB. boat did 26.69 runs per second and E2B did 12.61, so boat finished about twice as much CPU work in the same time. Railway has no result in that benchmark yet, so we cannot say how it compares.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. 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 | E2B, a month | Railway, 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 | $202 · Pro | $16 · Hobby · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $368 · Pro · 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 | $2,773 · Pro | $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 | $1,395 · Pro+ (600 concurrent) | $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 | $2,797 · Pro++ (1,100 concurrent) | $781 · Pro · with limits | $2,000 · $2000/mo · with limits |
E2B: E2B bills per second for the vCPU and RAM you set, idle time included, until you pause or kill the sandbox. Pro costs $150 a month for higher limits with no usage credit, and more concurrency costs $500 a month per 500 slots.
Railway: Railway bills sandboxes per second at $50 per vCPU-month on CPU actually used and $50 per GB-month on memory in use, plus $0.05 per GB out, and memory keeps billing while a sandbox waits. The Hobby ($5) and Pro ($20) fees count toward usage, and it publishes no price for sandbox disk, so our bills leave disk out.
Railway: Plans start at $20 a month, and the whole fee is usage credit spent per second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
E2B caps a session at 24 hours on Pro, so the always-on agent does not fit there, and Pro includes only 20 GiB of disk. Railway is marked as not a clean fit in every scenario because it is an app platform first and publishes no sandbox disk price, so its bills count CPU and memory only. Railway also caps sandboxes per environment, 50 on Hobby and 100 on Pro, so 300 sandboxes for your users or 1,000 jobs at once need several environments, while E2B reaches 1,100 at once on Pro++. 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.
| Scenario | E2B | Railway | boat |
|---|---|---|---|
| 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 |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use E2B when
you run many short agent or code jobs that pause between requests, wake on the next call, or branch from one running state with its memory.
- Memory pause and wake on request. For jobs that sleep between requests: a paused sandbox comes back in about a second with its processes still running.
- Memory forks for many branches. For rollouts and evals that branch from one state: E2B forks a running sandbox with its memory, up to 20 copies per call.
- A desktop and an open runtime. For computer-use agents and self-hosting: E2B has a Linux desktop, and its runtime is open source under Apache-2.0.
Use Railway when
your app and databases already live on Railway and you want short-lived sandboxes on the same private network, or bigger machines up to 32 vCPU.
- Your apps and databases in one place. For teams already on Railway: sandboxes can join the same private network as your Postgres and services.
- Bigger machines on Pro. For heavy jobs: Railway Pro allows sandboxes up to 32 vCPU / 32 GB, while E2B stops at 8 vCPU / 8 GiB self-serve.
- Short jobs that bill for CPU used. For quick code runs: Railway bills CPU on what a sandbox actually uses and destroys it when the job ends.
Where boat fits
If your agents work for hours on real projects, look at boat. Each one gets a full VM on a fast host that keeps its disk, runs Docker and emulators, has a desktop, and is driven from outside while its keys stay outside.
No session cap, and the disk stays
E2B stops a session at 24 hours on Pro, so your code must pause and resume it. Railway destroys an idle sandbox after 30 minutes, and turning that off keeps memory billing. boat saves the disk every minute and stops for free.
Docker, /dev/kvm and a 60fps desktop
E2B has no nested virtualization, so Android emulators and VMs cannot start. Railway sandboxes are headless and their docs do not mention Docker. boat has Docker, systemd, /dev/kvm and a desktop on every machine.
Agents driven from outside, keys kept outside
On Railway you run agents through exec and keys sit inside as environment variables; E2B's secret injection is in private beta. boat has a prompt, steer and events API and a credentials proxy for any HTTPS API.
Use boat when your agents work for hours or days: a fast full VM that keeps its disk, with Docker, /dev/kvm, a desktop, and coding agents you drive from outside while their keys stay outside. Compare it one to one: boat vs E2B and boat vs Railway.
Questions people ask
Is E2B cheaper than Railway?
On our numbers Railway comes out lower in every scenario: $202 against $16 for one agent on workdays and $2,773 against $739 for 50 agents in parallel. But Railway's bills leave out disk, which it does not price, and none of its scenarios is a clean fit. boat comes to $20 and $317 for those two.
Which is faster, E2B or Railway?
We cannot say, because Railway has no result in the StarSling CPU benchmark. E2B did 12.61 runs per second at 4 vCPU / 8 GB, and boat did 26.69 in the same run.
Can E2B and Railway run Docker?
E2B runs Docker inside the sandbox but does not support nested virtualization. Railway's sandbox docs give you a root shell on Ubuntu but do not mention Docker or /dev/kvm. boat has Docker, systemd and /dev/kvm on every machine.
Can a sandbox run for days on E2B or Railway?
E2B stops a session after 24 hours on Pro and 1 hour on Hobby, though pausing resets the clock. Railway has no documented cap while a sandbox is active, but destroys it after the idle timeout, 30 minutes by default, unless you set it to 0. boat has no session cap on paid plans and keeps the disk when stopped.
Can E2B or Railway pause a sandbox with its memory?
E2B can: a paused sandbox resumes in about a second with its processes running, and can wake on the next request. Railway cannot; you take a disk checkpoint and boot a new sandbox from it. boat saves the disk every minute and on stop, and resuming boots the machine again.
Where do E2B and Railway run?
E2B runs in the US by default, with EU and APAC on Pro and above, enabled by support. Railway has regions in California, Virginia, Amsterdam and Singapore. boat runs only in the EU, in Germany, Finland and France.
Try boat
Install the CLI, then run boat new.
7-day free trial