Open Webmail
Self-hosting & DNS·5 min read

Environment & storage

Complete reference for environment variables, Mailgun HTTP outbound delivery, SMTP relays, and Backblaze B2 blob storage.

Configuration variables

VariableDefaultDescription
ZINQ_EDITIONcommunitycommunity, free, or cloud
ZINQ_DB_PATH./data/zinq.dbPath to SQLite database file
ZINQ_BLOB_DIR./data/blobsLocal directory for .eml and attachments
ZINQ_JWT_SECRETauto-generatedHS256 secret for webmail sessions
ZINQ_MAIL_HOSTNAMEmail.<domain>EHLO/banner hostname for SMTP and IMAP
ZINQ_SERVER_IPYOUR_SERVER_IPPublic IPv4 shown in DNS setup helper
TRUSTED_PROXY_COUNT0Trusted reverse proxy hops for client IP extraction
ZINQ_ALLOW_SIGNUPfalseAllow open registration after first owner exists

Outbound mail & object storage

Configure Mailgun HTTP API (recommended for cloud VMs) or an SMTP relay, plus optional Backblaze B2 storage (US or EU) for attachment blobs.

.env.production
MAILGUN_API_KEY=key-xxxxxxxxxxxxxxxxxxxx
MAILGUN_DOMAIN=mg.yourdomain.com
MAILGUN_WEBHOOK_SIGNING_KEY=whsec_xxxxxxxxxxxx