Skip to content

Instantly share code, notes, and snippets.

Last active December 19, 2022 01:59
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
UniFi Controller with podman


Installed on Fedora Server 31 after running an update and reboot.

sudo dnf install podman
sudo systemctl enable io.podman.service
sudo systemctl start io.podman.service
sudo firewall-cmd --add-port 8081/tcp --add-port 8080/tcp --add-port 8443/tcp --add-port 8880/tcp --add-port 8843/tcp --zone=FedoraServer --permanent
sudo firewall-cmd --reload
sudo podman pull
sudo setsebool -P container_manage_cgroup on

Create container

sudo podman create -d --name unifictl --privileged --net=host -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-ubuntu

Create systemd service

sudo bash -c 'cat >  /etc/systemd/system/unifictl-container.service <<EOF
Description=UniFi Controller Container

ExecStart=/usr/bin/podman start -a unifictl
ExecStop=/usr/bin/podman stop -t 2 unifictl


sudo systemctl enable unifictl-container.service

Start container

sudo systemctl start unifictl-container.service

Install controller

Reference script:

sudo podman exec -it unifictl /bin/bash
cat > /etc/sysctl.d/10-ipv6.conf <<EOF
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

sysctl -p /etc/sysctl.d/10-ipv6.conf

apt update ; apt upgrade -y ; apt install vim iproute2 wget net-tools apt-utils dialog ca-certificates -y
wget ; chmod +x ; ./ -skip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment