1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 01:36:23 +00:00
Files
geek-cookbook/docs/recipes/jellyfin.md
David Young abf9309cb1 Experiment with PDF generation
Signed-off-by: David Young <davidy@funkypenguin.co.nz>
2022-08-19 16:40:53 +12:00

3.2 KiB

title, description
title description
Run Jellyfin in Docker with docker compose / swarm Jellyfin is best described as "like Emby but really FOSS"

Jellyfin

Jellyfin is best described as "like [Emby][emby] but really FOSS".

Jellyfin Screenshot{ loading=lazy }

If it looks very similar as Emby, is because it started as a fork of it, but it has evolved since them. For a complete explanation of the why, look here.

--8<-- "recipe-standard-ingredients.md"

Preparation

Setup data locations

We'll need a location to store Jellyfin's library data, config files, logs and temporary transcoding space, so create /var/data/jellyfin, and make sure it's owned by the user and group who also own your media data.

mkdir /var/data/jellyfin

Also if we want to avoid the cache to be part of the backup, we should create a location to map it on the runtime folder. It also has to be owned by the user and group who also own your media data.

mkdir /var/data/runtime/jellyfin

Prepare environment

Create jellyfin.env, and populate with PUID/GUID for the user who owns the /var/data/jellyfin directory (above) and your actual media content (in this example, the media content is at /srv/data)

PUID=
GUID=

Setup Docker Swarm

Create a docker swarm config file in docker-compose syntax (v3), something like this:

--8<-- "premix-cta.md"

version: "3.0"

services:
  jellyfin:
    image: jellyfin/jellyfin
    env_file: /var/data/config/jellyfin/jellyfin.env
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/data/jellyfin:/config
      - /var/data/runtime/jellyfin:/cache
      - /var/data/jellyfin/jellyfin:/config
      - /srv/data/:/data
    deploy:
      labels:
        # traefik common
        - traefik.enable=true
        - traefik.docker.network=traefik_public

        # traefikv1
        - traefik.frontend.rule=Host:jellyfin.example.com
        - traefik.port=8096     

        # traefikv2
        - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.example.com`)"
        - "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
        - "traefik.enable=true"

    networks:
        - traefik_public
    ports:
      - 8096:8096

networks:
  traefik_public:
    external: true

--8<-- "reference-networks.md"

Serving

Launch Jellyfin stack

Launch the stack by running docker stack deploy jellyfin -c <path -to-docker-compose.yml>

Log into your new instance at https://YOUR-FQDN, and complete the wizard-based setup to complete deploying your Jellyfin.

--8<-- "recipe-footer.md"