How to Install AdGuard on Your UGREEN NAS

How to Install AdGuard on Your UGREEN 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 UGREEN 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 UGREEN NAS device using Docker & Portainer.

šŸ’”Note:Ā This guide works perfectly with the latest AdGuard Home v0.107.55 release.

šŸ’”Note: Check out my new guide on how to Install AdGuard on Your Synology NAS.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Go toĀ Control Panel, then click on the Terminal icon. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 1

  • STEP 3

Check the Enable box to Enable the SSH service on port 22, then click Apply. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 2

  • STEP 4

Now open the Windows Command Prompt Client. Search for command prompt on your Windows PC. Follow the instructions in the image below. You can also use the PuTTY Client or Mac Z Shell (Client) if you are a Mac user.

Install AdGuard UGREEN NAS Set up 3

  • STEP 5

On Windows 10 or 11, open Command Prompt or use PuTTY or Mac Z Shell and type in ssh yourUGREENASusername@yourUGREENASip -p22 then press Enter on your keyboard. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 4

  • STEP 6

In Command Prompt, the message “Are you sure you want to continue connecting (yes/no)?” can sometimes appear. Type yes and then press Enter on your keyboard. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 5

  • STEP 7

After you press Enter, you will be prompted to type in your UGREEN NAS password. Type it in, then press Enter on your keyboard. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 6

  • STEP 8

Now type in:

sudo -i

Press Enter. After you press Enter, you will be prompted to type in your UGREEN NAS password. Type it in, then press Enter on your keyboard. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 7

  • STEP 9

Now type in:

sudo killall dnsmasq

Press Enter. After you press Enter, the dnsmasq service will be deactivated on your UGREEN NAS which will allow you to unlock port 53. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 8

  • STEP 10

InstallĀ Portainer using my step by step guide. If you already have Portainer installed on your UGREEN NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 11

Add Read & Write Permissions to the Docker Folder. If you have already added the Read and Write Permissions to the Docker Folder, skip this STEP.

  • STEP 12

Go toĀ File Manager 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.

Install AdGuard UGREEN NAS Set up 1 Folder Name

  • STEP 13

Now create two new foldersĀ inside the adguard folder that you previously created at STEP 12 and name them config and data. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Install AdGuard UGREEN NAS Set up 2 Folder Name

  • STEP 14

Log into Portainer using your username and password. On the left sidebar in Portainer, click on StacksĀ thenĀ + Add stack. Follow the instructions in the image below.

UGREEN NAS Portainer Add Stack

  • STEP 15

In the Name field type in adguard. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.9"
services:
  adguard:
    image: adguard/adguardhome
    container_name: AdGuard
    mem_limit: 2g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    restart: on-failure:5
    network_mode: host
    volumes:
      - /volume1/docker/adguard/config:/opt/adguardhome/conf:rw
      - /volume1/docker/adguard/data:/opt/adguardhome/work:rw
    environment:
      TZ: Europe/Bucharest

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

Install AdGuard UGREEN NAS Set up 9

  • STEP 16

Scroll down on the page until you see a button namedĀ Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Install AdGuard UGREEN NAS Set up 10

  • STEP 17

If everything goes right, you will see the following message at the top right of your screen: ā€œSuccess Stack successfully deployedā€œ.

Install AdGuard UGREEN NAS Set up 11

  • STEP 18

Go back toĀ STEP 1Ā or you will deal with karma šŸ™‚

  • STEP 19

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://ugreennas-ip-address:3000 Click Get Started. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 12

  • STEP 20

Change the default port 80 to 9080 then scroll down the page.Ā Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 13

  • STEP 21

Click Next. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 14

  • STEP 22

Add your own Username and Password then click Next. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 15

  • STEP 23

Click Next. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 16

  • STEP 24

Click Open Dashboard. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 17

  • STEP 25

Type in your own Username and Password that you have previously created at STEP 22. Click Sign in. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 18

Your AdGuard Dashboard at a glance!

Install AdGuard UGREEN NAS Set up 19

  • STEP 26

On your Windows 11 Desktop PC search for Settings. Once you find it, click Open. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 20

  • STEP 27

On the left sidebar click Network & Internet. Select your Ethernet connection, then click the little arrow. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 21

  • STEP 28

Scroll down until you find the option “DNS server assignment“. Click Edit. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 22

  • STEP 29

Edit DNS settings. Instead of Automatic DHCP, choose Manual. Turn ON IPv4. Add your UGREEN NAS local IP then click Save. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 23

  • STEP 30

From now on your PC will be automatically protected from ads by AdGuard. Start surfing the Internet via a web browser and you will see the number of blocked queries rapidly increasing in the graph. You can also activate Dark Mode on AdGuard. At the end of the page, click the Dark icon to switch the theme to Dark Mode. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 24

  • STEP 31

Go toĀ Control Panel, then click on the Terminal icon. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 1

  • STEP 32

Uncheck the Enable box on port 22, then click Apply. Follow the instructions in the image below.

UGREEN NAS Portainer Turn OFF SSH

Enjoy AdGuard on Your UGREEN NAS!

šŸ†˜TROUBLESHOOTING

Note: DNS Server Error message: listen udp 0.0.0.0:53: bind: address already in use. In this scenario, something else is listening on the local DNS port 53. Since there is no option to disable the DHCP Server on your UGREEN NAS via Control Panel, it’s mandatory to disable the dnsmasq service as I explained in this article from STEP 2 to STEP 9. Every time you restart your UGREEN NAS, you need to redo STEP 2STEP 9 to make AdGuard to run again. Right now, UGOS PRO is still in beta and there is no option to disable the DHCP Server via control panel. This is why STEP 2 STEP 9 is necessary. I am confident there will be an option to disable the DHCP Server once UGOS PRO is out of beta. You can also permanently stop dnsmasq by using the following command: @reboot /usr/bin/killall dnsmasq or just use AdGuard with Macvlan.

Install AdGuard UGREEN NAS Set up 25

This post was updated on Wednesday / December 11th, 2024 at 11:59 PM