UniFi Controller container setup
Introduction
The UniFi Controller is software that allows users to configure and monitor UniFi devices like access points, switches, and firewalls.
Setup
- 
Create the folders needed by the container
Run the following commands inside your home folder:
# Open your terminal applicationcd ~mkdir -p unifi/datamkdir -p unifi/logcd unifi - 
Create the script needed to run the container
Save the following script as
unifi_run.sh:unifi_run.sh # To create this script use your text editor application, for example NanoIDu=$(id -u $(logname)) # Saves the logged in user id in the IDu variableIDg=$(id -g $(logname)) # Saves the logged in user group in the IDg variabledocker run -d \--init \--name=unifi \--hostname=unifi \--net=host \-v $PWD/data:/unifi \-e RUNAS_UID0=false \-e UNIFI_UID=$IDu \-e UNIFI_GID=$IDg \-e TZ="Europe/Amsterdam" \--cap-add=NET_ADMIN \--restart=unless-stopped \jacobalberty/unifi# IMPORTANT: Please read the instructions belowInstructions:
- Optional  Replace 
dockerwithpodmanif needed - Optional  Replace 
--net=hostwith ports to pass through if you want to expose ports. Here is described how to check if ports are available - Optional  Replace 
$PWD/unifiwith your location if needed - Required  Replace 
Europe/Amsterdamwith your own timezone 
 - Optional  Replace 
 - 
Run the script to create the container
Run the following command:
# Open your terminal applicationsudo sh unifi_run.shThe image
jacobalberty/unifiis automatically pulled and the container is created. - 
Check the results
If needed you can check if the container is running properly.
In a minute or two, (after UniFi Controller starts up) you can go to https://localhost:8443 to complete configuration from the web (initial install) or resume using UniFi Controller. Replace localhost with the relevant IP address or FQDN if needed, and adjust the port if you changed it earlier.
 
No comments found for this note.
Join the discussion for this note on Github. Comments appear on this page instantly.