Quick start
Requirements
Section titled “Requirements”- A server that stays on, with Docker and Docker Compose
- A domain and an HTTPS reverse proxy (Caddy, Nginx, …) — you can skip this to try it locally
1. Download the config
Section titled “1. Download the config”mkdir damail && cd damailcurl -O https://raw.githubusercontent.com/gopkg-dev/damail/main/docker-compose.ymlcurl -o .env https://raw.githubusercontent.com/gopkg-dev/damail/main/.env.exampleEdit .env and set at least:
# generate with: openssl rand -hex 32MASTER_KEY=POSTGRES_PASSWORD=use-a-strong-passwordPUBLIC_URL=https://mail.example.com# true when served over HTTPSCOOKIE_SECURE=true2. Start
Section titled “2. Start”docker compose pull && docker compose up -dThe image is ghcr.io/gopkg-dev/damail (linux/amd64, linux/arm64). Database migrations run on startup. By default it only listens on 127.0.0.1:8787.
3. Reverse proxy
Section titled “3. Reverse proxy”Proxy your domain to http://127.0.0.1:8787 with HTTPS. Turn off response buffering, or live updates and MCP will stall.
Caddy:
mail.example.com { reverse_proxy 127.0.0.1:8787 { flush_interval -1 }}Nginx:
location / { proxy_pass http://127.0.0.1:8787; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_read_timeout 1h;}4. Start using it
Section titled “4. Start using it”- Open
https://mail.example.comand create the admin account on first visit - Add mailboxes under Settings → Accounts — see Mailboxes
- For AI features, add a model under AI → Models — see Models
- For agents, create a key under Settings → API keys — see MCP
Backups
Section titled “Backups”Back up the PostgreSQL volume (db-data), the DaMail data volume (app-data, raw messages and attachments) and your .env.