11/22/2021»»Monday

Ubuntu Upgrade Docker

The Jellyfin project and its contributors offer a number of pre-built binary packages to assist in getting Jellyfin up and running quickly on multiple systems.

Container images

Official container image: jellyfin/jellyfin.

Ubuntu supports the ability to upgrade from one LTS to the next LTS in sequential order. For example, a user on Ubuntu 16.04 LTS can upgrade to Ubuntu 18.04 LTS, but cannot jump directly to Ubuntu 20.04 LTS. To do this, the user would need to upgrade twice: once to Ubuntu 18.04 LTS, and then upgrade again to Ubuntu 20.04 LTS. Docker installed on Ubuntu 18.04; A command-line/terminal window (Ctrl-Alt-T) Steps for Installing Docker Compose on Ubuntu Update Software Repositories and Packages. Start by updating the software repositories and software packages. Open a terminal window, and enter the following: sudo apt-get update sudo apt-get upgrade. Docker installed on your server or local machine, following Steps 1 and 2 of How To Install and Use Docker on Ubuntu 20.04. Step 1 — Installing Docker Compose To make sure we obtain the most updated stable version of Docker Compose, we’ll download this software from its official Github repository.

LinuxServer.io image: linuxserver/jellyfin.

hotio image: hotio/jellyfin.

Jellyfin distributes official container images on Docker Hub for multiple architectures. These images are based on Debian and built directly from the Jellyfin source code.

Additionally the LinuxServer.io project and hotio distribute images based on Ubuntu and the official Jellyfin Ubuntu binary packages, see here and here to see their Dockerfile.

Update
Note

For ARM hardware and RPi, it is recommended to use the LinuxServer.io or hotio image since hardware acceleration support is not yet available on the native image.

Docker

Docker allows you to run containers on Linux, Windows and MacOS.

The basic steps to create and run a Jellyfin container using Docker are as follows.

  1. Follow the offical installation guide to install Docker.

  2. Download the latest container image.

  3. Create persistent storage for configuration and cache data.

    Either create two directories on the host and use bind mounts:

    Or create two persistent volumes:

  4. Create and run a container in one of the following ways.

Note

The default network mode for Docker is bridge mode. Bridge mode will be used if host mode is omitted. Use host mode for networking in order to use DLNA.

Using Docker command line interface:

Using host networking (--net=host) is optional but required in order to use DLNA.

Bind Mounts are needed to pass folders from the host OS to the container OS whereas volumes are maintained by Docker and can be considered easier to backup and control by external programs. For a simple setup, it's considered easier to use Bind Mounts instead of volumes. Replace jellyfin-config and jellyfin-cache with /path/to/config and /path/to/cache respectively if using bind mounts. Multiple media libraries can be bind mounted if needed:

Note

There is currently an issue with read-only mounts in Docker. If there are submounts within the main mount, the submounts are read-write capable.

Using Docker Compose:

Create a docker-compose.yml file with the following contents:

Then while in the same folder as the docker-compose.yml run:

To run the container in background add -d to the above command.

You can learn more about using Docker by reading the official Docker documentation.

Unraid Docker

An Unraid Docker template is available in the repository.

  1. Open the unRaid GUI (at least unRaid 6.5) and click on the 'Docker' tab.

  2. Add the following line under 'Template Repositories' and save the options.

  3. Click 'Add Container' and select 'jellyfin'.

  4. Adjust any required paths and save your changes.

Kubernetes

A community project to deploy Jellyfin on Kubernetes-based platforms exists at their repository. Any issues or feature requests related to deployment on Kubernetes-based platforms should be filed there.

Podman

Podman allows you to run containers as non-root. It's also the offically supported container solution on RHEL and CentOS.

Steps to run Jellyfin using Podman are almost identical to Docker steps:

  1. Install Podman:

  2. Download the latest container image:

  3. Create persistent storage for configuration and cache data:

    Either create two persistent volumes:

    Or create two directories on the host and use bind mounts:

  4. Create and run a Jellyfin container:

Note that Podman doesn't require root access and it's recommended to run the Jellyfin container as a separate non-root user for security.

