brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: JELLYFIN_CACHE_DIR or --cachedir moves the Jellyfin cache away from its config

Config
~/tips/tip-jellyfin-cache-dir-environment-variable

jellyfin --cachedir /srv/jellyfin-cache

Sets the Jellyfin cache directory with a command line option or an environment variable.

Jellyfin keeps its data, config, cache and logs in separate directories, and each one can be set on its own. That is handy when the cache is the part that grows.

The configuration page lists a command line option and an environment variable for every directory. For the cache they are --cachedir and JELLYFIN_CACHE_DIR. The environment variable is used when the option is not given.

jellyfin --cachedir /srv/jellyfin-cache

# or, without a flag
JELLYFIN_CACHE_DIR=/srv/jellyfin-cache jellyfin

The same pattern exists for the others: --datadir with JELLYFIN_DATA_DIR, --configdir with JELLYFIN_CONFIG_DIR, --logdir with JELLYFIN_LOG_DIR and --webdir with JELLYFIN_WEB_DIR. Run the executable with --help to see the options your build supports.

Why bother? A cache can grow over time, so it makes sense to point it at a disk with room to spare and leave the small config where it is. For a backup, the config is the part I would care about.

Caveat: the docs describe where Jellyfin looks for each directory. They do not say it moves existing files for you, so copy or delete the old cache yourself. Also make sure the account that runs Jellyfin can write to the new path.

Further reading: Configuration (Jellyfin documentation)

Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more

More Config tips include extraconfig.txt root = true npm config list –smart-case define( 'WP_HOME', 'https://example.com' ); All Config tips (9) All topics

Link