Unifi Controller on Debian Bullseye
What is UniFi controller ?
The Ubiquiti line of devices (network switches, wireless APs etc) do not have a built in environment for configuration/management. Instead they use a piece of software known as the UniFi network controller. With this application you can manage and configure any Ubiquiti device from one location and also remotely from the Ubiquiti portal. If you do not want your network infrastructure accessible via the cloud then you have two choices:
- Don’t use Ubiquiti devices
- Shutdown the controller application when not in use.
In this post I will describe you to install the UniFi network controller into Debian 11 (Bullseye). I’d suggest installing into a VM or container so that point two (above) can be accomplished as the controller will run as a service in Linux.
Preperation
UniFi network controller has two dependancies :-
- The Java Runtime Environment (JRE)
- MongoDB
Installation
Before proceeding we need to ensure that apt will be able to connect and use https based repositories.
The Java JRE is required as the network controller is a java application. They recommend Java 8 but I have found that the JRE11 headless packed in the debian repository works fine.
Next the gpgp key needs to be installed for MongoDB.
And the same thing for the UniFi repo key.
Now we can finally install the UniFi network controller.
Once apt has completed, check the unifi service.
systemctl should show that the unifi service is running and active.
unifi.service - unifi
Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-01-30 09:56:43 AEDT; 11min ago
Process: 361 ExecStartPre=/usr/sbin/unifi-network-service-helper init (code=exited, status=0/SUCCESS)
Process: 415 ExecStartPre=/usr/sbin/unifi-network-service-helper init-uos (code=exited, status=0/SUCCESS)
Process: 425 ExecStartPost=/usr/sbin/unifi-network-service-helper healthcheck (code=exited, status=0/SUCCESS)
Main PID: 424 (java)
Tasks: 100 (limit: 2337)
Memory: 936.9M
CPU: 38.822s
Browse to your UniFi network controller at https://your-controllers-ip-address:8443.
Note that you will need to create an account on the Ubiquiti portal as the network controller will ask for authentication. Login with your portal account and password.