Ubuntu Upgrade Docker

Keep in mind that the --label 'io.containers.autoupdate=image' flag will allow the container to be automatically updated via podman auto-update.

Ubuntu Upgrade Docker

If SELinux is enabled you need to use either the z (shared volume) or Z (private volume) volume option to allow Jellyfin to access the volumes.

Replace jellyfin-config, jellyfin-cache, and jellyfin-media with /path/to/config, /path/to/cache and /path/to/media respectively if using bind mounts.

To mount your media library read-only append ':ro' to the media volume:

Managing via Systemd

To run as a systemd service see Running containers with Podman and shareable systemd services.

As always it is recommended to run the container rootless. Therefore we want to manage the container with the systemd --user flag.

  1. First we have to generate the container as seen above.

  2. Next generate the systemd.service file.

  3. Verify and edit the systemd.service file to your liking. To further sandbox see Mastering systemd: Securing and sandboxing applications and services. An example service file is shown below. Do not blindly copy, one should make edits to the service file generated by podman.

  4. Enable the service.

    At this point the container will only start when the user logs in and shutdown when they log off. To have the container start as the user at first login we'll have to include one more option.

  5. Start the service.

Cloudron

Cloudron is a complete solution for running apps on your server and keeping them up-to-date and secure. On your Cloudron you can install Jellyfin with a few clicks via the app library and updates are delivered automatically.

The source code for the package can be found here.Any issues or feature requests related to deployment on Cloudron should be filed there.

Windows (x64)

Windows installers and builds in ZIP archive format are available here.

Warning

If you installed a version prior to 10.4.0 using a PowerShell script, you will need to manually remove the service using the command nssm remove Jellyfin and uninstall the server by remove all the files manually. Also one might need to move the data files to the correct location, or point the installer at the old location.

Warning

The Basic Install is the recommended way to run the Jellyfin Server. Using the Advanced/Service mode may experience FFmpeg Hardware Acceleration issues, and is only for advanced users.

Install using Installer (x64)

Install

  1. Download the latest version.
  2. Run the installer.
  3. (Optional) When installing as a service (not recommended), pick the service account type.
  4. If everything was completed successfully, Jellyfin is now running.
  5. Open your browser at http://your_local_IP_address:8096 to finish setting up Jellyfin.

Update

  1. Download the latest version.
  2. Close or Stop Jellyfin if it is running.
  3. Run the installer.
  4. If everything was completed successfully, the new version is installed.

Uninstall

  1. Go to Add or remove programs in Windows.
  2. Search for Jellyfin.
  3. Click Uninstall.

Manual Installation (x86/x64)

Install

  1. Download and extract the latest version.
  2. Create a folder jellyfin at your preferred install location.
  3. Copy the extracted folder into the jellyfin folder and rename it to system.
  4. Create jellyfin.bat within your jellyfin folder containing:

    • To use the default library/data location at %localappdata%:

    • To use a custom library/data location (Path after the -d parameter):

    • To use a custom library/data location (Path after the -d parameter) and disable the auto-start of the webapp:

  5. Run

  6. Open your browser at http://<--Server-IP-->:8096 (if auto-start of webapp is disabled)

Update

  1. Stop Jellyfin
  2. Rename the Jellyfin system folder to system-bak
  3. Download and extract the latest Jellyfin version
  4. Copy the extracted folder into the jellyfin folder and rename it to system
  5. Run jellyfin.bat to start the server again

Rollback

  1. Stop Jellyfin.
  2. Delete the system folder.
  3. Rename system-bak to system.
  4. Run jellyfin.bat to start the server again.

macOS

macOS Application packages and builds in TAR archive format are available here.

Install

  1. Download the latest version.
  2. Drag the .app package into the Applications folder.
  3. Start the application.
  4. Click the icon in the menu bar and select 'Launch Web UI'.

Upgrade

  1. Download the latest version.
  2. Stop the currently running server either via the dashboard or using the menu bar icon.
  3. Drag the new .app package into the Applications folder and click yes to replace the files.
  4. Start the application.

Uninstall

  1. Stop the currently running server either via the dashboard or using the application icon.
  2. Move the .app package to the trash.

Deleting Configuation

This will delete all settings and user information. This applies for the .app package and the portable version.

  1. Delete the folder ~/.config/jellyfin/
  2. Delete the folder ~/.local/share/jellyfin/

Portable Version

  1. Download the latest version
  2. Extract it into the Applications folder
  3. Open Terminal and type cd followed with a space then drag the jellyfin folder into the terminal.
  4. Type ./jellyfin to run jellyfin.
  5. Open your browser at http://localhost:8096

Closing the terminal window will end Jellyfin. Running Jellyfin in screen or tmux can prevent this from happening.

Upgrading the Portable Version

  1. Download the latest version.
  2. Stop the currently running server either via the dashboard or using CTRL+C in the terminal window.
  3. Extract the latest version into Applications
  4. Open Terminal and type cd followed with a space then drag the jellyfin folder into the terminal.
  5. Type ./jellyfin to run jellyfin.
  6. Open your browser at http://localhost:8096

Uninstalling the Portable Version

  1. Stop the currently running server either via the dashboard or using CTRL+C in the terminal window.
  2. Move /Application/jellyfin-version folder to the Trash. Replace version with the actual version number you are trying to delete.

Using FFmpeg with the Portable Version

