How to Install AdGuard on Your Synology NAS

How to Install AdGuard on Your Synology NAS

AdGuard is DNS ad blocking similar to Pi-Hole. It’s a privacy protection software which comprises open-source and shareware products that protect Microsoft Windows, Linux, OS X, Android and iOS users from unwanted ads, pop-ups, banners, as well as from tracking, obscene content, malware and phishing. Over 5 million people are reported to be using the software in 2018 and 7 million in 2019 with very fast growth. AdGuard is not only an ad blocker, but a whole ad blocking and privacy protection suite, a must-have product if you have a Synology NAS device. AdGuard Home intercepts and filters DNS requests. It works as a DNS server and prevents all the devices in a home network from connecting to the servers that track user browsing. In this step by step guide I will teach you how to install AdGuard on your Synology NAS device using Docker.

Note: This guide works perfectly with the latest AdGuard Home v0.106.3 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Docker via Synology “Package Center”.

Install Docker Synology DSM 7

  • STEP 3

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it adguard. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Adguard home Synology NAS Set up 1

  • STEP 4

Now create two new folders inside the adguard folder that you created at STEP 3 name one “config” and the other “data“. Follow the instructions in the image below.
Note: Be careful enter only lowercase, not uppercase letters.

Adguard home Synology NAS Set up 2

  • STEP 5

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.

Adguard home Synology NAS Set up 3

  • STEP 6

Once you click on User-defined script a new window will open. Follow the instructions below:

  1. General: In the Task field type in “Install Adguard“. Uncheck “Enabled” option. Select root User.
  2. Schedule: Select Run on the following date then select “Do not repeat“.
  3. Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that click OK.
docker run -d --name=adguard \
-e TZ=Europe/Bucharest \
-v /volume1/docker/adguard/config:/opt/adguardhome/conf \
-v /volume1/docker/adguard/data:/opt/adguardhome/work/data \
--net=host \
--restart always \
adguard/adguardhome

Note: Before you paste the code above in the Run command area, change the value for TZ (Select your current Time Zone from this list).

Adguard home Synology NAS Set up 4

  • STEP 7

After you click OK on STEP 6 a new warning pop up window will open. Click OK.

Adguard home Synology NAS Set up 5

  • STEP 8

After you click OK on STEP 7, select your “Install Adguard” Task then click the “Run” tab. You will be asked to run Install Adguard – click Yes. Follow the instructions in the image below.

Adguard home Synology NAS Set up 6

  • STEP 9

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 10

The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser and type in http://Synology-ip-address:3000 Install and Set it up according to your preference.

Adguard home Synology NAS Set up 7

Enjoy Adguard!

Adguard home Synology NAS Set up 8

Adguard view from IPAD.

Adguard home Synology NAS Set up 9

Note: I installed the AdGuard container on my Synology NAS DS1621xs+
Note: Admin Web Interface Error message: Listen tcp 0.0.0.0:80 bind: address already in use. This means that something on your system probably a web server like Apache already listening on port 80.

Adguard home Synology NAS Set up 9

You can solve it by changing port from 80 to 8080. Follow the instructions in the image below.

Adguard home Synology NAS Set up 10

Note: DNS Server Error message: listen udp 0.0.0.0:53: bind: address already in use.

port 53 DNS Adguard already in use

In this Scenario something else is listening to the local DNS port 53 or AdGuard Home doesn’t have privileges. Try to disable DHCP on your Synology NAS with DSM 6.2.4 Control PanelDHCP Server then select “Disable DHCP Server” or if you running on DSM 7 uninstall DHCP Server package. Now try again to open AdGuard Home. If this work, don’t miss to go back on STEP 1.

Note
: Find out how to update AdGuard container with the latest image.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Free Disk Space on Your NAS if You Run Docker.

This post was updated on Thursday / September 2nd, 2021 at 3:16 AM