Skip to content

Jellyfin, Your Private Netflix & Spotify Alternative

Jellyfin vs Plex Jellyfin vs Plex

Looking for a FOSS alternative to Plex media server? Jellyfin is a self-hosted digital media solution for your Ubuntu server. Enjoy movies, TV shows, and music on your media streaming devices. Jellyfin is free, open source, fast and beautiful. It facilitates multiple users, Live TV, metadata management, customisation, plugins, diverse clients, and more.

This chapter assumes you’ve already set up your home server with basic and advanced security measures, including secure remote access.

Installation

Jellyfin's installation process is pretty straight forward. More details below.

Step-by-step guide

Log into the server, then run the following commands to add the repository to the apt source list and install the software:

sudo apt install apt-transport-https
sudo apt-get install software-properties-common
sudo add-apt-repository universe
curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/debian-jellyfin.gpg
sudo echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu $( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
sudo apt update
sudo apt install jellyfin

Start the Jellyfin service and make sure the status is Active:

sudo systemctl start jellyfin
sudo systemctl status jellyfin


Jellyfin Ubuntu

Configuration

You’ve successfully installed Jellyfin! Now, configure auto start on boot, user accounts, language preferences, and more.

Step-by-step guide

Auto start

Let's make sure Jellyfin automatically starts every time the server boots:

sudo systemctl daemon-reload
sudo systemctl enable jellyfin

Reboot the server:

sudo reboot

Make sure Jellyfin is up and running (the status must be Active):

sudo systemctl status jellyfin

Initial Jellyfin setup

We're going to access Jellyfin's web interface to perform the initial setup. For this, we need to temporarily open port 8096 on the firewall:

sudo ufw allow 8096/tcp

Now browse to http://192.168.1.100:8096 (adjust accordingly) and follow the initial setup wizard:

Instructions Description
Preferred display language Select your preferred language, for example English.
Username Provide a username for the Jellyfin administrator. For the purpose of this tutorial, we'll call this administrator jellyfinadmin. Of course, you can choose any name, just make sure to adjust the commands accordingly.
Password Provide a strong, unique password for the Jellyfin administrator.
Add Media Libraries You can add music, movies or TV shows to Jellyfin now, or at any later time from the dashboard. Media should be stored on the file system: the server's storage, an external drive connected to the server or a network storage device directly mounted to the OS.
Select preferred Metadata Language Select your preferred language, for example English.
Allow remote connections to this Jellyfin media server No.

Once the initial setup is done, close the port 8096:

sudo ufw delete allow 8096/tcp


Jellyfin remote access

Web interface

Set up an Apache Virtual Host as a Reverse Proxy to access the Jellyfin web interface via a custom address and shield the server from direct internet exposure. Read on below for more details.

Step-by-step guide

Create an Apache configuration file:

sudo vi /etc/apache2/sites-available/mymedia.gofoss.duckdns.org.conf

Add the following content and make sure to adjust the settings to your own setup, such as domain names (mymedia.gofoss.duckdns.org), path to SSL keys, IP addresses and so on:

<VirtualHost *:80>

  ServerName mymedia.gofoss.duckdns.org
  ServerAlias www.mymedia.gofoss.duckdns.org
  Redirect permanent / https://mymedia.gofoss.duckdns.org/

</VirtualHost>

<VirtualHost *:443>

  ServerName  mymedia.gofoss.duckdns.org
  ServerAlias www.mymedia.gofoss.duckdns.org
  ServerSignature Off

  <IfModule security2_module>
      SecRuleEngine Off
  </IfModule>

  SSLEngine On
  SSLCertificateFile  /etc/dehydrated/certs/gofoss.duckdns.org/fullchain.pem
  SSLCertificateKeyFile /etc/dehydrated/certs/gofoss.duckdns.org/privkey.pem
  DocumentRoot /var/www

  <Location />
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from 192.168.1.0/24
    Allow from 10.8.0.1/24
  </Location>

  ProxyPreserveHost On
  ProxyPass "/socket" "ws://127.0.0.1:8096/socket"
  ProxyPassReverse "/socket" "ws://127.0.0.1:8096/socket"
  ProxyPass "/" "http://127.0.0.1:8096/"
  ProxyPassReverse "/" "http://127.0.0.1:8096/"

  ErrorLog ${APACHE_LOG_DIR}/mymedia.gofoss.duckdns.org-error.log
  CustomLog ${APACHE_LOG_DIR}/mymedia.gofoss.duckdns.org-access.log combined

</VirtualHost>

Once the content is added, save and close the file (:wq!).

Note how we enable SSL encryption for Jellyfin with the instruction SSLEngine On, and use the SSL certificate /etc/dehydrated/certs/gofoss.duckdns.org/fullchain.pem as well as the private SSL key /etc/dehydrated/certs/gofoss.duckdns.org/privkey.pem, which were created earlier on.

Also note how we disabled ModSecurity in the Apache configuration file with the instruction SecRuleEngine Off, as Jellyfin and ModSecurity don't play well together.

Next, enable the Apache Virtual Host and reload Apache:

sudo a2ensite mymedia.gofoss.duckdns.org.conf
sudo systemctl reload apache2

Configure Pi-Hole to resolve the Jellyfin server address. Browse to https://mypihole.gofoss.duckdns.org and log into Pi-Hole's web interface (adjust accordingly). Navigate to the menu entry Local DNS Records and add the following domain/IP combination (adjust accordingly):

DOMAIN:      mymedia.gofoss.duckdns.org
IP ADDRESS:  192.168.1.100

You can now browse to https://mymedia.gofoss.duckdns.org and log in as jellyfinadmin (adjust accordingly) or any valid Jellyfin user.


Jellyfin app

Clients

Jellyfin caters to Desktop, TV, and mobile devices with diverse client support. Pick on of Jellyfins official clients or a third-party client and follow their installation instructions.


What is a media server

Users

Jellyfin differentiates between two user types. Administrators enjoy full Jellyfin access to manage media and users. Additionally, administrators can maintain and update Jellyfin. In our example, the administrator jellyfinadmin was established during the installation process. Users, on the other hand, have restricted Jellyfin access and can enjoy media based on their permissions.

Step-by-step guide

Instructions Description
Jellyfin login Browse to https://mymedia.gofoss.duckdns.org and log in as administrator, e.g. jellyfinadmin (adjust accordingly).
Settings Navigate to Menu ‣ Dashboard ‣ Users ‣ Add User.
Add user Provide a user name, as well as a strong, unique password. Then click on Save. Also define which libraries this user can access.
Define user rights Optionally define further settings, such as:
• Administrator rights
• Live TV access
• Transcoding
• Restricted Internet speed
• Permission to delete media
• Remote control
• Account locking
• Library & device access
• Parental control
• Pin code

Admins & users need a VPN access

All users must be connected to the server via VPN to access Jellyfin.


Best home media server

Subtitles

Jellyfin handles both embedded and external subtitles. And with the Open Subtitle plugin, Jellyfin can automatically download subtitles.

Step-by-step guide

Instructions Description
Login Browse to https://mymedia.gofoss.duckdns.org and log in as administrator, e.g. jellyfinadmin (adjust accordingly).
Install Jellyfin plugins Navigate to Menu ‣ Dashboard ‣ Plugins ‣ All ‣ Open Subtitles and click on Install.
Restart Navigate to Menu ‣ Dashboard and click on Restart.
Configure plugin The Open Subtitle plugin doesn't require an account to download subtitles. Optionally, create an account on https://www.opensubtitles.org. Then navigate to Menu ‣ Dashboard ‣ Plugins ‣ Open Subtitles ‣ Settings and provide your Open Subtitle user credentials.
Settings Navigate to Menu ‣ Libraries ‣ Movies or TV Shows ‣ Manage Library and define further settings in the section Subtitle Downloads:

• Download languages
• Subtitle downloader
• Filter subtitles based on file name & audio
• Location to store subtitles
Download subtitles Jellyfin automatically schedules a task to regularly download missing subtitles. To force the download, navigate to Menu ‣ Dashboard ‣ Scheduled Tasks and click on Download missing subtitles.


Best Linux media server

Plugins & Themes

The Jellyfin community has developped a ton of awesome plugins to display episode lists, skip intros, show air times, integrate with Discord or Telegram, and so on. You can also install themes to customize Jellyfins appearance.


Best Linux media server

Upgrade

Ubuntu server's package manager automatically manages upgrades to new Jellyfin releases. For a manual upgrade, follow the instructions below.

Step-by-step guide

Log into the server and run the following command:

sudo apt update && sudo apt upgrade

Then restart Jellyfin and make sure it's up and running (the status should be "Active"):

sudo systemctl restart jellyfin
sudo systemctl status jellyfin


How to set up a media server

Support

For further details, refer to Jellyfin's documentation or community.