2025-04-14, 01:29 AM
(This post was last modified: 2025-04-14, 06:44 AM by binarygeek119. Edited 2 times in total.)
from github
Description of the bug
when i go to reboot my server when everything comes back up and i go into a library its empty. and before i restarted it was full of media. i have to rescan and get my media back. im on a network share nfs mounted with fstab
192.168.1.2
mnt/user/media /media nfs defaults,fsc 0 0
i have set RequiresMountsFor in /etc/systemd/system/multi-user.target.wants/jellyfin.service
RequiresMountsFor=/media
im not sure what else i can do. it only happens if i reboot if i restart the jellyfin server its fine. only a full os reboot is when i lose everything.
Reproduction steps
response
Your Jellyfin server is starting up before the network mount has been mounted. Jellyfin sees nothing in the folders since the network mount is not up yet, so nothing is in the libraries as Jellyfin thinks that everything has been removed.
how do i make jellyfin wait for network to be up and running before starting?
my service file.
[Unit]
Description = Jellyfin Media Server
After = network-online.target
Wants=network-online.target
[Service]
RequiresMountsFor=/media
RequiresMountsFor=/mnt
Type = simple
EnvironmentFile = /etc/default/jellyfin
User = jellyfin
Group = jellyfin
WorkingDirectory = /var/lib/jellyfin
ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
Restart = on-failure
TimeoutSec = 15
SuccessExitStatus=0 143
[Install]
WantedBy = multi-user.target
Description of the bug
when i go to reboot my server when everything comes back up and i go into a library its empty. and before i restarted it was full of media. i have to rescan and get my media back. im on a network share nfs mounted with fstab
192.168.1.2

i have set RequiresMountsFor in /etc/systemd/system/multi-user.target.wants/jellyfin.service
RequiresMountsFor=/media
im not sure what else i can do. it only happens if i reboot if i restart the jellyfin server its fine. only a full os reboot is when i lose everything.
Reproduction steps
- media is full
- sudo reboot
- media is empty
- rescan
- media is full again
response
Your Jellyfin server is starting up before the network mount has been mounted. Jellyfin sees nothing in the folders since the network mount is not up yet, so nothing is in the libraries as Jellyfin thinks that everything has been removed.
how do i make jellyfin wait for network to be up and running before starting?
my service file.
[Unit]
Description = Jellyfin Media Server
After = network-online.target
Wants=network-online.target
[Service]
RequiresMountsFor=/media
RequiresMountsFor=/mnt
Type = simple
EnvironmentFile = /etc/default/jellyfin
User = jellyfin
Group = jellyfin
WorkingDirectory = /var/lib/jellyfin
ExecStart = /usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
Restart = on-failure
TimeoutSec = 15
SuccessExitStatus=0 143
[Install]
WantedBy = multi-user.target