Skip to content

Instantly share code, notes, and snippets.

@Askill
Created May 30, 2025 07:40
Show Gist options
  • Save Askill/cb94b5af6691844bf3892b05df6334ab to your computer and use it in GitHub Desktop.
Save Askill/cb94b5af6691844bf3892b05df6334ab to your computer and use it in GitHub Desktop.
Run Jellyfin on Windows with single start file. (Uses Docker Desktop)

Prerequisits

Usage

You can use the Jellyfin mmart TV app, your smartphone or PC, as long as they are on the same network.

Start

  1. double click Start_JellyWin.bat
  2. note IP Adress from consol window http://192.168.<xxx.xxx>:8096
  3. if you close the console window jellyfin will stop
    3.1 if it does not and you want it to: double click on Stop_JellyWin.bat
  4. copy your movies and series to C:\jellyfin\media\1

Follow the setup guide

  1. create a user
  2. activate external access (active by default)
  3. do not enable automatic portforwarding (deactivated by default)
  4. add a Library

Add more libraries

Add more or different folders / drives for your collections by adding a line in the docker-compose.yaml following this pattern:
"<drive name>:\\<Path on that drive>:/media/<some number>"

Example:

Adjust the drive letters/paths to match your setup
 volumes:
   - "C:\\jellyfin\\config:/config"
   - "C:\\jellyfin\\cache:/cache"
   - "C:\\jellyfin\\media:/media/1"
   - "D:\\Path\\to\\your\\media:/media/2"
   - "X:\\Path\\to\\your\\media:/media/3"
   - "Y:\\Path\\to\\your\\media:/media/4"
   - [... and so on ...]
   
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
# Pass the NVIDIA GPU to the container
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all # use every GPU you have
capabilities: [gpu]
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video,graphics
# optional – helps remote clients find the server
#- JELLYFIN_PublishedServerUrl=http://localhost
ports:
- "8096:8096"
- "8920:8920"
- "1900:1900/udp"
- "7359:7359/udp"
# Adjust the drive letters/paths to match your setup
volumes:
- "C:\\jellyfin\\config:/config"
- "C:\\jellyfin\\cache:/cache"
- "C:\\jellyfin\\media:/media/1"
restart: unless-stopped
@echo off
title Jellyfin Starter
cd /d "%~dp0"
setlocal EnableDelayedExpansion
rem ------------ 1. make sure Docker is running ------------
echo Checking Docker...
docker info >nul 2>&1
if %errorlevel% neq 0 (
echo Starting Docker Desktop...
start "" "C:\Program Files\Docker\Docker\Docker Desktop.exe"
echo Waiting for Docker to be ready…
:waitDocker
timeout /t 2 >nul
docker info >nul 2>&1 && goto dockerOK
goto waitDocker
)
:dockerOK
echo Docker is running.
:: ---------- 2. Detect LAN IP (first usable IPv4) ----------
for /f %%A in ('
powershell -NoLogo -NoProfile ^
"(Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.IPAddress -notlike '169.254.*' -and $_.IPAddress -ne '127.0.0.1' } | Sort-Object InterfaceMetric | Select-Object -First 1 -ExpandProperty IPAddress)"
') do set "IP=%%A"
echo.
if defined IP (
echo Jellyfin starting on: http://%IP%:8096
) else (
echo Jellyfin starting on – could not auto-detect LAN IP,
echo try http://localhost:8096
)
:: ---------- 3. Launch the Jellyfin stack ----------
echo Launching Jellyfin container...
docker compose up -d
pause
docker compose down
docker compose down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment