One place for hosting & domains

      Jellyfin

      How to Install Jellyfin on Linux


      Updated by Linode Written by The Linux Gamer

      Jellyfin is an open source media library management and streaming platform, similar to Plex. This document will guide you through the process of installing and configuring Jellyfin on your Linode running Ubuntu 18.04.

      In this guide you will complete the following:

      Before you Begin

      1. If you have not set up your Linode yet, check out our Getting Started guide and complete the steps for setting your Linode’s hostname and timezone.

      2. Follow up with our Securing Your Server guide to create a standard user account with sudo privileges.

      3. Run the following command to upgrade your packages:

        sudo apt-get update && sudo apt-get upgrade
        

        Note

        This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, see the Users and Groups guide.

      Install Jellyfin

      1. Install and enable HTTPS transport for APT:

        sudo apt install apt-transport-https
        
      2. Enable the Universe repository for all of the ffmpeg dependencies:

        sudo add-apt-repository universe
        
      3. Import the GPG signing keys from the Jellyfin team:

        wget -O - https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo apt-key add -
        
      4. Create a new file located at /etc/apt/sources.list.d/jellyfin.list

        sudo touch /etc/apt/sources.list.d/jellyfin.list
        
      5. Add the Jellyfin apt repo to your Linode.

        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
        

        Note

        Current supported releases are Cxenial, bionic, cosmic, and disco. Since we’re using Ubuntu 18.04, lsb_release will become bionic.

        The output, and the content of the /etc/apt/sources.list.d/jellyfin.list, should look something like this:

          
        deb [arch=amd64] https://repo.jellyfin.org/ubuntu bionic main
        
        
      6. Finally, update your packages and install Jellyfin

        sudo apt update && sudo apt install jellyfin
        

      Configure Jellyfin

      Now that Jellyfin is successfully installed, it needs to be configured and pointed to our media.

      Initial Setup

      1. Setting up Jellyfin is done through the web interface. Before you can access the web interface, disconnect from SSH and create a secure tunnel via SSH from your local host to your Linode.

        ssh [email protected] -L 8888:localhost:8096
        

        Note

        Substitute user with the sudo user on your Linode, and 192.0.2.1 with your Linode’s IP address.

      2. Open your browser and navigate to http://localhost:8888/. You should now see the Jellyfin first-time configuration screen. Start by selecting your preferred language from the drop down menu. Then click the Next button to continue.

        Language Setup

      3. Create your user account and password. Then click the Next button to continue.

        Account Creation

      4. Now you’ll create the directories to store your media on your Linode. For example, if you want to have music and movies on your server, you would create a directory to store them by using the following command in your terminal:

        cd ~/
        sudo mkdir -p jellyfin-media/music && sudo mkdir jellyfin-media/movies
        
      5. Back in your browser, now that your account is created, we can add your media. Click on the Add Media Library button to begin this process.

        Library Setup

        Note

        Each kind of content type provides a different set of options for you to configure, such as where you would like your metadata retrieved from, etc.

      6. Content in Jellyfin is organized into Libraries. Libraries can have multiple directories from which they aggregate their media. You can specify directories using the Folders plus (+) button. Click the (+) button to add the folder you created earlier.

        Choose the "Folders" button

      7. In the Folders field, enter the full path to your folder (/home/username/jellyfin-media/movies) then click the Ok button.

        Path to Folder

      8. You can add as many libraries as you’d like both now and later through your dashboard Click the blue Next button to proceed to the next sections.

      9. Select your preferred metadata Language, then click on the Next button.

      10. Disable port mapping by unchecking the Enable automatic port mapping option as this feature can pose a security risk in a cloud environment. Port Mapping is generally enabled in a local environment behind a home router, where you may want your Jellyfin server to be able to seamlessly connect to other devices.

        Library Dashboard

      11. Click the Next button. Your setup is now complete and you’ll be required to sign in as the user with the password you setup earlier.

      DLNA is a protocol that incorporates Universal Plug and Play (or UPnP) standards for digital media sharing across devices. As port 1900 will be openly available and any DLNA device or application can have full unrestricted access to your content, we recommend disabling DLNA if you won’t be using it.

      Click the “hamburger” menu in the top left corner of Jellyfin, choose Dashboard, and on the left side of the screen choose DLNA, then disable and save your DLNA settings.

      Disable DLNA

      Add and Organize Media

      • You can add as many libraries as you’d like through the Dashboard under Libraries at any time.

        Library Dashboard

      • Media can be added to individual folders from inside your Linode using various file transfer tools and download methods.

      • Once files in a folder are added to your Jellyfin server, they can be accessed from your Home Menu by clicking on the Home icon at top left of the page after selecting the hamburger menu.

        Home Menu

      Create a Reverse Proxy for Jellyfin

      Jellyfin primarily works as a web frontend for your media. That means you’ll generally want to proxy the default Jellyfin websocket to requests. Jellyfin supports a large number of server software solutions for this purpose, though in this guide, the example will be Apache.

      1. Install Apache with the following command:

        sudo apt install apache2
        
      2. Enable proxy settings for Apache with the following commands:

        sudo a2enmod proxy
        sudo a2enmod proxy_http
        
      3. Open a new virtual host file for your configuration. Replace “example.com” in this example with the domain name you’ll be using:

        sudo nano /etc/apache2/sites-available/jellyfin.example.com.conf
        

        Note

        Although nano is used in this example, feel free to use the text editor of your choice.

      4. Use the following Apache virtual host configuration to create your reverse proxy. Replace jellyfin.example.com with your domain/subdomain.

        /etc/apache2/sites-available/jellyfin.example.com.conf
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        13
        
        <VirtualHost *:80>
            ServerName jellyfin.example.com
            ErrorLog /var/log/apache2/jellyfin-error.log
            CustomLog /var/log/apache2/jellyfin-access.log combined
        
            ProxyPreserveHost On
        
            ProxyPass "/embywebsocket" "ws://127.0.0.1:8096/embywebsocket"
                ProxyPassReverse "/embywebsocket" "ws://127.0.0.1:8096/embywebsocket"
        
            ProxyPass "/" "http://127.0.0.1:8096/"
                ProxyPassReverse "/" "http://127.0.0.1:8096/"
        </VirtualHost>
      5. Enable your new website:

        sudo a2ensite jellyfin.example.com.conf
        
      6. Restart Apache to fully enable your settings:

        sudo systemctl restart apache2
        

      You may also want to set up SSL encryption for this virtual host. For more information regarding this configuration, see Jellyfin’s reverse proxy documentation

      Find answers, ask questions, and help others.

      This guide is published under a CC BY-ND 4.0 license.



      Source link