This is an old revision of the document!
UniFi Controller
Ubiquiti UniFi is a line of networking equipment including Wi-Fi access points and switches. Most of these devices need a “UniFi Controller” to allow the device to be configured and managed. A LXC container in AstLinux offers a good method to act as a local UniFi Controller for Wi-Fi access points and switches.
Note -> At the time of this writing (June 2020), the UniFi Controller software is best matched with a Debian 9 distribution. The example below is based on a Debian 9 container.
Tip -> Alternatively, community supported UniFi Installation Scripts may be used for various Ubuntu / Debian distributions.
First, it is assumed the lxcbr0
interface is setup per the Quick Start Guide → Enable LXC Support.
Then from the CLI:
lxc-create -t download -n unifi -- -d debian -r stretch -a amd64 --no-validate
service lxc restart
lxc-attach unifi apt update apt install curl apt-transport-https openjdk-8-jre-headless echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | tee /etc/apt/sources.list.d/100-ubnt-unifi.list curl -o /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg apt update apt install unifi
Following installation, use HTTPS
on port 8443
to access the web interface within the container and begin setup.
Tip -> If you prefer not to create a unifi.ui.com
account, you may establish a local-only UniFi instance by clicking on “Switch to Advanced Setup” during “Sign in …”
The UniFi Controller can use a noticeable amount of CPU and RAM resources, depending on the number and type of device. For a small installation you can edit the /var/lib/lxc/unifi/config
file and uncomment the following line:
lxc.cgroup.memory.limit_in_bytes = 1024M
to keep the RAM usage from going over 1 GB. Larger installations may require 1536M
or 2048M
.
Related Info -> LXC container in AstLinux