How to Setup Jellyfin on a Raspberry Pi

Today we are going to look at how to setup Jellyfin on a Raspberry Pi.

Jellyfin is a Plex alternative and it’s a great tool that easily allows you to stream content to various devices. I already created a tutorial on how to install Jellyfin on a Synology NAS, but today we are going to look at how to install Jellyfin on a Raspberry Pi.

A few things before we get started:

  • You should use a Raspberry Pi 4 if you intend on setting this up.
  • If you intend on transcoding, you probably need to get a more powerful device. You’re free to try it out, but you might not get the performance you’re looking for.

This is a great option for people who don’t have a NAS device and don’t want to leave a PC running 24/7. The process will utilize an external hard drive because if you have a NAS or network resource that you’re connecting to, you should probably look into hosting Jellyfin on that. This makes for a great, lightweight media server that you can keep running 24/7.

How to Setup Jellyfin on a Raspberry Pi

1. First, we will create a directory where the external hard drive can mount when our Raspberry Pi is booted.

sudo mkdir /mnt/media

2. Run the command below to get the list of hard drives that we have attached to our Raspberry Pi.

sudo fdisk -l

3. Find your external hard drive in this list. Run the command below and copy the UUID of the external hard drive.

sudo blkid
jellyfin raspberry pi - check id of drives connected

4. Run this command to edit the fstab file.

sudo nano /etc/fstab

5. Enter in the line exactly as shown (add your UUID and drive type) below and write out the file by pressing CTRL + O when complete. NOTE: You must “tab” between each block of text (each space below). It is also important to note that the “nofail” parameter allows you to boot the Raspberry Pi without the external hard drive attached – if this doesn’t exist, your Raspberry Pi will throw an error when the external hard drive is not connected and won’t boot.

UUID=[the UUID of your external hard drive] /mnt/media [drive type] defaults,nofail 0 2
jellyfin raspberry pi - add uuid to fstab file

6. Reboot your Raspberry Pi. When it boots back up, navigate to the folder that we mounted using the commands below and you should see your external hard drives files.

cd /mnt/media
jellyfin raspberry pi - view the media folder

7. Installing Jellyfin on a Raspberry Pi is very straight forward. Run the commands below, in order, and Jellyfin will be installed.

sudo apt install apt-transport-https
wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo apt-key add -
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
sudo apt update
sudo apt install jellyfin

8. Navigate to the IP address of your Raspberry Pi and port 8096 to access Jellyfin.

http://[RASPBERRY_PI_IP]:8096

9. You will be brought to the default Jellyfin page. Pick your language and select Next.

How to Setup Jellyfin on a Raspberry Pi - jellyfin setup

10. Enter a username and password and select Next.

How to Setup Jellyfin on a Raspberry Pi - account creation

11. You will now need to enter your media libraries. Select Add Media Library, enter the content type and then add a new folder.

How to Setup Jellyfin on a Raspberry Pi - content type creation

12. In this section, you will need to select the folder that you mounted earlier. Make sure you pick the folder that is related to the content type you selected in the previous step!

add movies folder

13. Do steps 11 and 12 for all media types that you have and then select Next.

14. Select your preferred metadata settings and select Next.

setting up metadata

15. Configure your remote access settings. I highly suggest that you keep the second UPnP option deselected, as UPnP is an overall security risk. If you’d like to access your data remotely, I suggest that you open the port directly on your router (using a reverse proxy manager like nginx proxy manager would be even better) as opposed to using UPnP.

remote access setup

16. Select Finish. The setup process is now complete and your data will now sync! If you’d like to modify some of the admin settings, select Settings and then Dashboard under the admin section. There are a bunch of settings that can be changed here.

final configuration screen

Conclusion

This tutorial showed how to setup Jellyfin on a Raspberry Pi. Jellyfin on a Raspberry Pi is awesome for people who don’t have a NAS or device running 24/7. It’s lightweight, has a bunch of great applications for your devices, and just works. It’s also pretty cool to have this all running on a Raspberry Pi.

Thanks for reading the tutorial. If you have any questions, please leave them in the comments!

WunderTech

Frank is an IT professional with 13+ years experience and the creator of WunderTech. He focuses on sharing his experience with others on computer hardware, servers, software, networking, and self-hosted apps. He has a BS in Computer Information Systems and an MBA. Learn more about Frank in his bio.

