This article provides a list of source files you'll need to create, or lines you can use in an existing sources.list file, if you wish to be able to install and update the UniFi controller on your Debian or Ubuntu system via APT. 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.
Table of Contents
UniFi Controller APT Steps
1. Add /etc/apt/sources.list.d/100-ubnt.list (or edit /etc/apt/sources.list). The stable, old stable and testing sources are considered floating, which means they can change at any time. Typically there will be a post on the community announcing this.
If you wish to stay with a specific release branch, then you must specify the appropriate code name on the source line.
We currently use the following code names unifi3/unifi4/unifi5 but they are going to be obsoleted. The following is an updated sample of a sources file. Note, the source line can contain either a suite name or a code name, although we recommend using the suite name (e.g. stable, testing, etc.).
|Note: When following the instructions below, note that 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 working on CLI to run the commands below.|
# deb http://www.ubnt.com/downloads/unifi/debian testing ubiquiti
# deb http://www.ubnt.com/downloads/unifi/debian oldstable ubiquiti
deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti
# The following is a mapping of suite name->code name.
2. Add the GPG Keys:
# for Ubiquiti sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50 # or over HTTP by using hkp://keyserver.ubuntu.com:80
3. Update, install, and upgrade:
# retrieve the latest package information sudo apt-get update # install/upgrade unifi-controller sudo apt-get install unifi
4. (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. Mongo 3 may not work reliably with the backup function of UniFi, so keep this in mind when updating Mongo. Mongo 2 is preferred at this time.
Find the log files here:
User Notes & Tips
These notes have been added thanks to user collaboration. Have anything to contribute? Click on the Give Feedback button below!
- 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. The bundled snappy-java package in versions 5.5.x and previous, do not support arm64. In v5.6.1 Unstable (might be reverted for 5.6.2) that changed to an updated snappy-java package. That being said, the following script can be run after install to update the bundled version, which should help it run:
rm /usr/lib/unifi/lib/snappy-java-1.0.5.jar wget -O /usr/lib/unifi/lib http://central.maven.org/maven2/org/xerial/snappy/
- If the system continues to report issues with snappy-java, you can rename the new jar files from snappy-java-1.1.4-M3.jar to snappy-java-1.0.5.jar, or provide a symbolic link, e.g.:
maven2/org/xerial/snappy/ snappy-java/1.1.4-M3/snappy- java-1.1.4-M3.jar
ln -s snappy-java-1.1.4-M3.jar snappy-java-1.0.5.jar