docker-compose.yml runs the published image, ghcr.io/modelriver/desk (amd64 and arm64), with Caddy in front, which gets and renews the HTTPS certificate. Node.js, SQLite and Caddy all come in the containers: the server needs Docker with Compose 2.23 or later, and no copy of the code. Before you start, read what every deployment needs.
1. Point your domain at the server
Add an A record (and AAAA for IPv6) for your Desk's domain, for example support.acme.com, pointing at the server, and open ports 80 and 443.
2. Download the two files
In an empty folder on the server (its name becomes part of the volume names):
curl -fsSLO https://raw.githubusercontent.com/modelriver/desk/main/docker-compose.ymlcurl -fsSL https://raw.githubusercontent.com/modelriver/desk/main/deploy/docker/env.example -o .env3. Fill in .env
Set these three:
| Variable | Example |
|---|---|
DESK_DOMAIN | support.acme.com. Caddy gets the certificate for it |
APP_URL | https://support.acme.com |
MODELRIVER_API_KEY | Your project API key |
Then generate the two secrets:
sed -i "s|^DESK_SECRET_KEY=.*|DESK_SECRET_KEY=$(openssl rand -base64 32)|" .envsed -i "s|^DESK_IDENTITY_SECRET=.*|DESK_IDENTITY_SECRET=$(openssl rand -base64 48 | tr -d '\n')|" .env.env also holds the optional settings: email (recommended, see Set up email), the widget's allowed sites, rate limits and how long archived conversations are kept.
4. Start it
docker compose up -ddocker compose exec desk node scripts/create-admin.tsThe second command asks for the first admin's email, name and password. Open https://support.acme.com/dashboard and sign in; your first sign-in sets up two-factor authentication.
What runs
| Container | What it does |
|---|---|
desk | Desk itself, as an unprivileged user with no extra Linux capabilities. Reads all of .env |
caddy | HTTPS and the redirect from HTTP. It's only given DESK_DOMAIN, never your keys |
| What | Where |
|---|---|
| Settings | .env next to docker-compose.yml |
| Your data | The desk-data volume: data/ (articles and notes), desk.db and support.config.json |
| Certificates | The caddy-data volume |
Set up email
Recommended. Raising and answering tickets, email verification for account lookups, and team notifications all need email (what changes without it). Use Resend, Postmark or Amazon SES, with EMAIL_FROM on a domain the provider has verified and SUPPORT_REPLY_TO set to a mailbox your team reads.
Add the settings to .env:
EMAIL_PROVIDER=resendRESEND_API_KEY=re_…EMAIL_FROM="Acme Support <[email protected]>"SUPPORT_REPLY_TO=support@acme.comThen apply them: docker compose up -d.
Then check it with Dashboard → Settings → Send a test email.
Running it
- Logs:
docker compose logs -f desk. - Change settings: edit
.env, thendocker compose up -d. - Another admin, or a lost password or phone:
docker compose exec desk node scripts/create-admin.ts. - Back up: the volume's full name starts with your folder's name (
docker volume ls). For a folder nameddesk:
docker run --rm -v desk_desk-data:/data -v "$PWD":/backup alpine tar czf /backup/desk-data.tgz -C /data .- Branding: set the logo, colors, fonts, titles and favicon under Dashboard → Settings, with no restart. The defaults under those are in
support.config.jsonon the volume, with any logo next to it. To change it, copy it out, edit it, copy it back and restart:
docker compose cp desk:/data/support.config.json .docker compose cp support.config.json desk:/data/docker compose restart desk- Sample articles: set
DESK_SAMPLE_DATA=truein.envbefore the first start. - Update:
docker compose pull && docker compose up -d. See Updating to do it on a schedule.
Versions
The 1 tag follows every 1.x release. To stay on one version, set DESK_VERSION=1.0.1 in .env.
Your own proxy instead of Caddy
Remove the caddy service and the configs section, give desk a local port, and point your proxy at it:
1 ports:2 - "127.0.0.1:3000:3000"Keep TRUST_PROXY_HOPS=1 if exactly one proxy is in front, so rate limits see real visitor addresses.
Building from your own code
If you've changed Desk, build the image from your copy of the repository instead of pulling it:
docker compose -f docker-compose.yml -f docker-compose.source.yml up -d --buildRun it from a separate folder from the one you develop in: your development .env isn't the one Docker should use.