You are on page 1of 9

24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor

Running Ubiquiti UniFi controller in Docker on Synology NAS


September 13, 2016 | Synology (https://miketabor.com/category/synology-2/) | 27 comments

Recently I posted how to run the Ubiquiti UniFi Controller in the cloud (https://miketabor.com/install-ubiquiti-uni -
controller-cloud/) using services like Linode (//miketabor.com/links/linode/), Vultr (//miketabor.com/links/vultr/),
or DigitalOcean (//miketabor.com/links/digitalocean/). However, a few people has asked if I could post
instructions on how to run the UniFi controller in Docker, similar how I have CrashPlan
(https://miketabor.com/run-crashplan-docker-synology-nas/) running in Docker.

For the steps below I’ll be using my Synology DS1815+ NAS (https://miketabor.com/links/ds1815+/) which is
compatible to run Docker. If you’re unsure if your model support docker or not you can check here
(https://www.synology.com/en-us/dsm/app_packages/Docker).

How to install Ubiquiti UniFi Controller in Docker on Synology NAS

I’ll assume your Synology NAS does support Docker and you’ve already installed the Synology Docker app on
your Synology NAS.

1. SSH into your Synology NAS (https://miketabor.com/links/ds1815+/) using PuTTy or other terminal of your
choice, login using your account with admin access.

2. First lets create a new folder called “uni ” located in “docker“, this will be used to store all our UniFi
Controller con gs, so when we upgrade the Docker container our con gs remain in place. (Replace volume1
with your desired volume)
mkdir /volume1/docker/unifi

(https://miketabor.com/wp-content/uploads/2016/09/01-uni -controller-docker-synology-create-folder.png)

3. Now lets pull, or download, the UniFi Controller Docker container from the Docker Hub by typing the
following command:
sudo docker pull jacobalberty/unifi:latest

https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 1/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor

(https://miketabor.com/wp-content/uploads/2016/08/docker-pull-uni -controller.png)

4. Next lets run the new UniFi Controller container by typing the following, again replacing ‘volume1‘ with the
volume you create the uni folder on.
sudo docker run -d --name=unifi-controller --net=host --volume=/volume1/docker/unifi:/var/lib/unifi -p 8080:8080/tcp -p 8081:80

(https://miketabor.com/wp-content/uploads/2016/09/04-uni -controller-docker-synology-run-container.png)

5. Now nally, open a web browser and go to: https://<SYNOLOGY_IP>:8443

Con guring Ubiquiti UniFi Controller in Docker

Now we’ll just need to nish the UniFi controller setup by following the wizard once you’ve loaded
https://<SYNOLOGY_IP>:8443 in your browser from the above steps.

1. First, set your country and timezone then click Next.

https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 2/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor

(https://miketabor.com/wp-content/uploads/2016/09/uni -controller-setup-step-1.png)

2. The UniFi controller will automatically nd any access points on the same network, select the access point
you’d like to con gure for the Docker UniFi controller to manage and click Next.

(https://miketabor.com/wp-content/uploads/2016/09/uni -controller-setup-step-2.png)

3. Enter the SSID you’d like your wireless network to be named and a password then click Next.

(https://miketabor.com/wp-content/uploads/2016/09/uni -controller-setup-step-3.png)
Optionally, you can also con gure a guest wireless as well by checking the “Enable Guest Access”.

4. Now set the login user and password. This will be used to access the Docker UniFi Controller management
page. Then press Next.

(https://miketabor.com/wp-content/uploads/2016/09/uni -controller-setup-step-4.png)

https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 3/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor

5. Finally, review that the SSID and User names both look correct then press Finish.

(https://miketabor.com/wp-content/uploads/2016/09/uni -controller-setup-step-5.png)

Once the wizard has completed your Ubiquiti access point will be adopted, con gured and ready to connect to
from any of your wireless devices.

It is a good idea to log into the UniFi Controller management page (https://<SYNOLOGY_IP>:8443) and check the
rmware status of the access point. As shown below the access point is still functioning but also showing us
that a upgrade for the access point is available. Simply click on the “Upgrade” link and the UniFi controller will
automatically upgrade it within just a few minutes.

(https://miketabor.com/wp-content/uploads/2016/09/uni -controller-setup-step-6.png)

The bene ts of running the Ubiquiti UniFi controller in Docker on the Synology NAS is that it’s free (if you already
own the Synology NAS) and super simple to setup. Depending on your Synology specs, such as a Synology
DS1815+ (https://miketabor.com/links/ds1815+/), you could easily manage several access points and sites
using the docker UniFi controller and upgrading to 16GB RAM (https://miketabor.com/how-to-upgrade-synology-
ds1815-16gb-ram/) will certainly help with resources.

I still prefer hosting my UniFi Controller in the cloud (https://miketabor.com/install-ubiquiti-uni -controller-cloud/)


using Linode (//miketabor.com/links/linode/), Vultr (//miketabor.com/links/vultr/), or DigitalOcean
(//miketabor.com/links/digitalocean/) if only for the fact my UniFi controller isn’t tied to my home/business
network. Which means I’ll get email noti cations if an access point goes o ine. An important function for me as
I manage several access points for other places and people.

Otherwise, if you are looking for a great solution for your home or business then the UniFi Controller in Docker is
perfect t!

https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 4/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor

Tags: NAS (https://miketabor.com/tag/nas/), Ubiquiti (https://miketabor.com/tag/ubiquiti/), UniFi


(https://miketabor.com/tag/uni /)

Share This Post:

 (http://www.facebook.com/share.php?u=https://miketabor.com/running-ubiquiti-uni -controller-in-docker-on-
synology-nas/)
 (http://twitter.com/intent/tweet?url=https://miketabor.com/running-ubiquiti-uni -controller-in-docker-on-
synology-nas/&text=Running Ubiquiti UniFi controller in Docker on Synology NAS)
 (http://pinterest.com/pin/create/button/?url=https://miketabor.com/running-ubiquiti-uni -controller-in-docker-on-
synology-
nas/&media=&description=Running%20Ubiquiti%20UniFi%20controller%20in%20Docker%20on%20Synology%20NAS)

25 Comments MikeTabor 
1 Login

Sort by Oldest
 Recommend 1 ⤤ Share

Join the discussion…

LOG IN WITH
OR SIGN UP WITH DISQUS ?

Name

Eric • a year ago


Thank you Mr. Tabor for your write up. It works like a charm.
△ ▽ • Reply • Share ›

Claire Binder • a year ago


Great write up. I totally love my Synology and Ubiquity is a new find. These things are so Cool I almost want to install 1 in every room.
having it run on the Synology is just plain awesome.
Many thanks
△ ▽ • Reply • Share ›

Michael Mod > Claire Binder • a year ago


Glad to help @Claire Binder !
△ ▽ • Reply • Share ›

r1ckvandelaar • a year ago


hi I'm running the latest version of DSM, but the instructions don't work for me.
these are the steps i followed:
https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 5/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor
p

1. start docker from within synology


2. go to register tab
3. in the search bar, i typed in jacobalberty and selected the Unifi (tag: latest)
4. next next next, waiting for the download to complete etc
5. go to Image tab, hit next and then apply (just leave everything as it is by default)
6. go to Container tab, i see that it is running.

Next, i open a browser tab and go to https://192.168.178.31:8443.


Page not found!

what did i do wrong or which steps should be added?


△ ▽ • Reply • Share ›

EDijkstra > r1ckvandelaar • a year ago


Hi,
I have the same results. I tried both steps,
Any help available?
△ ▽ • Reply • Share ›

Michael Mod > r1ckvandelaar • a year ago


@r1ckvandelaar & @EDijkstra - it's because you did this through the GUI and not the instructions as detailed above.

Sounds like you took all defaults for the GUI install which doesn't save UniFi configs when the package is updated. It also sets
the network to bridge for the container. If you view the container details, under port settings it will show what port 8443 (and
others) have actually been mapped to.

i'd suggest following the steps above. For more everyone it's a simple copy and paste - no need to be afraid of the command
line. ;-)
△ ▽ • Reply • Share ›

Tom > Michael • 7 months ago


I followed both using the GUI and the CLI and I get ERR_CONNECTION_REFUSED on both when trying to access
https://<server-ip>:8443 any pointers?
△ ▽ • Reply • Share ›

Kyle • a year ago


I had an issue after shutting the container down and restarting it. It started back up but I could never get back to the portal page for
the UniFi... I ran the commands again through the SSH session and started from scratch and its working again but kind of worried if it
shuts down it wont start back up.. anything special to do there?
△ ▽ • Reply • Share ›

Peter T > Kyle • 10 months ago


I have the same issue. Created it in the first place, using the instructions above and no problems with the commands, but the
portal doesn't respond. Any ideas, except to start for scratch?
△ ▽ • Reply • Share ›

cdrom1028 • a year ago


Ok, so I get this thing running, then the Unifi releases an upgrade to the controller software and jacobalberty follows suit, what next?
Mike would you consider a revisit to this article detailing the upgrade process?

By the way Unifi in Docker on Synology is great!! I just dont know how to stay up to date..
△ ▽ • Reply • Share ›

Michael Mod > cdrom1028 • a year ago


I don't actively run my controller on my Synology NAS but luckily I do have an extra UAP-AC-LR laying around. I'll spin up the
Docker image on my NAS and will update this post as soon as I can after testing.
△ ▽ • Reply • Share ›

James Miller > Michael • 10 months ago


+1 Would love to know the "right" process to update the docker, especially since an update to the Unifi Controller was
just released...
1△ ▽ • Reply • Share ›

Jimmie Westlöv > Michael • 9 months ago


+1 for update instruction
△ ▽ • Reply • Share ›

https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 6/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor

Vinales • 9 months ago


Thanks Mr Tabor for writing this tutorial. I have installed it in a docker image, like you explained. weirdest thing is that i do not see
any webpage on port 8443 and 8843, but port 8080 is see the config page of the ubiquitu.....maybe i missed a config setting?
△ ▽ • Reply • Share ›

vinales > Vinales • 9 months ago


it all works. i should have a waited a bit longer to come up with all the services....
△ ▽ • Reply • Share ›

Michael Mod > vinales • 9 months ago


Glad to hear it's working for you now. Enjoy! ;)
△ ▽ • Reply • Share ›

Sleepy sleepy (S1eepy) • 7 months ago


Hi,

Great tutorial, thanks.


I am facing issue since I have to remap some of the ports because they are used on my synology.
I have modified the command like this: 8444:8443/tcp (because 8443 is used on my system).
When I check with netstat, I see the port 8080 and 8444 not being used, although the container is running.

Any clue to help? Thanks


△ ▽ • Reply • Share ›

Jens Kolling • 7 months ago


Hi Mr. Tabor I can see there is a new release of Unifi firmware .15 and i'm running .14, does the controler image after youre
description not check for updates automatically and get the updates from same place as an Unifi Cloudkey?
△ ▽ • Reply • Share ›

Kenneth Howe > Jens Kolling • 6 months ago


It doesn't check for updates automatically. You can hit the check for updates button all day. I attempted to follow
https://www.3dinfluence.com... to upgrade, but ended up deleting the container and starting over. I just restored the settings
from a backup. I'm still looking for a good upgrade method to retain historical data.
△ ▽ • Reply • Share ›

Kenneth Howe • 6 months ago


Perfect article for setting up the Unifi controller on a Synology NAS. I've been running the controller for several months now with no
issues. I needed to apply an upgrade to the controller and ended up deleting the container and unifi directory and starting over. I just
applied the backup settings to get going again quickly. However, all historical data is lost. Has anyone developed a good upgrade
process to retain historical data and not start over?
△ ▽ • Reply • Share ›

Linium • 3 months ago


Excellent work, I ran the docker with bridge instead of host; as i couldn't get nginx reverse proxy to work for some reason. " sudo
docker run -d --name=unifi-controller --net=bridge --volume=/volume1/docker/unifi:/var/lib/unifi -p 8080:8080/tcp -p
8081:8081/tcp -p 8443:8443/tcp -p 8843:8843/tcp -p 8880:8880/tcp -p 3478:3478/udp jacobalberty/unifi:latest "
△ ▽ • Reply • Share ›

Michael Mod > Linium • 3 months ago


Thanks for sharing your workaround Linium!

-Michael
△ ▽ • Reply • Share ›

Linium > Michael • 3 months ago


Thank you.
△ ▽ • Reply • Share ›

Christian Lønfeldt Jensen • 3 months ago


Hi.
I've tried several guides now, including this. I just can't get it to work. I can't connect to the site, no matter what I do. Found out that
Carddav on synology is using the same port, so deleted the app, but still doesn't work. open ports in router etc etc. Any ideas?
△ ▽ • Reply • Share ›

Goglie • 3 months ago


Thank you for this shared. i'm add a new tips, if your NAS can not discover the access points. You can add -p 10001:10001/udp for the
bridge mode
https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 7/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor
bridge mode.
△ ▽ • Reply • Share ›

ALSO ON MIKETABOR

How to update VMware ESXi 6.5 to 6.5 Update 1 How to upgrade Synology DS1815+ to 16GB RAM
4 comments • 3 months ago 35 comments • 2 years ago
Michael — Thanks for the comment! Glad this was of some help.- Tim Sheridan — Make sure you keep the "non-upgradable" 2GB
Michael module so that you can put it back into the unit if you do need to
return …

How to create a virtual machine on a Synology NAS Synology DSM 6.0.2-8451 Update 2
11 comments • 5 months ago 2 comments • a year ago
Patrick — It seems once the VM is created the allocated RAM Michael — Wio_Steelhor,I haven't had any issues myself on my
cannot be changed anymore. So good that I waited until the 16GB … DS1815+, but have heard a couple cases where people said they had
to …

✉ Subscribe d Add Disqus to your siteAdd DisqusAdd 🔒 Privacy

NComputing L300 Ethernet Virtual Desktop with …

$171.95

(https://miketabor.com/links/altaro/)

https://miketabor.com/running-ubiquiti-unifi-controller-in-docker-on-synology-nas/ 8/9
24/11/2017 Running Ubiquiti UniFi controller in Docker on Synology NAS - Mike Tabor

(https://miketabor.com/links/turbonomic/)

(https://miketabor.com/links/thinscale/)

Advertise Here

(//srv.buysellads.com/

Click to Advertise Here (https://miketabor.com/advertising/)

BE SOCIABLE

 (https://twitter.com/tabor_mike/)  (https://www.linkedin.com/in/michaeltabor/)  (//miketabor.com/feed/)

RECENT POSTS
Be social! How to start a blog (https://miketabor.com/how-to-start-a-blog/)

Using PowerShell to Unblock multiple les (https://miketabor.com/using-powershell-to-unblock-multiple- les/)

Fixing, This host currently has no management network redundancy (https://miketabor.com/how-to- x-host-currently-no-management-network-
redundancy/)

Be social! How to start a blog (https://miketabor.com/how-to-start-a-blog/)

How to migrate a VMware virtual machine to AWS (https://miketabor.com/how-to-migrate-vmware-vm-to-aws/)

How to Add Login Banner to vSphere Web Client (https://miketabor.com/add-login-banner-vsphere-web-client/)

NAKIVO Backup & Replication 7.2 Released (https://miketabor.com/nakivo-backup-replication-7-2-released/)

How to install Backblaze on Synology NAS (https://miketabor.com/install-backblaze-synology/)

How to update VMware ESXi 6.5 to 6.5 Update 1 (https://miketabor.com/how-to-update-vmware-esxi-6-5-to-6-5-update-1/)

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

You might also like