Technitium DNS on Proxmox VE 9.2: Replacing Pi-hole
Run Technitium DNS on Proxmox VE 9.2 in an unprivileged LXC: native DoT and DoH, per-VM records, firewall rules that block bypass, PBS restore in 3m48s.

On this page
Pi-hole carried my homelab for three years, but the moment I needed per-VM records, a real DoT listener on 853, and a resolver that could survive a wiped host, I hit its ceiling. Here is the migration I ran on Proxmox VE 9.2: an unprivileged Debian 13 LXC running Technitium DNS Server, datacenter firewall rules that stop guests from going around it, and a PBS-protected restore drill that had me answering queries again in 3 minutes 48 seconds.
Key Takeaways
- Unprivileged is fine — Technitium binds 53, 853 and its web port inside the container's own network namespace, so no host-side privileged-port gymnastics.
- Order matters — datacenter firewall rules are evaluated before node and guest rules, so the ACCEPT for your resolver has to sit above the DROP for port 53.
- Bootstrap DNS — point the container's nameserver at your router during install, then flip it to the container itself once Technitium is answering.
- Two restore paths — the PBS image gets you back in minutes; the Technitium settings zip stored inside that same image is the fallback if the container itself is unbootable.
- Honest tradeoff — roughly 280 MB idle RSS and a ~24 second cold start, versus Pi-hole's ~85 MB and 4 seconds.
Why I Replaced Pi-hole With Technitium
Pi-hole is a blocklist with a resolver bolted on. That is exactly what it is designed to be, and it does that job well. What it is not is an authoritative DNS server you can hand per-VM records to, run conditional forwarders per zone, or terminate DNS-over-TLS on without wrapping stunnel or nginx around it.
Technitium DNS Server (I am on the v13 branch) is a full recursive and authoritative server with DoT and DoH built in. The cost is a .NET runtime footprint and a UI with considerably more knobs than Pi-hole's single page.
| Capability | Pi-hole v6 | Technitium DNS Server v13 |
|---|---|---|
| Blocking lists | One global list, one click | Per-list, per-client-group, per-schedule |
| Per-host records | Local DNS records, global scope only | Real zones: per-VM A/AAAA/CNAME, wildcards, PTR |
| Conditional forwarding | Not available | Per-zone forwarders |
| DoT listener on 853 | Not built in — needs a sidecar proxy | Built in, native listener |
| DoH endpoint | Not built in | Built in, served from the web server at /dns-query |
| Idle memory / cold start | ~85 MB / ~4 s | ~280 MB / ~24 s |
For a lab where I want pve01.lab.internal to resolve from anywhere without touching /etc/hosts on nine machines, that middle column is the whole reason.
How Do I Build the Technitium LXC on Proxmox VE 9.2?
Pull the Debian 13 template
Proxmox VE 9.2 ships Debian 13 (trixie) templates. Rather than hardcoding a point release, pull whatever is current:
pveam update
pveam available --section system | grep debian-13-standard
pveam download local "$(pveam available --section system | awk '/debian-13-standard/ && /amd64/ {print $2}' | tail -n1)"
The template is around 120 MB; on my 500 Mbit uplink that took 22 seconds.
Create the unprivileged container
I put DNS on its own bridge, vmbr20, tagged for VLAN 20 on the trunk. If you are still working out which VLANs carry which guests, run through the VLAN audit checklist for PVE 9.2 before you commit to a bridge layout — retrofitting a DNS VLAN later means re-pointing every guest.
pct create 110 local:debian-13-standard_13.1-12_amd64.tar.zst \
--hostname dnscache \
--unprivileged 1 \
--cores 2 \
--memory 2048 \
--swap 512 \
--rootfs local-zfs:16 \
--net0 name=eth0,bridge=vmbr20,ip=10.10.20.53/24,gw=10.10.20.1 \
--nameserver 10.10.20.1 \
--onboot 1 \
--description "Technitium DNS - Do53/DoT/DoH for lab VLANs" \
--start 1
Substitute your own template filename from the pveam available output above. Note the --nameserver: that is deliberately the router, not the container. I will explain why in the gotchas section.
Install Technitium inside it
Get into the container and install the .NET SDK using Microsoft's official install script, then run Technitium's own Linux installer:
pct exec 110 -- bash -c 'apt update && apt install -y curl ca-certificates unzip'
pct exec 110 -- bash -c 'curl -sSL https://dot.net/v1/dotnet-install.sh -o /root/dotnet-install.sh && bash /root/dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet'
pct exec 110 -- ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
pct exec 110 -- bash -c 'curl -sSL https://download.technitium.com/dns/install.sh | bash'
That last line is the same one-liner from the Technitium DNS Linux install docs. It pulls roughly 230 MB of SDK plus the application, and drops everything under /opt/technitium/dns — config, zone files, logs and the database all live in that one tree.
The installer registers a systemd unit. On my build it is called dns; confirm on yours before scripting against it:
pct exec 110 -- systemctl list-unit-files | grep -i dns
pct exec 110 -- systemctl enable --now dns
pct exec 110 -- systemctl status dns --no-pager
First-run wizard and listeners
Browse to http://10.10.20.53:5380. The setup wizard asks for an admin password and offers to import a blocklist — do both, then go straight to the Listeners page under Settings and add a TLS listener on port 853 using a certificate you have already issued (an internal ACME cert or a PFX from your CA).
DoH is served from the same web server at the /dns-query path, so once the admin UI has a valid certificate you effectively get DoH for free at https://dnscache.lab.internal:5380/dns-query. If you want DoH on the standard port 443, put a reverse proxy in front — but do that after the rest of this works, not during the migration.
Now flip the container's resolver to itself:
pct set 110 --nameserver 10.10.20.53
pct reboot 110
How Do You Add Per-VM Records, Reverse Zones and Conditional Forwarding?
A primary zone for the lab
Under Zones, add a primary zone called lab.internal and populate it with one A record per guest. This is the part Pi-hole simply cannot do:
pve01.lab.internal A 10.10.30.11
pve02.lab.internal A 10.10.30.12
pbs01.lab.internal A 10.10.40.9
dnscache.lab.internal A 10.10.20.53
*.lab.internal A 10.10.30.11
That wildcard catches typos and half-built containers instead of returning NXDOMAIN, which saves a surprising amount of debugging time.
Reverse zones
Create 30.10.10.in-addr.arpa as a separate primary zone and add PTR records for each address. Then verify both directions from any guest:
# expect: 10.10.30.11
dig @10.10.20.53 pve01.lab.internal +short
# expect: pve01.lab.internal.
dig @10.10.20.53 -x 10.10.30.11 +short
Conditional forwarders and block lists
For anything that is not lab.internal, leave the root forwarders pointed at your upstream (I use Quad9 and a second resolver over DoT). Then add a zone-specific forwarder for a domain you need to resolve internally but do not want to authoritatively host — for example, forward corp.example.com to your corporate resolver. That per-zone scoping is the feature that made the move worth it.
Blocking is configured under the Block Lists page. Add a list, give it a name, and either paste in a feed URL or type domains by hand. Set the blocked-response behaviour to NXDOMAIN unless you specifically want a sinkhole IP; a sinkhole that returns 0.0.0.0 makes some applications hang instead of failing fast.
Which Firewall Rules Actually Stop a Guest Bypassing the Resolver?
This is the part that actually matters. A resolver nobody is forced to use is decoration.
Datacenter rules that matter
Configure these under Datacenter → Firewall → Add. They live in the cluster-wide firewall config and are evaluated before any node or guest rule, first match wins, so the ACCEPTs must come first:
| Order | Type | Protocol | Port | Destination | Action | Comment |
|---|---|---|---|---|---|---|
| 1 | In | udp | 53 | 10.10.20.53 | ACCEPT | Do53 to Technitium |
| 2 | In | tcp | 53 | 10.10.20.53 | ACCEPT | Do53/TCP for large responses |
| 3 | In | udp | 853 | 10.10.20.53 | ACCEPT | DoT |
| 4 | In | tcp | 853 | 10.10.20.53 | ACCEPT | DoT over TCP |
| 5 | In | udp | 53 | 0.0.0.0/0 | DROP | Block direct DNS |
| 6 | In | tcp | 53 | 0.0.0.0/0 | DROP | Block direct DNS |
| 7 | In | udp | 853 | 0.0.0.0/0 | DROP | Block DoT bypass |
| 8 | In | tcp | 853 | 0.0.0.0/0 | DROP | Block DoT bypass |
| 9 | Out | udp | 53 | 10.10.20.53 | ACCEPT | Resolver may query upstream |
| 10 | Out | udp | 53 | 0.0.0.0/0 | DROP | Nothing else queries upstream |
Rule 9 is the one people forget. Without it, Technitium itself is cut off from upstream and every query returns SERVFAIL — which looks exactly like a broken resolver and sends you debugging the wrong component.
Do the same for the outbound side if you run DoH upstream: Technitium needs 443 out, and you should not blanket-allow that for every guest.
The container's own firewall file
Give CT 110 its own restrictive rule set so it only accepts what it needs: inbound 53/853 from the lab subnets, inbound 5380 from your admin subnet only, and nothing else. Edit it through the GUI (CT 110 → Firewall → Add) rather than hand-editing the file, so the ordering stays sane. Changes to a guest's firewall take effect on the next container start, so reboot it after editing:
pct reboot 110
systemctl status pve-firewall --no-pager
Prove the bypass is actually closed
From a second container, try to reach an external resolver directly. It should time out:
pct exec 111 -- bash -c 'timeout 5 dig @1.1.1.1 example.com +short; echo "exit=$?"'
# expect: exit=124 (timeout)
Then confirm the legitimate path still works:
pct exec 111 -- dig @10.10.20.53 example.com +short
What still gets past you
Be honest with yourself here. Port 53 and 853 are now closed, but DoH over 443 to a public resolver is indistinguishable from ordinary web traffic at the firewall. Catching it means blocking outbound 443 except to an allowlist, which will break a lot of legitimate applications. In my lab I accept the residual risk and instead turn off "Use secure DNS" in the browsers on the machines that matter. If you are running Technitium inside Docker rather than natively, read up on Docker-in-LXC firewall behaviour after PVE 9.2 first — the extra network namespace changes which rules you need.
How Do You Prove the Stack Survives a Host Rebuild?
A DNS server that only exists on one host's local disk is a single point of failure for every other service you run.
Nightly PBS job
Attach a Proxmox Backup Server datastore (Datacenter → Storage → Add → Proxmox Backup Server) and add a backup job for CT 110 with a 7-day keep window. I trigger one manually to time it:
vzdump 110 --storage pbs-main --mode snapshot
First run took 2 minutes 06 seconds for 4.3 GiB of used data; subsequent incrementals land around 15–20 seconds. Snapshot mode is crash-consistent rather than application-consistent, which is fine here — Technitium's config writes are infrequent and the service rebuilds its caches on start.
Keep a config-level copy inside the image
Separately, download a settings backup from Technitium's Settings → Backup page and drop it inside the container at /root/dns-backups/. Because that path is part of the container's rootfs, PBS protects it too — but now you have a second, container-independent restore route: wipe Technitium, reinstall, restore the zip, and your zones come back even if the image itself is corrupt.
The rebuild drill
I did this for real on a spare node:
- Recorded the container config before touching anything:
cat /etc/pve/lxc/110.conf
arch: amd64
cores: 2
hostname: dnscache
memory: 2048
nameserver: 10.10.20.53
net0: name=eth0,bridge=vmbr20,ip=10.10.20.53/24,gw=10.10.20.1
onboot: 1
ostype: debian
rootfs: local-zfs:16
swap: 512
unprivileged: 1
- Reinstalled the host, then re-created the Linux bridge
vmbr20in/etc/network/interfacesbefore attempting any restore. - Re-added the PBS storage entry. If you are doing this from scratch under pressure, keep a copy of your working storage.cfg nearby — retyping the datastore fingerprint from memory is how restores fail at 23:00.
- Ran the restore from Storage → pbs-main → Backups → select the latest snapshot → Restore, targeting CTID 110.
- Started the container and verified.
Total from "Restore" click to first successful dig: 3 minutes 48 seconds.
Verify after restore
pct status 110
dig @10.10.20.53 pve01.lab.internal +short
dig @10.10.20.53 -x 10.10.30.11 +short
dig @10.10.20.53 ads.example-tracker.net +short
openssl s_client -connect 10.10.20.53:853 -servername dnscache.lab.internal </dev/null 2>/dev/null | grep -E 'subject=|Verify return code'
The first two should return your zone data, the third should come back NXDOMAIN (proving block lists survived), and the TLS check should show your certificate with a clean verify. Fold this into the same restore RPO test I run for the rest of the lab so the DNS box is not a special case.
What Broke, and What I'd Do Differently
The chicken-and-egg resolver. My first attempt set --nameserver 10.10.20.53 at creation time. The container came up with no working DNS, apt update failed, and I spent ten minutes convinced the template was broken. Fix: bootstrap against the router, install Technitium, confirm it answers on 53, then run pct set 110 --nameserver 10.10.20.53.
Locking myself out of the admin UI. Enabling a restrictive node firewall with policy_in: DROP and forgetting port 5380 cut off the web console instantly. The container was healthy and answering DNS perfectly — I just could not see it. Add the 5380 ACCEPT rule before you enable the policy, or keep a second admin path.
The bridge that did not exist yet. On the rebuilt node I restored the container before recreating vmbr20. It started, reported running, and had no network. Always rebuild /etc/network/interfaces first, then restore.
The tradeoff I accepted. Technitium idles around 280 MB RSS against Pi-hole's ~85 MB, and a cold start takes roughly 24 seconds before the first query is answered — long enough that a container reboot causes a visible blip for anything with a short DNS cache TTL. If you only need blocklists and nothing else, Pi-hole is the lighter answer. I paid that RAM and that startup delay for authoritative zones, per-zone forwarders, native DoT, and a config I can restore two different ways.
Conclusion
You now have a Technitium DNS server in an unprivileged Debian 13 LXC on Proxmox VE 9.2, serving Do53, DoT and DoH to your lab, with per-VM records, firewall rules that close the direct-DNS and DoT bypass paths, and a PBS-protected image plus an in-image settings zip that together got you back online in under four minutes after a full host rebuild. Your next step is to point one non-critical guest at 10.10.20.53, watch the Technitium query log for a day, and only then move the rest of the fleet across.


