← All articles
Medical iv bags are hanging in a row.

Self-Hosting the Unifi Network Controller: Centralized Network Management

Networking 2026-02-15 · 5 min read unifi networking ubiquiti network-management wifi
By Selfhosted Guides Editorial TeamSelf-hosting practitioners covering open source software, home lab infrastructure, and data sovereignty.

If you've ever managed multiple access points, switches, or network devices, you know the pain of logging into each one individually. Consumer routers give you one admin panel per device. Enterprise solutions cost thousands in licensing fees. Ubiquiti's Unifi sits in between — enterprise-grade hardware with a free software controller you can self-host.

Photo by David Farkas on Unsplash

The Unifi Network Controller (now called "Unifi Network Application") is the management software for Ubiquiti's Unifi hardware lineup. It handles device adoption, firmware updates, VLAN configuration, WiFi networks, firewall rules, and network analytics from a single dashboard.

Unifi Network Controller logo

Why Self-Host the Controller?

Ubiquiti offers a cloud-hosted controller option (through their UniFi OS consoles like the Dream Machine), but self-hosting gives you:

Unifi Controller vs. Alternatives

Feature Unifi Controller OpenWrt MikroTik (Winbox) Omada (TP-Link)
Price Free (with Unifi hardware) Free (open source) Free (with hardware) Free (with Omada hardware)
Hardware ecosystem Ubiquiti only Many routers MikroTik only TP-Link Omada
Central management Yes No (per-device) Limited (Dude) Yes (Omada Controller)
VLANs Yes Yes Yes Yes
Self-hosted Yes N/A (runs on router) Yes (Dude) Yes
WiFi management Excellent Limited N/A (no APs) Good
Mobile app Yes No Yes Yes
Learning curve Moderate High Very high Moderate
Open source No (proprietary) Yes (GPL) No No

When Unifi makes sense

When to look elsewhere

Self-Hosting: What You Need

Hardware requirements

The controller itself is lightweight:

Docker setup (recommended)

Using the linuxserver.io image, which is well-maintained and widely used:

version: "3"
services:
  unifi:
    image: lscr.io/linuxserver/unifi-network-application:latest
    container_name: unifi
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - MONGO_USER=unifi
      - MONGO_PASS=your-mongo-password
      - MONGO_HOST=mongo
      - MONGO_PORT=27017
      - MONGO_DBNAME=unifi
    volumes:
      - ./unifi-config:/config
    ports:
      - 8443:8443  # Web UI (HTTPS)
      - 3478:3478/udp  # STUN
      - 10001:10001/udp  # Device discovery
      - 8080:8080  # Device communication
    depends_on:
      - mongo
    restart: unless-stopped

  mongo:
    image: mongo:7
    container_name: unifi-mongo
    volumes:
      - ./mongo-data:/data/db
    restart: unless-stopped

After starting, access the controller at https://your-server-ip:8443.

Important ports

Port Protocol Purpose
8443 TCP Web management UI
8080 TCP Device inform/communication
3478 UDP STUN (required for AP adoption)
10001 UDP Device discovery
6789 TCP Mobile speed test (optional)
1900 UDP L2 discovery (optional)

All of these need to be accessible from your Unifi devices. If the controller is on a different subnet, you'll need to handle L3 adoption (see below).

Like what you're reading? Subscribe to Self-Hosted Weekly — free weekly guides in your inbox.

Adopting Devices

Once the controller is running, you need to "adopt" your Unifi devices. The controller discovers them, you click "Adopt," and they pull their configuration from the controller.

Same-subnet adoption (easy)

If the controller and devices are on the same Layer 2 network, devices will auto-discover the controller. Just click "Adopt" in the UI.

L3 adoption (different subnets)

If the controller is on a different subnet (common in self-hosted setups), you have two options:

Option 1: DHCP option 43 — Configure your DHCP server to send the controller's IP address as option 43. Unifi devices check this during boot.

Option 2: SSH into the device — SSH into the Unifi device (default credentials: ubnt/ubnt) and run:

set-inform http://controller-ip:8080/inform

Migrating from a Cloud Key or Dream Machine

If you're moving from a hardware controller to a self-hosted one:

  1. Export a backup from the old controller (Settings > Backup)
  2. Import it into your new self-hosted controller during setup
  3. Force-adopt any devices that don't automatically reconnect

Key Features Worth Configuring

VLANs and network segmentation

Unifi makes VLAN setup straightforward:

  1. Create networks in the controller (Settings > Networks)
  2. Assign VLAN IDs
  3. Configure switch port profiles to tag/untag VLANs
  4. Assign WiFi networks to specific VLANs

Common setup: separate VLANs for trusted devices, IoT devices, and guest WiFi.

Guest WiFi with captive portal

The controller can serve a captive portal for guest networks — useful for short-term rentals, offices, or events. Guests connect, see a splash page, accept terms, and get internet access on an isolated VLAN.

Traffic analytics

The controller collects DPI (Deep Packet Inspection) statistics by default, showing which devices are using bandwidth and what they're connecting to. This is useful for troubleshooting but can be disabled if you prefer not to collect this data.

Wireless uplink (mesh)

If you can't run Ethernet to every access point, Unifi supports wireless uplink (mesh). An AP without a wired connection will wirelessly mesh with nearby wired APs. Performance takes a hit, but it's better than no coverage.

What to Watch Out For

Backups

The controller has built-in backup functionality:

For Docker deployments, also back up the config volume:

tar czf unifi-backup-$(date +%Y%m%d).tar.gz ./unifi-config

Bottom Line

The Unifi Network Controller is the best option for managing a fleet of Ubiquiti devices from a single interface. Self-hosting it frees you from needing a Cloud Key or Dream Machine, and gives you full control over your network management infrastructure.

The main trade-off is vendor lock-in — you're committed to Ubiquiti hardware. But if you're already using Unifi APs and switches (or planning to), self-hosting the controller is a no-brainer. It's free, lightweight, and runs happily on a VM or container alongside your other self-hosted services.

For pure routing and firewall functionality, OPNsense or pfSense might be better choices. But for WiFi management and network-wide device configuration, Unifi's controller is hard to beat in the homelab space.

Get free weekly tips in your inbox. Subscribe to Self-Hosted Weekly