Do not treat a Compose file, a Git repository, and a backup archive as equivalent places to store Jellyfin credentials. The deployment recipe can be widely copied; secret values should have a narrower lifecycle, access boundary, and recovery path.
For a Jellyfin stack, sensitive material can include API keys, reverse-proxy or tunnel credentials, DNS provider tokens, backup repository passwords, encryption keys, database credentials for supporting services, and other tokens used by plugins or automation. Inventory them first, then decide which must be reproducible, which must be recoverable, and which can simply be reissued.
Separate Secret References From Secret Values
Keep Compose declarative: service images, networks, mounts, ports, variable names, and secret references belong in the file; raw credentials should not. A placeholder such as BACKUP_PASSWORD documents the requirement without turning the Compose file into the credential store.
Plaintext environment files are convenient but easy to copy into source control, troubleshooting bundles, or unencrypted backups. A current Docker secret-management walkthrough distinguishes build-time image leakage, local .env sprawl, and runtime environment exposure, which are different paths to the same credential leak.
Use a secret manager, Compose-supported secret file mechanism, or another runtime injection method appropriate to the dependent service. Do not assume every Jellyfin setting supports a _FILE convention; use file-based injection only where the specific component supports it.
Prevent Secrets From Entering Images, Repositories, and Shell History
Exclude local secret files from both version control and the Docker build context. A file being listed in .gitignore does not stop a broad Dockerfile COPY from placing it in an image if .dockerignore still allows it.
Do not pass long-lived credentials directly on a command line that will be stored in shell history. Do not echo secrets during startup debugging. Avoid printing the resolved environment into tickets or shared chat when a single variable is enough to diagnose the problem.
After a suspected leak, deleting the line from the latest Compose file is not remediation. Rotate the exposed credential, invalidate old tokens where possible, inspect repository and image history, and remove the leaked value from future backups and diagnostics.
Design Backups So Required Secrets Are Recoverable but Not Casually Readable
Some secrets are part of recovery. An encrypted backup is useless if the repository password or decryption key dies with the same server, and a restored proxy or automation stack may need credentials that cannot be reconstructed from the Compose recipe alone.
A practical self-hosting recovery inventory treats keys, tokens, recovery codes, and backup passwords as first-class recovery material while keeping the keys that unlock backups outside the server being backed up. This is different from putting a plaintext .env file into every archive.
Create a secret-recovery manifest that names each required credential, its owner, where the authoritative copy lives, how it is restored or reissued, and which backup it unlocks. Store sensitive values in an encrypted password manager, encrypted backup set, or separate protected recovery package with access controls appropriate to the household.
Keep Logs and Troubleshooting Bundles From Becoming a Second Secret Store
Proxy request URLs, environment dumps, application debug output, and shell transcripts can expose tokens even when Compose is clean. Before sharing logs, search for authorization headers, API keys, query-string tokens, cookies, private hostnames, and credentials.
Logging guidance recommends redacting sensitive fields before telemetry leaves the system. Apply the same rule to home-server support bundles: keep the original locally if needed for diagnosis, but share a redacted copy.
Restrict backup and log readers separately. A person who can read media backups does not automatically need access to DNS tokens or reverse-proxy credentials. Secret exposure is an access-scope problem as much as a file-format problem.
Run a Leak Test and a Recovery Test Together
Create a canary secret with a recognizable fake value, deploy the stack, and search the Compose directory, image history, container inspection output, logs, backup catalog, and extracted test restore for that value. This reveals where the current workflow copies secrets without risking a real credential.
Then perform the inverse test: restore the Jellyfin stack to an isolated target using only the documented recovery materials. If recovery requires a credential that exists only on the failed host, the design is too secret-sparse; if every ordinary backup exposes all credentials in plaintext, it is too secret-rich.
The ZimaSpace least-privilege boundary is the final check: each service, backup job, administrator, and recovery process should receive only the secrets required for its role. Rotate anything that crosses that boundary unexpectedly.
Support & Tips
More to Read

Should Jellyfin Use One Shared Account or Separate Household Accounts?
Choose Jellyfin household accounts by the identity, access, parental-control, and recovery boundaries you need.

Why Does Jellyfin Memory Use Stay High After Work Completes?
Separate Jellyfin process growth from Linux cache, and investigate only when memory keeps rising or creates real pressure.

Signs That a Jellyfin Storage Layout Is Becoming a Recovery Risk
Audit Jellyfin storage roles, separate live state from backups and rebuildable data, then prove the layout with a restore.

