How to setup Jellyfin with Docker Compose

Self-Hosting Feb 27, 2021

Today we'll be Self Hosting Jellyfin using Docker-Compose. This is a super simple installation and should take no longer than 10 Minutes!

What is Jellyfin?

Jellyfin is a suite of multimedia applications designed to organize, manage, and share digital media files to networked devices. Jellyfin consists of a server application installed on a machine running Microsoft Windows, macOS, Linux or in a Docker container, and another application running on a client device such as a smartphone, tablet, smart TV, streaming media player, game console or in a web browser. Jellyfin also can serve media to DLNA and Chromecast-enabled devices. It is a free and open-source software fork of Emby. - Wikipedia

Prerequisites:


Install

  1. Head to your home directory: cd
  2. Create a directory for Jellyfin: sudo mkdir jellyfin && cd jellyfin
  1. Create the docker-compose.yaml file:
    Use the following template
    sudo nano docker-compose.yaml
version: "3"
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    volumes:
      - ./config:/config
      - ./jellyfin/cache:/cache
      - /path/to/media:/media:ro
    restart: unless-stopped
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 1024M
    networks:
      default:
        ipv4_address: 10.10.10.14
        
networks:
  default:
    external:
      name: dockernet

Change /path/to/media and ensure your Docker Network/IP is correct.

As Jellyfin is fairly intensive due to transcoding the media, we have capped CPU usage to 2 cores to ensure it does not impact the rest of the server.

  1. Let's spin this up!
    sudo docker-compose --compatibility up -d
  1. You'll now want to set up a Reverse Proxy.
    Caddy Setup
    Reverse Proxy Manager Setup

A basic Caddyfile setup would look like this:

jellyfin.example.com {
  reverse_proxy 10.10.10.14:8096
}

Enjoy!

Tags