Raspberry Pi + AdGuard Home
A rebuildable guide for deploying network-wide DNS filtering and ad blocking with a Raspberry Pi 4B, Raspberry Pi OS Lite, AdGuard Home, and a Netgear Nighthawk router.
Setup used
Raspberry Pi 4B connected to the router. Ethernet is preferred to avoid dual-interface confusion.
Raspberry Pi OS Lite flashed with Raspberry Pi Imager, with SSH enabled during imaging.
Netgear Nighthawk router with AdGuard Home running as the DNS filtering service.
Quick setup
- Flash Raspberry Pi OS Lite using Raspberry Pi Imager.
- Enable SSH and configure login credentials during imaging.
- Boot the Pi and connect it by Ethernet.
- Update Raspberry Pi OS.
- Find the Pi IP address.
- Reserve that IP in the Nighthawk router.
- Install AdGuard Home.
- Check the installed AdGuard version from CLI.
- Open the AdGuard web UI.
- Configure upstream DNS.
- Test one client manually before changing the whole network.
Core commands
Update the Pi
sudo apt update
sudo apt upgrade -y
sudo reboot
Find the Pi IP address
hostname -I
ip addr
Install AdGuard Home
wget https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_arm64.tar.gz
tar xvf AdGuardHome_linux_arm64.tar.gz
cd AdGuardHome
sudo ./AdGuardHome -s install
Check installed version
AdGuardHome --version
sudo /opt/AdGuardHome/AdGuardHome --version
DNS flow
Client → AdGuard → Upstream DNS
AdGuard can show individual device traffic.
Client → Router → AdGuard
AdGuard may only show the router IP. Filtering can still work.
Netgear Nighthawk caveat
Many Nighthawk routers proxy DNS through the router. As a result, AdGuard may show only the router address instead of each device.
This does not automatically mean AdGuard is broken. DNS filtering and client-level visibility are related but separate problems.
DHCP warning
Do not disable router DHCP until AdGuard has a static IP and AdGuard DHCP is configured. If router DHCP is disabled too early, devices may lose IP addresses and the AdGuard interface may become unreachable.
- Reserve the Pi IP first.
- Confirm AdGuard is reachable.
- Configure AdGuard DHCP if needed.
- Only then disable router DHCP.
Troubleshooting
AdGuard only shows the router
Likely cause: router DNS proxying. Test by manually setting one client DNS server to the Pi IP.
AdGuard UI will not load
sudo systemctl status AdGuardHome
sudo systemctl restart AdGuardHome
sudo journalctl -u AdGuardHome -f
Test DNS
nslookup google.com
Lessons learned
- Use Ethernet if possible.
- Reserve the Pi IP before changing DNS settings.
- Test one device before changing the whole network.
- Expect Netgear DNS proxy behavior.
- Do not disable router DHCP until AdGuard DHCP is ready.