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.52 release.

  • 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.

  • STEP 11

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 12

Now create two new folders inside the adguard folder that you previously created at STEP 11 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 13

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 14

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 15

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 16

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 17

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

  • STEP 18

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 19

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 20

Click Next. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 14

  • STEP 21

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

Install AdGuard UGREEN NAS Set up 15

  • STEP 22

Click Next. Follow the instructions in the image below.

Install AdGuard UGREEN NAS Set up 16

  • STEP 23

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

Install AdGuard UGREEN NAS Set up 17

  • STEP 24

Type in your own Username and Password that you have previously created at STEP 21. 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 25

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 26

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 27

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 28

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 29

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 30

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 31

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 Thursday / July 11th, 2024 at 10:25 PM