Technitium DNS Server on Docker: HomeLab Split-Horizon, DHCP, and DNSSEC Guide

HomeLab tutorial - IT technology blog
HomeLab tutorial - IT technology blog

Editing /etc/hosts on every laptop works fine when you only run three services. Once your lab grows to 20 Docker containers, a Proxmox host, and a reverse proxy, manual host files fall apart fast.

Worse, consumer routers often choke on hairpin NAT when you use the same public domain inside and outside your LAN. Technitium DNS Server fixes both problems in one container. It bundles an authoritative DNS server, a recursive resolver, a DHCP server, and DNSSEC validation into a single lightweight image.

Most HomeLab setups need under 512 MB of RAM to run it, and local cache hits drop query times to 1–2 ms. Here is how Technitium compares to common alternatives, where its sharp edges are, and how to deploy it cleanly.

Approach Comparison: Choosing Your HomeLab DNS Stack

Before picking a stack, compare the three DNS patterns self-hosters rely on most:

  • Router-based DNS (dnsmasq or Unbound on your gateway): It requires zero extra hardware and handles basic hostnames well. Once you pass 10 to 15 services, though, managing Split-Horizon overrides, wildcard zones, and DNSSEC through a router UI gets clunky.
  • Pi-hole or AdGuard Home paired with Unbound: A proven combo for ad blocking—often filtering 15–25% of household queries—and recursive lookups. The catch is that neither tool is a full authoritative DNS server. Adding primary zones or clean Split-Horizon routing still forces you to maintain extra dnsmasq config snippets.
  • Technitium DNS Server on Docker: Combines full primary and secondary zones, recursive lookups, Split-Horizon routing, DHCP with dynamic DNS, DNSSEC, and blocklists in one dashboard. You manage a single container through one web UI and REST API.

Pros and Cons of Technitium DNS Server on Docker

What Works Well

  • Unified networking core: Authoritative zones, recursive resolution, DNS-over-HTTPS (DoH), DHCP, and ad-blocking run in one process. You maintain a single container instead of gluing three separate tools together.
  • Native Split-Horizon routing: Install the official Split Horizon app and internal clients resolve git.example.com to 192.168.10.50, while external traffic still receives your public IP.
  • Automatic DHCP-to-DNS sync: When a new VM or IoT device grabs a lease, Technitium writes its A and PTR records to your local zone right away. You never have to dig through router lease tables for an IP again.
  • DNSSEC ready from minute one: Recursive DNSSEC validation is active by default. Signing your own internal zones with ECDSA takes three clicks.

Trade-offs to Keep in Mind

  • Host networking for DHCP: Docker’s default bridge network drops Layer 2 DHCP broadcasts. Serving leases requires network_mode: host (or a macvlan network), which means port 53 on your host OS must be free.
  • Single point of failure: Rebooting your Docker host knocks out LAN DNS and DHCP unless you run a standby node. Adding a secondary Technitium instance on a $35 Raspberry Pi or a second node (for example, at 192.168.10.3) solves this with zone transfers.
  • Steeper learning curve: Because it behaves like BIND or PowerDNS underneath, you will work with SOA records, NS records, and DNSSEC keys. If you only want a flat list of domain-to-IP pairs, it can feel like overkill at first.

Recommended HomeLab Setup

Run Technitium on a dedicated Linux host or a small Debian/Ubuntu VM with 1 vCPU, 512 MB of RAM, and a static IP like 192.168.10.2 on a 192.168.10.0/24 subnet. Stick with network_mode: host in Docker Compose so DNS (UDP/TCP 53) and DHCP (UDP 67) bypass Docker NAT. Always bind-mount /etc/dns to a persistent host directory so your zones, DHCP leases, and cryptographic keys survive image updates.

Leave your router’s firewall and port forwards untouched. Just disable your router’s built-in DHCP server right after Technitium’s scope goes live so only one server hands out leases on your LAN.

Implementation Guide: Deploying Technitium DNS Server on Docker

Step 1: Free Up Port 53 on the Docker Host

Modern Ubuntu and Debian hosts run systemd-resolved, which binds to port 53 on 127.0.0.53 and blocks containers from listening in host mode. Disable the stub listener and point the host to an upstream resolver so it keeps resolving domains during setup:

