# Copy to .env for local development (docker-compose reads this automatically # for the `db` service password; the app reads it via dotenvy at startup). DATABASE_URL=postgres://tern:tern@localhost:5432/tern BIND_ADDR=127.0.0.1:8080 # 32 random bytes, as 64 hex digits (openssl rand -hex 32) or base64 # (openssl rand -base64 32). Encrypts stored IMAP/SMTP credentials at rest # (see src/crypto.rs). Losing this key makes every stored account credential # unrecoverable — back it up outside the database. CREDENTIAL_KEY= BLOB_STORAGE_DIR=./data/blobs # Sessions last this long since they were last *used* — a client in regular # use stays signed in; one left alone for this long has to sign in again. SESSION_TTL_HOURS=720 # Anyone may create a user. Off by default: then only the first user can # register, which is how a new server gets its owner. #OPEN_REGISTRATION=true # Days mail stays in Trash before it's permanently deleted. 0 disables purging. TRASH_RETENTION_DAYS=30 # --- UnifiedPush (Android notifications) --- # Endpoints come from the phone's distributor (e.g. the ntfy app), so they # carry the push server's *public* URL. If this server should reach it some # other way, rewrite the prefix: comma-separated from=>to pairs. #PUSH_URL_REWRITE=https://ntfy.example.org/=>http://ntfy:80/ # Trust an extra CA (PEM) for the push server, e.g. an internal CA... #PUSH_CA_CERT=/etc/tern/push-ca.pem # ...or, last resort, skip certificate checks for push requests entirely. #PUSH_TLS_INSECURE=true # Contact for push-service operators, sent in VAPID-signed requests. #PUSH_VAPID_SUBJECT=mailto:you@example.org RUST_LOG=tern_server=debug,tower_http=debug