Setting Up AdGuard Home on a Raspberry Pi for Network-Wide Ad Blocking


AdGuard Home is a powerful network-wide ad and tracker blocker. By setting it up on a Raspberry Pi, you can block unwanted ads and trackers for all devices on your network.
This tutorial will guide you through installing and configuring AdGuard Home on a Raspberry Pi.



1. What You’ll Need


To get started, ensure you have the following:
  • A Raspberry Pi (any model with network capability).
  • A microSD card (8GB or larger).
  • An Ethernet connection or Wi-Fi access.
  • Basic knowledge of terminal commands.




2. Installing Raspberry Pi OS


  • Step 1: Use the Raspberry Pi Imager to flash Raspberry Pi OS onto your microSD card.
    TutorialNinja Image
  • Step 2: On the OS Customisation page, set the hostname to "adguard", set your local timezone, custom username/password and enable SSH under the Services tab
  • Step 3: Insert the microSD card into your Raspberry Pi and boot it up.
  • Step 4: Find out the IP address for your Raspberry Pi from either your Router/DHCP server or login to the Pi using the credentials previously set
    ip addr




3. Setting a Static IP on Raspberry Pi OS


AdGuard Home is a server so it needs a static IP address to function properly.
To configure a static IP, edit the DHCP client settings:

  • Step 1: Open the Network Manager CLI
    sudo nmtui
  • Step 2: Configure the IPv4 settings to an available IP on your network
  • Step 3: For our changes to take effect, you will need to restart the network manager.
    sudo systemctl restart NetworkManager




4. Installing AdGuard Home


  • Step 1: Open the terminal on your Raspberry Pi.
  • Step 2 (Using curl): Download the AdGuard Home installation script:
    curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
  • Step 2 (Using wget): Download the AdGuard Home installation script:
    wget --no-verbose -O - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
  • Step 2 (Using fetch): Download the AdGuard Home installation script:
    fetch -o - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

starting AdGuard Home installation script
channel: release
operating system: linux
cpu type: arm64
...........
2025/01/08 22:01:03 [info] AdGuard Home, version v0.107.55
2025/01/08 22:01:03 [info] service: control action: install
2025/01/08 22:01:06 [info] service: started
2025/01/08 22:01:06 [info] Almost ready!
AdGuard Home is successfully installed and will automatically start on boot.
There are a few more things that must be configured before you can use it.
Click on the link below and follow the Installation Wizard steps to finish setup.
AdGuard Home is now available at the following addresses:
2025/01/08 22:01:06 [info] go to http://127.0.0.1:3000
2025/01/08 22:01:06 [info] go to http://192.168.0.236:3000
2025/01/08 22:01:06 [info] service: action install has been done successfully on linux-systemd
AdGuard Home is now installed and running
you can control the service status with the following commands:
sudo /opt/AdGuardHome/AdGuardHome -s start|stop|restart|status|install|uninstall




5. Configuring AdGuard Home


Once the installation is complete, AdGuard Home will guide you through the initial configuration.

  • Open your web browser and navigate to http://<raspberry_pi_ip>:3000 (replace <raspberry_pi_ip> with your Raspberry Pi’s IP address).
  • Follow the on-screen setup wizard to configure admin credentials.

TutorialNinja Image



6. Setting AdGuard as Your DNS Server


To use AdGuard Home, you’ll need to point your devices or router to the Raspberry Pi’s IP address as the DNS server:
  • Log into your router’s admin panel.
  • Locate the DNS settings within the DHCP server settings (usually in the WAN or LAN section).
  • Set the primary DNS server to the Raspberry Pi’s IP address.
  • Save your settings and restart/renew IP leases your devices to apply the changes.




7. Testing and Managing AdGuard Home


  • Access the AdGuard Home dashboard at http://<raspberry_pi_ip>/ and log in.
  • Check the Query Log to see which domains are being blocked.
  • Customise blocklists, filters, and settings from the dashboard.

TutorialNinja Image



With AdGuard Home set up on your Raspberry Pi, you now have a network-wide ad-blocking solution.
Enjoy faster browsing speeds and enhanced privacy while reducing unwanted ads and trackers.
Experiment with additional settings and blocklists to tailor AdGuard to your needs.
DanielXP's Avatar
Author:
Views:
22
Rating:
There are currently no comments for this tutorial, login or register to leave one.