29/12/2022
With Drauku's help we created a better docker compose to install unifi controller using portainer. We simplified the process for joining the macvlan network, and also assigning the static lan ip used by unifi controller web ui. So now, we no longer need to do the previous crude method for getting that to work. However for initial setup of the macvlan, you still have to do that manually as shown in the youtube video in the post link below.
viewtopic.php?f=45&t=168608&start=15#p835984
archived
*update
I've figured out how to setup unifi controller docker using docker. And to set a static ip for it (so you are not forced to use the nas ip). Skip straight to this post that explains everything in order to set that up. The earlier posts before this one is pretty much outdated since now i got a perfect working solution that i'm satisfied with to replace the previous attempts
viewtopic.php?f=45&t=168608&p=835245#p835245
If you want to use qpkg, there is one here (this is the most simplest hassle free method). But if you want to try the docker app method, read on.
viewtopic.php?f=320&t=139875
What is unifi network controller?
Basically it's a app you host on your own server, so you can manage ubiquiti unifi devices like switches, wireless access points etc. I personally use a unifi ap lite, so thats what i am using this app for. With this app i can configure and update the unifi ap device.
So with this app you can do that without requiring any sort of cloud service (some brands like putting you on cloud subscription models. but with unifi network controller (for tplink theirs is called omada? it's basically the same thing/purpose) you can avoid that and manage/update locally without having to opt for some ridiculous paid subscription model which we all hate
an alternative to the qnap qpkgs is using the docker app in container station. The benefit of doing so, then you don't have to wait on qnap releasing the update qpkgs for the newer version. sometimes they release it a bit too slow. Or maybe in the far future they stop releasing it altogether.
but a more recent example, when qnapclub.eu became inaccessible, or when the forum here did not release the update on time, so could not update for a while. had to hop on discord and grab the qpkg manually from a trusted moderator who had the update on him. but nobody available to fix the qnapclub.eu server because they were away on holiday. so in that kind of situation, if you want to avoid that, then docker unifi controller may be the way to go. below is a guide by qnap how to do that.
Configuring a UNIFI CONTROLLER on your QNAP NAS using Container Station
https://www.youtube.com/watch?v=iXLV_5_-7Lo
in the video they use this one *i'm assuming this one is safe because qnap recommended it, and it has a lot of downloads and stars. dyor
https://hub.docker.com/r/jacobalberty/unifi
Code: Select all
jacobalberty/unifi
Unifi-in-Docker (unifi-docker)
This repo contains a Dockerized version of Ubiqiti Network's Unifi Controller.
Why bother? Using Docker, you can stop worrying about version hassles and update notices for Unifi Controller, Java, or your OS. A Docker container wraps everything into one well-tested bundle.
To install, a couple lines on the command-line starts the container. To upgrade, just stop the old container, and start up the new. It's really that simple.
This container has been tested on Ubuntu, Debian, macOS, Windows, and even Raspberry Pi hardware.
Upgrading Unifi Controller
All the configuration and other files created by Unifi Controller are stored on the Docker host's local disk (~/unifi by default.) No information is retained within the container. An upgrade to a new version of Unifi Controller simply retrieves a new Docker container, which then re-uses the configuration from the local disk. The upgrade process is:
MAKE A BACKUP on another computer, not the Docker host (Always, every time...)
Stop the current container (see above)
Enter docker run... with the newer container tag (see Supported Tags below.)
Guide
How to create a backup of the UniFi Controller config
https://www.youtube.com/watch?v=GO3qfoYBfRM
How to Really Backup Unifi *this one is a more lengthier explanation
https://www.youtube.com/watch?v=TvRuDD_ARfQ
*update
Above is a youtube video guide for setting unifi docker up, but i will be using this one below instead. because the youtube guide neglect to mention how to add a persistent config using "mount to host" to retain your previously setup config without it getting wiped upon each update.
However this guide below uses unifi docker as a root user, so keep that in mind. If you want to setup for NON-ROOT user then you best look elsewhere, although i did leave sufficient leads/hints so you can pursue that further on your own. so the best this guide below does, is lets you update unifi controller without having to wait for the qpkg maintainer to release an update for it (sometimes they release slowly, so this approach solves that somewhat). However sadly this guide omits the part for configuring as non root user, so you miss out that security benefit for tightening down.
and just a reminder, if you had previously setup/used unifi controller QPKG, i strongly recommend you DISABLE but DO NOT remove. This is so that in the event the docker app is not satisfactory for you, you can disable/remove docker app, then re-enable to qpkg app. So no fuss. And as always, plz backup your unifi controller settings within the app
And just to reiterate, some of the settings i used in the posts below may be outdated and not what i currently used due to trial and error while exploring the usage/setup of the app. So just follow the guide in this link below, because that is the exact setting i am currently using.
so i was double checking the settings with a different guide. they also noted about the root user situation, but they opted to use the root user mode (this is what i will also be using cause then it's one less thing for me to figure out. but hopefully i left you enough leads so you can follow through on that if you want to go for a non root mode setup)
the other thing this author mentions is how he also suggested using "volume from host" *which is also what i am doing. I assume the reason why he does this is so that config will persist after upgrading? But will still backup config BEFORE each update just in case that is not the case.
https://my-doodads.com/qnap-nas-how-to- ... r-station/
you can try it out while retaining the other qpkg version (example, i backup config. turn off the qpkg, install the docker, import the config, then just use. then when update comes, test the upgrade method to see if it works as it should. if i am happy with it, continue using, if not, just stop and remove the docker app, then click start run for the previous unifi qpkg app).
that's what i am planning to do for myself
i've already tried something similar but using truenas for testing. but now want to use the container docker app on qnap qts, since that's my main nas. there is nothing particularly bad to keep using the qpkg approach if you prefer, but if you want to try the docker app method, then the youtube video explains how.
there is a newer container station v3 which is beta, this is what i am using. but if you are using for production and don't want to beta, then probably use the existing v2.
https://www.qnap.com/en/software/container-station#beta