Railway vs GitHub Codespaces

Railway is an app platform that added sandbox VMs you create from code, run commands in and destroy when they go idle. GitHub Codespaces is a dev environment for people: a Linux dev container opened from a repository in VS Code or the browser, which stops after 12 hours at most.

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.

GitHub Codespaces

GitHub Codespaces is GitHub's cloud development environment: a ready-to-code Linux machine for a repository, opened in the browser, VS Code or the GitHub CLI.

Codespaces is a different kind of product from boat: a dev environment for people working on a GitHub repository, not a sandbox API for agents. Each codespace is a Docker container built from the repo's dev container config, running on its own newly built VM on Azure, with 2 to 32 cores. It is built for developers and teams who want every contributor to start from the same setup, with prebuilds, port forwarding and GitHub billing.

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 workloadRailway: price rankGitHub Codespaces: price rankboat: 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 Codespaces stops at 12 hours, so long build-and-test loops need saving or restarting on both; boat keeps the machine and its disk.
51st of 367, with limits
$342 a month
274th of 367, with limits
$4,618 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 with the idle timeout set to 0, while every codespace stops after 12 hours at most, so Codespaces is only a compromise here.
16th cheapest of 366
$3,977 a month
309th of 366, with limits
$6,970 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
Railway fits short code runs better: it bills for CPU used and destroys the sandbox when done, while each codespace builds a dev container on a new VM.
36th cheapest of 345
$413 a month
288th of 345, with limits
$619 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 per environment (100 on Pro) and GitHub does not publish how many codespaces can run at once, so 300 user sandboxes are a compromise on both.
42nd of 361, with limits
$290 a month
281st of 361, with limits
$1,964 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
78th of 360, with limits
$4,450 a month
282nd of 360, with limits
$9,489 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
Railway can fork a running sandbox and boot many from one checkpoint; Codespaces has no copy or snapshot API, so every run starts again from the repository.
108th of 364, with limits
$364 a month
295th of 364, with limits
$1,519 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
Codespaces has Docker inside the dev container, while Railway's sandbox docs do not mention Docker; boat documents Docker and /dev/kvm on every machine.
113th cheapest of 377
$1,210 a month
314th of 377, with limits
$909 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Codespaces is a polished VS Code box per repo but stops at 12 hours, and Railway's Cloud Agents keep a disk but are early access; boat runs until you stop it.
66th cheapest of 368
$89 a month
130th of 368, with limits
$270 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 graphical desktop: Railway sandboxes are headless and a codespace has an editor and a terminal, while boat streams a 60fps desktop with Chromium.
77th of 369, with limits
$103 a month
267th of 369, with limits
$1,367 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
53rd of 367, with limits
$93 a month
275th of 367, with limits
$678 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
60th cheapest of 346
$570 a month
310th of 346, with limits
$922 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
109th of 338, with limits
$2,988 a month
280th of 338, with limits
$18,637 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
43rd of 360, with limits
$574 a month
267th of 360, with limits
$445 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

