This article provides the steps to update the UniFi Controller on a Debian or Ubuntu system via APT (Advanced Package Tool). You will need to create source files, or edit lines in an existing sources.list file with vi or nano. That is the most common method for package updates and installs for these OS. The repo structure should be permanent, but if there are any changes they will be pointed out in the release posts.
|
NOTES & REQUIREMENTS: Before upgrading the UniFi Controller, make sure that you have backed up the UniFi Controller Database. You will need to make sure that the user has sudo permissions, for more information about adding a user to sudo list, see this link. |
Table of Contents
UniFi Controller APT Steps
1.
Follow these instructions to stay with the current stable release, regardless of changes in versions. When there is a new stable release, typically there will be a post on the Community announcing it.
Use the following command to add a new source list:
echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
| NOTE:
Using http://www.ubnt.com/downloads/unifi/debian on a browser will result in a 403 Forbidden page. This is because we do not allow direct listing/access to this link. The URL is only meant to be used when using the CLI commands as in the one shown above. |
2. 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.
(Method A) Download and install the following trusted key into /etc/apt/trusted.gpg.d
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ubnt.com/unifi/unifi-repo.gpg
(Method B) Using apt-key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
3. Update. Retrieve the latest package information.
sudo apt-get update
4. Install and upgrade the UniFi controller.
sudo apt-get install unifi
Your UniFi Controller should now be accessible at the computer's configured local or public IP address.
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.
| WARNING:
We strongly recommend staying with the stable release, but for those users who wish to use another, find the possible suite names, as well as code names in the tables below.
"Testing" refers to the next generation release, it's not released to the general public yet. "Stable" refers to the current stable release, that is the one supported by UBNT and described in this article. "Old Stable" is the previous stable release, once it has been displaced by the new, current stable release. |
|
|
Troubleshooting
Find the log files here:
/usr/lib/unifi/logs/server.log
/usr/lib/unifi/logs/mongod.log
User Notes & Tips
These notes have been added thanks to user collaboration. Have anything to contribute? Click on the Give Feedback button below!
- The UniFi Controller when installed on Debian and Ubuntu will not have a GUI since it's being run as a Service. Please use the service command for starting, stopping and restarting the UniFi Controller.
- If you see the following error on your DNS server, a user reports solving this by forcing the system to use 8.8.8.8 as DNS server, not his ISP.
- If it's taking too long to access the controller after a restart, and you need to generate enough entropy on a headless VM to start up SSL, this Community post might help: Ubuntu 14.04 x64 Unifi 4.6.6 very slow start up.
- At the moment Ubiquiti does not support arm64, hence it is not available via the repo. A download and manual installation will be necessary for this.
Related Articles