Fly.io Machines vs GitHub Codespaces
Fly.io Machines are fast microVMs you boot from your own image to host apps near users, and they run until you stop them. GitHub Codespaces are ready dev containers opened from a repository in VS Code, and each one stops after 12 hours at most.
The companies and products
Fly.io Machines
Fly.io is an app hosting platform, and Machines are the microVMs underneath it that you can also start and stop through a REST API.
A Fly Machine boots your Docker image as a Firecracker microVM on Fly's own servers, in one of 17 regions. You pick a shared or performance CPU preset, attach at most one Volume for data that must last, and Fly Proxy can stop, suspend and wake Machines as traffic comes and goes. It is built for teams that host web apps and services worldwide; it is not a sandbox product, so this page compares the parts that overlap with agent work.
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. “92nd cheapest of 367” means 91 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 | Fly.io Machines: price rank | GitHub Codespaces: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Neither fits fully: Fly needs a Volume for files that must last and offers no /dev/kvm, while Codespaces stops every 12 hours; boat fits with Docker, /dev/kvm and a kept disk. | 92nd of 367, with limits $836 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 Fly Machines run until stopped, which suits a long-lived assistant better than Codespaces and its 12-hour cap, though Fly keeps only what sits on the one Volume. | 125th of 366, with limits $816 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 Fly fits short bursts best of the three on paper, with per-second billing and no plan fee, while each codespace builds a dev container on a new VM first. | 75th of 345, with limits $94 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 Fly can host one Machine per user through its API, while Codespaces are made for GitHub users on a repository and GitHub does not publish how many can run at once. | 69th of 361, with limits $600 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 | 48th of 360, with limits $2,838 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 | 117th of 364, with limits $457 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 Busy CI jobs drain a shared Fly vCPU's burst balance, and Codespaces has no fork or snapshot API, so each run starts from a repo or prebuild. | 152nd of 377, with limits $288 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 gives a polished VS Code box per repo but stops after 12 hours; Fly runs 24/7 but you build the image; boat is a full VM that keeps running. | 118th of 368, with limits $53 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 ships a graphical desktop, so computer-use agents need one built by hand on both, while boat streams a 60fps desktop with Chromium. | 95th of 369, with limits $173 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 | 160th of 367, with limits $90 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 | 161st of 346, with limits $67 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 Fly is the strongest of the three here, since it can spread scrapers across 17 regions and bill only the seconds they run. | 44th of 338, with limits $1,232 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 | 118th of 360, with limits $63 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 | Fly.io Machines | GitHub Codespaces | boat |
|---|---|---|---|
| Kind of product | App hosting platform; you boot your own image as a microVM | Cloud dev environment: a dev container per GitHub repository | Agent sandbox: a full VM per agent, ready to use |
| Isolation | Firecracker microVM with its own kernel | A Docker container on its own newly built VM | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X (Zen 5) hosts |
| How long it runs | Runs until you or Fly Proxy stop it; no documented maximum | 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 |
| Docker, systemd and nested virtualization | Root and Docker you install yourself; no systemd; /dev/kvm not offered | Docker and sudo inside the dev container; /dev/kvm not documented | Docker, root, systemd and /dev/kvm on every machine |
| Files after a stop | Root file system is ephemeral; lasting data goes on one Volume, billed for its full size around the clock | Saved files are kept and storage is billed; stopped codespaces are deleted after 30 days by default | The whole disk is kept, with snapshots every minute and on stop; a stopped sandbox costs nothing |
| Pause with memory | Suspend keeps memory for Machines up to 2GB | No memory state is kept; processes end at each stop | Resume reboots from disk (no memory snapshots) |
| Fork and copies | Clone copies a Machine's config; a cloned Volume starts empty | No copy or snapshot endpoint; new codespaces start from a repo, branch or prebuild | Fork a running sandbox, disk included; named snapshots as templates |
| Starting point | Any Docker image you build | Dev container config in the repo, with prebuilds built by GitHub Actions | Named snapshots (templates), shareable by code; no Dockerfile builds |
| Desktop and computer use | None built in; you add a desktop and browser to your image | VS Code, JupyterLab and a terminal; no graphical desktop | 60fps desktop and Chromium, computer use and browser control, embeddable stream |
| Coding agents | None built in; you install and run agents yourself | 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 arrive as environment variables; an open-source tokenizer proxy you deploy yourself | Secrets are copied into the codespace as environment variables | AI credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Reaching the machine | Public HTTPS and TCP through Fly Proxy, Anycast IPs, custom domains, private network | A URL per forwarded port and SSH tunnels; no public IP | HTTPS URLs for up to 50 ports, token-protected; raw TCP; dedicated IPv6 or IPv4 |
| Outbound rules | Network policies allow chosen ports and protocols and deny the rest | Open internet; GitHub says there is no way to restrict it | Open internet on every plan; no provider-side allowlist |
| Regions | 17 regions on six continents | US East, US West, Europe West and Southeast Asia | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | Fly.io Machines | GitHub Codespaces | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | No | Not published | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | 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 | Yes | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | Yes | No | Yes |
| Public IPv4 | Yes | No | No |
| Egress allowlist | Yes | No | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | 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 | No | No | No |
| Open source | Yes | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | No | 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 | No | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable measurement for either one: neither Fly.io Machines nor GitHub Codespaces was in the public StarSling run where boat did 26.69 Node.js build-and-test runs per second at 4 vCPU / 8 GB. Fly's shared vCPUs guarantee only 6.25% of each core with a burst balance, so its results would depend on whether you pick shared or performance CPUs.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Fly.io Machines 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 | Fly.io Machines, a month | GitHub Codespaces, 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 | $15 · Pay As You Go · 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 | $36 · Pay As You Go · 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 | $487 · Pay As You Go · 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 | $110 · Pay As You Go · 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 | $232 · Pay As You Go · with limits | $1,889 · Personal account: GitHub Free · with limits | $2,000 · $2000/mo · with limits |
Fly.io Machines: Fly bills each Machine per second while it runs, by CPU preset and memory, with no plan fee; Volumes are billed for their full size all month. The figures here use shared vCPUs bought in 1-year reservation blocks, Fly's lowest rate.
GitHub Codespaces: Codespaces bills $0.09 per core-hour while a codespace is active, plus $0.07 per GB-month of storage while it exists. A 4 vCPU / 8 GB job is priced on the 4-core 16 GB machine, and personal accounts get a free monthly quota.
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
Fly shows as a compromise in every scenario because its lowest figures need a 1-year reservation and use shared vCPUs that are throttled above 6.25% of each core, so long builds and tests slow down. Codespaces stops every codespace after 12 hours, so it does not fit the always-on agent, and GitHub does not publish how many can run at once, so 300 user sandboxes and 1,000 short jobs are not confirmed. On boat the 1,000-job burst is limited by starts per minute and per day, so it gets queued even on the $2,000 plan.
| Scenario | Fly.io Machines | GitHub Codespaces | boat |
|---|---|---|---|
| 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 Fly.io Machines when
you host web apps or services that must run near users around the world, sleep between requests and wake on traffic.
- No time limit. Useful for services and long jobs: a Fly Machine runs until you stop it, while a codespace stops after 12 hours.
- 17 regions and wake on request. Useful for apps near users worldwide: Fly runs in 17 regions and Fly Proxy wakes a sleeping Machine when traffic arrives.
- Public endpoints and egress rules. Useful if you host a product: Fly gives public HTTPS and TCP, custom domains and port-level outbound rules.
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 codespace from any repo, branch or pull request.
- A ready editor. Useful for people, not just code: VS Code in the browser or on your machine, with dev containers and prebuilds set up.
- Free hours for personal accounts. Useful for occasional personal work: a GitHub Free account includes 120 core-hours and 15 GB-month each month.
Where boat fits
Fly.io Machines are built for hosting apps and GitHub Codespaces for developers working in a repository, so teams using either for agents end up building the sandbox around them. If what you are really running is agents that install, build, test and browse for hours, boat gives each one a full VM with the disk, desktop and agent controls already in place.
A disk that keeps everything, with no time limit
A Fly Machine loses anything outside its one Volume on restart, and a codespace stops at 12 hours with its processes ended. boat runs until you stop it, saves the disk every minute and on stop, and a stopped machine costs nothing.
/dev/kvm, systemd and a desktop
Neither Fly nor Codespaces offers /dev/kvm or a graphical desktop, so emulators, nested VMs and computer-use agents need workarounds or do not run. Every boat machine has Docker, systemd, /dev/kvm and a 60fps desktop with Chromium.
Agents driven from outside, keys kept out
On both you install agents yourself, write the code that prompts and watches them, and pass keys in as environment variables that agent code can read. boat preinstalls coding agents with a prompt, steer and events API, and its credentials proxy keeps real keys outside.
Use boat when your agents do real work for hours or days: full VMs with /dev/kvm, Docker and a desktop, a disk that survives every stop, forks of running machines, and coding agents with keys kept outside. Compare it one to one: boat vs Fly.io Machines and boat vs GitHub Codespaces.
Questions people ask
Is Fly.io Machines cheaper than GitHub Codespaces?
In every scenario we priced, yes, using Fly's lowest rate of shared vCPUs on a 1-year reservation. One agent running all month is $36 on Fly against $270 on Codespaces, and 50 agents in parallel are $487 against $3,019. boat comes to $26 and $317 for the same two, with full cores and no reservation.
Which is faster, Fly.io Machines or GitHub Codespaces?
Neither has a comparable public measurement. Fly's shared vCPUs guarantee 6.25% of each core and get throttled under steady load, while its performance vCPUs get the full core. boat did 26.69 Node.js build-and-test runs per second at 4 vCPU / 8 GB in StarSling's benchmark.
Can I run an AI agent 24/7 on either one?
On Fly yes, since a Machine runs until you stop it, though only its Volume keeps files across restarts. A codespace stops after 12 hours at most, even while in use, so 24/7 work needs a restart script. A boat sandbox runs until you stop it and keeps its whole disk.
Can Fly.io Machines and GitHub Codespaces run Docker?
Both can: on Fly you install Docker inside the microVM yourself, and Codespaces runs Docker inside the dev container. Neither offers /dev/kvm, so Android emulators and nested VMs are not available. boat has Docker, systemd and /dev/kvm on every machine.
Where do they run?
Fly runs Machines in 17 regions on six continents, and Codespaces in US East, US West, Europe West and Southeast Asia. boat runs only in the EU, in Germany, Finland and France, with EU data residency.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs Fly.io Machines
- boat vs GitHub Codespaces
- E2B vs Fly.io Machines
- Daytona vs Fly.io Machines
- Modal vs Fly.io Machines
- Vercel Sandbox vs Fly.io Machines
- Cloudflare Sandbox vs Fly.io Machines
- Blaxel vs Fly.io Machines
- Runloop vs Fly.io Machines
- Tensorlake vs Fly.io Machines
- Morph Cloud vs Fly.io Machines
- CodeSandbox SDK vs Fly.io Machines