Docker
Clerq publishes a ready-to-run image to the GitHub Container Registry, so you do not have to build anything. Point it at a PostgreSQL database, set three environment variables, and it runs. The image applies its own database migrations on startup, which is what lets it run as a single container on any platform.
ghcr.io/punterdigital/clerq:latest
If you want the database managed for you too, the Docker Compose setup bundles Postgres in one command - start there. This page is for running the single app container against a Postgres you already have.
Run it
docker run -d --name clerq -p 3000:3000 \
-e DATABASE_URL="postgresql://user:password@your-db-host:5432/clerq" \
-e BETTER_AUTH_SECRET="$(openssl rand -base64 32)" \
-e BETTER_AUTH_URL="http://localhost:3000" \
ghcr.io/punterdigital/clerq:latest
On boot the container runs any pending migrations, then starts the app on port 3000. Open http://localhost:3000 and create your account.
Required environment
| Variable | What it is |
|---|---|
DATABASE_URL | Connection string for your PostgreSQL database |
BETTER_AUTH_SECRET | A 32+ character random secret - signs sessions and PDF links |
BETTER_AUTH_URL | The public URL users reach the instance on |
See Environment variables for the full reference, including optional Google sign-in.
Migrations
Migrations run automatically each time the container starts, using the same
Drizzle migrations the project ships - they are forward-only and safe to run
repeatedly (already-applied migrations are skipped). If you prefer to manage
migrations yourself, set CLERQ_SKIP_MIGRATIONS=1 and the container will boot
without touching the schema.
Pinning a version
latest follows the newest stable release. For production, pin a specific
version so upgrades are deliberate:
docker run ... ghcr.io/punterdigital/clerq:0.1.0
Next steps
- Going to production - HTTPS, a reverse proxy, and a pre-flight checklist
- Backups & upgrades - keep your data safe and move between versions
Deploying on a platform with a UI? See the EasyPanel, Coolify and Railway guides - they use this same image.