• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: network not mounted before jellyfin starts

     
    • 0 Vote(s) - 0 Average

    SOLVED: network not mounted before jellyfin starts

    jellyfin losses all my media after a reboot of os
    binarygeek119
    Offline

    Junior Member

    Posts: 4
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    #1
    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.2Confused-facemnt/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
    1. media is full
    2. sudo reboot
    3. media is empty
    4. rescan
    5. media is full again
    What is the current 

    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
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-04-14, 01:55 AM
    Are your network shares mounted at /media and /mnt? What are the contents of /etc/fstab?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    binarygeek119
    Offline

    Junior Member

    Posts: 4
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    #3
    2025-04-14, 02:54 AM (This post was last modified: 2025-04-14, 02:57 AM by binarygeek119. Edited 2 times in total.)
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>  <type>  <options>      <dump>  <pass>
    # / was on /dev/sda2 during curtin installation
    /dev/disk/by-uuid/6e157833-fbec-41a5-994a-490c34f02362 / ext4 defaults 0 1
    # /boot/efi was on /dev/sda1 during curtin installation
    /dev/disk/by-uuid/6821-3E62 /boot/efi vfat defaults 0 1
    /swap.img      none    swap    sw      0      0

    192.168.1.2: /mnt/user/media    /media nfs    defaults,fsc        0      0
    192.168.1.2: /mnt/user/photoprism    /mnt nfs    defaults,fsc        0      0

    theres no space after the ip address and before the slash. it added a emoji there so fixed it for post.
    binarygeek119
    Offline

    Junior Member

    Posts: 4
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    #4
    2025-04-14, 05:50 AM
    i think i got it.
    i needed to change want=network-online.target to Requires=network-online.target

    [Unit]
    Description = Jellyfin Media Server
    Requires=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
    « Next Oldest | Next Newest »

    Users browsing this thread: 2 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode