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 bochka: 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 workload | Railway: price rank | GitHub Codespaces: 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 Codespaces stops at 12 hours, so long build-and-test loops need saving or restarting on both; bochka 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; bochka 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; bochka 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 bochka 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 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 | GitHub Codespaces | bochka |
|---|---|---|---|
| Kind of product | App platform with sandbox VMs you create from a CLI or TypeScript SDK | Cloud dev environment per GitHub repository, for people in VS Code or the browser | Sandbox you drive from code: full VMs for agents, with an API and SDK |
| Isolation | Sandboxes are isolated Linux VMs; app services are containers | A Docker container on its own newly built VM | Every sandbox is a full VM with its own kernel |
| How long it runs | Until destroyed; the idle timeout (30 minutes by default) destroys it, or set it to 0 for never | Stops after 30 idle minutes by default and after 12 hours at most, even while in use | Runs until you stop it; no session cap on paid plans |
| Files after it stops | Destroyed with the sandbox; only checkpoints you take survive | Kept and billed as storage; stopped codespaces are deleted after 30 days by default | Snapshots every minute and on stop; a stopped sandbox keeps its disk and costs nothing |
| Docker and nested virtualization | Root shell on Ubuntu; the sandbox docs do not mention Docker or /dev/kvm | Docker and sudo in the dev container; /dev/kvm is not documented | Docker, root, systemd and /dev/kvm on every machine |
| Fork and snapshots | Fork a running sandbox's filesystem; named checkpoints to boot new ones | No copy or snapshot endpoint; new codespaces start from a repo, branch or prebuild | Fork a running sandbox into copies; named snapshots as templates |
| Starting setup | Templates built from ordered steps (packages, env, commands) and cached | Dev container config in the repo, with prebuilds built by GitHub Actions | Named snapshots (templates), shareable by code |
| Coding agents | Claude Code, Codex, OpenCode and Pi preinstalled; you run them headless through exec | GitHub Copilot as a VS Code extension; other agents you install yourself | Claude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API |
| Keeping keys out of the sandbox | Secrets go in as environment variables or are saved in a checkpoint | Secrets are copied into the codespace as environment variables | AI credentials proxy for model providers and any HTTPS API you register |
| Desktop and computer use | Headless: terminal, exec and SSH only | VS Code, JupyterLab and a terminal; no graphical desktop | 60fps desktop and Chromium, computer use and browser control |
| Reaching the sandbox | Up to 10 public HTTPS domains, set at creation; SSH | A URL per forwarded port, private or public; SSH; no public IP | HTTPS URLs for up to 50 ports, token-protected; raw TCP; dedicated IPv6 or IPv4 |
| Apps and databases nearby | Postgres, Redis and services in the same project, on a private network the sandbox can join | None hosted; you run them inside the codespace | None hosted; you run them inside a sandbox |
| Machines at once | 50 per environment on Hobby, 100 on Pro | Limits exist but GitHub does not publish them | 100 to 2,000 by plan |
| Regions | US West, US East, Amsterdam and Singapore | US East, US West, Europe West and Southeast Asia | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Railway | GitHub Codespaces | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Not published | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Not published | 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 | Yes | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | Yes | No | Yes |
| Live fork (no pause) | Yes | No | Yes |
| Memory fork | No | No | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | No | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | No | No | 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 | Yes | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Yes | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable measurement for Railway or GitHub Codespaces: neither was in the public benchmark runs we use. bochka 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.
| Scenario | Railway, a month | GitHub Codespaces, 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 | $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 bochka 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 | Railway | GitHub Codespaces | bochka |
|---|---|---|---|
| One coding agent, workdays |
| None that bite | 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 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 bochka 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. bochka 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. bochka 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 bochka, 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. bochka has a prompt, steer and events API and a credentials proxy.
Use bochka 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: bochka vs Railway and bochka 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 bochka 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. bochka 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 bochka 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 bochka 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. bochka 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. bochka runs only in the EU, in Germany, Finland and France.
Try bochka
Install the CLI, then run bochka new.
Product preview