FeatureRailwayGitHub Codespacesboat
Kind of productApp platform with sandbox VMs you create from a CLI or TypeScript SDKCloud dev environment per GitHub repository, for people in VS Code or the browserSandbox you drive from code: full VMs for agents, with an API and SDK
IsolationSandboxes are isolated Linux VMs; app services are containersA Docker container on its own newly built VMEvery sandbox is a full VM with its own kernel
How long it runsUntil destroyed; the idle timeout (30 minutes by default) destroys it, or set it to 0 for neverStops after 30 idle minutes by default and after 12 hours at most, even while in useRuns until you stop it; no session cap on paid plans
Files after it stopsDestroyed with the sandbox; only checkpoints you take surviveKept and billed as storage; stopped codespaces are deleted after 30 days by defaultSnapshots every minute and on stop; a stopped sandbox keeps its disk and costs nothing
Docker and nested virtualizationRoot shell on Ubuntu; the sandbox docs do not mention Docker or /dev/kvmDocker and sudo in the dev container; /dev/kvm is not documentedDocker, root, systemd and /dev/kvm on every machine
Fork and snapshotsFork a running sandbox's filesystem; named checkpoints to boot new onesNo copy or snapshot endpoint; new codespaces start from a repo, branch or prebuildFork a running sandbox into copies; named snapshots as templates
Starting setupTemplates built from ordered steps (packages, env, commands) and cachedDev container config in the repo, with prebuilds built by GitHub ActionsNamed snapshots (templates), shareable by code
Coding agentsClaude Code, Codex, OpenCode and Pi preinstalled; you run them headless through execGitHub Copilot as a VS Code extension; other agents you install yourselfClaude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API
Keeping keys out of the sandboxSecrets go in as environment variables or are saved in a checkpointSecrets are copied into the codespace as environment variablesAI credentials proxy for model providers and any HTTPS API you register
Desktop and computer useHeadless: terminal, exec and SSH onlyVS Code, JupyterLab and a terminal; no graphical desktop60fps desktop and Chromium, computer use and browser control
Reaching the sandboxUp to 10 public HTTPS domains, set at creation; SSHA URL per forwarded port, private or public; SSH; no public IPHTTPS URLs for up to 50 ports, token-protected; raw TCP; dedicated IPv6 or IPv4
Apps and databases nearbyPostgres, Redis and services in the same project, on a private network the sandbox can joinNone hosted; you run them inside the codespaceNone hosted; you run them inside a sandbox
Machines at once50 per environment on Hobby, 100 on ProLimits exist but GitHub does not publish them100 to 2,000 by plan
RegionsUS West, US East, Amsterdam and SingaporeUS East, US West, Europe West and Southeast AsiaEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureRailwayGitHub Codespacesboat
Full VM (own kernel)YesYesYes
Docker insideNot publishedYesYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUINoNoYes
BrowserYesNoYes
Computer-use APINoNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeYesYesYes
Automatic snapshotsNoNoYes
Fork/cloneYesNoYes
Live fork (no pause)YesNoYes
Memory forkNoNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesNoYes
Idle auto-stopYesYesNo
Wake on requestNoNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistNoNoNo
Secret proxyNoNoYes
Secret proxy for any APINoNoYes
Preinstalled agentsYesNoYes
Agent harness APIYesNoYes
MCP serverYesNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCYesNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsYesYesYes
Usage per sandbox (API)NoNoYes
Audit logsYesYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesNoNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

RailwayNot measured
GitHub CodespacesNot measured
boat26.69 runs/s

There is no comparable measurement for Railway or GitHub Codespaces: neither was in the public benchmark runs we use. boat did 26.69 Node.js build-and-test runs per second at 4 vCPU / 8 GB in StarSling's run of 2026-09-29, on dedicated AMD Ryzen 9 9950X hosts. So we cannot say which of the three is fastest.

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

ScenarioRailway, a monthGitHub Codespaces, 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
$16 · Hobby · with limits$51 · Personal account: GitHub Free$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$70 · Hobby · with limits$270 · Personal account: GitHub Free · 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$3,019 · Personal account: GitHub Free$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$850 · Personal account: GitHub Free · 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
$781 · Pro · with limits$1,889 · Personal account: GitHub Free · 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, which keeps billing while a sandbox waits. Railway does not publish a price for sandbox disk, so our bills leave disk out.

GitHub Codespaces: Codespaces bills $0.09 per core-hour for the whole time a codespace is active, plus $0.07 per GB-month of storage while it exists. There is no 4-core machine with 8 GB, so 4 vCPU / 8 GB jobs are priced on the 16 GB machine.

GitHub Codespaces: 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

Railway shows as not a clean fit in every scenario because it is an app platform first and does not price sandbox disk, and it caps sandboxes per environment, 100 on Pro, so 300 user sandboxes or 1,000 jobs at once need several environments. Codespaces stops every machine at 12 hours, so it does not fit the always-on agent, and GitHub does not publish how many can run at once. 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.

ScenarioRailwayGitHub Codespacesboat
One coding agent, workdays
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
None that biteNone that bite
One agent that never stops
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
  • Personal account: GitHub Free: sessions capped at 12 h
