Prerequisites

  • Ubuntu installed
  • Docker installed
  • Docker Compose installed

Step 1: Create Directories

mkdir -p ~/jellyfin/config
mkdir -p ~/jellyfin/data

Step 2: Create the docker-compose.yml

version: "3.9"
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    user: 1000:1000
    network_mode: "host"
    volumes:
      - /home/$USER/jellyfin/config:/config
      - /home/$USER/jellyfin/data:/data
      - /path/to/your/media:/media
    restart: unless-stopped

Replace /path/to/your/media with the actual path to your media.

Step 3: Start Jellyfin

cd ~/jellyfin
docker-compose up -d

Step 4: Access Jellyfin

Open your browser and go to http://localhost:8096. Follow the instructions in the web interface to set up Jellyfin.