Jellyfin installation and adding an SMB server to the library

To install the application:

https://jellyfin.org/downloads/

sudo apt install curl gnupg
curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/jellyfin.gpg
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

Open the web interface <server IP address>:8096 using a browser and log in to perform the initial configuration.

To add a folder on an SMB source (a file share on a PC or a NAS) to the library, first mount it locally on the server. For example:

sudo mkdir /mnt/nas
sudo apt-get install cifs-utils
sudo mount -t cifs -o user=chris //192.168.20.44/video /mnt/nas

If no errors are shown, run ls in the newly created local directory (/mnt/nas) and you should see the contents of the SMB share listed. Then add a source in Jellyfin and select the local directory as the folder.

This mount is only temporary and will not persist after a reboot. To permanently mount the directory, a line must be added to /etc/fstab. First, create a file with credentials for the SMB share as shown below. I created .smb in my home folder.

username=smbuser
password=smbpassword

Then run sudo nano /etc/fstab and add the following:

//192.168.20.44/video     /mnt/nas        cifs    uid=0,credentials=/home/chris/.smb,iocharset=utf8,vers=3.0,noperm 0 0

On a new Ubuntu 22.04 installation, I received the following error: mount error(79): Can not access a needed shared library

In my case, I needed to install the extra kernel modules for UTF-8 support. Verify this by running sudo dmesg and looking for the following output:

CIFS: VFS: CIFS mount error: iocharset utf8 not found

Run this command to install the appropriate package and resolve the problem: sudo apt install linux-modules-extra-$(uname -r)