4-Variable Docker Quick Start
Launch Bryfo in minutes with Docker Compose and 4 bootstrap environment variables.
Bryfo requires no pre-configured S3 bucket, external OAuth app, or AI key to start receiving and sending mail. Out of the box, self_hosted mode uses local deduplicated storage (/data/blobs) and hot-reloads optional integrations from /admin/*.
1. Download docker-compose.yml & .env
mkdir bryfo && cd bryfo
curl -fsSLO https://raw.githubusercontent.com/bryfo/bryfo/main/docker-compose.yml
curl -fsSL https://raw.githubusercontent.com/bryfo/bryfo/main/.env.example -o .env
chmod 600 .envSet the 4 required bootstrap keys in .env:
DEPLOYMENT_MODE=self_hosted
APP_PUBLIC_URL=https://mail.example.com
POSTGRES_PASSWORD=<openssl rand -hex 24>
CREDENTIALS_ENCRYPTION_KEYS=1:<openssl rand -base64 32>2. Start & Verify Readiness
docker compose up -d
curl -fsS http://127.0.0.1:8080/readyzImportant: Keep Named Volume mail-blobs or Fix Host Bind-Mount Ownership
The bryfo container runs as non-root USER bryfo (Dockerfile). Keep the default Docker named volume mail-blobs:/data/blobs whenever possible.
If you replace it with a host directory bind mount (for example ./blobs:/data/blobs created by root), /data/blobs will fail with permission denied during mail sync and raw MIME persistence. Fix ownership once with:
docker compose exec -u 0 app chown -R bryfo:bryfo /data/blobsBootstrap Environment Variables Reference
| Variable | Default / Format | Purpose |
|---|---|---|
APP_PUBLIC_URL | https://mail.example.com | Canonical HTTPS origin (COOKIE_SECURE auto-enables on https://) |
CREDENTIALS_ENCRYPTION_KEYS | 1:<base64-32B>[,2:<base64-32B>] | Multi-key AES-256-GCM keyring (all-zero keys rejected at boot) |
TRUSTED_PROXIES | 127.0.0.1/32 | Reverse-proxy CIDRs permitted to supply X-Forwarded-For / X-Real-IP |
DEPLOYMENT_MODE | self_hosted (self_hosted | cloud) | Single-tenant unlimited mode vs. multi-tenant SaaS mode |
BOOTSTRAP_ADMIN_EMAIL / PASSWORD | Optional first-boot seed | Creates the initial admin user (ChangeMe123! is rejected) |