How to install UniFi on Ubuntu 20.04

In this guide we're going to install the UniFi Controller on Ubuntu with DigitalOcean

Alex Lowe

July 2, 2024

This guide will go over the steps to install the UniFi Controller, now known as the UniFi Network Application on Ubuntu. For some context, we are using DigitalOcean in this guide, but it will work for most Ubuntu installations.

If you want fast and reliable UniFi Cloud hosting, check out HostiFi with prices from $99 per month, fast support, regular backups and managed updates.

  1. Pick a server

For smaller installations, up to 100 devices we would recommend picking the $12/month server with 2GB RAM and the Regular SSD. This gives you 50GB of storage which will be enough for most UniFi installations.

  1. SSH Key or Password

Next, either choose to use your own SSH key pair or simply use a password. Be aware, DigitalOcean won't send you this password via email, so be sure to keep it safe.

  1. Create Droplet

With all that out of the way, go ahead and create the droplet. The server preparation time can take 1-2 mins.

  1. Log into the server

Next, we need to log into the server. To do this, click one the 'More' dropdown and then 'Access Console'. You can use ether your own SSH client, such as Terminal in macOS or Termius but you can also use the 'Droplet Console' which is a browser based version. For this guide, we're going to use this.

  1. Update packages

Now that you're logged in, we need to run some usual package updates. There will update the packages in the Ubuntu OS.

sudo apt update

  1. Install packages

Next, we need to install some extra tools for the server. openjdk-8-jre-headless - This will install Java 8 , as UniFi requires this to run.

sudo apt install curl haveged gpg openjdk-8-jre-headless

  1. Adding the UniFi Repository (Repo)

Next, we need to download the official repo from Ubiquiti, you can do this by using the following command.

curl | sudo tee /usr/share/keyrings/ubiquiti-archive-keyring.gpg >/dev/null

Then run the following command to add the downloaded repo to the sources list

echo 'deb [signed-by=/usr/share/keyrings/ubiquiti-archive-keyring.gpg] stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list > /dev/null

  1. Install Libssl1.1

In this next section, we need to install an older version of LibSSL, as MongoDB requires this run for UniFi. This version of LibSSL can be downloaded with the following command.

wget -O libssl1.1.deb

Run this command to install LibSSL

sudo dpkg -i libssl1.1.deb

  1. Add the MongoDB Repository

Next step is to add the MongoDB repository. The first part of that is to download the GPG key.

curl | sudo gpg --dearmor | sudo tee /usr/share/keyrings/mongodb-org-server-4.4-archive-keyring.gpg >/dev/null

Next is to download the MongoDB 4.4 repoostiry

echo 'deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-org-server-4.4-archive-keyring.gpg] focal/mongodb-org/4.4 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list > /dev/null

  1. Install MongoDB 3.6 to Ubuntu

With the MongoDB repoostiry added, we now need to install MongoDB 3.6. To start with, run an update to make sure it knows about the latest repository changes.

sudo apt update

Next, we can install the MongoDB server to Ubuntu

sudo apt install -y mongodb-org-server

Once installed, make sure that MongoDB is tol to start up when the server reboots

sudo systemctl enable mongod

Next, to get MongoDB woken up and ready, run this command

sudo systemctl start mongod

  1. Install UniFi

After all of that, the exciting part is getting the UniFi Controller installed. This command is pretty simple, run this to install UniFi.

sudo apt install unifi

  1. Access UniFi

Before we access UniFi, we need to know what IP address the server has. If you are using DigitalOcean, it'll be in your dashboard otherwise run the following command to show the IP addresses.

hostname -I

Next, go to the server IP address and replace IPADDRESS with the IP address for your sever. Be sure to put https:// before it and :8443 at the end.


  1. Setup UniFi

Next, the UniFi wizard will run through the setup with you, log in with your UI Account, make a local account and get devices adopted.


HostiFi provides hosting for both Ubiquiti and TP-Link software-defined-networking (SDN) applications, with servers for UniFi, UISP and Omada. We also offer professional networking consulting, with HostiFi Pro.

More Blog Posts

Get the Ubiquiti Top 20

Each month our team sifts through Ubiquiti news and content from around the web and delivers 20 of our favorite links to your inbox.

Recent issue: March 2024

No spam. Unsubscribe anytime.


Discovered 3+ things that I did not know and will have a material impact on my business.

Newsletter Subscriber


All the info I want/need in a single clean thread! Perfect!

Newsletter Subscriber


Providing super valuable information to keep the community in the know. Awesome links page, Thank You.

Newsletter Subscriber