Setting up UniFi controller software in Ubuntu on the OrangePi Zero
By: Divan Visagie
Tags: Raspberry Pi, Orange Pi, Ubiquiti, Software, Unifi

Setting up UniFi controller software in Ubuntu on the OrangePi Zero

Learning to use the right OS the long way

What peaked my interest in the Orange Pi Zero was it’s price, I was able to get mine for 339 ZAR, that was a pretty good deal for a board that features both WiFi and an Ethernet port and falls below the Raspberry Pi’s price-point.

While my initial intended purpose for using the board had faded since I found out it’s WiFi card wasn’t strong enough (or even workable by some accounts) for what I wanted, I still had a usable tiny computer with an Ethernet cable attached to it.

I currently run a single UniFi AP (which should honestly be extended to at least 2 at this point) for my household wireless needs, but have been running the controller software off of an old HP micro-server, something that a recent affair with this little power monitoring device has made me rethink.

The router that serves up my internet connection has a USB port with enough power to run the Orange Pi Zero, so it was just a matter of getting the ARM version of the UniFi Controller software onto the Orange Pi. Easy Right?

Well when I initially set up the device I jumped for running Arch Linux .Why not run arch Linux on a tiny board and go around telling everyone I run Arch on a tiny board?

When it came to implementation though, the issue was that the UniFi controller software has a dependency on mongodb, something that isn’t very easy to get hold of on this unofficial version of the ARM build of Arch.

My go to problem solving method is to find the path of least resistance, so after a lot of tinkering with PKGBUILDs I decided to run docker on the thing.

I found this wonderful little project and gave it a shot:

It actually booted the container and I saw a flash of the control software in my browser… and then the device froze. Turns out that 512mb is a little bit too little to be running docker containers.

This was definitely not the right approach for a device this tiny, so next I decided to dig around in the Dockerfile and see how the whole setup was achieved.

I was not in the mood to tinker with debian packages on the Arch installation, so I headed for the image of the suggested OS for the Zero, armbian, I figured it would be the most like Raspbian and therefore would supply the least amount of trouble. This time I again ran into there being no supported mongodb package, and debian has no PKGBUILD file to edit.

So it was time for OS number 3: Ubuntu Server

The armbian page offers Ubuntu and Debian side by side, so in a last ditch effort I figured that if it was a real instance of Ubuntu Server, it might just have the mythical arm version of mongodb I was looking for.

So , I flashed the Micro-SD card for the 3rd time…

And what do you know? It worked.

Installing the UniFi software worked very similar to the way it was done in the Dockerfile, the only difference being that the URLto the GPG key seems to have changed, but because this is Ubuntu, we can actually just follow the official steps that ubiquity provides:

And that was it,UniFi was running! After hours of tinkering in different distros, all it took was installing the right one and following the simplest set of instructions. After that it was a matter of porting the site from my current controller setup.

The board seems happy now and has been running the software quite well so far, and it doesn’t even move my power monitor by a single watt thanks to it’s much lower voltage operation. Mission accomplished.