Coder — self-hosted cloud development environments: provision remote workspaces (VS Code, JetBrains, web terminal) from templates on your own infrastructure. Deployed as an all-in-one host-networked Nomad job (PostgreSQL + server).
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 16.7k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "coder"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Coder container image. Pin a tag in production.
image = "ghcr.io/coder/coder:latest"
# The PostgreSQL image for the bundled database.
postgres_image = "postgres:17-alpine"
# Host port for the Coder web UI / API.
port = 7080
# Host port for the bundled PostgreSQL.
db_port = 5432
# Password for the bundled PostgreSQL. CHANGE THIS.
db_password = "coder_change_me"
# Public URL clients use to reach Coder (set to the node's address). If empty, Coder creates a temporary tunnel.
access_url = "http://localhost:7080"
# Named volume for PostgreSQL data.
db_data_volume = "coder_db_data"
# Named volume for the Coder server home directory (/home/coder).
home_volume = "coder_home"
# Host path to the Docker socket, bind-mounted so the built-in Docker template can create workspaces. Set to empty to disable.
docker_sock = "/var/run/docker.sock"
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# Resources for the Coder server task.
resources = {
cpu = 1000
memory = 1024
}
# Resources for the bundled PostgreSQL task.
db_resources = {
cpu = 500
memory = 512
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "coder" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "ghcr.io/coder/coder:latest" | The Coder container image. Pin a tag in production. |
| postgres_image | string | "postgres:17-alpine" | The PostgreSQL image for the bundled database. |
| port | number | 7080 | Host port for the Coder web UI / API. |
| db_port | number | 5432 | Host port for the bundled PostgreSQL. |
| db_password set me | string | "coder_change_me" | Password for the bundled PostgreSQL. CHANGE THIS. |
| access_url | string | "http://localhost:7080" | Public URL clients use to reach Coder (set to the node's address). If empty, Coder creates a temporary tunnel. |
| db_data_volume | string | "coder_db_data" | Named volume for PostgreSQL data. |
| home_volume | string | "coder_home" | Named volume for the Coder server home directory (/home/coder). |
| docker_sock | string | "/var/run/docker.sock" | Host path to the Docker socket, bind-mounted so the built-in Docker template can create workspaces. Set to empty to disable. |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 1000
memory = 1024
} | Resources for the Coder server task. |
| db_resources | object | {
cpu = 500
memory = 512
} | Resources for the bundled PostgreSQL task. |
No variables match.
This pack stores data in 2 Docker named volumes:
coder_db_datacoder_home
⚠ This pack bundles a database. A cold copy of the volume can be inconsistent — for a reliable backup, dump the DB (pg_dump / mysqldump) or stop the job while backing up.
restic
# Run on the node hosting this pack. Point restic at your repo first: # export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>" # export RESTIC_PASSWORD="<repo-password>" # export AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> restic backup \ /var/lib/docker/volumes/coder_db_data/_data \ /var/lib/docker/volumes/coder_home/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/coder_db_data/_data backup:<bucket>/coder_db_data rclone sync /var/lib/docker/volumes/coder_home/_data backup:<bucket>/coder_home
Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.
Coder provisions self-hosted cloud development environments on your own infrastructure. Developers get on-demand remote workspaces — VS Code (desktop or web), JetBrains, or a browser terminal — defined as code with Terraform templates, so environments are consistent, disposable and kept close to your data.
This pack deploys Coder all-in-one as a single host-networked Nomad job: PostgreSQL (bundled as a prestart sidecar) plus the Coder server. The Docker socket is mounted so the built-in Docker template can create workspaces on the node.
nomad-pack run coder --registry=nomploy \
--var db_password=$(openssl rand -hex 16) \
--var access_url=http://10.0.0.5:7080
Open http://<node-ip>:7080 and create the first admin account.
| Variable | Default | Description |
|---|---|---|
image |
ghcr.io/coder/coder:latest |
Server image (pin a tag in production). |
postgres_image |
postgres:17-alpine |
Bundled PostgreSQL image. |
port |
7080 |
Host port for the web UI / API. |
db_password |
coder_change_me |
PostgreSQL password — change this. |
access_url |
http://localhost:7080 |
Public URL clients use (set to the node address). |
docker_sock |
/var/run/docker.sock |
Docker socket for workspace templates; "" to disable. |
resources |
1000 MHz / 1024 MB | Server task resources. |
Note: The Docker socket lets Coder create workspace containers on the host — grant it only on nodes you trust. Set
access_urlto a reachable address so the CLI and workspaces can connect (otherwise a temporary tunnel is created).
Data persists in separate volumes for PostgreSQL and the Coder home directory.