Skip to content

Installation: Podman Linux

Michael Wagner edited this page Dec 27, 2022 · 3 revisions

Tested with Podman v4.3.1 on Fedora IoT (Rootless is untested)

Make a folder located at /var/opt/scrypted for Scrypted to store its data.
Create a file with the contents below at:
/etc/systemd/system/container-scrypted.service

Enable Scrypted service and start it.
sudo systemctl --now enable container-scrypted.service

# container-scrypted.service

[Unit]
Description=Podman container-scrypted.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm \
	-f %t/%n.ctr-id
ExecStart=/usr/bin/podman run \
	--cidfile=%t/%n.ctr-id \
	--cgroups=no-conmon \
	--sdnotify=conmon \
	--detach \
	--network=host \
	--tz=local \
	--replace \
        --health-cmd="/usr/bin/curl http://localhost:11080 || exit 1" \
	--volume=/var/opt/scrypted:/server/volume:z \
	--label io.containers.autoupdate=registry \
	--name=scrypted docker.io/koush/scrypted:18-bullseye-full
ExecStop=/usr/bin/podman stop \
	--ignore -t 10 \
	--cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm \
	-f \
	--ignore -t 10 \
	--cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all

[Install]
WantedBy=default.target