Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host Technitium DNS Server
updated Nov 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
An authoritative and recursive DNS server with a web console, block lists for ads and malware, and DNS-over-TLS, DNS-over-HTTPS and DNS-over-QUIC support. It also offers DNSSEC validation, conditional forwarders, a built-in DHCP server, clustering for managing several servers from one console, and OpenID Connect single sign-on. A .NET application licensed under GPL-3.0.
Pick Technitium DNS Server when you want your network's DNS filter to also be a real DNS server. It is both authoritative and recursive, blocks ads and malware with one or more block list URLs, supports DNS-over-TLS, DNS-over-HTTPS and DNS-over-QUIC, validates DNSSEC, has a built-in DHCP server and can cluster two or more servers under one admin console. It is a GPL-3.0 .NET application with a web console on port 5380. Our snippet adapts the project's docker-compose.yml: the image pinned to a release tag instead of `latest`, the admin password generated into `.env`, blocking switched on with the StevenBlack hosts list, and DNS published on host port 5353 instead of 53. We did not find an upstream RAM minimum, so our 256 MB floor is an estimate. The catalog's AdGuard Home and Pi-hole are the simpler DNS filters, and Blocky is a YAML-only proxy with no web interface.
What you need
Any VPS with at least 256 MB of RAM
A domain you control — most self-hosted setups need HTTPS in front of them
Paid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# Technitium DNS Server — DNS server with ad blocking — based on the project's docker-compose.yml, pinned to 15.6.2echo "DNS_SERVER_ADMIN_PASSWORD=$(openssl rand -hex 12)" > .envcat > docker-compose.yml <<'EOF'services: dns-server: image: technitium/dns-server:15.6.2 hostname: dns-server restart: unless-stopped ports: - "5380:5380/tcp" - "5353:53/udp" - "5353:53/tcp" environment: DNS_SERVER_DOMAIN: dns-server DNS_SERVER_ADMIN_PASSWORD: ${DNS_SERVER_ADMIN_PASSWORD} DNS_SERVER_ENABLE_BLOCKING: "true" DNS_SERVER_BLOCK_LIST_URLS: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts volumes: - config:/etc/dns sysctls: - net.ipv4.ip_local_port_range=1024 65535volumes: config:EOFdocker compose up -dtimeout 180 bash -c 'until curl -fsS http://localhost:5380/api/dnsClient/healthCheck >/dev/null; do sleep 3; done'# → http://SERVER_IP:5380 (user admin, password in .env; DNS answers on port 5353 — see the notes to free port 53)
Technitium's docker-compose.yml and environment-variable reference flag these before you point real clients at it:
non-negotiableThe DNS_SERVER_* variables, including DNS_SERVER_ADMIN_PASSWORD, are read only the first time the server starts, when no config file exists yet. Our snippet generates a random password into .env; changing the variable later does not change the password, so use the web console. Keep .env out of version control.
non-negotiableThe upstream compose file publishes DNS on host port 53, which on Ubuntu is already held by systemd-resolved, so a stock server cannot bind it. Our snippet publishes DNS on 5353 so it starts anywhere, but ordinary clients cannot use a non-standard port. To serve your network, free port 53 (for example DNSStubListener=no in a drop-in under /etc/systemd/resolved.conf.d/, as the AdGuard Home and Pi-hole entries describe) and change both mappings to 53:53.
non-negotiablePort 5380 is plain HTTP and the console controls your DNS. Put a TLS reverse proxy in front, or enable the console's HTTPS options (DNS_SERVER_WEB_SERVICE_ENABLE_HTTPS), and do not expose either port to the internet: an open resolver can be abused for DNS amplification attacks. The variable reference lists a DNS_SERVER_RECURSION setting to restrict who may recurse.
non-negotiableState lives in /etc/dns, which our config volume holds, so back that volume up. The upstream compose file mounts a separate logs volume; we leave logs in the default location. We pin 15.6.2 (released 2026-10-17); the project ships frequent releases, so read the release notes before moving to a newer tag.
Technitium DNS Server used 59 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 256 MB.
Is the Technitium DNS Server install snippet verified?
The Technitium DNS Server install snippet is marked verified on Ubuntu 26.04 (Nov 2026).