Skip to main content
DNZ reads its settings from three places. A later one wins:
  1. a TOML file: --config FILE or DNZ_CONFIG, otherwise ./dnz.toml or /etc/dnz/dnz.toml (the first that exists);
  2. the environment;
  3. flags: --dns-addr, --http-addr, --database-url, --upstream, --no-ui, --tls-cert, --tls-key, and --set KEY=VALUE for anything else, e.g. --set dns.rate_limit=100.
Every setting is optional. Unknown keys in the file are errors, so typos don’t go unnoticed.
/etc/dnz/dnz.toml
Settings in the database (upstreams, strategy, zones, users and everything else you change in the dashboard) are not part of this file. DNZ_UPSTREAM and DNZ_FORWARD_STRATEGY are only used on the first start; after that, manage them under Forwarding.

Reference

General

DNS

Forwarding

The resolver options above (serve-stale to NSID) are also set in the dashboard and with dnz; once saved there, the saved value wins over the file.

HTTP and dashboard

TLS and encrypted DNS

See Encrypted DNS.

Proxy

See Proxied records and Certificates.

Database and sessions

First admin

Cloudflare

See Cloudflare.