Protect your devices from internet threats with AdGuard Home on a Raspberry Pi

Learn how to install and configure AdGuard Home on your Raspberry Pi to keep your network safe from malware, ads, and tracking. …


Updated August 19, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


Learn how to install and configure AdGuard Home on your Raspberry Pi to keep your network safe from malware, ads, and tracking.

AdGuard Home is an open-source network-wide ad blocker and DNS server that helps protect your devices from online threats such as malware, advertisements, and tracking. In this article, we will guide you through the process of installing AdGuard Home on a Raspberry Pi and configuring it to work with your local network.

Prerequisites:

  • A Raspberry Pi (any model)
  • MicroSD card (8GB or larger) with Raspbian OS installed
  • Power supply for the Raspberry Pi
  • Ethernet cable
  • Monitor, keyboard, and mouse (optional)
  • Internet connection

Step 1: Update your Raspberry Pi

First, ensure that your Raspberry Pi is up-to-date by running the following commands in a terminal window or SSH session:

sudo apt update
sudo apt upgrade

This will download and install any available updates for your system.

Step 2: Install Docker

Docker is an application that simplifies the process of deploying, managing, and running applications on Raspberry Pi. To install Docker, run the following commands in a terminal window or SSH session:

curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi

After installing Docker, log out of your current session and log back in for the changes to take effect. You can verify that Docker is installed correctly by running docker --version.

Step 3: Install AdGuard Home

Now we will pull the AdGuard Home image from Docker Hub and run it as a container:

sudo docker pull adguard/adguardhome
sudo docker run -d --name adguardhome --restart always -v /opt/adguardhome:/opt/adguardhome -p 53:53/tcp -p 53:53/udp -p 80:80/tcp -p 80:80/udp -p 443:443/tcp -p 30000:30000/tcp adguard/adguardhome

This command will download the AdGuard Home image from Docker Hub, create a new container named adguardhome, and map the necessary ports for it to work. The -v flag creates a persistent data volume at /opt/adguardhome on your Raspberry Pi so that your configuration settings are not lost when you restart the container.

Step 4: Access AdGuard Home Web Interface

To access the web interface, open a web browser and navigate to http://<raspberry-pi-ip>:30000, replacing <raspberry-pi-ip> with your Raspberry Pi’s IP address or hostname. You should see the AdGuard Home login page. The default username is admin and the password is admin.

Step 5: Configure AdGuard Home

After logging in, you will be presented with a setup wizard that asks for your language, network configuration, and proxy settings. If you are using AdGuard Home as your primary DNS server on your local network, select “Use this device as a DNS server” and enter the IP address of your Raspberry Pi (e.g., 192.168.1.1).

You can also configure parental controls, safe search settings, and block ads or malware from specific sources. Once you’ve completed the setup wizard, AdGuard Home is ready to use!

Step 6: Configure Your Devices to Use AdGuard Home as DNS Server

To ensure that your devices use AdGuard Home for DNS resolution, log in to their network settings and change the DNS server IP address to the IP address of your Raspberry Pi. On most routers, you can do this by accessing the router’s admin interface and modifying the DHCP settings or by configuring each device individually.

That’s it! With AdGuard Home installed on your Raspberry Pi, you now have a powerful tool to protect your devices from internet threats. Remember to check the web interface periodically for updates and system logs. You can also configure additional features such as filtering by device or creating custom filters to block specific websites.

If you have any questions or run into issues during installation, feel free to ask in the comments section below. Happy blocking!