Skip to content

Jellyfin

Jellyfin is an open source version of the famous media server Emby.

There is an official image for this service that we'll use: jellyfin/jellyfin.

Pre-Installation

We'll create a folder in the main user's home where all the service's data will be saved.

mkdir ~/services/media/jellyfin

Docker Compose

Jellyfin will be run using Docker Compose. The content of the docker-compose.yml file is as follows:

services:
  web:
    image: jellyfin/jellyfin:latest
    restart: unless-stopped
    user: 1000:1000
    networks:
      default:
      proxy_external:
        aliases:
          - jellyfin
    volumes:
      - ./config:/config
      - ./cache:/cache
      - /media/usb_4tb:/media/usb_4tb
      - /media/usb_8tb:/media/usb_8tb
      - /media/sata_2tb:/media/sata_2tb
    environment:
      TZ: America/Guayaquil
    labels:
      traefik.enable: true
      traefik.docker.network: proxy_external
      traefik.http.routers.jellyfin.rule: Host(`subdomain.example.com`)
      traefik.http.routers.jellyfin.entrypoints: public
      traefik.http.routers.jellyfin.service: jellyfin@docker
      traefik.http.services.jellyfin.loadbalancer.server.port: 8096

networks:
  proxy_external:
    external: true

Note

In the case of the user directive, 1000:1000 corresponds to the user's UID:GID. You can find the values for your own user by running id $whoami.

Note

Replace subdomain.example.com with the domain name where your service will be accessible from.

Reverse Proxy

This service is exposed by a reverse proxy. More specifically, it is using Traefik.

For this reason, you will see that this service has:

  1. A directive to connect it to the proxy_external external network.
  2. A container alias for the proxy_external network.
  3. A number of labels with names starting with traefik.

If you're not using a reverse proxy, feel free to remove these from the docker-compose.yml file. Keep in mind you might need to bind the ports to connect to the service instead.

Running

Start up the service with:

docker compose up -d

That's it! The service will auto-start on system startup and restart on failure.