JELLYFIN - Documentation

From IT-Arts.net


Return to Wiki Index


Installation Steps

Prerequisites

Run the following command to update your package lists:

sudo apt update
sudo apt upgrade -y

You will also need to install some required dependencies if they aren't already available on your system:

sudo apt install -y apt-transport-https ca-certificates software-properties-common

Adding the Jellyfin Repository

Jellyfin provides an official repository for easy installation and updates. First, you need to add the Jellyfin repository to your system:

1. Download the repository’s GPG key to verify the packages:

curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/jellyfin.gpg

2. Add the Jellyfin repository:

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" | tee /etc/apt/sources.list.d/jellyfin.list

3. Update your package list to reflect the new repository:

sudo apt update

Installing Jellyfin

With the repository added, you can now install Jellyfin:

sudo apt install jellyfin

This will download and install Jellyfin along with all the required dependencies.

Starting Jellyfin Service

After installation, Jellyfin will be automatically enabled to start on boot. You can manually start the Jellyfin server with the following command:

sudo systemctl start jellyfin

To verify that Jellyfin is running, you can use:

sudo systemctl status jellyfin

You should see output indicating that the Jellyfin service is active and running.

Enabling Jellyfin to Start on Boot

To ensure that Jellyfin starts automatically when your system reboots, run the following command:

sudo systemctl enable jellyfin

Accessing Jellyfin Web Interface

Once Jellyfin is installed and running, you can access its web interface by navigating to:

http://<your-server-ip>:8096

Use your web browser to access the above URL. The first time you visit this page, Jellyfin will guide you through the setup process.

Security Concepts

Setting Up a Firewall

To secure your Jellyfin installation, you should configure a firewall. If you're using UFW (Uncomplicated Firewall), you can open port 8096 (default Jellyfin web interface port) as follows:

sudo ufw allow 8096

If you plan to use Jellyfin with HTTPS, open port 443 as well:

sudo ufw allow 443

Check the status of your firewall with:

sudo ufw status

Secure Connections (HTTPS)

It's important to use HTTPS to secure your connections to the Jellyfin web interface. To enable HTTPS, you can use a reverse proxy such as Nginx or Apache with SSL certificates from Let’s Encrypt.

1. Install Nginx:

sudo apt install nginx

2. Set up a SSL certificate using Certbot:

sudo apt install certbot python3-certbot-nginx

3. Obtain and install the SSL certificate:

sudo certbot --nginx

This will automatically configure Nginx for SSL with Let's Encrypt.

4. Once the SSL certificate is installed, Jellyfin will be accessible over HTTPS.

User Authentication and Permissions

To improve security, you can set up user authentication for accessing Jellyfin. In the web interface, navigate to **Admin Dashboard** > **Users** > **Add User**. Assign usernames, passwords, and permissions accordingly. You can limit access to specific libraries and manage user roles here.

Regular Security Updates

To ensure that Jellyfin stays secure, regularly check for updates:

sudo apt update
sudo apt upgrade

For unattended updates, you can install and configure the unattended-upgrades package:

sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades

Troubleshooting

Jellyfin Not Starting

If Jellyfin is not starting, you can check the logs for any error messages:

journalctl -u jellyfin -f

Look for any error messages that might indicate missing dependencies or misconfigurations.

If you see an issue with a database migration error, you may need to clear the Jellyfin data directory:

sudo systemctl stop jellyfin
sudo rm -rf /var/lib/jellyfin/*

Then restart the service:

sudo systemctl start jellyfin

Jellyfin Web Interface Not Accessible

If the Jellyfin web interface is not accessible, make sure the service is running:

sudo systemctl status jellyfin

Also, ensure that the server's firewall allows access to port 8096:

sudo ufw status

If you're using a reverse proxy, ensure that the proxy configuration is correct.

Jellyfin Server Is Slow

If Jellyfin is running slowly, try the following:

1. Check system resources (CPU, RAM) with:

top

2. Ensure your media is stored on a fast disk and not an external USB drive.

3. Reduce the quality of transcoding in Jellyfin settings.

4. Make sure your network is not congested by checking bandwidth.

Audio/Video Playback Issues

If Jellyfin isn't playing media correctly, check the server logs for transcoding errors:

journalctl -u jellyfin -f

Ensure that your system has the necessary codecs installed (like `ffmpeg`).

sudo apt install ffmpeg

If the issue persists, try disabling hardware acceleration in the Jellyfin dashboard settings.