Skip to content

Deploy with Docker Compose

This is the standard way to self-host: one app container and one Postgres container on a Linux server, behind a reverse proxy that handles HTTPS.

  • A server with Docker and Docker Compose (1 GB of RAM is enough).
  • A domain name pointing at the server, such as tasks.example.com.
  • A reverse proxy for HTTPS, such as Caddy, Traefik or nginx. Reverse proxy and client IPs has a Caddy example.

Follow Try it with Docker Compose on the server, with one change: set BETTER_AUTH_URL to your public URL.

Terminal window
BETTER_AUTH_URL=https://tasks.example.com

This must be the exact URL people type, with https and no trailing path. Sign-in only accepts requests from this origin (plus any in TRUSTED_ORIGINS).

You have two options:

  • Setup token (default): start the app, run docker compose logs app | grep setup_token=, and open your URL. See First-run setup.
  • Environment variables: set ADMIN_EMAIL and ADMIN_PASSWORD (or ADMIN_PASSWORD_FILE) in .env before the first start. The admin is created at startup and the setup page is skipped.
Terminal window
docker compose up -d
docker compose ps
curl -s https://tasks.example.com/api/health

docker compose ps should show both containers as healthy. The health endpoint returns {"status":"ok",…}; see Health endpoint for its fields.

The Compose file runs the latest image by default. To control upgrades, pin a version in .env:

Terminal window
DAY_PLANNER_VERSION=1.0.0

Upgrading explains how to move to a newer version.