Every developer team knows the ritual: a new hire spends their first week installing toolchains, fighting version conflicts, and begging for access to staging databases. Coder is an open-source platform that ends that ritual. It is a self-hosted system for cloud development environments (CDEs) and AI coding agents, built in Go with a React frontend, and it treats your development environment the way Kubernetes treats workloads: declaratively defined, provisioned on demand, connected over an encrypted network, and shut down when idle.
The project has tens of thousands of GitHub stars, a large contributor base, and a design philosophy that is easy to respect: everything is Terraform, everything is observable, and nothing sensitive lives on a developer laptop. We mapped its real repository structure into the two diagrams in this post, and the overview below captures the whole story in one glance: clients on the left, a control plane in the middle, provisioned workspaces on the right.
High-level overview of the major layers: clients, control plane, Terraform provisioning, and the workspace runtime.
Why You Need This
The problem Coder solves is bigger than onboarding. Local laptops are slow, inconsistent, and impossible to secure at scale; cloud VMs configured by hand drift and rot. If your builds depend on “that one machine that works,” you already feel the pain. A cloud development environment gives every developer an identical, disposable, centrally managed workspace that lives next to your code and your data.
You specifically need Coder, rather than a managed SaaS IDE, for three reasons. First, it is self-hosted: the control plane and every workspace run on your infrastructure, so source code, credentials, and AI traffic never leave your perimeter. Second, workspaces are defined in Terraform, the same language your platform team already uses, so an environment can be an EC2 instance, a Kubernetes pod, or a Docker container with one template change. Third, idle workspaces shut down automatically, which turns the usual “always-on VM bill” into a fraction of the cost.
And there is a fourth reason that has become urgent in the last two years: AI agents. Coder lets you delegate coding work to agents that run inside your workspaces while their model credentials and governance stay in the control plane. No API keys scattered across laptops, and every agent action carries a user identity.
How It Works
The repository is a Go workspace with a clear separation of concerns, and each box in the detailed diagram below is a real package you can read today.
Detailed architecture: the full path from clients through the control plane to provisioned workspaces, plus the enterprise layer.
Follow a build. The React dashboard in site/ and the single Go CLI in cmd/coder both talk REST to coderd, the control plane’s HTTP server built on the Chi router. Every database read and write passes through dbauthz, an authorization wrapper that enforces role-based access control before a single row leaves PostgreSQL; the queries themselves are generated with SQLC, so database access is type-checked at compile time. When a workspace needs to be built or stopped, coderd hands the job over gRPC to provisionerd, a daemon that executes Terraform through the provider in provisioner/terraform. Terraform creates the actual infrastructure, and a small agent binary inside each workspace phones home, reports its state, and starts serving SSH and apps.
The networking layer is the most interesting part. Instead of exposing ports and punching holes in firewalls, Coder implements a WireGuard-based overlay in the tailnet package, using Tailscale’s library. Clients, the control plane, and workspace agents become peers; when a direct peer-to-peer connection is impossible, traffic relays through DERP servers. The result is end-to-end encrypted access to any workspace regardless of NAT or corporate firewalls, which is why the CLI can ssh into a workspace or forward a port with no VPN in sight.
The enterprise directory adds governance for larger teams: regional workspace proxies that relay browser traffic closer to users, audit logging, and high-availability deployment options. Everything ships with Helm charts for Kubernetes, and the AI gateway (aibridge) centralizes model authentication, cost tracking, and audit logging for agent traffic.
Advantages
Against hosted CDE platforms, Coder’s advantage is ownership: AGPL-3.0 licensed core, your cloud, your database, your audit trail. Against homegrown VM scripts, the advantage is the Terraform boundary. Templates are declarative, versioned, and reusable across clouds, and the same template that creates a Docker container for one developer can create a Kubernetes pod for another.
The authorization design is a genuine engineering win. Because every database operation is wrapped by an RBAC layer rather than sprinkled with checks in handlers, permission bugs have a single choke point to be fixed in. And because the provisioning protocol is gRPC with an SDK, third parties can write their own provisioners; the repository itself ships an echo provisioner used in tests to fake infrastructure.
Finally, the agent architecture is ahead of the market. The AI loop executes on the control plane, workspaces hold no LLM credentials, and identity travels with every action. Teams get centralized cost tracking and model governance by default instead of bolting it on after an incident.
Benefits
The practical payoff shows up in onboarding time. Common experience shows that a workspace built from a template is ready in minutes, while a hand-configured laptop takes days. New contractors start productive on day one, and a broken environment is replaced, not repaired.
Cost is the second benefit. Automatic shutdown of idle workspaces means you pay for compute while developers actually work, not while their machines idle overnight and on weekends. Combined with right-sized templates per task, infrastructure spend becomes predictable and attributable to teams.
Security is the third. Centralized credentials, a WireGuard overlay instead of open ports, RBAC on every query, and audit logs give security teams what they ask for: a perimeter, identity on every action, and evidence afterward. For AI usage specifically, the gateway means one place to see who spent what on which model.
Usage
Install on Linux or macOS with the official script, or grab a binary for Windows from the releases page:
curl -L https://coder.com/install.sh | sh
Start the server and open the dashboard on port 3000:
coder server
For production, attach PostgreSQL and an external access URL:
coder server --postgres-url <url> --access-url <url>
The first-run flow is worth following exactly: create your admin user, pull a starter template from the Coder Registry (Docker is the fastest to try), and provision your first workspace from the dashboard. From then on, developers connect with the CLI (coder login, then coder ssh <workspace>), through VS Code or JetBrains with the official extensions, or directly in the browser via workspace apps. Template authors work in Terraform, and platform admins will find Helm charts and validated architectures in the documentation.
Conclusion
Coder is what you get when a platform team takes development environments seriously: Terraform for definitions, gRPC for provisioning, WireGuard for connectivity, SQLC and RBAC for data integrity, and a control-plane-first design for AI agents. It turns environments from fragile laptops into infrastructure, and it does so under an AGPL-3.0 license you can self-host and audit. If your team is adopting cloud development environments or agents, the repository is the most complete open-source reference available today.
Links:
- Repository: github.com/coder/coder
- Website: coder.com
- Documentation: coder.com/docs
- Install guides: coder.com/docs/install
Enjoyed this post? Never miss out on future posts by following us