UniFi Wireless Access Point on a Raspberry Pi

I followed the recommendation of Jupiter Broadcasting's Self Hosted Extras: Fixing Brent's WiFi and purchased a Ubiquiti Networks Unifi 802.11ac Dual-Radio PRO Access Point (UAP-AC-PRO-US), Single from Amazon.

It is very nice to have the WiFi Access Point (WAP) separated from my modem!

The WiFi router was becoming very sluggish, but the modem functionality has remained much more stable and close to the performance when I first purchased it.

Controller Client

You need to a controller (the WAP doesn't have it's own login portal, like most Modem/WAP combo units do)

I decided to set up the UniFi controller software on my Raspberry Pi 3B+. It has proven to be a great appliance to host several small utilities.

First thought was Docker. There had to be a Docker image for this!

A community project for UniFi Docker images can be found here: GitHub jacobalberty/unifi-docker.

The Raspberry Pi is an ARM board and requires a special tag. See https://hub.docker.com/r/jacobalberty/unifi/tags for the full list of tags.

ARM32 Docker Image

docker pull jacobalberty/unifi:arm32v7

Full Setup Script

mkdir -p ~/unifi/data
mkdir -p ~/unifi/log
docker run --rm --init -d -p 8080:8080 -p 8443:8443 -p 3478:3478/udp -p 10001:10001/udp -e TZ='America/Phoenix' -v ~/unifi:/unifi --name unifi jacobalberty/unifi:arm32v7

Start on Boot with SystemD

I followed Luis Toubes' article, "How to start a Docker container at boot time", and created a systemd file:

Create unifi.service

Description=My UniFi Controller

ExecStart=/usr/bin/docker run --rm --init -d -p 8080:8080 -p 8443:8443 -p 3478:3478/udp -p 10001:10001/udp -e TZ='America/Phoenix' -v ~/unifi:/unifi --name unifi jacobalberty/unifi:arm32v7
ExecStop=/usr/bin/docker stop -t 2 unifi


Make systemd see your service

Copy file from step 1 to /etc/systemd/system

sudo cp unifi.service /etc/systemd/system/

Give execution rights to the file

chmod +x unifi.service

SystemD Options

Enable the service on boot

sudo systemctl enable rpi-agario

Check current status

sudo systemctl status rpi-agario

Disable the service from boot

sudo systemctl disable rpi-agario