None that bite
50 agents in parallel
  • not confirmed: Docker inside
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
  • how many machines can run at once: limit not published, probably fine at 50 (the typical published limit is 50)
None that bite
Sandboxes for your users
  • Pro: max 100 concurrent
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
  • not confirmed: how many machines can run at once (you need 300; the typical published limit is 50)
None that bite
1,000 short jobs at once
  • Pro: max 100 concurrent
  • different kind of product: app platform
  • disk beyond 0 GiB: price unknown
  • not confirmed: how many machines can run at once (you need 1,000; the typical published limit is 50)
  • 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 Railway when

your app already lives on Railway and you want short-lived sandboxes created from code on the same private network, billed on CPU used.

  • Sandboxes next to your apps. Useful if your app already runs on Railway: a sandbox can join the private network of your Postgres and services.
  • Built for code that creates machines. Useful for agent platforms: create, fork and destroy sandboxes from an SDK, with coding agents already in the image.
  • Short jobs billed on CPU used. Useful for many quick runs: Railway bills sandbox CPU on what is used and destroys the machine when done.

Use GitHub Codespaces when

your developers want a ready VS Code environment for a GitHub repository, opened from a branch or pull request.

  • Built into GitHub. Useful if your team lives on GitHub: open a ready VS Code setup from any repo, branch or pull request.
  • Docker in the dev container. Useful for projects that build containers: Docker and sudo work inside a codespace through dev container features.
  • Free hours for personal accounts. Useful for occasional personal work: a GitHub Free account includes 120 core-hours and 15 GB-month of storage each month.

Where boat fits

If what you are running is coding agents that work for hours, both choices bend: Railway destroys idle sandboxes and Codespaces stops every machine at 12 hours. boat gives each agent a full VM that runs until you stop it, keeps its disk, and comes with Docker, /dev/kvm, a desktop and agents you drive from outside.

Machines that keep running and keep their work

A Railway sandbox is destroyed after 30 idle minutes unless you set the timeout to 0, and then memory bills until you destroy it. A codespace stops at 12 hours, ending its processes. boat runs until you stop it and saves the disk every minute.

A full VM with Docker, /dev/kvm and a desktop

Railway's sandbox docs do not mention Docker, and neither documents /dev/kvm or a graphical desktop. An agent that boots an Android emulator or tests a site in a real browser gets all three on boat, plus raw TCP.

Agents driven from outside, keys kept outside

On Railway you run agents through exec and parse output; on Codespaces you script them over SSH. Both put API keys in environment variables any code can read. boat has a prompt, steer and events API and a credentials proxy.

Use boat when your agents work for hours or days: full VMs that keep their 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 Railway and boat vs GitHub Codespaces.

Questions people ask

Is Railway cheaper than GitHub Codespaces?

In the scenarios we priced, yes, though Railway's numbers leave out disk, which it does not price. One agent running all month is $70 on Railway against $270 on Codespaces, and 50 agents in parallel come to $739 against $3,019. On boat those are $26 and $317.

Which is faster, Railway or GitHub Codespaces?

We cannot say: neither has a result in the public benchmark we use. boat did 26.69 Node.js build-and-test runs per second at 4 vCPU / 8 GB in that benchmark.

Can Railway or Codespaces run Docker?

Docker works inside a codespace through dev container features, with sudo. Railway's sandbox docs give you a root shell on Ubuntu but do not mention Docker. Every boat machine has Docker, systemd and /dev/kvm.

Can I keep an AI agent running 24/7 on either?

On Railway, only if you set the idle timeout to 0, and memory then bills the whole time. A codespace stops after 12 hours at most, so you need a script that restarts it. A boat sandbox runs until you stop it.

Do Railway or Codespaces come with coding agents?

Railway's sandbox image includes Claude Code, Codex, OpenCode and Pi, which you run headless through exec. Codespaces offers GitHub Copilot as an editor extension, and other agents you install yourself. boat preinstalls coding agents and lets you prompt, steer and watch them through an API.

Where do they run?

Railway runs in California, Virginia, Amsterdam and Singapore. Codespaces runs in US East, US West, Europe West and Southeast Asia. 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