ScriptsApr 16, 2026·3 min read

Coder — Self-Hosted Cloud Development Environments

Deploy secure, reproducible dev environments on your own infrastructure with Coder. Supports Kubernetes, Docker, AWS, GCP, and Azure.

TL;DR
Coder provisions secure cloud dev environments on your own infrastructure using Terraform templates and any compute backend.
§01

What it is

Coder is an open-source platform for provisioning self-hosted cloud development environments. Instead of coding on local machines with inconsistent setups, teams define environments as Terraform templates and spin them up on Kubernetes, Docker, AWS, GCP, or Azure.

Coder targets engineering teams that need reproducible, secure dev environments without vendor lock-in. Platform engineers use it to standardize tooling, while developers get instant workspaces with all dependencies pre-installed.

§02

How it saves time or tokens

New developer onboarding drops from hours of local setup to minutes. A Terraform template defines the entire environment (OS, language runtimes, databases, IDE extensions), and Coder provisions it on demand. When something breaks, developers destroy and recreate the workspace instead of debugging local configuration drift.

Coder also centralizes secrets management. Database credentials and API keys live in the workspace template, not on individual laptops.

§03

How to use

  1. Install and start the Coder server:
curl -L https://coder.com/install.sh | sh
coder server
  1. Open http://localhost:3000 and create your first template:
coder templates init
coder templates push my-template
  1. Create a workspace from the template:
coder create my-workspace --template my-template
§04

Example

A minimal Terraform template for a Docker-based workspace:

resource "coder_agent" "main" {
  os   = "linux"
  arch = "amd64"
}

resource "docker_container" "workspace" {
  image = "codercom/enterprise-base:ubuntu"
  name  = "coder-${data.coder_workspace.me.name}"
  command = ["sh", "-c", coder_agent.main.init_script]
  env = ["CODER_AGENT_TOKEN=${coder_agent.main.token}"]
}

This creates a Linux container with the Coder agent pre-configured. Developers connect via VS Code Remote, JetBrains Gateway, or the built-in web terminal.

§05

Related on TokRepo

§06

Common pitfalls

  • Over-provisioning workspace resources. Start with small CPU/memory limits and let developers request more. Cloud compute costs scale linearly with workspace count.
  • Ignoring template versioning. When you push a new template version, existing workspaces do not auto-update. Communicate breaking changes to your team.
  • Skipping the idle timeout configuration. Workspaces left running overnight waste compute. Set auto-stop after 30-60 minutes of inactivity.

Frequently Asked Questions

How is Coder different from GitHub Codespaces?+

GitHub Codespaces runs on Microsoft-managed infrastructure. Coder runs on your own infrastructure (Kubernetes, Docker, cloud VMs). You control the compute, networking, and data residency. Coder also supports any IDE, not just VS Code.

Does Coder support JetBrains IDEs?+

Yes. Coder integrates with JetBrains Gateway, which connects IntelliJ, GoLand, PyCharm, and other JetBrains IDEs to remote workspaces. The IDE runs locally while the backend runs in the Coder workspace.

Can I use Coder for GPU-accelerated development?+

Yes. If your infrastructure has GPU nodes (NVIDIA, AMD), you can configure Terraform templates to request GPU resources. This is common for ML/AI development teams who need CUDA-enabled environments.

What happens when a Coder workspace crashes?+

Coder monitors workspace health and can auto-restart failed workspaces. Persistent volumes ensure that code and data survive container restarts. You can also configure automatic workspace rebuilds on failure.

Is Coder free to use?+

Coder is open source (AGPL-3.0) and free for self-hosted deployments. Coder also offers an enterprise version with additional features like audit logging, RBAC, and premium support.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets