Install Unifi Controller on VPS

I have realized why they are charging at least 20$/month for a hosted Unifi controller solution – one of the reasons for this price is that it actually took me a few days to set it up right.

I bought a VPS ( for about 5$/month and installed Unifi controller on which I have added (migrated) all my costumers Unifi APs.

1. My choosen OS is Ubuntu 16.04 Server (64 bits, Linux Kernel

2. Add the Unifi repo so you can install Unifi with apt-get command

I like to use NANO editor.

nano /etc/apt/sources.list.d/100-ubnt.list and add “deb stable ubiquiti” so you can install and update the controller.

Don’t forget to install Java 8.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

and to verify:
sudo apt-get install oracle-java8-set-default


Since there is a known kernel problem with the jsvc and that stopped Unifi controller from running normally so I added this commands to solve it.

Check here (uname -a):

echo “JSVC_EXTRA_OPTS=\”\$JSVC_EXTRA_OPTS -Xss1280k\”” | sudo tee -a /etc/default/unifi
UniFi Video (NVR):
echo “JSVC_EXTRA_OPTS=\”\$JSVC_EXTRA_OPTS -Xss1280k\”” | sudo tee -a /etc/default/unifi-video


4. The GPG keys are needed for the new repo.

sudo aptkey adv keyserver recv C0A52C50

5. Update and install Unifi

sudo aptget update
sudo aptget install unifi
6. Check is your Unifi running.
sudo service unifi status
7. Access your Unifi Controller via browser
and the initial configuration should appear.

Leave a comment

Your email address will not be published. Required fields are marked *