May 18, 2018

Installing UniFi controller on Ubuntu 16.04

I run the UniFi control software on an LXC/D containter on my VM host, currently the default LXC network is bridged to my LAN (not ideal). There is a seperate article, if you need to setup an LXC bridge.

Setup contanier:

lxc launch ubuntu:xenial unifi
Make sure an internal IP shows:
lxc list
Open a shell inside the container
lxc exec unifi bash

Update

sudo apt update && \
sudo apt upgrade -y && \
sudo apt autoremove -y && \
sudo reboot

Add UniFi Repository

sudo nano /etc/apt/sources.list.d/100-ubnt.list

Paste the following:

## Debian/Ubuntu
# stable => unifi4
# deb http://www.ubnt.com/downloads/unifi/debian unifi4 ubiquiti
deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti

Add the signing key and install

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50 && \
sudo apt update && \
sudo apt install unifi -y

NOTE: for new kernel also do this

echo "JSVC_EXTRA_OPTS=\"\$JSVC_EXTRA_OPTS -Xss1280k\"" | sudo tee -a /etc/default/unifi

Verify and Configure

Open web browser to https://INTERNALIP:8443