Docker - Jellyfin Container Setup


Jellyfin is a great open source media system and in my case Jellyfin replaced Plex. Here I describe my setup of the Docker Jellyfin container.

Setup

I run this Docker container on a Ubuntu VM that runs via [[ Proxmox VE ]]. I perform the following on the CLI.

Docker pull command:

docker pull jellyfin/jellyfin

Within my home folder I have created a Docker folder where I create a subfolder for each container:

cd ~
mkdir -p docker/jellyfin
cd docker/jellyfin

Also create the folders where the media, config and cache can be stored:

mkdir media
mkdir cache
mkdir config

I use the Nano text editor to create a shell script:

sudo nano jellyfin_run.sh

With this shell script we are going to create the container. Copy the following into jellyfin_run.sh:

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 \
 -e TZ=Europe/Amsterdam \
 -v $PWD/config:/config \
 -v $PWD/cache:/cache \
 -v $PWD/media:/media \
 --restart unless-stopped \
 jellyfin/jellyfin

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

-e TZ=Europe/Amsterdam
Pick the right timezone

-v $PWD/config:/config
Choose the location for the Jellyfin configuration. In this example it is the config map we created.

-v $PWD/cache:/cache
Choose the location for the Jellyfin cache. In this example it is the cache map we created.

-v $PWD/media:/media
Choose the location for the Jellyfin media. In this example it is the media map we created. Personally I use a mapping to my fileserver: /mnt/fileserver/media instead of $PWD/media

Exit Nano (CTRL-X) and save the changes.

Now create the container:

sudo sh jellyfin_run.sh

Check if the container is running properly.

See also my notes about updating containers with Portainer or via the CLI. With Synology’s Docker Application, updating a container is also very easy.

Jellyfin Configuration

Jellyfin can now be accessed via the following URL:

http://<IP DOCKER HOST>:8096

Read other notes

Comments

    No comments found for this note.

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

    Tags


    Notes mentioning this note

    There are no notes linking to this note.


    Notes Graph