- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| defaults | ||
| meta | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
jellyfin
Deploys a Jellyfin media server via Docker Compose (official jellyfin/jellyfin image), routed through Traefik as a reverse proxy. Config and cache live under jellyfin_data_path; media comes from any number of host paths in jellyfin_media_volumes.
Requirements
- Docker
- Traefik on the
traefik_webnetwork with awebsecureentrypoint (whenjellyfin_traefikistrue) community.dockerAnsible collection
Variables
| Variable | Default | Description |
|---|---|---|
jellyfin_instance |
jellyfin |
Unique instance name. Used as Compose project name and container name prefix. |
jellyfin_data_path |
/data/jellyfin |
Host path for config/ (database, settings, metadata, plugins) and cache/ (transcodes, images). |
jellyfin_docker_path |
/docker/jellyfin |
Host path for the compose.yml file. |
jellyfin_version |
12.4 |
Image tag. 12.4 follows patch releases; pin an exact tag to freeze it. |
jellyfin_user |
1000:1000 |
UID:GID the container runs as. Owns the data directories and must be able to read the media. |
jellyfin_domain |
~ |
Public domain (no protocol prefix). Traefik rule and published server URL. Required with jellyfin_traefik. |
jellyfin_port |
~ |
When set, exposes Jellyfin on this host port, bound to 127.0.0.1. Either this or jellyfin_domain must be set. |
jellyfin_traefik |
true |
Attaches to the traefik_web network and adds Traefik routing labels. |
jellyfin_traefik_certresolver |
default |
Traefik certificate resolver. |
jellyfin_timezone |
Europe/Berlin |
Container timezone. |
jellyfin_media_volumes |
[] |
Media mounts as Compose volume strings. See Media. |
jellyfin_devices |
[] |
Devices for hardware transcoding, e.g. ["/dev/dri:/dev/dri"]. |
jellyfin_group_add |
[] |
Extra numeric GIDs for the container user, e.g. the host's render group. |
jellyfin_env |
{} |
Additional environment variables, overriding the role's own values. |
jellyfin_uninstall |
false |
Stops and removes the container and the compose directory. |
jellyfin_purge |
false |
Also removes the data directory. Requires jellyfin_uninstall: true. Media is never touched. Irreversible. |
Media
Every entry is a Compose volume string, <host path>:<container path>[:ro]. Add a line per disk and re-run the role; the container is recreated with the new mount. Then add the container path as a library in the dashboard.
jellyfin_media_volumes:
- /data/media:/media/data:ro
- /mnt/usb1:/media/usb1:ro # USB drive, mounted on the host first (fstab, nofail)
Mount :ro unless Jellyfin should write NFO files or artwork next to the media. A host path that doesn't exist is created empty by Docker (as root) - mount the drive first. A drive that is mounted after the container started is not visible until the container restarts.
Hardware transcoding
jellyfin_devices: ["/dev/dri:/dev/dri"]
jellyfin_group_add: ["993"] # getent group render
Then pick the method (VAAPI/QSV) under Dashboard > Playback > Transcoding.
Usage
- hosts: media01
become: true
roles:
- role: jellyfin
vars:
jellyfin_domain: media.example.com
jellyfin_media_volumes:
- /data/media:/media/data:ro
The first visitor runs the setup wizard and creates the admin account - open it right after the first deploy. Afterwards add Traefik's address under Dashboard > Networking > Known Proxies, else Jellyfin ignores X-Forwarded-For and logs every client as Traefik.
Not included
- SSO - Jellyfin has no built-in OIDC; the third-party SSO plugin is installed by hand if needed.
- Client auto-discovery (7359/udp) and DLNA - they need the LAN, not a reverse proxy.