Install Unifi Network Controller on Asustor NASSummary: These notes are based off a few Unifi Controller installs I found documented on the web which I used as a guide (with some modification) to install and configure Unifi Controller on an AS6604T.
Prerequisite: Docker (via Portainer)
1) Create a Unifi folder to store the Unifi config files
- Using File Explorer in ADM create a folder named <Unifi> in the Docker folder
- ie: ADM/Docker/Unifi
◦ ** NOTE: Step 1 is not required but nice if you want to have a local backup when upgrading. This will be addressed later in step 3 below...
2) Install the jacob alberty docker image for Unifi controller
- Open Portainer
- Select Images,
▪ Registry: <DockerHub>
▪ Image: enter <jacobalberty/unifi> and pull image
- When download has completed, change to the containers tab
3) Add and Configure the Unifi Container
▪ Add container
▪ Name: <Unifi>
▪ Image configuration:
• Registry: <DockerHub>
• Image: <jacobalberty/unifi:latest>
• Enable Always Pull image
▪ Network Port Configuration:
• Select manual port Publishing, enter ports (same for both host and container)
◦ 8080/tcp - Device command/control
◦ 8443/tcp - Web interface + API
◦ 8843/tcp - HTTPS portal
◦ 8880/tcp - HTTP portal
◦ 3478/udp - STUN service
◦ 6789/tcp - Speed Test (unifi5 only)
◦ 10001/udp - Discovery
• Enable Access Control: Select <Administrators>
**NOTE: After this point if the advanced settings are unavailable do the following:
- select deploy
- stop service on this container
- open the container and select edit to modify the remaining settings
- when completed then redeploy the container
• Advanced container settings:
• Restart Policy: <Always>
• Advanced container settings:
• Command and Logging: <No Change>
• Advanced container settings:
• Runtime and Resources:
◦ memory limit <set as 1024k>
◦ Cpu Limit: <set as 2>
• Advanced container settings:
• Environment:
◦ Set BIND_PRIV to <false>
◦ Set RUNAS_UID0 to <false>
• Advanced container settings:
• Network: Set to <bridge>
• Advanced container settings:
• Volumes: [Select ADD and include these additional volumes, there are likely a couple of other entries there to start]
◦ container: /unifi/data/backup [Select BIND]
◦ host: /volume1/Docker/Unifi/data/backup [Select Writable]
◦ container: /unifi/data/firmware [Select BIND]
◦ host: /volume1/Docker/Unifi/data/firmware [Select Writable]
** NOTE: The section on adding volumes is required only if you want to utilize the folder created in step 1 above... I wanted to carve out just the backup and firmware directories, if you want everything (including the config, logs, etc) you can probably add a single mount point for /unifi and bind that and it should capture all. This allows the Unifi controller to save outside the container and on the NAS file system directly and in doing so you can destroy, recreate or upgrade the container while retaining this data. Keep in mind these PATHS will be specific to your NAS so you may need to confirm it is correct in your case.
4) Login to your Unifi server
•
https://<server IP Address>:8443
Troubleshooting:If unifi devices do not start to appear for adoption:
• then ssh into each device
• enter command to adopt:
◦ set-inform
http://<server IP address>:8080/inform
• you may also need to create an alias in DNS for server name to be "Unifi" for registration to work