Blog

How to install UniFi on Ubuntu with DigitalOcean

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 hosting, check out HostiFi with fast support, regular backups, managed updates and prices from just $9 per month.

To learn more about our hosting plans, create an account and get started today.
  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.

__wf_reserved_inherit
  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.

__wf_reserved_inherit
  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.

  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.

  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.

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

  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.

Run this command to install LibSSL

  1. Add the MongoDB Repository

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

Next is to download the MongoDB 4.4 repoostiry

  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.

Next, we can install the MongoDB server to Ubuntu

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

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

  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.

  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.

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.

About HostiFi

HostiFi provides hosting for Ubiquiti software platforms, with servers for UniFi and UISP. We also offer network consulting, with HostiFi Professional Services.

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.

View recent issues

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