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.

Tutorial

An existing Docker image makes setting up the UniFi Controller a breeze. Here’s how.

Install Docker

First, you must install Docker on your system.

  1. Install Docker Compose.

    $ sudo apt -y install docker-compose
  2. Add your user to the docker group if you want to run docker without requiring superuser privileges.

    $ sudo usermod -aG docker $USER
  3. Reboot to complete the installation.

    $ sudo reboot

Compose

Configuring the docker-compose file should provide all of the necessary details required to get the controller up and running.

  1. With Docker installed, create a directory for the docker-compose file.

    $ mkdir unifi_controller
    $ cd unifi_controller
  2. Configure the docker-compose file.

    The provided docker-compose file requires just one tweak, configuring the volume.

    docker-compose.yml
    ---
    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.

  3. Once configured, run the container.

    $ docker-compose up -d
  4. Then, just open the UniFi Controller’s web UI.

    fish
    $ open http://127.0.0.1:8443
    Other shells
    $ xdg-open http://127.0.0.1:8443