Skip to content

AdGuard Home in Docker on a Synology NAS

Please note if you are using DSM7.2 or higher you should use the Container Manager version of this guide from the menu.
This guide has reached the end of its updates as most people are now on the latest DSM update - This guide is correct as of 08/12/2023 however no further updates will be added.
UpdateDate
Amended the path to save the compose file – this is for security, so the container has no access to the file contents.14/04/2023
Historic updates now at the end of the guide.


What is AdGuard Home?

AdGuard Home is a network-wide software for blocking ads and tracking. After you set it up, it’ll cover all your home devices it even includes a parental control solution, just like a PiHole it acts as your home network DNS server and will block advertising on any site you visit.

This guide will get you set up with AdGuard and cover some basic initial settings, I recommend checking out the documentation for all the various features available. Please note as DSM uses port 443 and 80 you will not be able to use DNS over HTTPS with this method. However, DNS over QUIC and DNS Crypt can be used in additional to standard DNS.

Let’s Begin

In order for you to successfully use this guide you will need to check that your Router allows you to change your network DNS servers, this is usually found in the DHCP settings. You will also want to make sure your NAS has an IP address manually assigned, so it doesn’t change.

Please follow the two steps below first and then come back here.

Downloading the AdGuard Image

Open up Docker within DSM and navigate to the ‘Registry’ section and search for ‘adguard’ in the search box and download the ‘adguard/adguardhome’ version

The pop-up box will ask which version you want to download, make sure you choose ‘Latest’ from the list of available versions.

You can check the status of the download over on the ‘Image’ tab.

Setting up the container

In Docker click on the ‘Image’ tab, in the list of your containers select the ‘Adguard’ image and click on ‘Launch’

You will be greeted with the Network screen, we will be using the same network as Docker Host – this will allow AdGuard to see all the IPs of your devices allowing you to use the parental controls for specific IPs

General Settings

Next you will see the General Settings screen, this is where you can start specifying some of your preferences.

You can change the name of the container to anything you like, and you may want to enable Auto Restart as this will ensure AdGuard starts automatically if you reboot your NAS.

You will also notice a Configure capabilities button — don’t change anything in here!

Believe it or not we don’t have anything else to do on this screen as no additional variables are required!

Click ‘Next’

Volume Settings

We can now specify where AdGuard will store its configuration files.

Click on ‘Add Folder’, select the ‘docker’ share and create a new sub-folder called ‘adguard’ then repeat this creating two additional subfolders called ‘work’ and ‘conf’.

It should look like the screenshot below.

Now we will add these folders to the container. First select the ‘conf’ folder and click ‘Select’ this will add it to the list of folders shown in the Docker UI, click Select Folder again and then select the ‘work’ folder.

It should now look like the screenshot below:

Next we are going to map these folders to paths inside the container, the table below shows the paths to use, you can copy and paste the ‘Mount Path’ in line with the screenshot.

File/FolderMount path
/docker/adguard/conf/opt/adguardhome/conf
/docker/adguard/work/opt/adguardhome/work

Click next to go to the final screen.

Summary

You have now completed the setup of the container.

You will be shown an overall summary of the settings we have specified, this is a good time to double-check everything is correct. Finally, click on Done and the container should start to boot.

You should now be able to access the web interface via the IP of your NAS followed by the port 3000

e.g. 192.168.0.30:3000

Initial Setup

You will now do some initial setup steps, Step 1 – click ‘Get Started’

Step 2 – You will be asked to choose the network interfaces AdGuard will listen to for DNS requests and the Web Interface. Leave these set to ‘All Interfaces’ but change the Port for the Web Interface from 80 to 3000.

(Ignore the IP addresses shown on this screen as they are the internal Docker IPs)

Click ‘Next’

Step 3 – You will be required to set up a Username and Password to access the Web UI. Fill these in (You could follow the Vaultwarden guide to get a password manager setup if you don’t have one already)

Step 4 – You can now configure your devices to use AdGuard Home – This is the point where you will need to check your Router documentation on how to change the DNS server settings.

Do not use the IP addresses shown on this screen it will be the IP address of your NAS. If your router has more than one DNS server section fill in both with the same IP otherwise your ad blocking will not always work.

Click on Open Dashboard and you will be taken to the login screen.

Now log in to your account.

Once your devices start to update with the new DNS server IP you will begin seeing traffic in your Dashboard. (This can take up to 24 hours)

From here you can set up some initial settings such as additional ‘Filters’ (blocklists) or define additional upstream DNS providers who handle the requests that make it past the filters in Settings > DNS Settings.

More settings can be found here

You are ready to roll 🙂


Historic UpdatesDate
New guide Published31/12/2022
Guide was briefly pulled to move the container to host mode to allow for each device IP to be seen04/01/2023
Compose version number removed09/04/2023
Historic Updates

Looking for some help, join our Discord community

If you are struggling with any steps in the guides or looking to branch out into other containers join our Discord community!

Buy me a beverage!

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running things or just lets me stay hydrated. Plus 10% goes to the devs of the apps I do guides for every year.

Published inAd-Blocking / DNS 7.1DockerSearch / Indexers 7.1Synology

22 Comments

  1. Nick Nick

    Great guide. I’ve got everything working. However, I do want to know if it’s possible to encrypt DNS queries. I’m trying to prevent DNS leaks.

  2. Dr_Frankenstein Dr_Frankenstein

    I see I have not seen it done via that method before, I will have a read. Give it a go and report back.

    • Dr_Frankenstein Dr_Frankenstein

      You can, but either this or pihole would need to be on another device. The only way to have both in Docker on dsm is to enable macvlan support which would allow for one of them to be on their own ip address. This is out of the scope of these guides and unless you know what you are doing I wouldn’t try it without learning a bit more about docker networking.

  3. Rob Rob

    Hey nice guide thank you, but there is a discrepancy in Step 3 – Setting Up a Docker Bridge Network

    The line “Then select ‘IP Range’ and enter ‘172.20.0.1’ in ‘From:’ and ‘172.20.255.255’ in ‘To:’”

    This doesn’t match the screenshot, which shows the To: as 172.20.255.254.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

drfrankenstein.co.uk – writing Synology Docker Guides since 2016 – Join My Discord!