The portable version doesn't come with FFmpeg by default, so to install FFmpeg you have three options.

  • use the package manager homebrew by typing brew install ffmpeg into your Terminal (here's how to install homebrew if you don't have it already
  • download the most recent static build from this link (compiled by a third party see this page for options and information), or
  • compile from source available from the official website

More detailed download options, documentation, and signatures can be found.

If using static build, extract it to the /Applications/ folder.

Navigate to the Playback tab in the Dashboard and set the path to FFmpeg under FFmpeg Path.

Linux

Linux (generic amd64)

Generic amd64 Linux builds in TAR archive format are available here.

Installation Process

Create a directory in /opt for jellyfin and its files, and enter that directory.

Download the latest generic Linux build from the release page. The generic Linux build ends with 'linux-amd64.tar.gz'. The rest of these instructions assume version 10.4.3 is being installed (i.e. jellyfin_10.4.3_linux-amd64.tar.gz). Download the generic build, then extract the archive:

Create a symbolic link to the Jellyfin 10.4.3 directory. This allows an upgrade by repeating the above steps and enabling it by simply re-creating the symbolic link to the new version.

Create four sub-directories for Jellyfin data.

If you are running Debian or a derivative, you can also download and install an ffmpeg release built specifically for Jellyfin. Be sure to download the latest release that matches your OS (4.2.1-5 for Debian Stretch assumed below).

If you run into any dependency errors, run this and it will install them and jellyfin-ffmpeg.

Due to the number of command line options that must be passed, it is easiest to create a small script to run Jellyfin.

Then paste the following commands and modify as needed.

Assuming you desire Jellyfin to run as a non-root user, chmod all files and directories to your normal login user and group. Also make the startup script above executable.

Finally you can run it. You will see lots of log information when run, this is normal. Setup is as usual in the web browser.

Upgrade

Portable DLL

Platform-agnostic .NET Core DLL builds in TAR archive format are available here. These builds use the binary jellyfin.dll and must be loaded with dotnet.

Arch Linux

Jellyfin can be found in the AUR as jellyfin, jellyfin-bin and jellyfin-git.

Fedora

Fedora builds in RPM package format are available here for now but an official Fedora repository is coming soon.

  1. You will need to enable rpmfusion as ffmpeg is a dependency of the jellyfin server package

    Note

    You do not need to manually install ffmpeg, it will be installed by the jellyfin server package as a dependency

  2. Install the jellyfin server

  3. Install the jellyfin web interface

  4. Enable jellyfin service with systemd

  5. Open jellyfin service with firewalld

    Note

    This will open the following ports8096 TCP used by default for HTTP traffic, you can change this in the dashboard8920 TCP used by default for HTTPS traffic, you can change this in the dashboard1900 UDP used for service auto-discovery, this is not configurable7359 UDP used for auto-discovery, this is not configurable

  6. Reboot your box

  7. Go to localhost:8096 or ip-address-of-jellyfin-server:8096 to finish setup in the web UI

CentOS

Ubuntu Upgrade Docker

CentOS/RHEL 7 builds in RPM package format are available here and an official CentOS/RHEL repository is planned for the future.

The default CentOS/RHEL repositories don't carry FFmpeg, which the RPM requires. You will need to add a third-party repository which carries FFmpeg, such as RPM Fusion's Free repository.

Ubuntu Upgrade Docker-compose

You can also build Jellyfin's version on your own. This includes gathering the dependencies and compiling and installing them. Instructions can be found at the FFmpeg wiki.

Debian

Repository

The Jellyfin team provides a Debian repository for installation on Debian Stretch/Buster. Supported architectures are amd64, arm64, and armhf.

Note

Microsoft does not provide a .NET for 32-bit x86 Linux systems, and hence Jellyfin is not supported on the i386 architecture.

Steps 1 to 3 can also be replaced by:

  1. Install HTTPS transport for APT as well as gnupg and lsb-release if you haven't already.

  2. Import the GPG signing key (signed by the Jellyfin Team):

  3. Add a repository configuration at /etc/apt/sources.list.d/jellyfin.list:

    Note

    Supported releases are stretch, buster, and bullseye.

  4. Update APT repositories:

  5. Install Jellyfin:

  6. Manage the Jellyfin system service with your tool of choice:

Ubuntu Upgrade Docker Update

Packages

Ubuntu

Raw Debian packages, including old versions, are available here.

Note

The repository is the preferred way to obtain Jellyfin on Debian, as it contains several dependencies as well.

  1. Download the desired jellyfin and jellyfin-ffmpeg.deb packages from the repository.

  2. Install the downloaded .deb packages:

  3. Use apt to install any missing dependencies:

  4. Manage the Jellyfin system service with your tool of choice:

Ubuntu

Migrating to the new repository

Previous versions of Jellyfin included Ubuntu under the Debian repository. This has now been split out into its own repository to better handle the separate binary packages. If you encounter errors about the ubuntu release not being found and you previously configured an ubuntujellyfin.list file, please follow these steps.

Ubuntu Upgrade Docker Software

  1. Remove the old /etc/apt/sources.list.d/jellyfin.list file:

  2. Proceed with the following section as written.

Ubuntu Repository

The Jellyfin team provides an Ubuntu repository for installation on Ubuntu Xenial, Bionic, Cosmic, Disco, Eoan, and Focal. Supported architectures are amd64, arm64, and armhf. Only amd64 is supported on Ubuntu Xenial.

Note

Microsoft does not provide a .NET for 32-bit x86 Linux systems, and hence Jellyfin is not supported on the i386 architecture.

  1. Install HTTPS transport for APT if you haven't already:

  2. Enable the Universe repository to obtain all the FFMpeg dependencies:

    Note

    If the above command fails you will need to install the following package software-properties-common.This can be achieved with the following command sudo apt-get install software-properties-common

  3. Import the GPG signing key (signed by the Jellyfin Team):

  4. Add a repository configuration at /etc/apt/sources.list.d/jellyfin.list:

    Note

    Supported releases are xenial, bionic, cosmic, disco, eoan, and focal.

  5. Update APT repositories:

  6. Install Jellyfin:

  7. Manage the Jellyfin system service with your tool of choice:

Ubuntu Packages

Raw Ubuntu packages, including old versions, are available here.

Ubuntu Update Docker-compose

Note

The repository is the preferred way to install Jellyfin on Ubuntu, as it contains several dependencies as well.

Ubuntu Upgrade Docker Windows 10

  1. Enable the Universe repository to obtain all the FFMpeg dependencies, and update repositories:

  2. Download the desired jellyfin and jellyfin-ffmpeg.deb packages from the repository.

  3. Install the required dependencies:

  4. Install the downloaded .deb packages:

  5. Use apt to install any missing dependencies:

  6. Manage the Jellyfin system service with your tool of choice:

Most Viewed Posts