Unifi Controller setup with Podman
September 29, 2022
Overview
I had an old Cloud Key that was my Unifi Controller for several years. I decided to virtualize it though and move it to my NAS/media server. That system is running Fedora Workstation, and I chose to use Podman to host it as a container.
Creating the container
# Create directory for configuration
mkdir ~/.config/unifi-container
# Create Podman container
podman run --detach --name unifi -e MEM_LIMIT=1024 -e MEM_STARTUP=1024 -p 8443:8443 -p 3478:3478/udp -p 10001:10001/udp -p 8080:8080 -p 1900:1900/udp -p 8843:8843 -p 8880:8880 -p 6789:6789 -p 5514:5514/udp -v ~/.config/unifi-container:/config:Z docker.io/linuxserver/unifi-controller
# Create a systemd file
podman generate systemd --restart-policy=always unifi > ~/.config/systemd/user/unifi-container.service
# Enable the systemd file
systemctl --user enable unifi-container.service
Navigating to localhost:8843 should present you with an initial setup screen. I was migrating from my Cloud Key, so I chose to import the configuration file that I downloaded before powering down the Cloud Key. Once you’ve got the virtual controller set up, be sure to go to Settings -> Network Application and set the “Network application Hostname/IP” to the IP address of the server running the controller. Also check the box directly below to “Override inform host…“. If you don’t do this, the controller will provide its internal Podman IP address, and the other devices on your network will not be able to find it.
Conclusion
That’s basically it. Another short post that serves as documentation for me and hopefully helps someone else.