Systemd units for unifi-systemd container
- UniFi OS
>=1.10.0 <2.0.0
is required.
Install unifi-systemd.
podman exec unifi-os sh -c "curl -fsSLo /tmp/unifi-systemd_1.0.0_all.deb https://github.com/ntkme/unifi-systemd/releases/download/v1.0.0/unifi-systemd_1.0.0_all.deb && dpkg -i /tmp/unifi-systemd_1.0.0_all.deb && rm /tmp/unifi-systemd_1.0.0_all.deb"
Install systemd units from this repository to /mnt/data/etc/systemd/system
.
curl -fsSL https://github.com/ntkme/unifi-systemd-units/archive/HEAD.tar.gz | tar -vxzC /mnt/data --strip-components 1 --exclude '*/.github' --exclude '*/docs' --exclude '*/test' --exclude '*/*.md' --exclude '*/LICENSE' && unifi-systemd reload
unifi-systemd
is a container that runs systemd
and nested podman
containers.
Use unifi-systemd shell
to enter the container shell to interact with systemctl
and podman
.
See the links below for documentation of services provided by this repository.
- container-adguardhome
- container-boringtun
- container-caddy{,-unifi}
- container-certbot{,-unifi}
- container-homebridge
- container-inadyn
- container-wpa_supplicant
- ssh-key-dir
To create a new container service unit, see podman-generate-systemd(1).
It is recommended to gracefully stop all services with unifi-systemd stop
before create a backup. Services can be restarted with unifi-systemd start
.
By default, the following directories are used to store config and data.
/mnt/data/etc
/mnt/data/var
To store data on hard disk instead of the eMMC, move the directories into /mnt/data_ext
and create symlinks on /mnt/data
.
unifi-systemd stop
mv /mnt/data/etc /mnt/data_ext/etc && ln -s /mnt/data_ext/etc /mnt/data/etc
mv /mnt/data/var /mnt/data_ext/var && ln -s /mnt/data_ext/var /mnt/data/var
unifi-systemd start
To migrate from udm-boot, please install unifi-systemd
and unifi-systemd-units
first.
podman exec unifi-os dpkg -P udm-boot
podman exec unifi-systemd systemctl enable unifi-entrypoint@mnt-data-on_boot.d.service