Install Unifi Network Controller on Synology

In this blog I will show how to setup Unifi Network Controller as a container in Docker on a Synology Nas. To perform this setup you need to install Docker on your NAS. Not all Synology Diskstations support Docker check here which models support Docker.

Updated 28-12: Updated screenshot step 10, port 10001 was missing in the screenshot.

1. Login at your Synology Diskstation and start “Docker”. Select “Registry” and enter “unifi” in the searchbox and press “Search”. In the results rightclick “jacobalberty / unifi” and select “Download this image”

 

2. Select in the popup the Tag “latest” and press “select”

 

3. Select “Image” on the left and wait for the image to be downloaded. When the disk image on the right stops blinking and become blue the image has downloaded.

 

4. Select the “image” you just downloaded and press the “Launch” button.

 

5. Enter a name for the Container (eg Unifi), check the box resource limitation and press the button “Advanced Settings”.

 

6. On the “Advanced Settings” Tab select “Enable auto-restart” so the container will automatically start when the Synology Diskstation is started (for example after a reboot).

 

7. Select the “Volume” tab and press the button “Add Folder” to add a volume for the docker container to save data.

 

8. Create a folder “unifi” in the docker folder. This folder will be used to store the configuration of the Unifi Controller. AFter creating select the folder and press “Select”

 

9. In “Mount path” enter the value “/unifi” to mount the folder in the docker container with the name “unifi”

 

10. In the tab “Port Settings” copy the “Container Port” values to the “Local Port” values. (You can also select “Use the same network as Docker Host” in the “Network” tab, but this way port numbers which are in use can be changed)

 

11. Finally in the “Environment” tab change the values for “BIND_PRIV” (enable binding to ports less than 1024) and “RUNAS_UID0” (run as root user) to “false” and press “Apply”.

 

12. On the “General Settings” page press “Next” to continue.

 

13. On the “Summary” page check the box “Run this container after the wizard is finished” and press “Apply”.

 

14. Select “Container” on the left it will take a few minutes to start. (On my DS918+ it takes about 2 minutes)

15. Now we need to open the ports on the firewall. In DSM go to “Control Panel” -> “Security” -> “Firewall”. Select your active firewall profile and press “Edit Rules”

 

16. In “Edit Profile” windows select “Create”. In the Create Firewall Rules window select “Custom and press the button “Custom”.

 

17. Add the following TCP ports: “8080,8443,8843,8880,6789” and press two times “OK” to close.

 

18. In “Edit Profile” windows select “Create”. In the Create Firewall Rules window select “Custom and press the button “Custom”.

 

19. Now add the UDP ports. Select “UDP” and enter the ports “3478,10001” and press 3 times  “OK”

 

20. You should see the following popup “Firewall settings have been saved successfully” press “OK” to continue. The Unifi Controller should now be accessible if not you may want to reboot your Synology NAS.

 

21. Open a browser and enter “https://<SYNOLOGY_IP>:8443 to follow the steps to configure your Controller or restore a backup of an existing configuration.

 

For more info about the configuration go to the docker page https://hub.docker.com/r/jacobalberty/unifi

9 thoughts on “Install Unifi Network Controller on Synology

  1. Kevin Hovoet

    I don’t know about you, but I had to add port UDP/10001 also in the port settings in docker or the server couldn’t discover any new Ubiquity device.

    Reply
    1. Lexx

      It wasn’t just missing in the screenshot, it is actually missing in that container configuration right from Docker Hub. That seems like a container configuration bug, present even now as of the date of this post. It was critical for me to recognize and adopt devices on the network.

      And thank you for a great tutorial!

      Reply
  2. Filip

    Hi Aad,

    When I set the environment variable RUNAS_UID0 to FALSE then I cannot contact the controller, If I switch it to TRUE the controller functions correctly. I switched of the synology firewall to rule out interference there.
    Adding the variable USER with value unify doesn’t help either.
    What could be the cause?

    Kind regards,

    Filip

    Reply
    1. Aad Lutgert Post author

      Hi Filip,

      Did you configure in “Settings -> Controller” the following settings:

      Controller Hostname/IP:
      Override inform host with controller hostname/IP: Enable
      Make controller discoverable on L2 network: Enable

      This should fix the issue.

      best regards, Aad

      Reply
  3. Steffen Holzt

    Hi, I am coming from an outside IP and I configure the docker and container, also added the port 10001. When I configure all this it shows my public IP (add the start-age on my desktop). Then on my firewall I Nat the port 8443 to my DS, however when I run the setup it does not find any devices. It might look on the outside IP/24 and not on the 192.168.2.0/24 which is the LAN. Any suggestions ?

    Reply
  4. Robert

    Hi Aad;
    Thankyou for putting this guide together, absolute breeze following your instructions.
    Regards;

    Rob

    Reply

Leave a Reply

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