Skip to content

Instantly share code, notes, and snippets.

@bartprokop
Last active June 20, 2025 15:53
Show Gist options
  • Save bartprokop/1f1cb022c652c20166a5c37ccb1d4554 to your computer and use it in GitHub Desktop.
Save bartprokop/1f1cb022c652c20166a5c37ccb1d4554 to your computer and use it in GitHub Desktop.
Unifi in Docker

Running UniFi Controller on Docker

One time setup

I prefer to run UniFi controller in my DMZ network zone, instead of doing Docker port forward. So I just created VLAN aware Docker network.

docker network create --driver=ipvlan --subnet=192.168.17.0/24 --gateway=192.168.17.1 --ip-range=192.168.17.64/28 -o parent=enp1s0 ipvlan17

Upgrade

Stop and remove container

docker stop unifi
docker ps --all # look for: Exited (0) 8 seconds ago
docker rm unifi

Pull latest image:

docker pull jacobalberty/unifi:latest

And finally start new container:

docker run -d --init --network=ipvlan17 --ip=192.168.17.65 -e TZ='Europe/Belfast' -v /mnt/docker/unifi:/unifi --user unifi --name unifi jacobalberty/unifi

Some resources:

https://hub.docker.com/r/jacobalberty/unifi/

  • stop: docker stop unifi
  • pull image: docker pull jacobalberty/unifi
  • pull specific image: docker pull jacobalberty/unifi:v9.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment