4 Home DNS Setup
Matt Cupp edited this page 2026-05-29 17:35:45 -04:00

Setting Up a Home DNS

Current homelab DNS setup: AdGuard Home is running at 192.168.1.86 (primary) and Pi-hole at 192.168.1.220 (secondary). Both are LXC containers on PVE. See Proxmox LXC Services for their details. This page is a general reference guide for DNS options.

Options for setting up custom DNS on a home network, from simplest to most flexible.


Option 1: Router DNS Settings (Simplest)

Change the DNS servers your router hands out to all connected devices.

Pros: Affects all devices automatically; easy to configure. Cons: Usually only points to external DNS -- cannot create custom local hostnames.

Steps:

  1. Open your router admin interface (IP is on the sticker, or check your default gateway)
  2. Log in with admin credentials
  3. Navigate to DNS, WAN Settings, or Internet Settings
  4. Enter DNS server IPs (e.g. Cloudflare 1.1.1.1, Google 8.8.8.8)
  5. Save and reboot devices (or renew DHCP leases)

For navigating to local services by hostname, this option alone will not work. You also need a local DNS server (Options 2 or 3) and then point your router at it.


Run a DNS server inside Proxmox to create custom local hostnames like plex.local or nextcloud.local.

Pros: Full control over DNS records; caches queries for speed. Cons: Requires more setup; local DNS goes down if Proxmox goes down.

2a: AdGuard Home in an LXC

Create the LXC container:

  1. In Proxmox, click Create CT
  2. Set hostname (e.g. adguardhome), choose Ubuntu or Debian template
  3. Resources: 8-16 GB disk, 1-2 CPU cores, 512 MB-1 GB RAM
  4. Network: assign a static IP outside the DHCP range (e.g. 192.168.1.25/24)
  5. Set gateway to your router IP; use a public DNS (e.g. 8.8.8.8) temporarily

Install AdGuard Home:

sudo apt update && sudo apt upgrade -y
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

Access the web interface at http://<LXC_IP>:3000 and run the setup wizard.

Add custom DNS records:

In AdGuard Home: Filters -> DNS Rewrites

plex.local        192.168.1.100
nextcloud.local   192.168.1.101

Point your router at AdGuard Home:

  • Set the router primary DNS to the LXC static IP
  • Optionally add a public DNS as fallback (e.g. 1.1.1.1)

2b: dnsmasq in a VM

More control, slightly more complex.

Install:

sudo apt update && sudo apt upgrade -y
sudo apt install dnsmasq -y

Configure /etc/dnsmasq.conf:

# Custom local hostnames
address=/plex.local/192.168.1.100
address=/nextcloud.local/192.168.1.101

# Upstream DNS
server=8.8.8.8
server=1.1.1.1

Enable and start:

sudo systemctl restart dnsmasq
sudo systemctl enable dnsmasq

Point your router to this VM static IP as the DNS server.


Option 3: Recover and Use Pi-hole

Pi-hole is excellent for DNS and ad blocking. If you lost the root password, here is how to recover it.

Requirements: Physical access, keyboard, and monitor connected to the Pi.

Reset the password:

  1. Power on the Raspberry Pi
  2. At boot, press Shift to enter GRUB (or e at the splash screen on newer OS)
  3. Select the first boot option and press e to edit
  4. On the linux line, append init=/bin/bash at the end
  5. Press F10 or Ctrl+X to boot into a root shell
  6. Remount read-write, reset the password, then reboot:
mount -o remount,rw /
passwd root
# or: passwd pi
mount -o remount,ro /
reboot -f

After recovery, update Pi-hole:

sudo apt update && sudo apt upgrade -y
pihole -up

Add local DNS records:

  • Pi-hole admin -> Local DNS -> DNS Records
  • Add entries like plex.local -> 192.168.1.100
  • Point your router DNS to the Pi-hole static IP

Summary

Option Best for Complexity
Router DNS External DNS only Very low
AdGuard Home (LXC) Custom hostnames + ad blocking Medium
dnsmasq/BIND9 (VM) Maximum control High
Pi-hole Ad blocking + custom DNS Medium

Recommendation: AdGuard Home in an LXC is the best balance of features and ease of setup for local app navigation.

Static IPs: Ensure all servers (Proxmox, DNS, Plex, Nextcloud, etc.) have static IPs outside the router DHCP range to avoid conflicts.