Published: Tue 29 May 2018
Sometime last year I decided to switch my home wireless infrastructure over to
Ubiquiti UniFi. This isn't just standalone access points, so they rely on controller software - to be run on Someone Else's Computer (just no), or using their UniFi Controller on a machine of your choice. Since the controller is written in Java, it will run pretty much anywhere that can also run its other dependencies. They even provide their own Debian/Ubuntu repository, and a pretty howto on setting it up. UniFi on armhf
I initially actually ran this on armhf/Stretch, and still have a post in draft state on how to achieve this (since one of the prerequisites is MongoDB, no longer supported on armhf), but probably won't bother publishing it since it is a bit of a dead end.
(Short short version: grab the
2.6.10 sources from Ubuntu Xenial and fix the most awfully broken bits of code until it actually compiles. This includes the parts of the testsuite that try to verify undefined behaviour of the programming languages used. ?!?)
But since I now have always-on arm64 machines in my home network, I decided it was time to move to the architecture that has been my main development target for the past 8 years...
UniFi on arm64
Unsurprisingly, this hit a snag; while the package itself is completely architecture-independent, the Debian repository format is not. With the instructions from the howto, apt expects to find
$ARCHIVE_ROOT/dists/$DISTRIBUTION/ubiquiti/binary-$arch/Packages.gz to tell it which packages are available in the repo and what their dependencies are. Which works fine when there is a populated entry for
$arch. There is for (at least)
i386, amd64 and armhf - but not for arm64 or ppc64el.
$ARCHIVE_ROOT specified in abovelinked howto is
http://www.ubnt.com/downloads/unifi/debian. Not sure why that does not specify https (which also works), but I will use the actually documented variant below.
The package itself is fully architecture independent. So what we can do instead is grab the
Packages.gz for armhf and have a peek:
$ wget http://dl.ubnt.com/unifi/debian/dists/stable/ubiquiti/binary-armhf/Packages.gz
$ zcat Packages.gz
Depends: binutils, coreutils, jsvc (> = 1.0.8 ) , mongodb-server (> = 2.4.10 ) | mongodb-10gen (> = 2.4.14 ) | mongodb-org-server (> = 2.6.0 ), java8-runtime-headless, adduser, libcap2
Maintainer: UniFi developers <email@example.com>
Description: Ubiquiti UniFi server
Ubiquiti UniFi server is a centralized management system for UniFi suite of devices.
After the UniFi server is installed, the UniFi controller can be accessed on any
web browser. The UniFi controller allows the operator to instantly provision thousands
of UniFi devices, map out network topology, quickly manage system traffic, and further
provision individual UniFi devices.
Download the package
Filename: field tells us the current unifi packages can be found at
pool/ubiquiti/u/unifi/unifi_5.7.23-10670_all.deb - relative to the
$ARCHIVE_ROOT, not the
binary-$arch - so we can download it with
$ wget http://dl.ubnt.com/unifi/debian/pool/ubiquiti/u/unifi/unifi_5.7.23-10670_all.deb
Verify the integrity of the package by running
$ sha256sum unifi_5.7.23-10670_all.deb
and comparing the output with the value from the
Install dependencies and UniFi
Depends: field tells us we need
(both of these are likely to be installed already, unless you like me had just accidentally tried to install a broken home-built toolchain package in the host instead of a chroot ... oops!)
adduser (also likely to already be installed)
Resolving this is straightforward enough, with perhaps the single exception of
java8-runtime-headless, which is a virtual package. But if you try to install that, apt will let you know, and point out which available packages provide it.
So, as a one-liner:
$ sudo apt-get install jsvc mongodb-server openjdk-8-jre-headless libcap2
Then we're ready to:
$ sudo dpkg -i unifi_5.7.23-10670_all.deb
Nothing architecture-specific about this: go to
https://$HOST:8443 to set up. In my case, I just imported my downloaded backup from the armhf server and had everything back up and running quickly without manual intervention.
Of course, this will leave you without automatic updates, so you'll need to go periodically have a look at one of the actually enabled architectures for version changes and manually install updates.
And if you have an account on the Ubiquiti forum, consider upvoting
my proposal to add the missing architectures to the repository.