PDNS Manager

Configuration (.env)

PDNS Manager is configured from two sources: the .env file (boot-time config: DB, JWT, cookies, feature flags) and the admin panel itself (everything operational: PowerDNS servers, SMTP, captcha, welcome mail, branding). That split is intentional: things you may change at runtime don't require a container restart.

Database

VariableDefaultPurpose
DB_ROOT_PASSWORDempty (required)MariaDB root password. Set on first start.
DB_NAMEdns_managerSchema name. Don't change post-install.
DB_USERdns_adminApp user in the DB.
DB_PASSWORDempty (required)App user password. Auto-generated by setup.

Auth & cookies

VariableDefaultPurpose
JWT_SECRET_KEYempty (required)Signs session JWTs. Recommended: openssl rand -hex 64.
JWT_ALGORITHMHS256Asymmetric would be overkill for a self-signed session.
JWT_EXPIRE_MINUTES1440Session lifetime in the JWT. 24 hours.
AUTH_COOKIE_NAMEdns_manager_tokenCookie name. Deliberately not session so it's easy to find in DevTools.
AUTH_COOKIE_SECUREfalseSet to true once you have HTTPS in front – otherwise the browser doesn't send the cookie reliably.
AUTH_COOKIE_SAMESITElaxSafe and compatible. strict usually fine, none only for cross-site embeds.
AUTH_COOKIE_MAX_AGE2592000 (compose), 86400 (code)Cookie lifetime in seconds. Compose sets 30 days, plain code default is 24 h.
INITIAL_ADMIN_PASSWORDunsetIf set, on first start a user admin is created with this password. Otherwise the backend generates a random one and stores it under /app/.initial-admin-password.
ENABLE_REGISTRATIONfalseAllows public sign-up via /register. Default true during the wizard for first setup, please set back to false afterwards.

App / behaviour

VariableDefaultPurpose
APP_NAMEPDNS ManagerDisplay name (tab title, header). Also editable in the panel.
DEFAULT_LANGUAGEde (compose)UI language on first visit. Users can change later via dropdown.
LOG_LEVELinfoStandard Python log level.
LOG_FORMATtexttext for humans, json for log aggregators like Loki.
INSTALL_PATHunsetShown in the panel ("Updates come from …").
ALLOWED_ORIGINSemptyCORS allow list (comma-separated URLs). Empty = same-origin only, fine for the built-in UI.
DOCS_ENABLEDfalseExposes Swagger under /docs + /openapi.json. Only on if you really need it.

PowerDNS

VariableDefaultPurpose
PDNS_SERVERSemptyComma-separated name|url|api_key. Not required – servers are usually added in the panel (cleaner because they go into the DB and stay editable).

Webhooks

VariableDefaultPurpose
WEBHOOK_ALLOW_PRIVATE_URLSfalseSSRF protection: localhost, RFC1918, link-local URLs are blocked. Set true only on fully internal networks.

Not in .env

Deliberately not in .env: SMTP, captcha, welcome mail, branding, ACME tokens. Those live in system_settings (DB) and are managed via the panel – see the feature pages:

Example: a fully-set production .env

# --- DB ---
DB_ROOT_PASSWORD=jfM3...random...vQ
DB_NAME=dns_manager
DB_USER=dns_admin
DB_PASSWORD=K8x...random...mz

# --- Auth ---
JWT_SECRET_KEY=58b6...128-hex-chars...
INITIAL_ADMIN_PASSWORD=                      # empty = auto-generated
ENABLE_REGISTRATION=false                    # disable after setup
AUTH_COOKIE_SECURE=true                      # because reverse proxy with HTTPS
AUTH_COOKIE_SAMESITE=lax
AUTH_COOKIE_MAX_AGE=2592000                  # 30 days

# --- App ---
APP_NAME=PDNS Manager
DEFAULT_LANGUAGE=en
LOG_LEVEL=info
LOG_FORMAT=text
ALLOWED_ORIGINS=
DOCS_ENABLED=false

# --- Webhooks ---
WEBHOOK_ALLOW_PRIVATE_URLS=false