Install

Docker Compose

deploy/compose contains a ready-to-use setup:

sh
cd deploy/compose
cp .env.example .env && chmod 600 .env
# edit .env: PUBLIC_URL, MASTER_KEY, ALLOWED_EMAILS, DOMAIN
docker compose --profile caddy up -d

The caddy profile adds Caddy, which obtains a certificate for DOMAIN automatically (ports 80 and 443 must be reachable, and DNS must point at the machine). Without the profile, the app listens on 127.0.0.1:8080 for your own reverse proxy.

Upgrade with docker compose pull && docker compose up -d. Pin IMAGE_TAG to a version (for example 0.3.2) for predictable upgrades.

The Compose file and Caddyfile in the repository state the following.

  • The image is postkeep/postkeep:${IMAGE_TAG:-latest}.
  • Required environment: PUBLIC_URL (POSTKEEP_PUBLIC_URL), MASTER_KEY (POSTKEEP_MASTER_KEY). ALLOWED_EMAILS maps to POSTKEEP_ALLOWED_EMAILS. DOMAIN is required when the caddy profile is used.
  • POSTKEEP_CLIENT_IP_HEADER comes from CLIENT_IP_HEADER. The bundled Caddy sets X-Forwarded-For.
  • POSTKEEP_LOG comes from LOG (default info).
  • PostgreSQL is commented out: POSTKEEP_DATABASE_URL: postgres://postkeep:${POSTGRES_PASSWORD}@postgres/postkeep.
  • The app publishes 127.0.0.1:8080:8080.
  • The caddy service is behind profile caddy, uses caddy:2, and publishes 80:80, 443:443 and 443:443/udp.
  • The Caddyfile reverse-proxies {$DOMAIN} to postkeep:8080.

See the deployment overview for the surrounding requirements.