Media Server: Jellyfin
nguyennamdsn | July 5, 2023, 3:56 p.m.
How to Install Jellyfin Media Server on Debian 11
Jellyfin is a free and open-source media streaming application that organizes, manages, and shares digital media files to networked devices. It allows you to stream the uploaded media files to your PC, Laptop, Mobile, and Roku. It provides an interactive web interface to manage all your photos, videos, and music. If you are looking for an alternative solution for Plex and Netflix, Jellyfin is the best option.
Features
- Free, open-source, and cross-platform
- Supports hardware acceleration of video encoding/decoding using FFMpeg
- Allow you to fetch metadata from TheTVDB and TheMovieDB
- No playback limit on mobile apps
This post will show you how to install Jellyfin media streaming application with Nginx and Let's Encrypt SSL on Debian 11.
Prerequisites
- A server running Debian 11.
- A valid domain name pointed with your server IP.
- A root password is configured on the server.
Install Jellyfin
Before starting, you will need to add the Jellyfin repository to the APT. To do so, first install the required dependencies using the following command:
Before starting, you will need to add the Jellyfin repository to the APT. To do so, first install the required dependencies using the following command:
apt-get install apt-transport-https ca-certificates gnupg2 curl git -yOnce all the dependencies are installed, add the GPG key and repository with the following command:
wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | apt-key add -
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/debian bullseye main" | tee /etc/apt/sources.list.d/jellyfin.list
Next, update the repository and install the Jellyfin using the following command:
apt-get update -y
apt-get install jellyfin -y
Once the Jellyfin has been installed, you can verify the status of the Jellyfin using the following command:
systemctl status jellyfin
You will get the following output:
? jellyfin.service - Jellyfin Media Server
Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/jellyfin.service.d
??jellyfin.service.conf
Active: active (running) since Fri 2022-02-04 03:48:50 UTC; 9s ago
Main PID: 4989 (jellyfin)
Tasks: 19 (limit: 2341)
Memory: 85.0M
CPU: 4.069s
CGroup: /system.slice/jellyfin.service
??4989 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --restartpath=/usr/lib/jellyfin/restart.sh --ffmpeg=/usr/lib/jellyfin->
Feb 04 03:48:56 debian11 jellyfin[4989]: [03:48:56] [INF] ServerId: 809b343f6da845699dd6447e1bb4f061
Feb 04 03:48:56 debian11 jellyfin[4989]: [03:48:56] [INF] Registering publisher for urn:schemas-upnp-org:device:MediaServer:1 on 127.0.0.1/32
Feb 04 03:48:56 debian11 jellyfin[4989]: [03:48:56] [WRN] 127.0.0.1/32: GetBindInterface: Loopback 127.0.0.1 returned.
Feb 04 03:48:56 debian11 jellyfin[4989]: [03:48:56] [INF] Executed all pre-startup entry points in 0:00:00.2808517
Feb 04 03:48:56 debian11 jellyfin[4989]: [03:48:56] [INF] Core startup complete
Feb 04 03:48:57 debian11 jellyfin[4989]: [03:48:57] [INF] Executed all post-startup entry points in 0:00:00.2169291
Feb 04 03:48:57 debian11 jellyfin[4989]: [03:48:57] [INF] Startup complete 0:00:06.7385186
Feb 04 03:48:59 debian11 jellyfin[4989]: [03:48:59] [INF] StartupTrigger fired for task: Update Plugins
Feb 04 03:48:59 debian11 jellyfin[4989]: [03:48:59] [INF] Queuing task PluginUpdateTask
Feb 04 03:48:59 debian11 jellyfin[4989]: [03:48:59] [INF] Executing Update Plugins
Configure apache2 as a Reverse Proxy for Jellyfin
<VirtualHost *:80>source: https://www.howtoforge.com/how-to-install-jellyfin-media-server-on-debian-11/
ServerName DOMAIN_NAME
# Comment to prevent HTTP to HTTPS redirect
ProxyPreserveHost On
# Letsencrypt's certbot will place a file in this folder when updating/verifying certs
# This line will tell apache to not to use the proxy for this folder.
ProxyPass "/.well-known/" "!"
# Tell Jellyfin to forward that requests came from TLS connections
# RequestHeader set X-Forwarded-Proto "https"
# RequestHeader set X-Forwarded-Port "443"
ProxyPass "/socket" "ws://SERVER_IP_ADDRESS:8096/socket"
ProxyPassReverse "/socket" "ws://SERVER_IP_ADDRESS:8096/socket"
ProxyPass "/" "http://SERVER_IP_ADDRESS:8096/"
ProxyPassReverse "/" "http://SERVER_IP_ADDRESS:8096/"
# SSLEngine on
# SSLCertificateFile /etc/letsencrypt/live/DOMAIN_NAME/fullchain.pem
# SSLCertificateKeyFile /etc/letsencrypt/live/DOMAIN_NAME/privkey.pem
Protocols h2 http/1.1
# Enable only strong encryption ciphers and prefer versions with Forward Secrecy
# SSLCipherSuite HIGH:RC4-SHA:AES128-SHA:!aNULL:!MD5
# SSLHonorCipherOrder on
# Disable insecure SSL and TLS versions
# SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
ErrorLog /var/log/apache2/DOMAIN_NAME-error.log
CustomLog /var/log/apache2/DOMAIN_NAME-access.log combined
</VirtualHost>