- Added Linux/Windows startup config templates and README - Updated default paths to FHS-compliant locations - Improved publish profiles for platform targeting - Enhanced Postgres migration: auto-recover on 42P07 errors - Added RecordMigrationAsAppliedAsync for manual migration history - Improved migration logging and error handling - Added detailed documentation for config and migration fixes
Jellyfin Startup Configuration
This directory contains startup configuration templates for Jellyfin Server.
Configuration Files
startup.default.json- Default configuration (Linux paths)startup.linux.json- Linux-specific configuration templatestartup.windows.json- Windows-specific configuration template
Usage
Linux Systems
The default configuration uses Linux paths (/var/lib/jellyfin). To customize:
- Copy
startup.linux.jsontostartup.jsonin your Jellyfin installation directory - Edit the paths as needed
- Restart Jellyfin
cp startup.linux.json /path/to/jellyfin/startup.json
Windows Systems
For Windows, use the Windows-specific configuration:
- Copy
startup.windows.jsontostartup.jsonin your Jellyfin installation directory - Edit the paths as needed (default:
C:/ProgramData/jellyfin) - Restart Jellyfin
Copy-Item startup.windows.json C:\Path\To\Jellyfin\startup.json
Configuration Priority
Jellyfin resolves paths in this order (highest priority first):
- Command-line arguments (
-d,-c,-l, etc.) - Environment variables (
JELLYFIN_DATA_DIR,JELLYFIN_CONFIG_DIR, etc.) startup.jsonfile (user's custom configuration)- Built-in defaults (OS-specific)
Path Descriptions
| Path | Purpose |
|---|---|
DataDir |
Database files, metadata, and media library information |
ConfigDir |
User settings, configuration files, and user-specific data |
CacheDir |
Cached images, thumbnails, and temporary processing files |
LogDir |
Application log files |
TempDir |
Temporary files during transcoding and processing |
WebDir |
Web UI assets (jellyfin-web) |
Platform-Specific Defaults
Linux (Default)
All paths use /var/lib/jellyfin for system-wide installation.
For user-specific installations, consider using:
- Data:
~/.local/share/jellyfin - Config:
~/.config/jellyfin - Cache:
~/.cache/jellyfin
Windows
All paths use C:/ProgramData/jellyfin for system-wide installation.
For user-specific installations, paths will default to:
%LOCALAPPDATA%\jellyfin
macOS
Jellyfin will automatically use appropriate macOS directories:
- Data:
~/Library/Application Support/jellyfin - Config:
~/Library/Application Support/jellyfin/config - Cache:
~/Library/Caches/jellyfin
Example: Custom Configuration
Create startup.json:
{
"Paths": {
"DataDir": "/mnt/storage/jellyfin/data",
"ConfigDir": "/etc/jellyfin",
"CacheDir": "/var/cache/jellyfin",
"LogDir": "/var/log/jellyfin",
"TempDir": "/tmp/jellyfin",
"WebDir": "/usr/share/jellyfin/web"
}
}
Environment Variables
You can also set paths via environment variables:
export JELLYFIN_DATA_DIR=/mnt/storage/jellyfin
export JELLYFIN_CONFIG_DIR=/etc/jellyfin
export JELLYFIN_CACHE_DIR=/var/cache/jellyfin
export JELLYFIN_LOG_DIR=/var/log/jellyfin
export JELLYFIN_TEMP_DIR=/tmp/jellyfin
export JELLYFIN_WEB_DIR=/usr/share/jellyfin/web
Troubleshooting
Permissions
Ensure the Jellyfin user has read/write permissions to all configured paths:
# Linux
sudo chown -R jellyfin:jellyfin /var/lib/jellyfin
sudo chmod -R 755 /var/lib/jellyfin
# Windows - Run as Administrator
icacls "C:\ProgramData\jellyfin" /grant "NETWORK SERVICE:(OI)(CI)F" /T
Verify Current Configuration
Check the Jellyfin logs on startup to see which paths are being used. The first few log entries will show the resolved paths.