Skip to content

Instantly share code, notes, and snippets.

@golharam
Last active December 18, 2023 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save golharam/7191fe4d542c3713e0cd42ca25f01598 to your computer and use it in GitHub Desktop.
Save golharam/7191fe4d542c3713e0cd42ca25f01598 to your computer and use it in GitHub Desktop.
Raspberry PI 4 Ubiquiti Network Controller
  1. Set up Raspberry PI 4 64-bite Lite OS
  2. Disable Wifi & Bluetooth
sudo vi /boot/config.txt

Under the section "[all]", add:

dtoverlay=disable-wifi
dtoverlay=disable-bt

Then reboot

  1. Update Raspberry PI
sudo apt update
sudo apt upgrade
  1. Install Docker
curl -sSL https://get.docker.com | sh
  1. Give our Pi user account access to Docker, then reboot the Raspberry Pi.
# assuming you are using username pi 
sudo usermod -aG docker pi 
sudo reboot now
  1. Create directory of Unifi controller's data
cd ~
mkdir unifi-controller
  1. Create Docker Compose file, ~/compose.yaml
version: "2.1"
services:
  unifi-controller:
    image: lscr.io/linuxserver/unifi-controller:latest
    container_name: unifi-controller
    environment:
      - TZ=America/New_York
    volumes:
      - /home/pi/unifi-controller/:/config
    network_mode: host
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
    restart: unless-stopped
  1. Start the controller
docker compose up
  1. Access Unifi Controller
https://RASPBERRY_PI_IP:8443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment