My goal was to change a Unfi-Controller from a Windows-Server to a Linux-VM installed on Proxmox. So in general it should be easy but there were some problems coming up during the installation.
But first i have searched for a tutorial how to install it on Linux. There are some old tutorials that showed how to install the controller with MongoDB 3.6. The last version supports MongoDB 8 so there is a big difference.
Install MongoDB
After all it’s simple to install it you have only to add the repository for MondoDB to you Ubuntu installation. A tutorial is found here.
In general you can use the following commands.
sudo apt-get install gnupg curl
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
sudogpg-o/usr/share/keyrings/mongodb-server-8.0.gpg\
--dearmor
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
Thats in that case enough for the dependency that is used in the DEB file from Ubiquiti.
Install Unifi-Controller
Now you can go to the Unifi-Website and download the controller for Linux. This should give a DEB-File for Debian. Or you use the repository then you get updates over the package manager.
sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https
echo 'deb [ arch=amd64,arm64 ] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo apt-get update && sudo apt-get install unifi -y
The installation should go through and the controller is installed and working. After that you can open it with: https://[your-server-ip]:8080
Problems with installation
I had the problem, thats why i wrote this post, that the installation hang during the „configuration“ part of the apt install. After some investigation i found an error in the „/var/log/syslog“ that MondoDB is crashing and that is preventing the completion.
After some longer research it’s because MongoDB can’t read the CPU from the VM. This is because the CPU was not set to „host“ in the Proxmox CPU configuration.
After setting to „host“ the installation finished and the controller was working.