AdGuard Home — Self-Hosted DNS Ad Blocker Setup

AdGuard Home is a network-wide DNS ad blocker that you run on your own hardware. It blocks ads, trackers, and malicious domains for every device on your network. It is similar to Pi-hole but with a modern web interface, built-in DHCP server, and support for encrypted DNS protocols.

AdGuard Home is written in Go, which means it is a single binary with no dependencies. You download it, run it, and it works. It runs on Linux, Windows, Mac, and even ARM devices like Raspberry Pi. The setup process takes about five minutes.

How AdGuard Home Works

AdGuard Home acts as a DNS server on your network. Devices send their DNS queries to AdGuard Home instead of your router or ISP. AdGuard Home checks each domain against its filtering rules. If the domain matches a blocklist, AdGuard Home returns a blocked response. If not, it forwards the query to an upstream DNS resolver.

The filtering engine supports multiple rule formats. You can use AdGuard's own filter lists, Pi-hole-compatible lists, or custom rules. The engine also supports DNS rewrites, which let you map domains to specific IP addresses. This is useful for local development or blocking specific domains.

AdGuard Home's query log is searchable and filterable. You can see every DNS query made on your network, whether it was blocked or allowed, and which device made the query. This visibility is incredibly useful for debugging and understanding what your devices are doing.

How to Install AdGuard Home

Download the latest release from the AdGuard Home GitHub repository. There are pre-built binaries for Linux, Windows, Mac, and various architectures. For Linux on a Raspberry Pi, choose the linux_arm download.

Extract the archive and run the installer: sudo ./AdGuardHome -s install. The installer asks a few questions: which port to listen on, what web interface port to use, and which upstream DNS servers to use. Accept the defaults for most options.

After installation, access the web interface at http://<your-server-ip>:3000. The setup wizard guides you through the initial configuration. Set up an admin account, configure your upstream DNS servers, and enable the filtering rules you want.

Configure your router to use AdGuard Home as the DNS server. Set the DNS server address to your AdGuard Home server's IP. After saving, all devices on your network start using AdGuard Home for DNS resolution.

AdGuard Home vs Pi-hole

AdGuard Home and Pi-hole solve the same problem but have different strengths. AdGuard Home has a more polished web interface with built-in graphs, statistics, and configuration options. Pi-hole's interface is functional but dated.

AdGuard Home supports DNS over HTTPS and DNS over TLS natively. You can use it as an encrypted DNS server without additional software. Pi-hole requires additional configuration or a separate tool like Stubby for encrypted DNS.

AdGuard Home is easier to install. It is a single binary with no dependencies. Pi-hole requires a LAMP stack or at least a web server and PHP. AdGuard Home updates itself from the web interface. Pi-hole updates via command line.

Pi-hole has a larger community and more third-party blocklists. The community around Pi-hole is older and more established. AdGuard Home's blocklist ecosystem is smaller but growing. Both projects are actively maintained and work well.

Encrypted DNS with AdGuard Home

AdGuard Home can act as a DNS-over-HTTPS and DNS-over-TLS server. This lets you use your own encrypted DNS server from anywhere on the internet. You can configure your phone to use your home AdGuard Home server even when you are away from home.

To enable encrypted DNS, you need a domain name and a valid SSL certificate. AdGuard Home can obtain a Let's Encrypt certificate automatically. Configure the DNS-over-HTTPS and DNS-over-TLS settings in the encryption settings section of the web interface.

Once configured, you can point your devices to your AdGuard Home server using the encrypted DNS address. Android's Private DNS feature works with AdGuard Home's DNS-over-TLS. iOS and macOS support DNS-over-HTTPS with configuration profiles.

For more on encrypted DNS, see our guides on DNSCrypt and Stubby.

Optimizing AdGuard Home

Enable caching to improve performance. AdGuard Home caches DNS responses by default. Increase the cache size if you have enough RAM. A larger cache means more queries are answered from cache without going to the upstream resolver.

Use parallel upstream DNS queries. AdGuard Home can query multiple upstream DNS servers simultaneously and use the fastest response. This reduces resolution time when one upstream server is slow. Enable this in the DNS settings.

Configure access control to limit which devices can use AdGuard Home. By default, it responds to queries from any device on your network. You can restrict it to specific IP ranges or require authentication for certain clients.

Monitor the query log regularly. Look for unexpected domains being queried by devices on your network. This can reveal malware infections, unauthorized tracking, or misconfigured applications. The query log is one of the most valuable features of running your own DNS server.