Self-host Coder with Levelrail

A self-hosted platform for cloud development environments, backed by Postgres. This runs the Coder server only, with no Docker socket, so add workspace templates that use remote infrastructure. Create the first admin on first open.

  • Authorcoder
  • LicenceAGPL-3.0-or-later
  • Memory768 MiB
  • Services2

How to self-host Coder

  1. Pull the images

    2 images are pulled on your server.

    Show images
    • ghcr.io/coder/coder:v2.39.1
    • postgres:17.11-alpine
  2. Create the app

    2 services start in a single Compose app, with 1 named volume mount for your data, on port 7080.

  3. Fill in the secrets

    2 secrets are generated and stored encrypted, 4 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

After the first start

  • Open the page and create the first admin user.

Coder requirements

Memory
About 768 MiB
Architectures
amd64 unknown, arm64 unknown
Ports
7080
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
AGPL-3.0-or-later, network copyleft (agpl) license
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Coder. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Coder docs page.

Deploy Coder your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Coder from the CLI

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain coder=app.example.com.

levelrail-cli templates install coder --name my-coder

Deploy Coder with the API

Create a token in the dashboard first. Name, env and domains are the request fields.

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/coder/install \
  -d '{
    "name": "my-coder"
  }'

Coder configuration

Coder services

ServiceImagePortsVolumes
coder ghcr.io/coder/coder:v2.39.1 7080 none
db postgres:17.11-alpine none pgdata -> /var/lib/postgresql/data

Coder environment variables

VariableServiceValue
CODER_ACCESS_URL coder Preset by the template
CODER_HTTP_ADDRESS coder Preset by the template
CODER_PG_CONNECTION_URL coder Generated at deploy
POSTGRES_DB db Preset by the template
POSTGRES_PASSWORD db Generated at deploy
POSTGRES_USER db Preset by the template

Ports and volumes

Ports
7080
Volumes
1 named mount: pgdata -> /var/lib/postgresql/data

Coder FAQ

How much memory does Coder need?

The catalog lists about 768 MiB of memory for Coder across its 2 services.

Does Coder run on arm64?

For Coder, arm64 support is not confirmed; amd64 is unknown.

What licence is Coder under?

Coder is licensed under AGPL-3.0-or-later, which is network copyleft, so source sharing also applies when it is offered as a hosted service.

Does Coder need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does Coder bundle?

The template includes Postgres, running as its own service.

Which ports does Coder use?

Coder listens on port 7080 inside the stack.

Where does Coder keep its data?

In a named volume: pgdata mounted at /var/lib/postgresql/data.

Can I deploy Coder on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id coder for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image ghcr.io/coder/coder:v2.39.1, postgres:17.11-alpine is what you deploy there.

levelrail-cli templates install coder --name my-coder