Reply
Highlighted
New Member
Posts: 7
Registered: ‎08-01-2016
Kudos: 3

Running Ubiquiti UniFi controller in Docker on Synology NAS

Posted a quick blog post on how to run the Ubiquiti UniFi controller in Docker using a Synology NAS. Hope this might help someone.

 

https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/

New Member
Posts: 33
Registered: ‎03-23-2016
Kudos: 7
Solutions: 2

Re: Running Ubiquiti UniFi controller in Docker on Synology NAS

worked for me as expected

 

1. install as described

2. restore from autobackup

3. reassigned port 8080 for autoprovisioning

4. FINALLY throw away that cloudkey

 

thx

New Member
Posts: 4
Registered: ‎10-17-2016

Re: Running Ubiquiti UniFi controller in Docker on Synology NAS

Hi, thanks for doing this!

So, I'm finding that I can't get my AP to register. Obviously I moved from a controller on another device to the docker image on my NAS. The easiest thing seemed to be to restore from a backup. After not being able to connect to the device, i 'forgot' it, then reset it. I can ssh to the AP, and the synology and AP can ping bidirectionally. Thus, I suspect the port isn't open, and it looks like port 8080 *ought* to be the culprit. I'm not seeing the AP show up in my device list still, and I did hard set 8080's mapping ot 8080 (using the Synology Docker app GUI). 

If I run an NMAP against the syno, it yields:
"8080/tcp  filtered http-proxy"

and as I said, the docker container settings show 8080 -> 8080.

Sooo, any ideas? I see @elmcrest did osmething with 8080.. 

New Member
Posts: 4
Registered: ‎10-17-2016

Re: Running Ubiquiti UniFi controller in Docker on Synology NAS

OK, so controller migration just isn't that reliable. I deleted the image and the contents of the preferences directory and rebuilt it and managed to discover it fine.

The backup thing is overrated. It's so easy to do a basic config with the wizard.

New Member
Posts: 2
Registered: ‎12-27-2017
Kudos: 2

Re: Running Ubiquiti UniFi controller in Docker on Synology NAS

I have written down how to do it manually from the Synology NAS GUI, DSM 6.2-23739 Update 2:

 

Prerequisite: A place on your NAS to place your Unifi data files. I created a share named /Docker/unifi/.

1. Make a manual backup of your Unifi Controller: Unifi controller interface/settings/Maintenance/Backup.
2. Switch to Container and stop your Unifi Controller.
3. Under Docker/Container: Delete your Unifi Controller.
4. Under Docker/Image: Delete the image.
5. Under Docker/Registry: Download jacobalberty/unifi:latest.
6. Under Docker/Image: Launch the new Image.
7. Under Advanced settings, configure:
    

    • Advanced settings: Enable auto-restart.
    
    • Volume: Add folder: docker/Unifi (data path on your NAS, see prereq); mount path: /unifi/.
    
    • Port settings: Make local port the same as Container port.

8. Start the container.

9. Only the first time you upgrade: Restore from backup. After restore you should see data in the share you linked in step 7.

10. If something has gone wrong, you can always restore from your backup made in step 1.

 

If anything is confusing, please let me know.

Regular Member
Posts: 313
Registered: ‎04-22-2018
Kudos: 44
Solutions: 2

Re: Running Ubiquiti UniFi controller in Docker on Synology NAS

[ Edited ]

@jramskov 

 

Is there a reason you did not use Site Migration? Or does that not work when going from container to container?

 


AP AC LITE
UAP nanoHD (x2)
Edgerouter 4
New Member
Posts: 2
Registered: ‎12-27-2017
Kudos: 2

Re: Running Ubiquiti UniFi controller in Docker on Synology NAS

I'm pretty new to Unifi, so I don't know about site migration and how it works. This is just my own private network, so upgrading the controller is basically deleting the current one, install a new one and point it at the folder where the configuration and data is stored. Takes 5 minutes. I know it is certainly possible to make it al automatic, but I haven't bothered so far Man Happy

Reply