$ sudo apt -y install docker-compose
For wi-fi, I use use a UniFi AP. One slightly annoying aspect of this is the UniFi Controller. If you don’t have a smartphone or need to manage more than one device, you’ll need to set one up. I provide a brief tutorial for setting up the UniFi Controller with Docker Compose here.
An existing Docker image makes setting up the UniFi Controller a breeze. Here’s how.
First, you must install Docker on your system.
Install Docker Compose.
$ sudo apt -y install docker-compose
Add your user to the docker
group if you want to run docker without requiring superuser privileges.
$ sudo usermod -aG docker $USER
Reboot to complete the installation.
$ sudo reboot
Configuring the docker-compose
file should provide all of the necessary details required to get the controller up and running.
With Docker installed, create a directory for the docker-compose
file.
$ mkdir unifi_controller
$ cd unifi_controller
Configure the docker-compose
file.
The provided docker-compose
file requires just one tweak, configuring the volume.
---
version: "2.1"
services:
unifi-controller:
image: linuxserver/unifi-controller
container_name: unifi-controller
environment:
- PUID=1000
- PGID=1000
- MEM_LIMIT=1024M #optional
volumes:
- data:/config
ports:
- 3478:3478/udp
- 10001:10001/udp
- 8080:8080
- 8081:8081
- 8443:8443
- 8843:8843
- 8880:8880
- 6789:6789
restart: unless-stopped
volumes:
data:
The docker-compose
should be pretty self-explanatory.
It really just forwards the necessary ports from the Docker container to the host machine.
Once configured, run the container.
$ docker-compose up -d
Then, just open the UniFi Controller’s web UI.
$ open http://127.0.0.1:8443
$ xdg-open http://127.0.0.1:8443