Skip to content
dimmiDocs

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.

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 15m or 336h.

See Configuration options for the full list of variables.

Terminal window
dimmictl set DIMMI_LOG__LEVEL=debug

dimmictl set updates /opt/dimmi/.env and restarts only the affected services. Pipe secrets via stdin so they stay out of your shell history:

Terminal window
dimmictl set <<'EOF'
DIMMI_AI__MANAGED__ANTHROPIC__API_KEY=<anthropic_api_key>
EOF

Two 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, and CADDY_TLS have no DIMMI_ prefix. dimmictl set restarts Caddy or starts ClamAV automatically when you change them.

Print the resolved config with secrets masked as [redacted]:

Terminal window
docker compose -f /opt/dimmi/compose.yaml exec web /dimmi config:show

dimmi validates settings on startup. If an invalid value stops the container from booting, dimmictl logs web names the offending 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.