Skip to content

Technitium DNS Server in Docker: Install and Configure

February 22, 2026

This tutorial shows how to run Technitium DNS Server in Docker on your Ubuntu VM (e.g. 112-Technitium-DNS_Server at 172.100.12.112). After this, you’ll use it as your primary DNS and configure your router so all devices get DNS via DHCP.


What is Technitium DNS Server?

Technitium DNS Server is a free, open-source DNS server with a web UI. It can:

  • Resolve and cache DNS for your whole network.
  • Block ads and malware (optional).
  • Support DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT).
  • Store config in a folder so it survives container restarts.

We run it in Docker so updates and backups are simple.


Where This Fits

    flowchart LR
  A[VM + Docker] --> B[This tutorial]
  B --> C[Technitium in Docker]
  C --> D[Primary DNS and router]
  

Step 1: Free Port 53 (Ubuntu)

Technitium needs port 53 for DNS. On Ubuntu 24, systemd-resolved often uses it. Disable it for the main interface so Technitium can bind to 53:

sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved

Point the host to a public resolver so it can still resolve names (optional; only until Technitium is up). Edit /etc/resolv.conf (often managed by resolvconf):

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf

(After Technitium is running, you can point the host to 127.0.0.1 if you prefer.)


Step 2: Create Folders for Config and Data

mkdir -p ~/technitium/config ~/technitium/logs
cd ~/technitium

Step 3: Docker Compose for Technitium

Create docker-compose.yml in ~/technitium:

services:
  technitium:
    image: technitium/dns-server:latest
    container_name: technitium-dns
    restart: unless-stopped
    ports:
      - "53:53/udp"
      - "53:53/tcp"
      - "5380:5380"
    volumes:
      - ./config:/etc/dns
      - ./logs:/var/log/dns
    environment:
      - DNS_SERVER_PREFER_IPV6=false
    cap_add:
      - NET_ADMIN
  • 53: DNS (UDP/TCP).
  • 5380: Web console (HTTP). Use http://172.100.12.112:5380 from your browser (replace with your VM IP).
  • config: Persists Technitium settings.
  • logs: Persists logs.

Optional: set an admin password and domain on first run (only when config is empty). Add under environment:

      - DNS_SERVER_ADMIN_PASSWORD=your-secure-password
      - DNS_SERVER_DOMAIN=home

Step 4: Start Technitium

cd ~/technitium
docker compose up -d
docker compose ps

Check that the container is running and that port 53 is listening:

ss -ulnp | grep 53

Step 5: Open the Web Console

  1. In your browser go to: http://172.100.12.112:5380 (use your VM IP if different).
  2. First time: set an admin password and optional domain if prompted.
  3. You can now create zones, enable blocking, and tweak settings from the UI.

Step 6: Quick Test from Another Machine

Point another device (or your router) to 172.100.12.112 as DNS and run:

nslookup google.com 172.100.12.112

You should get a reply from Technitium.


Reference: Useful Links


What’s Next?

StepTutorialWhat you’ll do
1Create VMVM with static IP
2Docker and utilitiesDocker + Compose + tools
3You are hereTechnitium in Docker
4Technitium primary DNS and routerPrimary DNS on VM; router DHCP so all devices use Technitium

Next: Set Technitium as primary DNS and configure router →