Wikielele. DNS · self-hosted DNS analytics
docs for
back to the dashboard

Configuration

Every environment variable, what it defaults to, and when to change it.

operatorAssumes a terminal, Docker, and editing a config file.page 7 of 24

Everything is an environment variable, validated at boot. A misconfigured deploy fails loudly at startup rather than at the first query three hours into an ingest run.

Which resolver#

One variable decides the rest. Fill in the block that matches it and leave the other unset: the settings for the resolver you are not using are ignored, and an empty value counts as unset rather than failing the check. The switch in the header is set to AdGuard HomePi-hole, so that is the block shown below.

VariableDefaultNotes
DNS_PROVIDERadguardadguard or pihole. Defaults to AdGuard Home so installs predating the switch keep working untouched

AdGuard Home#

VariableExampleNotes
ADGUARD_URLhttp://192.168.1.10:3000Full URL with scheme. Trailing slashes are stripped
ADGUARD_USERNAMEadminThe admin account you log in with
ADGUARD_PASSWORDSent only to AdGuard Home, over your LAN

Pi-hole#

VariableExampleNotes
PIHOLE_URLhttp://192.168.1.10Full URL with scheme. Pi-hole v6 or newer only
PIHOLE_PASSWORDNo username: v6 exchanges the password alone for a session. Prefer an application password from Settings → Web interface / API — it can be revoked on its own and works with 2FA. Omit entirely if your Pi-hole has no password

There is no PIHOLE_USERNAME, and adding one is not an oversight: v6’s auth endpoint takes a password and returns a session ID, with no account to name.

Storage and retention#

VariableDefaultNotes
DATABASE_PATH./data/queries.dbInside the container this is /data/queries.db
RETENTION_DAYS90Detail older than this is deleted. Rollups survive forever; see Rollups

Ingest#

VariableDefaultNotes
INGEST_ENABLEDtrueSet false to run the UI against an existing store without polling
INGEST_POLL_INTERVAL_MS5000Lower means fresher and more requests; below ~2s buys nothing
INGEST_PAGE_SIZE500AdGuard Home silently clamps anything larger, so raising it does nothingPi-hole honours it, so raising it genuinely means fewer round trips on a busy network
VariableDefaultNotes
PUBLIC_URLunsetWhere this is reachable from your phone. Without it, notification links are relative and resolve to the phone itself
NOTIFY_ENABLEDtrueSet false to stop the rule engine evaluating or sending
NOTIFY_HISTORY_DAYS30How long the delivery log is kept

Where to put them#

Docker Compose reads .env beside the compose file when you use env_file. Running from source, the same file is read by --env-file-if-exists in the npm scripts. Changing anything requires a restart:

cd /opt/elele-dns
sudo nano .env
sudo docker compose up -d   # recreates the container with the new environment

See also