Skip to content

Jellyfin container setup

Introduction

Jellyfin is an open-source media server that allows you to manage and stream your media content, including movies, TV shows, music, and photos, to various devices. It offers a highly customizable user interface and extensive plugin support, ensuring a personalized media experience. Unlike some other media servers, Jellyfin is completely free and does not require any subscriptions or licenses.

Setup

  1. Create the folders needed by the container

    Run the following commands inside your home folder:

    # Open your terminal application
    cd ~
    mkdir -p jellyfin/media
    mkdir -p jellyfin/cache
    mkdir -p jellyfin/config
    cd jellyfin
  2. Create the script needed to run the container

    Save the following script as jellyfin_run.sh:

    jellyfin_run.sh
    # To create this script use your text editor application, for example Nano
    IDu=$(id -u $(logname)) # Saves the logged in user id in the IDu variable
    IDg=$(id -g $(logname)) # Saves the logged in user group in the IDg variable
    docker run -d \
    --name=jellyfin \
    --hostname=jellyfin \
    --net=host \
    --user $IDu:$IDg \
    -v $PWD/config:/config \
    -v $PWD/cache:/cache \
    -v $PWD/media:/media \
    -e TZ=Europe/Amsterdam \
    --restart unless-stopped \
    jellyfin/jellyfin
    # IMPORTANT: Please read the instructions below
    Instructions:
    • Optional Replace docker with podman if needed
    • Optional Replace --net=host with ports to pass through if you want to expose ports. Here is described how to check if ports are available
    • Optional Replace $PWD/config with the location of your config if needed. This can be a fileserver mount
    • Optional Replace $PWD/cache with the location of your cache if needed. This can be a fileserver mount
    • Optional Replace $PWD/media with the location of your media if needed. Personally I use a mapping to my fileserver: /mnt/fileserver/media instead of $PWD/media
    • Required Replace Europe/Amsterdam with your own timezone
  3. Run the script to create the container

    Run the following command:

    # Open your terminal application
    sudo sh jellyfin_run.sh

    The image jellyfin/jellyfin is automatically pulled and the container is created.

  4. Check the results

    If needed you can check if the container is running properly.

    Now you can use Jellyfin by opening a web browser and going to: http://localhost:8096. Replace localhost with the relevant IP address or FQDN if needed, and adjust the port if you changed it earlier.

Comments

    No comments found for this note.

    Join the discussion for this note on Github. Comments appear on this page instantly.

    Copyright 2021- Fiction Becomes Fact