Running UniFi in Docker saves resources, simplifies updates, and makes backups painless. In this guide, I’ll show you how to set up the UniFi Network Controller using jacobalberty/unifi-docker

Why Run UniFi in Docker Instead of the Default Installer?
If you’ve tried UniFi’s official installation methods, you’ve probably noticed:
- They often require a full VM.
- Updates can be clunky.
- Backups and migrations aren’t always seamless.
Docker solves all of these pain points. With UniFi running in containers, you get:
- Lightweight setup — no need for a full VM.
- Easy backups and restores — just mount a volume.
- Consistent updates — always stay on the latest version.
- Flexible deployment — spin it up anywhere Docker runs.

The Best Dockerized UniFi Option
If you search Google or ask an AI, you’ll find many GitHub repos offering UniFi in Docker. But the one I’ve used successfully (and recommend) is jacobalberty/unifi-docker
Here’s why I like it:
- Runs three containers: UniFi, MongoDB, and logs.
- Requires minimal configuration.
- Updates frequently to the latest UniFi release.
- Works right out of the box.

Running UniFi Controller with Docker
Here’s the simplest docker run command to get UniFi running:
docker run -d --init \
--restart=unless-stopped \
-p 8080:8080 \
-p 8443:8443 \
-p 10001:10001/udp \
-p 3478:3478/udp \
-e TZ='Asia/Teharn' \
-v ~/unifi:/unifi \
--user unifi \
--name unifi \
jacobalberty/unifi
Alternatively, you can:
- Clone the project and build it yourself.
- Use the included
docker-compose.ymlfor easier stack management.
Important Notes for Access Points
When adopting new UniFi APs, remember:
UniFi needs port 10001 open for adoption. Sometimes adoption fails. If that happens, try:
- Running the container in host networking mode.
- Importing an existing site backup into the Docker instance.