Getting Started With AdGuard Home On Raspberry Pi (vs Pi-Hole)


Recently, I came across AdGuard Home which is a network-wide ad blocker that looks a lot like Pi-Hole on the user end. I decided to test it, and was pretty amazed by the results, so I will share everything with you in this article.

AdGuard Home is an ad-blocking solution, available for Linux and Mac, and can also be installed on Raspberry Pi with only one command line. Then, a web interface will be used for the software configuration and monitoring.

I highly recommend you to at least test it by following the first part of the installation. Then I will show you a few things you can tweak in the configuration and will conclude with a quick comparison with Pi-Hole.

If you are looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge, where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.

How To Install AdGuard Home On Raspberry Pi

Download the Pi Glossary!
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!

AdGuard Home can be installed on any Linux distribution running on Raspberry Pi by using one command line.
Here are the required steps to get started with AdGuard Home:

  • Install any Linux distribution (Raspberry Pi OS Lite is a great choice).
  • Copy and paste the command line from their GitHub project.
  • Configure the DNS server on your computer to use AdGuard Home.

I will now explain each in detail to make sure everything is clear for you.

Prerequisites

AdGuard Home is installed with a simple command line, and don’t any desktop environment. So, if your primary goal for this Raspberry Pi setup is to use it as an ad-blocker, Raspberry Pi OS Lite will be a great choice. You can use any Raspberry Pi model you want, it’s probably a good job for the Raspberry Pi Zero 2.

Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I'm here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.

I have had Pi-Hole running on my Raspberry Pi Zero 1 for years. Perhaps the new model will upgrade it with a new software :-).

Anyway, the easiest way to flash your SD card, will be to use Raspberry Pi Imager on your computer:

  • Insert your SD card in your computer (use this USB adapter if you don’t have any SD card slot).
  • Install and start Raspberry Pi Imager.
  • In the OS selection, click on Raspberry Pi OS and pick the Lite version.
  • I also recommend enabling SSH at this step, it might be easier to do everything from your computer as there is no interface.
    Press CTRL+Shift+X to open the advanced options, and check “Enable SSH”. You can also set a custom password there.
  • Select your SD card (or USB stick) and click on Write to start the installation.

After a few minutes, your SD card should be ready to use. Insert it in your Raspberry Pi and login (pi / raspberry).
I have a detailed tutorial on how to install Raspberry Pi OS here, feel free to check it out if you are not yet familiar with this procedure.

AdGuard Home Installation

Connect to your Raspberry Pi with SSH (more details here), or continue directly on the Raspberry Pi screen.
As for any project, I recommend starting by updating your system, even if you just installed it.
Type these commands:
sudo apt update
sudo apt full-upgrade

A reboot then is probably a good idea, as these first updates often contain a new kernel:
sudo reboot

Are you a bit lost in the Linux command line? Check this article first, for the most important commands to remember, and a free downloadable cheat sheet so you can have the commands at your fingertips.

Then, you can run this command to install AdGuard Home on your system:
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
You can find all the details on their GitHub page if you need more or want to check the source code before using their script :-).

The installation is very fast, it shouldn’t ask anything, and will end like on the screenshot, giving you th eweb interface URL and the command line to manage the service.
If you want to stop, start or check the service status you can use these commands:

  • Stop AdGuard Home:
    sudo /opt/AdGuardHome/AdGuardHome -s stop
  • Start AdGuard Home:
    sudo /opt/AdGuardHome/AdGuardHome -s start
  • AdGuard Home status:
    sudo /opt/AdGuardHome/AdGuardHome -s status

As you’ll see, you can do everything from the web interface, so you shouldn’t need it, unless you installed it with other services and that there is a conflict. For example, Pi-Hole uses the same port as both act as a DNS server, so if you have Pi-Hole running, I suspect AdGuard Home won’t start.

AdGuard Home Configuration On Raspberry Pi

Once installed, AdGuard Home will start a web server and deliver a web interface for further configuration and service monitoring.

Web Interface

Head over to the URL given at the end of the installation to access the web interface. Most likely, it will be something like:
http://RASPBERRYPI_IP:3000

Master your Raspberry Pi in 30 days
Sale: 10% off today.
Download the eBook.
Uncover the secrets of the Raspberry Pi in a 30 days challenge.
Learn useful Linux skills and practice multiples projects.

If you used SSH, you already know the IP address. If not, you can check this article, or just type this command in your terminal:
ip a

When you access the URL for the first time, you’ll get an installation wizard:

It’s really short, the main goal is to create the username and password you’ll use to access the interface after that:

Try to use a strong password, even if you have a small network because anyone getting access to this can see everything you do on the Internet :-).
The wizard also gives you instructions for the clients configurations, we’ll see that just after.
Once done, you finally get access to the main dashboard, looking like this:

Clients Configuration

AdGuard Home is now installed, but it doesn’t change anything until your clients are using the Raspberry Pi as their main DNS server. AdGuard Home works like this:

  • Your computer does a DNS request to get the IP address of a domain (raspberrytips.com, ads.google.com, etc.).
  • AdGuard Home will either answer if it’s not blocked (raspberrytips.com), or block the traffic for domains hosting ads or malware (ads.google.com).

So, first, you need to tell your computer to use AdGuard Home as the primary DNS server.
You can see the instructions during the welcome wizard, or by clicking on “Setup Guide” in the web interface:

I recommend testing with one device first. For example, if your computer is on Windows, go to the Control panel, find Network and Internet settings, and change the DNS server for your current connection. On Windows 11, it looks like this:

