Jellyfin Server provides extensive configuration options to customize your media server experience. Configuration can be managed through the web interface, configuration files, or environment variables.
Configuration Files
Jellyfin stores its configuration in XML and JSON files within the data directory:
/var/lib/jellyfin/
├── config/
│ ├── system.xml # Server configuration
│ ├── network.xml # Network settings
│ ├── encoding.xml # Transcoding settings
│ └── logging.json # Logging configuration
├── data/ # Database and metadata
├── cache/ # Temporary cache files
└── log/ # Server logs
Core Server Settings
Server Configuration (system.xml)
The main server configuration file contains essential settings:
Server Name and Culture
Configure the server’s display name and localization settings: < ServerName > My Jellyfin Server </ ServerName >
< UICulture > en-US </ UICulture >
< PreferredMetadataLanguage > en </ PreferredMetadataLanguage >
< MetadataCountryCode > US </ MetadataCountryCode >
Metadata Path
Specify where Jellyfin stores metadata: < MetadataPath > /var/lib/jellyfin/metadata </ MetadataPath >
If not specified, metadata is stored in the default internal metadata path within the data directory.
Library Settings
Configure library scanning and monitoring: < LibraryMonitorDelay > 60 </ LibraryMonitorDelay >
< LibraryUpdateDuration > 30 </ LibraryUpdateDuration >
< LibraryScanFanoutConcurrency > 0 </ LibraryScanFanoutConcurrency >
< LibraryMetadataRefreshConcurrency > 0 </ LibraryMetadataRefreshConcurrency >
LibraryMonitorDelay: Seconds to wait after file system change (default: 60)
LibraryUpdateDuration: Seconds to wait before executing library changed notification (default: 30)
Concurrency set to 0 uses automatic values based on CPU count
Playback Settings
Configure playback resume behavior: < MinResumePct > 5 </ MinResumePct >
< MaxResumePct > 90 </ MaxResumePct >
< MinResumeDurationSeconds > 300 </ MinResumeDurationSeconds >
< MinAudiobookResume > 5 </ MinAudiobookResume >
< MaxAudiobookResume > 5 </ MaxAudiobookResume >
Cache Configuration
< CacheSize > 10000 </ CacheSize >
< ImageExtractionTimeoutMs > 0 </ ImageExtractionTimeoutMs >
CacheSize: Maximum number of items to cache (default: ProcessorCount * 100)
ImageExtractionTimeoutMs: Timeout for image extraction (0 = no limit)
Environment Variables
Jellyfin supports various environment variables for configuration:
Data Paths
FFmpeg Configuration
Web Client
Database
Logging
Control where Jellyfin stores its data: JELLYFIN_DATA_DIR = /path/to/data
JELLYFIN_CONFIG_DIR = /path/to/config
JELLYFIN_CACHE_DIR = /path/to/cache
JELLYFIN_LOG_DIR = /path/to/logs
Configure FFmpeg behavior: # FFmpeg probe settings
JELLYFIN_FFmpeg_probesize = 1G
JELLYFIN_FFmpeg_analyzeduration = 200M
# Skip FFmpeg validation (not recommended)
JELLYFIN_FFmpeg_skipvalidation = false
# Performance trade-off for image extraction
JELLYFIN_FFmpeg_imgextract_perf_tradeoff = false
These settings are defined in ConfigurationOptions.cs and affect transcoding performance and accuracy.
Control web client hosting: JELLYFIN_HostWebClient = true
JELLYFIN_DefaultRedirect = web/
SQLite cache configuration: JELLYFIN_SqliteCacheSize = 20000
Configure logging output: JELLYFIN_LOG_DIR = /var/log/jellyfin
Logging Configuration
Jellyfin uses Serilog for structured logging. Configuration is stored in logging.json:
{
"Serilog" : {
"MinimumLevel" : {
"Default" : "Information" ,
"Override" : {
"Microsoft" : "Warning" ,
"System" : "Warning"
}
},
"WriteTo" : [
{
"Name" : "Console" ,
"Args" : {
"outputTemplate" : "[{Timestamp:HH:mm:ss.fff}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}"
}
},
{
"Name" : "Async" ,
"Args" : {
"configure" : [
{
"Name" : "File" ,
"Args" : {
"path" : "%JELLYFIN_LOG_DIR%//log_.log" ,
"rollingInterval" : "Day" ,
"retainedFileCountLimit" : 3 ,
"rollOnFileSizeLimit" : true ,
"fileSizeLimitBytes" : 100000000 ,
"outputTemplate" : "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}"
}
}
]
}
}
],
"Enrich" : [ "FromLogContext" , "WithThreadId" ]
}
}
Log Levels
Verbose
Debug
Information
Warning
Error
Most detailed logging for debugging: Detailed information for troubleshooting: Normal operational messages (default): Warnings and non-critical issues:
Activity Log Retention
Configure how long activity logs are retained:
< ActivityLogRetentionDays > 30 </ ActivityLogRetentionDays >
Set to null or omit to keep logs indefinitely.
Session Management
< InactiveSessionThreshold > 0 </ InactiveSessionThreshold >
Set the threshold in minutes for closing inactive sessions. Set to 0 to disable.
Slow Response Monitoring
< EnableSlowResponseWarning > true </ EnableSlowResponseWarning >
< SlowResponseThresholdMs > 500 </ SlowResponseThresholdMs >
Log warnings for requests that take longer than the specified threshold.
Security Settings
Quick Connect
< QuickConnectAvailable > true </ QuickConnectAvailable >
Enable or disable Quick Connect for easy device pairing.
Client Log Upload
< AllowClientLogUpload > true </ AllowClientLogUpload >
Allow clients to upload logs to the server for troubleshooting.
Legacy Authorization
< EnableLegacyAuthorization > false </ EnableLegacyAuthorization >
Only enable legacy authorization if required for compatibility with older clients.
CORS Configuration
Configure Cross-Origin Resource Sharing:
< CorsHosts >
< string > * </ string >
</ CorsHosts >
Default allows all origins. For production, specify allowed domains explicitly.
Path Substitution
Map paths for different environments (e.g., Docker, network shares):
< PathSubstitutions >
< PathSubstitution >
< From > /media/old-path </ From >
< To > /media/new-path </ To >
</ PathSubstitution >
</ PathSubstitutions >
Best Practices
Backup Configuration
Regularly back up your configuration directory: tar -czf jellyfin-config-backup.tar.gz /var/lib/jellyfin/config/
Use Environment Variables for Containers
When running in Docker, prefer environment variables over editing config files: environment :
- JELLYFIN_DATA_DIR=/config
- JELLYFIN_LOG_DIR=/config/log
Monitor Performance
Enable metrics for monitoring: < EnableMetrics > true </ EnableMetrics >
Keep Logs Manageable
Configure log retention and size limits to prevent disk space issues.
Next Steps
Network Setup Configure networking, ports, and remote access
Transcoding Set up media transcoding and codec options