-
Notifications
You must be signed in to change notification settings - Fork 105
Startup
Donald Webster edited this page Jun 20, 2018
·
6 revisions
Create the file /etc/systemd/system/unifi-video.service
and include the below options, be sure to modify the appropriate directory and UID/GID options. The --rm
option means that it gets removed when stopped, so to update your container you can just docker pull pducharme/unifi-video-controller
and then systemctl restart unifi-video
.
[Unit]
Description=Ubiquiti UniFi Video Server
After=network.target zfs.target docker.service
Requires=docker.service
[Service]
Restart=on-failure
Type=simple
ExecStart=/usr/bin/docker run --rm \
--name unifi-video \
--cap-add DAC_READ_SEARCH \
--cap-add SYS_ADMIN \
--cap-add NET_BIND_SERVICE \
--cap-add SYS_PTRACE \
--cap-add SETUID \
--cap-add SETGID \
-p 10001:10001 \
-p 1935:1935 \
-p 6666:6666 \
-p 7080:7080 \
-p 7442:7442 \
-p 7443:7443 \
-p 7444:7444 \
-p 7445:7445 \
-p 7446:7446 \
-p 7447:7447 \
-v <config path>:/var/lib/unifi-video \
-v <videos path>:/var/lib/unifi-video/videos \
-e PUID=<uid> \
-e PGID=<gid> \
-e TZ=America/Los_Angeles \
-e DEBUG=1 \
pducharme/unifi-video-controller
ExecStop=/usr/bin/docker stop -t 30 unifi-video
[Install]
WantedBy=default.target