Should Run Your Own DNS with AdGuard Home
Welcome back to Self-Hosted Tech! If you’ve been hanging around the homelab community for any amount of time, you’ve probably heard the term “DNS” thrown around constantly. Usually, it’s right next to words like “Pi-hole” or “AdGuard.” But if you’re new to the scene, you might be wondering: why does everyone care so much about DNS, and why should I run my own?
Let’s be real for a second. Your internet service provider (ISP) gives you DNS servers by default. It just works out of the box. But “just working” isn’t really the homelab ethos, is it? We want control, privacy, and customization. We want to be the masters of our own networks.
Today, we’re going to talk about why running your own DNS server is one of the most impactful upgrades you can make to your home network, and why AdGuard Home is the best tool for the job. We’ll even walk through exactly how to set it up using Docker.
What is DNS, Anyway?
Before we get into the “why,” let’s quickly cover the “what.” DNS stands for Domain Name System. The easiest way to understand it is to think of it as the phonebook of the internet.
When you type youtube.com into your browser, your computer doesn’t actually know what youtube.com is. It needs an IP address to connect to the server hosting the videos. So, your computer asks a DNS server: “Hey, what’s the IP address for youtube.com?” The DNS server looks it up, replies with something like 142.250.190.46, and boom—your browser connects, and the cat videos start playing.
By default, your router hands out your ISP’s DNS servers to every device on your network. That means your ISP sees every single website you visit, even if you’re using a VPN on your main PC (because your smart TV or smart fridge definitely isn’t using your VPN).
Why You Should Run Your Own DNS
When you run your own DNS server, you step in the middle of that process. Instead of your devices asking your ISP for IP addresses, they ask your self-hosted DNS server. Your server then goes out, fetches the answer, and passes it back to your devices.
This simple interception unlocks a massive amount of power for your homelab.
1. Network-Wide Ad and Tracker Blocking
This is usually the number one reason people self-host their DNS. AdGuard Home acts as a filter. When your smart TV asks for the IP address of ads.tracker.com, AdGuard Home checks its blocklists. If that domain is on a blocklist, AdGuard returns a blank IP address (or a “blackhole” IP) instead of the real one. The ad simply fails to load.
This means you get ad-blocking on devices where you normally can’t install an ad blocker. Smart TVs, IoT devices, mobile games, and older consoles all benefit from network-wide ad blocking. It also dramatically cuts down on telemetry and tracking scripts, speeding up your overall browsing experience.
2. Privacy from Your ISP
As we mentioned, your ISP’s default DNS servers log every DNS query you make. They can (and do) use this data for marketing, or sell it to third parties. By running AdGuard Home, you can configure it to use upstream DNS servers that respect your privacy (like Cloudflare’s 1.1.1.1 or Quad9’s 9.9.9.9).
Even better, AdGuard Home supports DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT). This means when AdGuard goes out to the internet to fetch an IP address, it encrypts that request. Your ISP can see that you’re using the internet, but they can no longer see the specific DNS queries you’re making.
3. Local DNS Resolution (The Homelab Superpower)
This is the feature that truly elevates a homelab. As your homelab grows, you’ll start running internal services: maybe a Nextcloud instance, a Plex server, Home Assistant, or a Proxmox web interface.
Instead of typing http://192.168.1.50:8080 to access your Nextcloud instance, you can use AdGuard Home to create a local DNS record. You can tell AdGuard: “Whenever someone asks for nextcloud.lan, give them 192.168.1.50.”
Now, you can just type nextcloud.lan into your browser, and it resolves instantly to your local server. It makes your homelab feel like a polished, professional IT environment, and it makes sharing links with family members significantly easier.
Why AdGuard Home?
If you’ve been in the homelab space for a minute, you might be asking, “What about Pi-hole?” Pi-hole is fantastic. It’s the grandfather of self-hosted DNS ad-blocking, and it’s a great piece of software.
However, AdGuard Home has a few distinct advantages that make it our preferred choice today:
- Native Encrypted DNS: AdGuard Home has DNS-over-HTTPS and DNS-over-TLS baked right in from the start. Setting up encrypted upstream DNS in Pi-hole requires extra steps and third-party tools.
- Modern UI: The AdGuard Home web interface is clean, fast, and visually intuitive. It’s easy to read the query logs and see exactly what’s being blocked.
- Client-Specific Settings: You can configure AdGuard Home to apply different rules to different devices. Want your kid’s tablet to have strict parental controls, but your work PC to bypass the ad-blocker entirely? AdGuard makes this incredibly easy to set up.
- Written in Go: It’s a single, lightweight binary. It uses very little RAM and CPU, making it perfect to run on a Raspberry Pi alongside other services.
The Walkthrough: Installing AdGuard Home with Docker
Ready to take the plunge? Let’s get AdGuard Home installed. We’re going to use Docker and Docker Compose, because that’s the best way to manage self-hosted services. It keeps things clean, updatable, and portable.
Prerequisites
- A machine on your network that’s always on (a Raspberry Pi, an old desktop, or a VM on your Proxmox server).
- Docker and Docker Compose installed.
- Basic familiarity with the command line.
Step 1: Dealing with Port 53
DNS operates on port 53. By default, many Linux distributions (especially Ubuntu) run a service called systemd-resolved which binds to port 53 on the local loopback address. If port 53 is in use, AdGuard Home won’t be able to start properly.
First, check if port 53 is in use:
| |
If you see systemd-resolv listed, you need to free up the port. The easiest way is to edit the resolved config file:
| |
Uncomment and change the DNSStubListener line so it looks like this:
| |
Save and exit the file, then restart the service and create a symlink to keep your /etc/resolv.conf working:
| |
Now port 53 is free!
Step 2: Create the Docker Compose File
Create a directory for your AdGuard Home installation and navigate into it:
| |
Now, create the docker-compose.yml file:
| |
Paste the following configuration into the file:
| |
Save and exit.
Step 3: Start the Container
Before we start it up, we need to create the directories we referenced in the volumes so Docker doesn’t create them with root-only permissions:
| |
Now, bring the container online:
| |
Docker will pull the AdGuard Home image and start the container.
Step 4: The Initial Setup Wizard
Open up a web browser on your computer and navigate to:
http://<IP-OF-YOUR-SERVER>:3000
You will be greeted by the AdGuard Home setup wizard.
- Click Get Started.
- The wizard will detect your network interfaces. Make sure the “Listen interfaces” is set to
0.0.0.0(all interfaces) or your specific server IP. - Set up your admin username and password. Don’t skip this; you don’t want anyone on your network messing with your DNS settings!
- For the upstream DNS server, you can leave the default (which is usually a mix of Cloudflare and Google) or choose a specific one like
https://dns.cloudflare.com/dns-query. - Click Next and finish the setup.
The wizard will tell you to navigate to port 80 to access your dashboard. Go ahead and do that: http://<IP-OF-YOUR-SERVER>.
Pointing Your Network to AdGuard Home
AdGuard is running, but it’s useless if nothing is talking to it. You need to tell your router to hand out your AdGuard Home server’s IP address as the primary DNS server to all connected devices.
Every router is different, but generally, you want to:
- Log into your router’s admin panel (usually
192.168.1.1or10.0.0.1). - Look for DHCP settings or LAN settings.
- Find the section for DNS Servers.
- Remove your ISP’s DNS servers. Set the Primary DNS to the IP address of your AdGuard Home server.
- Save and apply.
Note: After changing this, you will need to reconnect your devices to the network (or reboot them) so they pull the new DHCP lease with the updated DNS server.
Advanced Tip: Setting Up Local DNS Rewrites
Now that it’s running, let’s use that homelab superpower we talked about: local DNS.
- In the AdGuard Home dashboard, go to Settings -> DNS settings.
- Scroll down to the DNS rewrites section.
- Let’s say you have a Proxmox server at
192.168.1.10. In the “Domain” box, typeproxmox.lan. In the “IP address” box, type192.168.1.10. - Click Save.
Now, from any device on your network, if you type proxmox.lan into your browser, it will instantly resolve to your server. You can do this for all your services—plex.lan, homeassistant.lan, unifi.lan. It’s a massive quality-of-life upgrade for managing your homelab.
Summary and Call to Action
Running your own DNS server with AdGuard Home is a foundational homelab project. It immediately provides network-wide ad blocking, protects your family’s privacy from ISP snooping, and gives you the ability to create clean, memorable local domains for all your self-hosted services. It’s lightweight, easy to run via Docker, and packs a feature set that punches well above its weight class.
If you’ve been relying on your ISP’s default settings, it’s time to take back control of your network. Give AdGuard Home a spin on an old Raspberry Pi or a spare VM this weekend—you won’t regret it.
What about you? Have you made the switch to AdGuard Home, or are you still a die-hard Pi-hole fan? Let us know in the comments below what blocklists you’re using and how you’ve configured your local DNS rewrites!
If you found this guide helpful, make sure to hit that subscribe button on the Self-Hosted Tech YouTube channel and drop your email on the blog so you never miss a tutorial. Keep on hosting, and we’ll see you in the next one!