UniFi Network – How to Install and Update via APT on Debian or Ubuntu
Welcome to a short tutorial on how to keep your Unifi controllers up to date. Please do not forget to make a backup of your Unifi machine before each update. If you don’t have root rights you have to use sudo for every command!
1. Install required packages before you begin with the following command:
sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https
2. Use the following command to add a new source list:
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
3. Add the GPG Keys. To add the GPG Keys use one of the two methods described below (Method A is recommended). When using the commands below, it is assumed you have sudo
and wget
installed, more information about sudo
can be found here, and wget
here.
wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add -
echo "deb https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
Method A: Install the following trusted key into /etc/apt/trusted.gpg.d
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
Method B: Using apt-key.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
4. Install and upgrade the UniFi Network application with the following command:
sudo apt-get update && sudo apt-get install unifi -y
5. [optional] This step may not be required, depending on the Linux distro you have. If your distro does not come with MongoDB, and it’s not available in their repo, then please see the MongoDB installation guide. You can find the latest installation guide for Ubuntu here, and Debian here. We recommend at least MongoDB 2.6.10. Some users have changed the backend to use MongoDB 3 successfully too.
6. The UniFi Network application should now be accessible at the computer’s configured local or public IP address, by typing that IP address in a browser’s navigation bar (Chrome is recommended). If it is not launching, use the following command:
sudo service unifi start.
Other helpful commands are:
To stop the UniFi service:
sudo service unifi stop
To restart the UniFi service:
sudo service unifi restart
To see the status of UniFi service:
sudo service unifi status
If you have any questions, please leave it in the comments. 🙂
After you have got through this process, you don’t need to do it in future steps.
It’s enough when you only search for updates and upgrade it after.
apt-get update // apt-update // apt upgrade -y