Install Unifi controller on Ubuntu

Installing Ubiquiti's Unifi controller on Ubuntu is fairly straight forward. The first step is to install the Unifi controller with the following commands:

deb stable ubiquiti

sudo apt-key adv --keyserver --recv 06E85760C0A52C50

sudo apt-get update

sudo apt-get install unifi

If you have Oracle Java installed on Ubuntu there is a good chance that the Unifi controller will fail to locate JAVA_HOME. To solve this follow these steps:

Step 1


You should get the following path returned:


Step 2

Next, you need to edit the unifi.init script with the following command:

sudo nano /usr/lib/unifi/bin/unifi.init

At the bottom of the set_java_home() method ensure that JAVA_HOME is as follows:


This directory pasted here is of course dependent on what directory was echoed back in step 1.

Step 4

Restart the unifi controller and check its status with the following commands:

sudo systemctl restart unifi

sudo systemctl status unifi

The status command should yield output similar to the following:


Step 5

You are now able to access the admin panel by inputting the following in your web browser: