Hey there, I need some help!
I always used Jellyfin with docker-compose, but right now I’m trying to embrace the podman way, even though I never used it before.
I managed to create a working container following the official docs, so just launching the following command does start Jellyfin correctly:
podman run \
--detach \
--label "io.containers.autoupdate=registry" \
--name jellyfin \
--publish 8096:8096/tcp \
--rm \
--user $(id -u):$(id -g) \
--userns keep-id \
--volume jellyfin-cache:/cache:Z \
--volume jellyfin-config:/config:Z \
--mount type=bind,source=/mnt/Kingston,destination=/media,ro=false,relabel=shared \
docker.io/jellyfin/jellyfin:latest
Now the problem is that I can’t find a way to autostart this container on boot.
With docker-compose I didn’t have to do anything beside enabling the docker daemon.
With podman, following the docs again, I created ~/.config/containers/systemd/jellyfin.container
, which contains:
[Container]
Image=docker.io/jellyfin/jellyfin:latest
AutoUpdate=registry
PublishPort=8096:8096/tcp
UserNS=keep-id
Volume=jellyfin-config:/config:Z
Volume=jellyfin-cache:/cache:Z
Volume=/mnt/Kingston:/media:z
[Service]
# Inform systemd of additional exit status
SuccessExitStatus=0 143
[Install]
# Start by default on boot
WantedBy=default.target
But when I do systemctl --user daemon-reload && systemctl --user start jellyfin
, the service seems to start correctly, but I can’t connect to Jellyfin.
Doing systemctl --user status jellyfin
shows this:
○ jellyfin.service
Loaded: loaded (/home/andrea/.config/containers/systemd/jellyfin.container; generated)
Drop-In: /usr/lib/systemd/user/service.d
└─10-timeout-abort.conf
Active: inactive (dead) since Mon 2024-09-09 10:36:36 CEST; 18min ago
Duration: 38ms
Process: 9331 ExecStart=/usr/bin/podman run --name=systemd-jellyfin --cidfile=/run/user/1000/jellyfin.cid --replace --rm --cgroups=split --sdnotify=conmon -d --userns keep-id -v je>
Process: 9384 ExecStop=/usr/bin/podman rm -v -f -i --cidfile=/run/user/1000/jellyfin.cid (code=exited, status=0/SUCCESS)
Process: 9444 ExecStopPost=/usr/bin/podman rm -v -f -i --cidfile=/run/user/1000/jellyfin.cid (code=exited, status=0/SUCCESS)
Main PID: 9331 (code=exited, status=0/SUCCESS)
CPU: 94ms
set 09 10:36:36 fedora systemd[1913]: Starting jellyfin.service...
set 09 10:36:36 fedora systemd[1913]: Started jellyfin.service.
So it seems like something is wrong, but I really cannot understand what’s the problem.
I could just give up and install Jellyfin from rpmfusion, but I’d like to keep it portable.
So, can you help me figure this out?
Thanks!
PS. Note that manually launching the container with podman run...
still works. The problem is with the systemd service