This Post Has 21 Comments

  1. Dude

    Dude, you forgot the most important thing. Look at step 7… Where is the actual installation? In step 8 you want me to connect to the web UI of Jellyfin without actually installing it somewhere!?! HAHAHAA

    1. WunderTech

      You are absolutely right – genuinely, my apologies. I recently migrated the site and I think I indirectly removed them. Thank you for letting me know and if you need any help, let me know!

    2. David

      I am very new at this so here is my question.I apear to have my drive mounted to the filesystem root, /media/pi/1.0 TB Volume. Now when in Jellyfin and I try to make library Jellyfin don’t take my path.what should it be.?

      1. WunderTech

        Are you properly mounting that path inside of the Docker container? You will have to map a volume (like /movies) and then point it back to the local folder where your movies are stored.

  2. Harrison

    Thanks for the great tutorial! I was able to get jellyfin up and running, but I did encounter a hiccup on step 5. You’ve included an extra “I” in the first UUID.

    1. WunderTech

      Thank you so much! I didn’t notice that, so I appreciate you letting me know so I could correct it.

      If I can ever do anything to help, please let me know!

  3. Neil

    the UUID didn’t work for mine but I used /dev/sda1 and it worked instead thank you.

  4. Armand Lange

    Hi, thx for your tutorial. Question: Have Kodi running on a Raspberry 3 B. Possible to run Jellyfin on it too? And would it be powerful enough or better invest in Pi 4? Thx

    1. WunderTech

      It should run fine! It’s hard to say if you should upgrade as it depends on the total number of streams you need, etc, but it certainly doesn’t hurt to try it out first on your 3B!

  5. KiTA

    This is a great guide. There is a couple of things you could add to it. The Raspberry Pi supports hardware transcoding in Jellyfin, which helps a lot. To do so you have to add the Jellyfin service to the video group.

    sudo usermod -aG video jellyfin

    After doing so, you select OpenMAX OMX for hardware acceleration in the Jellyfin server dashboard’s Transcoding tab.

    The instructions I saw suggested increasing the amount of GPU memory if you do this, by

    sudo nano /boot/config.txt

    And then at the bottom, for a Rp4, adding:

    gpu_mem=320

    For 3/3Bs:

    gpu_mem=256

    1. WunderTech

      This is awesome, thanks so much for sharing!

  6. Aphotic

    Do you have options on how to secure the server if you access it remotely?

    1. WunderTech

      There are a few ways that you can increase the security if you’d like to expose Jellyfin.

      1. Ensure your Raspberry Pi is using a firewall as well as any other servers on your local network.
      2. Use Cloudflare to manage your domain, since they have various security features built-in.
      3. Use a reverse proxy to manage the external traffic.

      Those are my overall recommendations. Let me know if you have any questions!

  7. Diane

    will jellyfin work with raspberry pi4 with .m2 ssdrive attached instead of external drive?

    1. WunderTech

      Yes, that should be fine! However, if you ever need that m2 storage, you can move the media files to an external HDD.

  8. jstsmblaz

    this tutorial is great! thanks a lot.

    i do have one questione (as i am more a begginner than anything else): i have rpi4 already running as a torrent box. would adding jellyfin kill the rpi or can rpi handle both services?

    1. WunderTech

      It’s hard to say because I’m not sure how much usage it takes up, but my suspicion is that it will be fine!

  9. David

    Question: Given the size and slowness of the sd card this generally gets installed upon why are there no instructions to relocate directories like the cache directory, the log directory, the metadata directory and the transcodes directory? The jellyfin web admin permits movement of three of those cache, metadata and transcodes. It lists the log directory but I cannot determine how to inform jellyfin in the web admin that I have moved it. Is the data directory a candidate to be relocated (/var/lib/jellyfin/data). I have seen references to environment variables to identify where they are moved, but I was hoping for a common process using the jellyfin web administration pages. My current attempt in on a RPI 3b using ext4 mountpoints for hard sized usb drive partitions. My next attempt will be on a RPI 4B where I plan to use ubuntu server and zfs. From my early looks at ZFS I will be able to fstab mount ZFS subdirectories for each of the jellyfin directories and it can appear to the system that nothing has been relocated from the root directory structure and standard directory locations. This also means I will not be partitioning the drives into multiple hard sized partitions so there will be one pool of space for all ZFS subdirectories on a physical device. Any comments as to the probable success of a ZFS installation on a RPI 4B would be appreciated. The RPI 4B installation plans are for an all ZFS implementation starting with the root directory of the install.

    1. WunderTech

      You can store the data on just about any device that’s connected to the Raspberry Pi. You just have to mount the volumes to the specific path of that device. As far as mounting other directories, you can technically mount whatever you’d like, but not all directories are designed to “write” the files to a local folder. Generally, you need to go based on the documentation and determine what paths can be mounted.

  10. Ranga

    Hi this is a great guide. If I want to completely remove the Jellyfin from raspberry pi, how can I do it.

    1. WunderTech

      You can run the uninstall command that you normally run for the “jellyfin” package.

Comments are closed.