Unifi Controller - zbrewer/homelab GitHub Wiki
The UniFi controller can be installed in a unprivileged Proxmox container to manage UniFi APs and other devices.
Preparation
A normal, unprivileged container can be created for the UniFi controller based on Debian or Ubuntu Server. This container should be created on the same VLAN that the APs will be managed on.
Installation
Instructions for self-hosting are available on the UniFi website; however, the easiest way to do this is to use the community-made install scripts available here. Follow the instructions there for the latest version.
Updates
The UniFi controller can be updated using an update script from the same source as the install scripts.
Email Alerts
Email settings can be configured under Settings > System > Advanced
. Select Custom Server
under Email Services
and enter smtp.gmail.com
as the server, 465
as the port, check the SSL
box, and check the Authentication
box. Enter the email address as the username and generate an app password to use at the password. Send a test email (if you'd like) and save the settings. You'll also need to make sure the destination email address is correct for your admin account(s) under the Admins
tab.
Monitoring
The UniFi controller can be monitored using Unpoller running in a Docker container. This exports metrics to InfluxDB which can then be viewed in Grafana dashboards. See my Docker Compose file for Unpoller here.
When setting up Unpoller in Docker Compose, note that the POLLER_TAG
variable can be latest
, INFLUXDB_URL
must start with the protocol (http://
), a new admin user must be created in the UniFi controller with read only permissions so that its username and password can be set in UNIFI_USER
and UNIFI_PASS
, UNIFI_URL
can be a reverse proxy URL to avoid punching another hole through the firewall, and POLLER_DEBUG
and POLLER_SAVE_DPI
can both be false.
Note that the Unpoller dashboards currently rely on InfluxDB 1.8 and therefore need to use InfluxQL instead of Flux. This can be accomplished by creating a new InfluxQL data source, per the instructions here, and setting the Database
to the bucket used by Unpoller. Then use this as the data source for the dashboards.
Also note that these dashboards currently rely on AngularJS, which is deprecated in Grafana. It can be re-enabled by adding GF_SECURITY_ANGULAR_SUPPORT_ENABLED=true
as an environment variable, but it will be completely removed in Grafana 12, so an alternative or migration path will be needed.