Configure
How configuration works
Learn how dimmi maps settings to environment variables in /opt/dimmi/.env and how to update them safely with dimmictl.
A self-hosted dimmi loads its settings from environment variables stored in /opt/dimmi/.env.
Environment variable naming
Section titled “Environment variable naming”Every config key maps to an uppercase variable starting with DIMMI_, using double underscores (__) between nesting levels:
| Config key | Environment variable |
|---|---|
log.level |
DIMMI_LOG__LEVEL |
auth.sessions.idle_lifetime |
DIMMI_AUTH__SESSIONS__IDLE_LIFETIME |
mail.mailers.system.driver |
DIMMI_MAIL__MAILERS__SYSTEM__DRIVER |
- Lists: comma-separated values, such as
totp,passkey. - Durations: number plus unit, such as
15mor336h.
See Configuration options for the full list of variables.
Change a setting with dimmictl set
Section titled “Change a setting with dimmictl set”dimmictl set DIMMI_LOG__LEVEL=debugdimmictl set updates /opt/dimmi/.env and restarts only the affected services. Pipe secrets via stdin so they stay out of your shell history:
dimmictl set <<'EOF'DIMMI_AI__MANAGED__ANTHROPIC__API_KEY=<anthropic_api_key>EOFTwo groups of variables behave differently:
- Managed by
compose.yaml: app URL, database, Redis/Valkey, file storage, HTTP listeners, and roles (DIMMI_APP__URL,DIMMI_DATABASE__URL,DIMMI_REDIS__URL,DIMMI_FILESYSTEMS__*,DIMMI_HTTP__*,DIMMI_APP__ROLES) are wired by Compose and cannot be overridden in.env. - Compose and Caddy variables:
APP_DOMAIN,COMPOSE_PROFILES,NETWORK_SUBNET, andCADDY_TLShave noDIMMI_prefix.dimmictl setrestarts Caddy or starts ClamAV automatically when you change them.
Inspect active settings
Section titled “Inspect active settings”Print the resolved config with secrets masked as [redacted]:
docker compose -f /opt/dimmi/compose.yaml exec web /dimmi config:showdimmi validates settings on startup. If an invalid value stops the container from booting, dimmictl logs web names the offending key.
Protect your app key
Section titled “Protect your app key”DIMMI_APP__KEY encrypts secrets saved inside Postgres. The installer generates it once; losing or changing it makes encrypted database values unreadable forever. Always include /opt/dimmi/.env in your backups.