AdGuard on the Raspberry PI

How to Install AdGuard Home on a Raspberry Pi


1. SSH into your Raspberry Pi. When you SSH in, run the commands below. These commands will get the latest version of AdGuard Home, extract the archive and silently install it. The install file is found on the official AdGuard Home github page.

wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_arm.tar.gz

sudo tar xvf AdGuardHome_linux_arm.tar.gz

cd AdGuardHome

sudo ./AdGuardHome -s install

That’s it! Access AdGuard Home using the IP address of your Raspberry Pi and port 3000.


http://[IP_ADDRESS]:3000

Here you can make an administration account to administer the AdGuard and where you can add or delete blocking repositories.



The raspberry PI needs an static IP address. You can set that in the FritzBox router easily.

Then you need to set the DNS servers. On the fritzbox there are two pages where you need to do that.

Internet --> Toegangsgegevens

on this page enter the IP address of your raspberry PI in both IPv4 and IPv6 The servers and the alternative server are the same on IPv4 and on IPv6.

Thuisnetwerk --> Netwerk --> IP adressen --> IPv4 instellingen

On this page enter the IPv4 adress of the raspberry PI at "Lokale DNS server"

Thuisnetwerk --> Netwerk --> IP adressen --> IPv6 instellingen

On these page you enter at "lokale DNS server in thuisnetwerk the IPv6 address of the raspberry PI.

These pages determine the DNS servers adresses the router is pushing to connected devices.


Sometimes you need to recvonnect a device in order to get the connection data working.

Updating the AdGuard

Sometimes AdGuard needs to be updated. It is easy from a terminal on the raspberry PI itself.

First logon to the Raspberry PI. Then download the newest release of AdGuard from this site:

https://github.com/AdguardTeam/AdGuardHome/releases

For the Raspberry PI 4 I use

AdGuardHome_linux_arm64.tar.gz

Download the new AdGuard Home package from the releases page. If you want to perform this step from the command line:


curl -L -S -o '~/Downloads/AdGuardHome_linux_arm64.tar.gz' -s\ 'https://static.adguard.com/adguardhome/release/AdGuardHome_linux_arm64.tar.gz'

Untar it in ~/Downloads


Navigate to the directory where AdGuard Home was installed. On most Unix systems the default directory is /opt/AdGuardHome
Stop AdGuard Home:

sudo ./AdGuardHome -s stop

Now your DNS servers is offline and you cant visit any website anymore till your DNS server is running again. If something goes wrong, login into your router and restore the DNS server of your Internet Service provider to be able to visit websites again.

Backup your data. That is, your configuration file and the data directory (AdGuardHome.yaml and data/ by default). For example, to backup your data to a new directory called ~/my-agh-backup:

mkdir -p ~/my-adguardhome-backup

cp -r ./AdGuardHome.yaml ./data ~/my-adguardhome-backup/

(Add ./leases.db if it is present.)

Unpack the AdGuard Home archive to a temporary directory. For example, if you downloaded the archive to your ~/Downloads directory and want to unpack it to /tmp/:

tar -C /tmp/ -f ~/Downloads/AdGuardHome_linux_amd64.tar.gz -x -v -z

Replace the old AdGuard Home executable file with the new one. On most Unix systems the command would look something like:

sudo cp /tmp/AdGuardHome/AdGuardHome /opt/AdGuardHome/AdGuardHome


You can now remove the temporary directory.

Restart AdGuard Home:

sudo ./AdGuardHome -s start