Installing AdGuard Home

A powerful self-hosted DNS server with built-in ad blocking, DNS-over-HTTPS, DNS-over-TLS, parental controls, and beautiful per-device statistics — all in one package.

DNS Server DoH · DoT · DoQ Free & Open Source By AdGuard

AdGuard Home vs Pi-hole

AdGuard Home is often described as a more modern alternative to Pi-hole. It's a single binary with a polished web UI, built-in encrypted DNS support (DoH, DoT, DoQ), and per-device tracking out of the box — without requiring extra tools.

FeatureAdGuard HomePi-hole
DNS-over-HTTPS✅ Built-in❌ Needs extra setup
DNS-over-TLS✅ Built-in❌ Needs extra setup
Per-device stats✅ Built-in⚠️ Limited
Parental controls✅ Built-in❌ Via blocklists only
Safe search✅ One-click❌ Manual
InstallationSingle binaryGuided wizard
Community blocklistsGoodExcellent (more options)
DHCP Server✅ Built-in✅ Built-in

Prerequisites

Hardware
Any Raspberry Pi (Zero 2W works fine), or any Linux machine
OS
Raspberry Pi OS, Ubuntu 22.04+, Debian 11+ (64-bit recommended)
Network
Static IP address configured on the device
Port 53
DNS port must be free — disable systemd-resolved if needed

Step-by-Step Installation

01

Free Up Port 53

On many modern Linux systems, systemd-resolved occupies port 53. We need to disable it first.

# Check if port 53 is in use:
sudo ss -tulpn | grep :53

# Disable systemd-resolved stub listener:
sudo sed -i 's/#DNSStubListener=yes/DNSStubListener=no/' /etc/systemd/resolved.conf
sudo systemctl restart systemd-resolved

# Or disable entirely:
sudo systemctl disable --now systemd-resolved
02

Download and Install AdGuard Home

AdGuard provides an automated install script that detects your architecture automatically.

curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

The binary installs to /opt/AdGuardHome/ and registers itself as a systemd service.

03

Run Initial Setup Wizard

Open a browser and navigate to port 3000 on your Pi's IP:

http://192.168.1.100:3000

The setup wizard will guide you through: choosing the web interface port (default 80), DNS port (53), and creating an admin username and password.

After setup, the web interface moves to port 80: http://192.168.1.100

04

Configure Upstream DNS

In the web UI: Settings → DNS Settings → Upstream DNS Servers. Choose your upstream resolver:

# Cloudflare (fast, privacy-respecting):
https://dns.cloudflare.com/dns-query

# Quad9 (security-focused):
https://dns.quad9.net/dns-query

# Or use Unbound on localhost for full recursion:
127.0.0.1:5335
05

Add Blocklists

Go to Filters → DNS Blocklists → Add blocklist. AdGuard Home has a built-in list catalog, or add custom URLs:

# Recommended lists to add:
# AdGuard DNS filter (built-in)
# EasyList
# Steven Black's Unified Hosts:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

# Rebuild filters after adding:
# Click "Update" button in the Filters section
06

Enable DNS-over-HTTPS for Clients

AdGuard Home can act as a DoH server so devices can use encrypted DNS:

In Settings → Encryption Settings, you can configure HTTPS with a certificate (Let's Encrypt or self-signed) to enable DoH at https://your-pi-ip/dns-query.

07

Point Router DNS to AdGuard Home

In your router admin panel, set the Primary DNS to your Pi's static IP. All devices will then use AdGuard Home automatically.

# Test it's working:
nslookup doubleclick.net 192.168.1.100
# Should return 0.0.0.0

# Check service status:
sudo systemctl status AdGuardHome

Useful Commands

TaskCommand
Check statussudo systemctl status AdGuardHome
Restart servicesudo systemctl restart AdGuardHome
View logssudo journalctl -u AdGuardHome -f
Update AdGuard HomeUse the web UI: Settings → Updates
Config file location/opt/AdGuardHome/AdGuardHome.yaml
Uninstallsudo /opt/AdGuardHome/AdGuardHome -s uninstall