2026-07-10, 01:38 PM
Hello forum,
In my attempt to steer away from the non-reproducible click-ops approach for many containers, I gave Jellyfin a try.
First task was a look around for what is available for unattended configuration, since platform was docker the install/deployment itself wasn't a problem.
All tools I found were either not up to date, abandoned, did nasty unsupported things or were difficult to deal with.
So now I am with a docker platform, and a few wishes:
First I create the compose.yaml for Jellyfin (see attached). Some highlights from it
The configuration script starts with sleeping a bit, then, in order, on an new Jellyfin:
With help of ${JellyfinURL}/api-docs/swagger and postman. And Gemini for syntax things.
Maybe good to add: All done in Ubuntu or Debian, do not know if/how anything works in Windows.
Was a fun endeavor, maybe benefitting others.
In my attempt to steer away from the non-reproducible click-ops approach for many containers, I gave Jellyfin a try.
First task was a look around for what is available for unattended configuration, since platform was docker the install/deployment itself wasn't a problem.
All tools I found were either not up to date, abandoned, did nasty unsupported things or were difficult to deal with.
So now I am with a docker platform, and a few wishes:
- Create a secure container setup for Jellyfin.
- Place the Jellyfin container behing Traefik proxy, that takes care of https termination and certificates. Jellyfin may be shared with family at some point.
- Integrate Jellyfin with LDAP, also running in Docker.
- Integrate Jellyfin with Crowdsec (yes, I'm paranoid)
- Create a portable setup, deployable on other docker systems without touching the content, just changing some variables/secrets.
- No touch deployment and configuration, preserving what is already configured (not a complete wipe on container restart).
First I create the compose.yaml for Jellyfin (see attached). Some highlights from it
- It uses docker secrets, .env and environment sect.. Goal was to be portability with the compose file
- It only has the capabilities needed
- It uses labels for Traefik, Crowdsec and Homepage. Easy to turn those off if not needed.
- It uses 2 networks: one for traefik and one it shares with ldap server
- The configuration script is mounted as a volume and is started in the post_start section
The configuration script starts with sleeping a bit, then, in order, on an new Jellyfin:
- Sets variables (some by cat'ting from mounted docker secrets)
- It wait for Jellyfin process to be ready.
- Check if JF is already configured, if so it skips the initial config.
- Set language settings, adds StartupUser, assign admin/pass to the startup user
- Marks startup as complete
- Generate an API-key if it does'n already exists
- Configures the network setting (nasty bit of file replacement, can't be done though API), I don't need it now, but might later.
- If it doesn't exist, installs LDAP plugin, and restart Jellyfin (required to configure LDAP)
- Configures LDAP plugin
- Create 2 libraries with options.
With help of ${JellyfinURL}/api-docs/swagger and postman. And Gemini for syntax things.
Maybe good to add: All done in Ubuntu or Debian, do not know if/how anything works in Windows.
Was a fun endeavor, maybe benefitting others.