If it’s working correctly and doesn’t block too much, you can then do the same thing on any device you want. But the easiest way to get a network-wide ad-blocker is to change your router configuration to use the Raspberry Pi as the main DNS server. This way, any device connected to your router will go through AdGuard Home.

Just don’t power off your Raspberry Pi after that, or everybody will lose Internet access :-).

Further Configuration

Master Python on Raspberry Pi
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.

The interface is then pretty intuitive, so I won’t be long here, but here is a quick overview:

  • Dashboard: The default page when you log in. You’ll get a general overview of the job AdGuard Home has been doing (DNS queries handled, and blocked). You can also see the top websites and clients. There is also a button “Disable Protection” on top, where you can temporarily disable everything (for example, to check if an issue you experience is due to AdGuard Home or not).
  • Settings:
    • General settings: Basic configuration. I think you’ll use it if you want to enable parental control or safe search. Except from that, the default values should be fine. Also, if using it in a company, make sure you have the permission to keep the logs for 90 days.
    • DNS settings: AdGuard Home uses Quad9 as the main DNS server by default. You can change it, or add some failover options if you want.
    • Encryption settings: Probably not the most useful for home usage. But it’s good to know that everything can be configured easily from there. It’s also on this page that you can change the default ports to avoid conflict (for example, if you host another web server or DNS server on the same Raspberry Pi).
    • Client settings: You can tweak the configuration a bit differently depending on each client. For example, to enable parental control on your daughter’s phone, but not on the other devices.
    • DHCP settings: If you want to use AdGuard Home as your DHCP server, you can enable it easily from there.
  • Filters: Choose the blocklists you use, and add some exceptions if needed. The updates are done automatically.
  • Query log: You’ll find here all the requests, and see what hapened for each of them. It’s great for debug purpose.
    You can also block/unblock domain from there.

If you are looking for more technical details on how to do specific things, I highly recommend checking the official Wiki. You can also ask questions directly on their GitHub project.

Thanks to all my Patrons for supporting me, helping me to keep doing this and producing even more tutorials for everyone! Thank you to everyone supporting me there.

Differences Between AdGuard Home and Pi-Hole

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

As a whole, both solutions work the same way, by blocking ads and trackers for the clients. There are some slight differences, like the default DNS servers they use (Quad9 vs Google) and the built-in technologies. AdGuard Home seems more state-of-art and intuitive than Pi-Hole.

First impressions

As I wrote in the introduction, there isn’t much of a difference for the end-user. You have your Raspberry Pi, with a DNS server running on it, and configure your client or router to use it. After that, a good percentage of ads will be blocked, and you have a web interface to see what happened and tweak the configuration.

I didn’t use AdGuard Home enough to give you a complete review, but there are some great points I notice:

  • Fastest installation: both are easy to install, but Pi-Hole installs many things during the installation script.
  • Cleaner interface: Pi-Hole interface is becoming a bit old-school. They never updated it, I think. Also, their interface is a bit overwhelming when you use it for the first time.
  • Different technologies: I’m not an expert, but it seems like AdGuard Home is further ahead on the technologies they use (coded in Go, HTTPS interface, DNS over HTTPS/TLS, etc.). I find this important for that kind of software.
  • Maybe limited in the configuration: It’s often like that. It’s either intuitive or complete (Retropie vs Recalbox ^^). I’m not sure if it’s possible to go as far as with Pi-Hole in the configuration details. But do we really need it?

At least, I’m convinced enough to try it a bit more, and replace Pi-Hole with AdGuard Home for a while to see how it goes. I will update this article if I change my mind. But for now, I recommend you to do the same thing. Test it for a few days/weeks and see how it goes.

AdGuard Home vs Pi-Hole: Comparison Table

FeatureAdGuard HomePi-Hole
InstallationEasy. A few seconds.Easy. A few minutes.
Web InterfaceYes. Modern and intuitive.Yes. A bit overwhelming (too many menus and options).
Cross-platformYesOnly with Docker.
Force safe search on search engines.YesNo
Parental controlYesNo
Blocking phishing and malware sites.YesNot by default, you need to add a specific blocklist.
HTTPS for the web interface.YesYou can configure it in Lighttpd.
DNS over HTTPS.YesNot by default.
Block ads on YouTube, Instagram, Facebook, etc.NoNo

AdGuard Home vs Pi-Hole: Video Comparison

If you want to learn more about Pi-Hole, and compare it to AdGuard Home, I have a complete article about it: Install Pi-Hole on Raspberry Pi (Free Ad Blocker in 15min).

Raspberry Pi Resources

Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.

Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.

VIP Community
If you just want to hang out with me and show your support, you can also join the Patreon community. I share behind-the-scenes content there and give you early access to my content. You’ll also get a shoutout when you join.
More details here.

Need help building something with Python?
Create, understand and improve any Python script for your Raspberry Pi.
Learn the essentials, step-by-step, without losing time understanding useless concepts.
Get the e-book now.

You can also find all my recommendations for tools and hardware on this page.


This tutorial doesn't work anymore? Report the issue here, so that I can update it!

5 1 vote
Article Rating

Patrick Fromaget

I'm the lead author and owner of RaspberryTips.com. My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
brad
brad
1 month ago

Is there a way to easily update the adguardhome on the rasberry pi? Official Github instructions has version 0.102.0 which is two years old and theres a new version out. I installed the old version unknowingly, and would like to update, but there is no documentations I am able to find to do it quickly. PiHole had pihole -up which was very simple.

Thanks

Recent Posts

Master your Raspberry Pi - 10% off