How to Install UniFi Network Controller on Your UGREEN NAS

How to Install UniFi Network Controller on Your UGREEN NAS

The UniFi Controller or Network Application is a wireless network management software solution from Ubiquiti Networks that supports the latest UniFi Network Application app. It allows you to manage multiple wireless networks using a web browser. This guide is fully compatible with theĀ latest Unifi Network Application 8.5.6. In this step by step guide I will show you how to Install the Unifi Network Application on your UGREEN NAS using Docker & Portainer.

šŸ’”Note:Ā This guide works perfectly with the latest Unifi Network Application 8.5.6 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

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 3

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 4

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

UniFi Network Controller UGREEN NAS Set up 1

  • STEP 5

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

UniFi Network Controller UGREEN NAS Set up 2

  • STEP 6

Download (click on the blue link below) then unzip and upload the init-mongo.js file below in the db folder that you have previously created at STEP 5. Follow the instructions in the image below. šŸ”’Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

šŸ‘‰šŸ»Download init-mongo.js

UniFi Network Controller UGREEN NAS Set up 3

  • STEP 7

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 8

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

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

version: "3.9"
services:
  db:
    image: mongo:7
    container_name: Unifi-Network-Application-Database
    hostname: unifi-db
    mem_limit: 2g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:false
    healthcheck:
      test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
      interval: 10s
      timeout: 10s
      retries: 5
      start_period: 20s
    volumes:
      - /volume1/docker/unifi/db:/data/db:rw
      - /volume1/docker/unifi/db/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
    restart: on-failure:5

  unifi-network-application:
    image: ghcr.io/linuxserver/unifi-network-application:latest
    container_name: Unifi-Network-Application
    hostname: unifi-network-application
    mem_limit: 4g
    cpu_shares: 1024
    security_opt:
      - no-new-privileges:false
    ports:
      - 8443:8443       # Required - web admin port
      - 3478:3478/udp   # Required - STUN port
      - 10001:10001/udp # Required - AP discovery
      - 8080:8080       # Required - Device communication
      #- 1900:1900/udp   # optional - controller discoverable on L2 network
      - 8843:8843       # optional - Unifi guest portal HTTPS redirect port
      - 8880:8880       # optional - Unifi guest portal HTTP redirect port
      - 6789:6789       # optional - For mobile throughput test
      - 5514:5514/udp   # optional - Remote syslog port
    volumes:
      - /volume1/docker/unifi/config:/config:rw
    environment:
      TZ: Europe/Bucharest
      PUID: 999
      PGID: 10
      MONGO_USER: unifiuser
      MONGO_PASS: unifipass
      MONGO_HOST: unifi-db
      MONGO_PORT: 27017
      MONGO_DBNAME: unifi
      MEM_LIMIT: 2048   # optional - Java memory limit
      MEM_STARTUP: 2048 # optional - Java initial/minimum memory
    restart: on-failure:5
    depends_on:
      db:
        condition: service_started

Note: After you paste the code in the Web editor, change the value for TZĀ (Select your current Time Zone from this list).
Note: Before you paste the code above in the Web editor area below, change the value numbers for PUID and PGID with your own PUID and PGID values. (Follow my step by step guide on how to do this.) 999 is my personal PUID value and 10Ā is my personal PGID value. You have to type in your own values.

UniFi Network Controller UGREEN NAS Set up 4 new 2025

  • STEP 9

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.

UniFi Network Controller UGREEN NAS Set up 5

  • STEP 10

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

UniFi Network Controller UGREEN NAS Set up 6

  • STEP 11

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

  • STEP 12

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:8080/setup You will be automatically redirected to an https 8443 port. If you are using the chrome browser, click Advanced. Follow the instructions in the image below.

UniFi Network Controller UGREEN NAS Set up 7

  • STEP 13

Click to Proceed to your local UGREEN NAS IP (unsafe). Follow the instructions in the image below.

UniFi Network Controller UGREEN NAS Set up 8

  • STEP 14

Select a name for the Server Controller and Country Region, then check “I agree with the user license and terms of service”. Click Next to start the installation wizard.

UniFi Network Controller UGREEN NAS Set up 9

Enjoy UniFi Network Controller on your UGREEN NAS!

Fix: Once you have installed Unifi Network Controller, go to Settings / System and scroll all the way to the bottom and enable “override inform host“, using the IP address of the UGREEN NAS as the value.

This post was updated on Friday / October 11th, 2024 at 10:11 PM