Deploying UniFi Controller in Docker on Synology NAS – the ultimate guide

Want to host your UniFi Controller without buying a Cloud Key or gateway? Running it in Docker on your Synology NAS is a great option. Your NAS is always on, flexible, and powerful enough to run the controller alongside other services. This guide walks you through setup, tips, and recovery, all without unnecessary fluff.

Let’s dive in !!

Before we dive in, please don't self-host your UniFi Controller if you take care of client networks. Sooner or later this will cause issues! It's fine for home users, but definitely not recommended for IT service businesses and MSPs. If you want secure, reliable and a scalable hosting solution check out UniHosted. )

why run UniFi in Docker on Synology?

  • Always‑on hardware: Synology NAS runs 24/7, no need for a separate PC or Cloud Key
  • No extra cost: Use an existing NAS and free Docker, no new hardware
  • Easy control and backup: Use Synology’s tools to manage container files and snapshots
  • Full access: Tools like Portainer and MacVLAN give you total network control

prerequisite checklist

Make sure you have:

  • A Synology NAS with Docker or Container Manager
  • Docker package installed
  • Admin or sudo access on the NAS
  • A static IP address for your NAS
  • At least 100 MB free space on volume for UniFi config files

Step 1: prep your folders

Create a folder structure:

/volume1/docker/unifi/data

This holds all UniFi config data, makes backups easy, and keeps data separate from the system OS

Step 2: pull the UniFi Docker image

In DSM Container Manager:

  • Go to Registry
  • Search for jacobalberty/unifi (most common)
  • Download the latest tag

Alternatively, use this command via SSH:

bash
docker pull ghcr.io/jacobalberty/unifi-controller

Step 3: configure networking

Option A: Host network mode

Easiest, makes port binding consistent with NAS LAN IP.

Option B: MacVLAN

Recommended if you need the container to have its own IP (e.g. for device discovery)

Use Portainer or CLI to set up a MacVLAN network tied to your LAN and assign a fixed IP to the UniFi container.

Step 4: deploy the Docker container

Via GUI or CLI:

Example CLI command:

bash
docker run -d \
  --name=unifi-controller \
  --network=host \
  -e PUID=1026 -e PGID=100 \
  -e TZ=Asia/Kolkata \
  -v /volume1/docker/unifi/data:/unifi \
  --restart unless-stopped \
  ghcr.io/jacobalberty/unifi-controller

Ports to ensure are mapped with host mode:

  • 8080, 8443, 8880, 8843 (HTTP/HTTPS)
  • 3478/udp, 10001/udp (discovery, STUN)

Step 5: launch the controller and configure it

  1. Visit https://<NAS_IP>:8443
  2. Go through the setup wizard, create account, choose site
  3. Navigate to Settings → System → Advanced
  4. Set Override Inform Host to your NAS IP so devices can find it
  5. Save and restart container

Step 6: adopt UniFi devices

  • Reset devices from old controllers
  • Use SSH or QR code for adoption
  • In the Controller UI, click Adopt, status will change to “Connected”

Tip: If devices don’t show up, ensure the container can receive discovery traffic (Host mode or correct MacVLAN).

Step 7: set up backups

  • Enable automatic backups in UniFi settings
  • Back up /volume1/docker/unifi/data via Synology’s Hyper Backup
  • Store off-site backups to cloud for disaster recovery

step 8: troubleshoot adoption and network issues

  • If devices don’t adopt, set inform URL manually:
bash
set-inform http://<NAS_IP>:8080/inform
  • Restart the container after config changes
  • If in MacVLAN mode, ensure “Inform Host” matches NAS IP

real-world tips from the community

Reddit users highlight: \n> [!info]

“You MUST override the Inform Host IP with the Docker host address.” “It just worked, no real issues. Worked far better than the basic Cloud Key.”

updates, maintenance, and scaling

  • Pull new image versions via Docker registry
  • Restart container after updates to apply fixes
  • Expand NAS volume and back up data directory
  • Monitor logs in Container Manager and DSM
  • Manage via Portainer if used

pros and cons

Pros:

  • Affordable, no need for new hardware
  • Synology tools for easy backup and snapshots
  • Docker isolation keeps data safe

Cons:

  • Slight complexity vs Cloud Key
  • Needs Docker and some command-line knowledge
  • Tech-savvy setup, but worth it for flexibility

final thoughts

Hosting your UniFi Controller in Docker on a Synology NAS gives you full control, reliability, and cost savings. You get all features, device adoption, firmware management, remote access, without extra hardware.

If you’d rather skip setup or need guaranteed uptime and backups, check out pUnihosted, where we take care of everything in the cloud, so you focus on your network, not servers.