Oct 14 2021

Coder: The self-hosted GitHub Codespaces alternative

Update

The original article was written by Erik Bledsoe and Ashley McClelland. We’ve updated it to cover the latest details about GitHub Codespaces and Coder.


GitHub Codespaces and Coder both give developers reproducible, cloud-based development environments. They take very different paths to get there, and they hand you very different amounts of control. Here is how each one works in 2026, where each fits, and how to choose.

Why teams move development to the cloud

Most developers still run their IDE on a local laptop. Moving those environments to the cloud solves a familiar set of problems and adds a few advantages on top.

  • Start coding on day one. Setting up a local environment can take hours or days before the first commit. A cloud workspace is configured once and ready the moment a developer signs in.
  • Keep source code off local machines. The laptop is usually the least controlled endpoint in the pipeline. When code is cloned to individual devices, it spreads. When it lives in a cloud workspace, it stays inside infrastructure the organization controls.
  • Cut configuration drift. Dependency and config drift is the root of the classic "it works on my machine" problem. Reproducible workspaces give everyone the same baseline.
  • Scale compute on demand. Need more cores or a GPU for a heavy build or a model? Resize the workspace instead of buying a new laptop.
  • Work from anywhere. Because the environment lives in the cloud, developers can reach it securely from any device.

There is a newer reason too. AI coding agents need somewhere to run, and the same cloud environment that serves a developer can serve that developer's agents. Where those agents run, what they can reach, and who can audit them is becoming as important as the developer experience itself. More on that below.

Where GitHub Codespaces fits

Codespaces is built into GitHub, and that integration is its biggest strength. You open a repository in the browser, click a button or press a key, and a configured environment spins up. For a team that lives inside GitHub, it feels like a natural part of the workflow.

A few things are worth knowing before you standardize on it.

  • It is tied to GitHub-hosted repositories. Codespaces creates environments from GitHub repositories, branches, and templates. If your source of truth is GitLab, Bitbucket, a self-managed Git server, or GitHub Enterprise Server, it is not a general-purpose option for those repositories.
  • The experience centers on VS Code. VS Code in the browser and on the desktop is the first-class path, and JupyterLab is supported. JetBrains support has existed through Gateway and plugin workflows, but it is not presented as a central, first-class client in GitHub's current documentation.
  • The control plane and compute run in GitHub's cloud. Codespaces is a managed service hosted on Microsoft Azure. GitHub now offers Codespaces for GitHub Enterprise Cloud with data residency, so code and data can be pinned to a region, but the orchestration and compute still live in GitHub's cloud rather than yours. For air-gapped work, classified environments, or organizations that cannot send code to a vendor's cloud at all, regional data residency is not the same as self-hosting.

If your team is all in on GitHub, mostly uses VS Code, and wants nothing to operate, Codespaces is a strong and simple choice.

Where Coder fits

Coder is built for teams that need the development environment to run on infrastructure they control. That includes any cloud, your own data center, and fully air-gapped networks with no outbound connectivity.

Coder does not try to lock you into one ecosystem. The assumption is that your team already knows which editors, clouds, and workflows work best, so Coder stays agnostic about them.

  • Run it on infrastructure you already operate. AWS, Azure, GCP, on-prem, EKS, AKS, GKE, OpenShift, bare VMs, and air-gapped networks are all in scope.
  • Use any Git provider. GitHub, GitLab, Bitbucket, GitHub Enterprise Server, and internal forks all work.
  • Use any IDE. VS Code, JetBrains, Cursor, Zed, and Windsurf, in the browser, on the desktop, or over SSH.
  • Define workspaces as code. Workspaces are Terraform templates, which gives your platform team version-controlled environments with role-based access control, audit logging, and policy controls.
  • Keep code in your network. Source code and data stay inside your infrastructure, which is why Coder is common in regulated, high-security environments, including financial services, energy, defense, and government.
  • It is open source. You can read the code, extend it, and integrate it rather than trusting a closed service.

Running AI agents under your control

AI coding agents are capable, and they are also a new kind of risk. An agent that can read a codebase, run commands, and open pull requests needs a sandbox with the right access and clear boundaries. Running that on a developer's laptop, or shipping the code a model reasons over to a vendor's cloud, is exactly what regulated teams are trying to avoid.

Coder treats agents as first-class tenants of the same platform that serves developers. Agent environments use the same Terraform templates, the same provisioning, and the same controls as developer workspaces, so a platform team manages one system instead of two. With Coder Agents, the agent loop and model routing run on your infrastructure, and you choose the models and providers instead of routing everything through a vendor. For teams that care where code goes and who can audit agent behavior, that control is the reason to self-host in the first place.

This is where the two products diverge most. Codespaces can give an agent a GitHub-managed cloud environment, while Coder extends the same self-hosted governance model to both developers and agents, so the model routing and network boundaries stay yours.

Pricing

GitHub bills Codespaces for what you actively use. As of mid-2026, compute starts at about $0.18 per hour for a two-core machine and scales with core count, and storage is about $0.07 per gigabyte per month. Personal accounts on GitHub Free include a monthly free allotment of 120 core hours and 15 gigabytes of storage, and GitHub Pro personal accounts include 180 hours and 20 gigabytes. Organizations and enterprises do not get a free allotment, so their usage is billed from the first hour. You can confirm the current figures in GitHub's billing documentation.

Coder comes in two editions. Coder Community is free and open source, and it already covers the core of a self-hosted platform: unlimited workspaces and templates, web and desktop IDEs including VS Code, JetBrains, and Cursor, single sign-on, and the ability to assign long-running tasks to AI coding agents. Coder Premium is billed annually per user and adds the enterprise layer: audit logging, role-based access control, resource quotas, automatic shutdown of idle workspaces, high availability, and more. Either way, because Coder runs on your own infrastructure, your cloud compute is a separate line in your total cost of ownership, which means you can apply your existing cloud discounts and keep that spend in one place. Contact Coder's team for Premium pricing.

Proof in production

Palantir's DevOps team wrote about the benefits of remote ephemeral workspaces after adopting Coder, reporting that front-end build times improved by 78% and git clone times dropped by 71% for one example repository, along with faster development cycles from on-demand CPU and RAM and reduced onboarding, to the point that their own infrastructure teams began encouraging developers to switch. A United States defense intelligence organization built the military's first multi-tenant Coder deployment and centralized compliance for more than 2,500 developers. These are the kinds of environments where keeping code and tooling inside your own infrastructure is not a preference but a requirement.

Choosing between them

The decision usually comes down to control. If your team works entirely inside GitHub, mostly uses VS Code, and wants a managed service with nothing to operate, GitHub Codespaces is a clean fit. If you need any Git provider, any IDE, deployment on your own infrastructure including air-gapped networks, governance over both developers and AI agents, and an open-source foundation you can inspect, that is what Coder is built for.

Try Coder

To see how Coder works as a self-hosted alternative to GitHub Codespaces, request a demo, explore Coder on GitHub, or start a Coder Premium trial.

Dave Ahr
Dave Ahr

Staff Sales Engineer

Subscribe to our newsletter

Want to stay up to date on all things Coder? Subscribe to our monthly newsletter for the latest articles, workshops, events, and announcements.