Skip to content

Service: Coder

Jonas Birmé edited this page Nov 21, 2026 · 2 revisions

Coder

Coder (serviceId coder-coder) is an open source platform for self-hosted cloud development environments: remote workspaces defined as code with Terraform templates, managed from a central web dashboard. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance that runs the Coder control plane (dashboard and API), backed by a PostgreSQL database. License: AGPL-3.0. Source: coder/coder.

Scope: this service is the control plane only. See Limitations before you plan on creating workspaces.

What it can do

  • Provide a web dashboard and API for managing developer workspaces defined by Terraform templates.
  • Standardize environments across VMs, Kubernetes pods or Docker containers (provisioned on infrastructure you supply).
  • Connect developers to workspaces through a secure WireGuard tunnel and shut down idle resources to control spend.
  • Run AI coding agents from the control plane so API keys need not live inside workspaces.

Creating an instance

Coder needs a PostgreSQL database that exists and is running first. Create a PostgreSQL instance (birme-osc-postgresql) with create-service-instance, for example { "name": "coderdb", "PostgresPassword": "{{secrets.postgrespwd}}", "PostgresDb": "coder" }. Read its internal cluster hostname with describe-service-instance; it has the format <instance>.birme-osc-postgresql.svc.cluster.local, and PostgreSQL listens on port 5432. Build the connection URL:

postgres://<user>:<password>@<instance>.birme-osc-postgresql.svc.cluster.local:5432/coder?sslmode=disable

Percent-encode special characters in the password. Because the URL embeds the password, store the whole URL as one secret with create-service-secret (serviceId: "coder-coder", name coderdburl). A {{secrets.NAME}} reference only works as the entire field value; substituting a secret into part of the URL does not resolve.

Then create the instance with serviceId: "coder-coder":

{
  "name": "mycoder",
  "PgConnectionUrl": "{{secrets.coderdburl}}"
}

Verify with wait-for-service-ready or describe-service-instance. To create the first (owner) user automatically, also set FirstUserEmail and FirstUserPassword (e.g. "{{secrets.coderadminpwd}}"), optionally FirstUserUsername. Without them, open the instance URL and create the first user on the Coder setup page.

Options

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric/word characters only (^\w+$), at most 20 characters.
PgConnectionUrl Yes string, sensitive PostgreSQL connection URL for Coder's database, for example postgres://user:password@host:5432/coder?sslmode=disable (PostgreSQL 13 or later). The OSC image refuses to start without it. Store the full URL as one secret. Feeds CODER_PG_CONNECTION_URL.
AccessUrl No string Public URL of this Coder instance, for example https://my-coder.example.com, with no path. Leave empty to use the instance's own OSC address. Feeds CODER_ACCESS_URL.
TelemetryEnable No boolean Set to true to let Coder send anonymous usage telemetry to Coder. Disabled by default in the OSC image. Feeds CODER_TELEMETRY_ENABLE.
FirstUserEmail No string Email of the first (owner) user created at startup. If empty, create the first user in the setup page. Must be set together with FirstUserPassword. Feeds OSC_FIRST_USER_EMAIL.
FirstUserUsername No string Username of the first user. Defaults to admin. Only used when FirstUserEmail and FirstUserPassword are set. Feeds OSC_FIRST_USER_USERNAME.
FirstUserPassword No string, sensitive Password of the first user. Store as a service secret. Must be set together with FirstUserEmail. Feeds OSC_FIRST_USER_PASSWORD.

PostgreSQL options

The dependency database is service birme-osc-postgresql (see PostgreSQL).

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric/word characters only, at most 20 characters.
PostgresPassword Yes string, sensitive Password of the PostgreSQL superuser. Example: {{secrets.postgrespwd}}.
PostgresUser No string Superuser name. Defaults to postgres.
PostgresDb No string Name of the default database created at first start. Defaults to the user name.
PostgresInitDbArgs No string Extra arguments passed to initdb during cluster initialization (for example encoding or locale).
PostgresInitDbSql No string SQL executed during initialization (custom users, tables or schema).

Using the instance

Open the instance URL in a browser while signed in to OSC and the Coder dashboard loads. The instance listens on port 8080 and is based on the official Coder v2.38.10 release.

OSC puts an authentication gate in front of all paths on the instance except /. Signed-in OSC users in a browser pass it.

Licensing

The Coder core is licensed under AGPL-3.0. The enterprise/ directory in the Coder repository is under a separate proprietary license. Those features are gated by a license key, and production use of them requires agreeing to Coder's Terms of Service.

Limitations

  • This is the control plane only. Creating workspaces requires external provisioners and infrastructure, with Terraform templates targeting your own cloud, Kubernetes or Docker. OSC does not provide a Docker socket or Kubernetes access for this.
  • The logs show one error line about embedded NATS pubsub having no cluster host. Coder falls back to PostgreSQL pubsub.
  • The OSC authentication gate may block the Coder CLI and workspace agents that connect to /api/v2; this has not been verified.

Resources

Clone this wiki locally