Self-hosting
Run ADC on your own server
The self-hosted app is the same one that runs the official service. You need Docker Compose 2.24.4+, a hostname, ports 80/443 and persistent storage.
Deploy
Terminal
cp .env.example .env
openssl rand -hex 48 # ADC_AUTH_SECRET
openssl rand -hex 32 # ADC_DATABASE_PASSWORD
docker compose --env-file .env -f deploy/compose.yaml up -d --build- ADC_PUBLIC_URL
- The public HTTPS origin.
- ADC_AUTH_SECRET
- A stable secret of 32+ characters. Back it up.
- ADC_DATABASE_PASSWORD
- PostgreSQL password (URL-safe).
- ADC_SMTP_URL
- Required when email verification is on.
- ADC_TRUSTED_PROXIES
- Only the proxies allowed to set client IP headers.
- ADC_ANALYTICS_*
- Leave unset to send no external analytics (the default).
Caddy obtains TLS certificates automatically. Set ADC_REGISTRATION_ENABLED=false once the intended accounts exist.
Verify
Terminal
curl -fsS https://devices.example.com/health
# {"ok":true,"schemaVersion":"0.1"}
docker compose --env-file .env -f deploy/compose.yaml logs --tail=100 control-planeThen follow the Quickstart once: pair a device and complete one read-only call. A healthy /health alone does not prove sign-in, WebSocket upgrades and dispatch all work.
Operate
- Probe /health from outside the host and alert on anything but 200.
- Scrape the authenticated /metrics endpoint; never expose it publicly.
- Alert on disk space and PostgreSQL availability. There is no automatic quota or retention yet.
| Metric | Meaning |
|---|---|
adc_node_wake_connections | Connected devices right now. |
adc_node_poll_total | Device polls: dispatched, idle or denied. |
adc_invocation_total | Calls by tool and outcome. |
Back up and restore
Terminal
docker compose --env-file .env -f deploy/compose.yaml exec -T postgres \
pg_dump -U adc -d adc -Fc > adc-backup.dump
docker compose --env-file .env -f deploy/compose.yaml exec -T postgres \
pg_restore --list < adc-backup.dumpKeep the dump together with .env in encrypted storage, and test a restore into a separate database. Restoring can bring back credentials revoked after the backup, so rotate them after an incident.
Upgrade
- Record the running version and take a verified backup.
- Rebuild and recreate the control plane. Migrations run before HTTP starts.
- Check /health, sign-in, device presence and one read-only call.
- Keep the previous image and backup until you are satisfied; a schema rollback may need the backup.