Moving to Self Hosting Unifi Controller -- Any tips or potential pitfalls?

I’ve usually used Gen2 Cloud Keys to run my Unifi Host Controller however in a new location I think I’m going to try to self host the controller via the linuxserver docker image: Linuxer.io Unfi Controller

Are there really any potential issues in terms of discovery or logging when self-hosting this controller? I’m considering running the docker image within a VM. Does logging consume that much space?

Thanks for any tips or potential perils.

Myself, I run jacobalberty/unifi, but I reckon there aren’t many differences between the two as the containerize the same application.

One pitfall that comes to mind with running Unifi controller in a container is that, unless you opt for host network mode, L2 discovery won’t work. I personally can live with that since I only run it for home use and don’t need to adopt new devices all the time. Adoption is still possible using the other methods like SSH or DHCP.

I prefer to load the UniFi controller directly in the VM instead of Docker because there is not an official Docker image from UniFi which means you are trusting a third party not to put anything in there that does not belong.

1 Like

I use the Glenn from Ubiquiti easy install script. Google it. I can build a new server from scratch and restore a backup in about 10-15 minutes.

You can find those here Glenn R. make sure scroll down to the bottom for the latest version.

Would you run into this problem if running the docker container with a macvlan network? The only issue I could think of is that each time the new container is updated, I believe it receives a different MAC address.

Thanks @LTS_Tom, @paolo and @wotsthestory for your input. I have to say after reading up on this topic of unifi controller a bit, its all kind of a mess particularly with unifi using an old version of mongodb in which support has been dropped to avoid licensing fees. Docker containers seem problematic if needing to regularly adopt containers. Tom’s solution in a video he presented used an older version of Ubuntu with I think is supported to 2028. Outside scripts such as Glen R’s, support much newer versions of Ubuntu/Debian, however then you have dependency on third parties. All kind of a mess actually and not the cleanest solution in any of the available choices.

Thanks for all for touching upone this topic.

1 Like

just reminder, you should used unifi-network-application image

I just converted my controller to network-application, it was smooth.

New image is not using mongoDB inside so you need setup external one. Or you can configure in same compose. check this :

Create your virtual linux machine and run Glenn R scripts

UniFi Installation Scripts | UniFi Easy Update Script | UniFi Let’s Encrypt | UniFi Easy Encrypt | Ubuntu 16.04/18.04/20.04/21.04/22.04/23.04/23.10 | Debian 9/10/11/12/13/14 | Ubiquiti Community

Change the script to the latest version - wget https://get.glennr.nl/unifi/install/unifi-7.5.176.sh

They are scripts to update the unfii controller, install let’s encrypt ssl certificate

1 Like