Jellyfin server on OpenSUSE Tumbleweed

I was unable to find a jellyfin-server package in OpenSUSE’s repositories or in any OBS repositories. One day I will learn how to package via OBS and submit it to a repository, but for now this is how I install my Jellyfin server.

This tutorial will be using the TAR generic package, found on repo.jellyfin.org, at the time of writing the current version is 10.9.9 with ffmpeg 6.0.1-8. I am writing this for anybody that just could not or did not find the tutorial on Jellyfin’s website, and also because it left out some information. Most of this will just be copying Jellyfin’s instructions from their documentation page.

Step 1: obtaining the packages. This can be done through the terminal, but I still suggest checking the website to verify versions.

visit https://repo.jellyfin.org/

	Home → Server → Generic Linux portable archives (.tar) → Current Stable → AMD64 → jellyfin_VERSION-amd64.tar.xz
	
	Home → FFmpeg → Generic Linux portable archives (.tar) → FFmpeg 6.x (Jellyfin 10.9.z) → AMD64 → jellyfin-ffmpeg_VERSION_portable_linux64-gpl.tar.xz

To download via the terminal:

sudo cd ~/Downloads
	sudo wget https://repo.jellyfin.org/files/server/linux/latest-stable/amd64/jellyfin_10.9.9-amd64.tar.xz
	sudo wget https://repo.jellyfin.org/files/ffmpeg/linux/latest-6.x/amd64/jellyfin-ffmpeg_6.0.1-8_portable_linux64-gpl.tar.xz

Step 2: extracting our .tar files

cd ~/Downloads
sudo tar -xf jellyfin_VERSION-amd64.tar.xz
sudo tar -xf jellyfin-ffmpeg_VERSION_portable_linux64-gpl.tar.xz

Step 3: making our Jellyfin Server directory, you should still be cd’ed into your Downloads folder.

sudo mkdir /opt/jellyfin
sudo mv jellyfin /opt/jellyfin/

Step 4: making our jellyfin-ffmpeg directory, still cd’ed into your Downloads folder

sudo mkdir /usr/share/jellyfin-ffmpeg
sudo mv ffmpeg /usr/share/jellyfin-ffmpeg/
sudo mv ffprobe /usr/share/jellyfin-ffmpeg/

Step 5: creating a symbolic link to our directory

cd /opt/jellyfin
sudo ln -s jellyfin_VERSION jellyfin            #At the time of writing it is jellyfin_10.9.9

Step 6: creating sub-directories for Jellyfin data, you should be cd’ed into /opt/jellyfin

sudo mkdir data cache config log

Step 7: installing and running Jellyfin server, still cd’ed into /opt/jellyfin

sudo nano jellyfin.sh
Paste the following commands, and if you chose different directory paths than I did then make sure those changes are reflected in this script.
#!/bin/bash
JELLYFINDIR=”/opt/jellyfin”
FFMPEGDIR=”/usr/share/jellyfin-ffmpeg”

$JELLYFINDIR/jellyfin/jellyfin \
 -d $JELLYFINDIR/data \
 -C $JELLYFINDIR/cache \
 -c $JELLYFINDIR/config \
 -l $JELLYFINDIR/log \
 --ffmpeg $FFMPEGDIR/ffmpeg

after pasting the above into your new nano document press CTRL+O to create the file, and CTRL+X to exit nano.

Now we change ownership to our normal user and make our new script executable:

sudo chown -R user:gorup *
sudo chmod u+x jellyfin.sh

finally, run this script:

./jellyfin.sh	

Step 8: creating a systemd unit file for starting on boot, this is optional

cd /etc/systemd/system
sudo nano jellyfin.service

paste the following into your new nano document, replacing ‘youruser’ with your actual username

[Unit]
Description=Jellyfin
After=network.target

[Service]
Type=simple
User=youruser
Restart=always
ExecStart=/opt/jellyfin/jellyfin.sh

[Install]
WantedBy=multi-user.target

again, to write the document to a file, CTRL+O then CTRL+X to exit nano.
Change permissions, enable, and start:

sudo chmod 644 jellyfin.service
sudo systemctl daemon-reload
sudo systemctl enable jellyfin.service
sudo systemctl start jellyfin.service

Your server should now be installed, running, and pointing to the correct ffmpeg version.
From here you follow the normal server setup by opening a browser and going to 192.168.1.100:8096 , obviously changing it to match your IP address
YOUR.IP.ADDRESS:8096

I do not allow remote connections, so I do not have instructions for setting yourself up to do that. If you wish to have remote access visit Jellyfin’s documentation on networking.

To update to newer Jellyfin and ffmpeg versions follow steps 1 through 5, but without any mkdir commands as you already have the directories.

1 Like

I keep getting
./jellyfin.sh: line 6: ”/opt/jellyfin”/jellyfin/jellyfin: No such file or directory
I thought maybe there was an extra “jellyfin” but I still get
./jellyfin.sh: line 6: ”/opt/jellyfin”/jellyfin: No such file or directory

I’m just starting to learn scripting so I’m easily confused :slight_smile:

Also, I already had "/usr/share/ffmpeg so I changed that line in the script to remove “jellyfin-”

I wish flatpack would just get the latest version so we wouldn’t have to do all this.

Did you follow step 3 and create the directory?

The standard ffmpeg doesn’t work well with jellyfin, that is why we make a separate jellyfin-ffmpeg directory and place the jellyfin custom version of ffmpeg there. We point our jellyfin server to that, and let all other programs that need ffmpeg refer to the original ffmpeg.

Yes. I’m confused. I have the directory “/opt/jellyfin/jellyfin/” but the error lists 3 nested jellyfin directories is this supposed to be correct or am I reading the error wrong?

/opt/jellyfin should contain five folders and one shell script file if you followed all of the steps. The five folders should be: cache, config, data, jellyfin, and log. The third nested jellyfin you are seeing is probably the application executable named jellyfin, so /opt/jellyfin/jellyfin/jellyfin is referring to a file, not a directory.

did you copy and paste the jellyfin.sh contents, or type them out yourself?

Copy and paste the full output you get when you try to run jellyfin.sh here. Also, copy and paste the contents of your jellyfin.sh here.

I have all the folders and script file.

telliott@localhost:/opt/jellyfin> ls
cache config data jellyfin jellyfin.sh log

Here is the output

telliott@localhost:/opt/jellyfin> ./jellyfin.sh
./jellyfin.sh: line 6: ”/opt/jellyfin”/jellyfin/jellyfin: No such file or directory
telliott@localhost:/opt/jellyfin>

Here is the jellyfin.sh file contents

#!/bin/bash
JELLYFINDIR=”/opt/jellyfin”
FFMPEGDIR=”/usr/share/jellyfin-ffmpeg”

$JELLYFINDIR/jellyfin/jellyfin
-d $JELLYFINDIR/data
-C $JELLYFINDIR/cache
-c $JELLYFINDIR/config
-l $JELLYFINDIR/log
–ffmpeg $FFMPEGDIR/ffmpeg

@telliott ,
Please to make it easier for all use this for posting code: Posting code or preformatted text - Using Discourse - Discourse Meta

Also, one does not say “Here is the jellyfin.sh file contents”, but one copies/pastes one more line at the beginning, in this case the cat command, so everybody can see who you were, where you were and what you did. Like you did for the execution of the script.

BTW, I did not follow this, but shouldn’t you be one more jellyfin directory down for the execution? (or even two, I am already lost, nice design :frowning: ).

So correction. My story about how many jellfin directories down is probably nonsense.

But your script does not look OK to me.

As I interpret it, it should be one command with several options. And those option are on separate lines, but the lines do not have a continutation. There should be \ at the and of the lines, This should then result in

#!/bin/bash
JELLYFINDIR=”/opt/jellyfin”
FFMPEGDIR=”/usr/share/jellyfin-ffmpeg”

$JELLYFINDIR/jellyfin/jellyfin \
-d $JELLYFINDIR/data \
-C $JELLYFINDIR/cache \
-c $JELLYFINDIR/config \
-l $JELLYFINDIR/log \
–ffmpeg $FFMPEGDIR/ffmpeg

hcvv…sorry I bothered you.

You didn’t. I only explain to you how to more efficient communicate in a computer help forum where people can not see what others do and depend complete on precise and exact reports of what is done.

1 Like

I had the slashes Here’s the hellyfin.sh file (properly formatted). The slashes did not come across.

#!/bin/bash
JELLYFINDIR=”/opt/jellyfin”
FFMPEGDIR=”/usr/share/jellyfin-ffmpeg”

$JELLYFINDIR/jellyfin/jellyfin \
 -d $JELLYFINDIR/data \
 -C $JELLYFINDIR/cache \
 -c $JELLYFINDIR/config \
 -l $JELLYFINDIR/log \
 --ffmpeg $FFMPEGDIR/ffmpeg

Here is the error.

./jellyfin.sh: line 6: ”/opt/jellyfin”/jellyfin/jellyfin: No such file or directory
telliott@localhost:/opt/jellyfin>
'''

I do not know how you copied that file. Please always use Linux ways of doing so. It looks as if you used some document editor. It not only removed the \, but it also changed the " characters. I will give you a new version:

#!/bin/bash
JELLYFINDIR="/opt/jellyfin"
FFMPEGDIR="/usr/share/jellyfin-ffmpeg"

$JELLYFINDIR/jellyfin/jellyfin \
-d $JELLYFINDIR/data \
-C $JELLYFINDIR/cache \
-c $JELLYFINDIR/config \
-l $JELLYFINDIR/log \
–ffmpeg $FFMPEGDIR/ffmpeg

Let’s try it without initializing anything. Copy and paste this, save, then retry.

#!/bin/bash
/opt/jellyfin/jellyfin/jellyfin \
  -d /opt/jellyfin/data \
  -C /opt/jellyfin/cache \
  -c /opt/jellyfin/config \
  -l /opt/jellyfin/log \
  --ffmpeg /usr/share/jellyfin-ffmpeg/ffmpeg

Thank you SO much It is up and running, adding my media.

1 Like

glad to hear it!

1 Like

That is fine then.

But did you note that you borked that script file? I do not know how you did it, but the \ s at the end were missing and the " were replaced by “smart quotes” (like these here). I guess you used some word processor or so. Please try to re-think about how you did that copying and were it went wrong. That is important to know for a next time.

I’m running Jellyfin in podman container, works really well and much easier to setup IMHO:

Add jellyfin service to firewalld:

sudo firewall-cmd --permanent --new-service=jellyfin
sudo firewall-cmd --permanent --service=jellyfin --set-description='Jellyfin is a Free Software Media System and an alternative to the proprietary Emby and Plex'
sudo firewall-cmd --permanent --service=jellyfin --set-short='Jellyfin Media Server'
sudo firewall-cmd --permanent --service=jellyfin --add-port=8096/tcp
sudo firewall-cmd --zone=home --add-service=jellyfin --permanent

sudo firewall-cmd --reload
sudo firewall-cmd --state
sudo firewall-cmd --get-services
sudo firewall-cmd --info-service=jellyfin

Note: in the above command home is the zone bound to my laptop’s wifi interface (local network). Replace it with your own! :warning:
See sudo firewall-cmd --list-all-zones

Setup/upgrade jellyfin container:

podman run \
--detach \
--label "io.containers.autoupdate=registry" \
--name jellyfin \
--publish 8096:8096/tcp \
--device /dev/dri/:/dev/dri/ \
--user $(id -u):$(id -g) \
--userns keep-id \
--volume jellyfin-cache:/cache:Z \
--volume jellyfin-config:/config:Z \
--mount type=bind,source=/usbraid/Media,destination=/media,ro=true,relabel=private \
docker.io/jellyfin/jellyfin:latest

Note: in the above command /usbraid is where my media lives. Replace it with your own media directory! :warning:

Starting containers on system startup:

# /etc/systemd/system/container-autostart.service
[Unit]
Description=Start containers on system startup
Requires=NetworkManager-wait-online.service usbraid.service
After=NetworkManager-wait-online.service usbraid.service

[Service]
Type=oneshot
User=pavin
Group=pavin
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/podman start deb jellyfin
ExecStop=/usr/bin/podman stop deb jellyfin
RemainAfterExit=yes

[Install]
WantedBy=graphical.target

Replace Requires/After services, user, group and container name(s) with your own! :warning:

2 Likes

Towards the end of step 7, where we change the ownership of the jellyfin.sh file I misspelled ‘group’ as ‘gorup’. Please be careful when copying and pasteing.

Thank you for your explanation. I have no experience using Podman or Docker, and I’m sure there are others that also lack that experience. Do you think you could edit your post, or make a new one, explaining it for people like myself who have never used Podman?

.
https://podman.io/get-started
.
https://docs.podman.io/en/latest/Tutorials.html

1 Like