this post was submitted on 17 Feb 2025
50 points (96.3% liked)

Selfhosted

42716 readers
482 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I didn't like Kodi due to the unpleasant controls, especially on Android, so I decided to try out Jellyfin. It was really easy to get working, and I like it a lot more than Kodi, but I started to have problems after the first time restarting my computer.

I store my media on an external LUKS encrypted hard drive. Because of that, for some reason, Jellyfin's permission to access the drive go away after a reboot. That means something like chgrp -R jellyfin /media/username does work, but it stops working after I restart my computer and unlock the disk.

I tried modifying the /etc/fstab file without really knowing what I was doing, and almost bricked the system. Thank goodness I'm running an atomic distro (Fedora Silverblue), I was able to recover pretty quickly.

How do I give Jellyfin permanent access to my hard drive?

Solution:

  1. Install GNOME Disks
  2. Open GNOME Disks
  3. On the left, click on the drive storing your media
  4. Click "Unlock selected encrypted partition" (the padlock icon)
  5. Enter your password
  6. Click "Unlock"
  7. Select the LUKS partition
  8. Click "Additional partition options" (the gear icon)
  9. Click "Edit Encryption Options..."
  10. Enter your admin password
  11. Click "Authenticate"
  12. Disable "User Session Defaults"
  13. Select "Unlock at system startup"
  14. Enter the encryption password for your drive in the "Passphrase" field
  15. Click "Ok"
  16. Select the decrypted Ext4 partition
  17. Click "Additional partition options" (the gear icon)
  18. Click "Edit Mount Options..."
  19. Disable "User Session Defaults"
  20. Select "Mount at system startup"
  21. Click "Ok"
  22. Navigate to your Jellyfin Dashboard
  23. Go to "Libraries"
  24. Select "Add Media Library"
  25. When configuring the folder, navigate to /mnt and then select the UUID that points to your mounted hard drive
top 6 comments
sorted by: hot top controversial new old
[–] wildbus8979@sh.itjust.works 11 points 4 days ago (1 children)

You need to setup /etc/crypttab to unlock the disk: https://linux.die.net/man/5/crypttab

[–] Charger8232@lemmy.ml 7 points 4 days ago* (last edited 4 days ago) (1 children)

I used GNOME Disks to modify /etc/crypttab and /etc/fstab to auto decrypt and auto mount on boot. Jellyfin still loses its access each time I restart, even though the jellyfin group still displays having access to the files.

Edit: Turns out it does have access, but it's no longer under the /media/username directory. I have to point Jellyfin to /mnt/UUID instead. This fixed it!

[–] catloaf@lemm.ee 3 points 4 days ago

What changes were made, exactly? Not everyone has a desktop environment on their server.

[–] mierdabird@lemmy.dbzer0.com 8 points 4 days ago

Thanks for editing in the solution!

[–] Scholars_Mate@lemmy.world 4 points 4 days ago

What filesystem are you using on the external drive? If it is NTFS or FAT, they won't store permissions on the filesystem, which would explain why the owner/group changes are not persistent. To fix that, you can set the uid/gid on mount in your fstab.

/dev/mapper/YOUR_DRIVE /path/to/mnt <fstype> rw,uid=<jellyfin_uid>,gid=<jellyfin_gid>,dmask=0002,fmask=0113
[–] ocean@lemmy.selfhostcat.com 2 points 4 days ago

I bet it’s because it’s encrypted. Idk if there’s a fix to that. I had a lot of trouble making local servers auto unlock when using LUKS.