Skip to main content

Install Jellyfin on Dcoker

Install Jellyfin on Docker

This guide provides a Docker Compose YAML file to deploy a Jellyfin media server.

Prerequisites

  • Docker and Docker Compose must be installed. Refer to Docker Installation Guide for setup instructions.
  • Basic knowledge of Docker commands and file system permissions.
  • A local storage location for Jellyfin’s configuration, cache, and media files.

Setup

  1. Create a directory for your Jellyfin setup (e.g., mkdir jellyfin && cd jellyfin).
  2. Ensure the local storage paths (e.g., /mounted/local/storage/location) exist on your host system and have appropriate permissions (e.g., owned by user/group with IDs 1001).
  3. Create a docker-compose.yml file in the directory.

Docker Compose YAML

yaml


version: "3"
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=America/Los_Angeles
    volumes:
      - /home/user/jellyfin/config:/config
      - /home/user/jellyfin/cache:/cache
      - /home/user/jellyfin/media:/media
    ports:
      - 8092:8096
    restart: unless-stopped

Running the Service

  1. In the directory containing docker-compose.yml, run:
    docker-compose up -d
  2. Access Jellyfin by navigating to http://<your-server-ip>:8092 in a web browser.

Notes

  • Storage Paths: Replace /mounted/local/storage/location with actual paths on your host (e.g., /home/user/jellyfin/config). Using the same path for /config, /cache, and /media may not be ideal; consider separate paths (e.g., /home/user/jellyfin/config, /home/user/jellyfin/cache, /home/user/jellyfin/media) for better organization.
  • Permissions: Ensure the user/group IDs (PUID/PGID) match the owner of the storage paths. Adjust 1001 to match your system’s user/group IDs if needed (check with id <username>).
  • Timezone: The PST=America/Los Angeles environment variable may not be recognized by Jellyfin; the correct variable is TZ=America/Los_Angeles. Update the YAML accordingly.
  • Port: The service maps port 8092 on the host to 8096 in the container. Ensure 8092 is open on your firewall.