UPDATE 11/05/2021 - added some details on the bottom regarding performance of the Unifi US-16-XG switch

If you are looking to run your Ubiquiti gear you will need an Unifi Controller at some point unless you want to pay for the cloud-hosted one. If you are into Docker you can easily configure and run your own.

Unlike some other articles here, this will be a short one just to see how to get this container up and running. Linuxserver team behind this image have done a great job with documentation, so probably there will be nothing unclear.

I will be using the linuxserver/unifi-controller image myself as it is always up to date and maintained by a trusted team. To stay on top of all your docker image update you should look into the DIUN solution, and you will not miss a single update, ever.

Would recommend running this container via Portainer solution also hosted on your Docker host, and for more info on it, you can read up here, and then come back.

Once you have it up and running, make sure to log into your Portainer setup and create a new stack (using docker-compose) with the following compose file (you can of course change it any way you want):

version: "2.1"
    image: ghcr.io/linuxserver/unifi-controller
    container_name: unifi-controller
      - PUID=1000
      - PGID=1000
      - MEM_LIMIT=1024M #optional
      - <path to data>:/config
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      - 8443:8443
      - 1900:1900/udp #optional
      - 8843:8843 #optional
      - 8880:8880 #optional
      - 6789:6789 #optional
      - 5514:5514/udp #optional
    restart: unless-stopped

In order to get to your user and group ID under which you want to run your container do the following:

  1. Log into your NAS using SSH
  2. Elevate to root with sudo -i
  3. Run id command and read your user and group ID values.

Make sure to visit the linuxserver hub page for more info on all the ports and configuration parameters.

NOTE: would recommend keeping the port 8080 as is considering that you might get into problems when you start adding and adopting new devices using the controller. By default adopt will be pushed towards port 8080, and if you have it changed, you will not be able to do it until you make the necessary changes.

It's up, now what?

Now that you have the controller up and running it is time to log in. Be sure to NOT log in using the Ubiquiti cloud solution but rather choose the advanced setup to create your local account.

Log into your web UI using your NAS IP address and the 8443 port (yes the web UI runs on HTTPS)


Setup US‑16‑XG switch

The main reason that I will use this controller is to configure and maintain my new US‑16‑XG Unifi switch from UI.

I have a few NAS models that have dual 10G cards, as well as some that are on 2.5/5G, and getting those speeds of transfer requires a 10G capable switch.

Considering that the devices are still not connected, the Unifi Controller is not registering anything apart from the uplink (port 16) to the rest of the network.

Adopt and update process to the current latest firmware was executed without any major problems and the switch is stable, silent (so far) and ready to be utilized.


DAC cables have arrived. DIGITUS DN-81221 were detected without any problems at all.

DIGITUS DAC 10G cables (DN-81221)
White light = 10G
Unifi controller view, blue light = 10G

Regarding speed with my current setup speeds are about 350-450MB/s (R/W) with RAID6 and RAID5 arrays (RS3614RPxs in both cases).

400GB replication task done in 21min
23:20-23:41 with average speed of aabout 350MB/s and peeks at 409MB/s

I think I will add my 718 and 918 into the mix with 2.5 or 5G adapters as secondary connections in the near future.