‍Jellyfin is a versatile and powerful media solution that allows you to take complete control of your media and stream it to any device. Whether you want to enjoy your favorite movies, music, or TV shows, Jellyfin has got you covered. In this step-by-step guide, we will walk you through the process of installing Jellyfin on AlmaLinux 8 using Docker. By following these instructions, you will be able to set up your own media server and access your content from anywhere, anytime. So, let’s dive in!

Prerequisites

Before we begin, make sure you have the following prerequisites in place:

  • A system running AlmaLinux 8 with root access.
  • Docker installed and running on your system. If you haven’t installed Docker yet, you can refer to our guide on how to install Docker on AlmaLinux 8.
  • Basic familiarity with the command line interface.

Step 1: Install Nginx

To get started, we need to install Nginx, a web server that will act as a reverse proxy for Jellyfin. Follow these commands to install Nginx:

yum install nginx -y
systemctl enable nginx
systemctl start nginx
systemctl status nginx

Step 2: Install Let’s Encrypt SSL Certificate

Next, we will issue an SSL certificate for the domain using Let’s Encrypt. This will ensure secure communication between the server and client devices. Follow these commands to install the necessary packages and generate the SSL certificate:

dnf install epel-release mod_ssl -y
dnf install python3-certbot-nginx -y
certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email dev@dev.domainhere.info -d dev.domainhere.info
systemctl restart nginx

Step 3: Configure Nginx Server Blocks

Now, let’s configure Nginx to act as a reverse proxy for Jellyfin. Open the Nginx configuration file using the following command:

nano /etc/nginx/nginx.conf

Replace the contents of nginx.conf with the following configuration:

# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/user

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic
include /usr/share/nginx/modules/*.conf;

events {
 worker_connections 1024;
}

http {
 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
 '$status $body_bytes_sent "$http_referer" '
 '"$http_user_agent" "$http_x_forwarded_for"';

 access_log /var/log/nginx/access.log main;

 sendfile on;
 tcp_nopush on;
 tcp_nodelay on;
 keepalive_timeout 65;
 types_hash_max_size 2048;

 include /etc/nginx/mime.types;
 default_type application/octet-stream;

 # Load modular configuration files from the /etc/nginx/conf.d directory.
 # See http://nginx.org/en/docs/ngx_core_module.html#include
 # for more information.
 include /etc/nginx/conf.d/*.conf;
}

Save and exit the file by pressing Ctrl+O, then Ctrl+X.

Create a new Nginx configuration file for the domain using the following command:

vi /etc/nginx/conf.d/dev.conf

Add the following codes to the dev.conf file:

upstream app {
server 192.169.7.180:8096;
}

server {
listen 80 default_server;
server_name dev.domainhere.info;
return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl; # managed by Certbot
server_name dev.domainhere.info;
ssl_certificate /etc/letsencrypt/live/dev.domainhere.info/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/dev.domainhere.info/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

location / {
proxy_pass http://app;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Real-Port $server_port;
proxy_set_header X-Real-Scheme $scheme;
}
}

Save and exit the file by pressing Esc, then :wq!, and press Enter.

If SELinux is enabled on your system, run the following command to allow Nginx to make network connections:

setsebool -P httpd_can_network_connect 1

Restart Nginx to apply the changes:

systemctl restart nginx
systemctl status nginx

Step 4: Enable Port 8096

To enable connection through the firewall, run the following commands:

firewall-cmd --zone=public --permanent --add-port 8096/tcp
firewall-cmd --reload

Step 5: Install Jellyfin with Docker

Now it’s time to install Jellyfin using Docker. Docker allows us to easily manage containerized applications, ensuring that Jellyfin runs smoothly on your AlmaLinux 8 system. Follow these commands:

docker pull jellyfin/jellyfin:latest
mkdir -p /srv/jellyfin/{config,cache}
docker run -d -v /srv/jellyfin/config:/config -v /srv/jellyfin/cache:/cache -v /media:/media --net=host jellyfin/jellyfin:latest

The installation process may take a few minutes to complete. Once it’s done, Jellyfin will be up and running on your system.

Step 6: Adding Media/Audio Files to Jellyfin

To add your media and audio files to Jellyfin, use the following command:

docker cp media.file container_id:/media/media.file

Replace media.file with the name of your file and container_id with the ID of the Jellyfin Docker container.

You can now start adding your media and audio files directly to Jellyfin.

Step 7: Accessing Jellyfin

Congratulations! You have successfully installed Jellyfin with Docker on AlmaLinux 8. Now, you can access Jellyfin by opening your web browser and entering the IP address or domain name of your server.

https://dev.domainhere.info

Replace dev.domainhere.info with the actual IP address or domain name you have configured for your server.

Conclusion

In this guide, we have walked you through the process of installing Jellyfin with Docker on AlmaLinux 8. By following these steps, you have set up your own media server and can now enjoy your favorite movies, music, and TV shows from anywhere, anytime. Jellyfin provides a free and open-source solution that puts you in control of your media, allowing you to stream it to any device without any limitations. If you are looking for reliable and scalable cloud hosting solutions, be sure to check out Shape.host for their Cloud VPS services. Happy streaming!