sudo mkdir -p /etc/systemd/resolved.conf.d
cat <<EOF | sudo tee /etc/systemd/resolved.conf.d/no-stub.conf
[Resolve]
DNS=1.1.1.1 9.9.9.9
DNSStubListener=no
EOF

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl restart systemd-resolved

Confirm nothing is holding port 53 before you launch the container (the command below should return no output):

sudo ss -tulpn | grep :53

Step 2: Deploy Technitium DNS with Docker Compose

Create a directory for your DNS stack and write a docker-compose.yml file. Swap out the example domain and password for your own values:

mkdir -p ~/technitium-dns/config
cd ~/technitium-dns
services:
  technitium-dns:
    image: technitium/dns-server:latest
    container_name: technitium-dns
    network_mode: host
    restart: unless-stopped
    environment:
      - DNS_SERVER_DOMAIN=dns.lab.example.com
      - DNS_SERVER_ADMIN_PASSWORD=ChangeMeToAStrongPassword!
      - DNS_SERVER_PREFER_IPV6=false
    volumes:
      - ./config:/etc/dns

Start the container in the background and check its startup logs:

docker compose up -d
docker compose logs -f --tail=30

Open http://192.168.10.2:5380 in your browser. Log in with username admin and the password from your Compose file.

Step 3: Configure Authoritative Zones and Split-Horizon DNS

Keeping internal traffic inside your LAN while sharing a public domain requires a primary zone and Split-Horizon routing:

  1. In the Technitium web UI, go to Zones → Add Zone.
  2. Enter your domain (such as example.com or lab.example.com), pick Primary Zone, and click Add.
  3. Open the zone and click Add Record to create internal A records. For example, point *.lab.example.com or git.example.com to your reverse proxy IP (such as 192.168.10.50).
  4. For true Split-Horizon responses on a domain you also serve publicly, open Apps → App Store and install the official Split Horizon app.
  5. Add an APP record inside your zone using the Split Horizon app to map your LAN subnet (192.168.10.0/24) to internal IP addresses, while default or external queries return your public IP.

Technitium acts as a recursive resolver by default. Any domain you do not host locally (like github.com) resolves straight from root servers, or via upstream forwarders you set under Settings → Proxy & Forwarders.

Step 4: Enable DHCP with Dynamic DNS Registration

Handing IP assignment to Technitium keeps hostnames and leases in sync automatically:

  1. Go to the DHCP tab and click Add Scope.
  2. Name the scope HomeLab-LAN and set a pool—for example, 192.168.10.100 to 192.168.10.220 with subnet mask 255.255.255.0. Use a 1-hour (3600-second) lease if you spin test VMs up and down often, or 24 hours for stable devices.
  3. Set Router (Gateway) to your firewall IP (192.168.10.1) and DNS Servers to 192.168.10.2.
  4. Set Domain Name to your internal zone (lab.example.com) and enable DNS Updates so Technitium writes A and PTR records for every leased client.
  5. Save and enable the scope, then log into your router and turn off its DHCP server to prevent IP conflicts.

Step 5: Turn On DNSSEC Validation and Zone Signing

DNSSEC blocks spoofed DNS replies using cryptographic signatures. Recursive validation is turned on by default, which you can verify under Settings → General → DNSSEC Validation.

Signing your own internal primary zone takes three quick steps:

  1. Open Zones and select your primary zone.
  2. Click DNSSEC → Sign Zone.
  3. Pick ECDSA P-256 (Algorithm 13) with NSEC3 for strong security with compact keys, then click Sign. (If you sign a subdomain of a public domain you own, add the generated DS record at your registrar if external resolvers need to validate it.)

Step 6: Verify Everything from the Terminal

Test resolution, Split-Horizon routing, and DNSSEC validation from another machine on your LAN:

# Test internal Split-Horizon A record resolution
dig @192.168.10.2 git.example.com +short

# Verify DNSSEC validation (look for the 'ad' flag in the header)
dig @192.168.10.2 cloudflare.com +dnssec

# Confirm DNSSEC failure is blocked on a known broken domain
dig @192.168.10.2 dnssec-failed.org

You should see your internal LAN IP from the first command, the ad (Authenticated Data) flag in the second, and SERVFAIL from the third. Once those checks pass, renew your clients’ DHCP leases or point your static hosts to 192.168.10.2 for sub-2 ms local lookups and validated external DNS across your entire lab.

Share: