- Add build-error-resolution.md guide for CS0006 and IDE analyzer issues - Add rebuild-solution.ps1 script for clean/reliable builds - Suppress noisy IDE/StyleCop warnings in .editorconfig - Optimize BaseItemRepository grouping queries to use Min(Id) instead of FirstOrDefault, avoiding correlated subqueries and greatly improving DB performance - Add database-query-optimization.md explaining query changes and tuning - Enable EF Core SQL query logging, sensitive data, and detailed errors when log level is Debug (ServiceCollectionExtensions, logging.json) - Update readme with SQL logging instructions - Clarify git commit/ignore guidance and improve inline documentation
Jellyfin with PostgreSQL Support
The Free Software Media System - Now with Enterprise Database Backend
🚀 What's New in This Fork?
This is a PostgreSQL-enabled fork of Jellyfin that replaces SQLite with PostgreSQL for improved performance, scalability, and reliability.
✨ Key Features
- ✅ PostgreSQL Database Backend - Full migration from SQLite
- ✅ Improved Performance - Better handling of large libraries
- ✅ Enterprise Scalability - Replication and clustering support
- ✅ Professional Backups - pgBackRest integration
- ✅ OS-Specific Configuration - Auto-configuration for Windows/Linux/macOS
- ✅ Windows Installer - Professional installer with PostgreSQL wizard
- ✅ Centralized Build - All DLLs in
libfolder
📚 Quick Navigation
- Quick Start
- Installation
- PostgreSQL Setup
- Configuration
- Building
- Creating Installer
- Migration
- Troubleshooting
- Documentation
🎯 Quick Start
Windows Installer
# Run JellyfinSetup-PostgreSQL-11.0.0.exe
# Follow wizard for PostgreSQL setup
From Source
git clone https://gitea.wpjones.com/wjones/pgsql-jellyfin.git
cd pgsql-jellyfin
dotnet build --configuration Release
cd lib/Release/net11.0
dotnet jellyfin.dll
📖 See INSTALLER_QUICK_START.md or QUICKSTART_POSTGRESQL.md
📦 Installation
Prerequisites
- .NET 11 Runtime - Download
- PostgreSQL 12+ - Download
- FFmpeg - Jellyfin builds
Install from Installer (Windows)
- Download
JellyfinSetup-PostgreSQL-11.0.0.exe - Run installer, select options
- Configure PostgreSQL (or skip for later)
- Open http://localhost:8096
📖 Full guide: INSTALLER_GUIDE.md
Install from Source
Windows:
dotnet build Jellyfin.Server --configuration Release
cd lib\Release\net11.0
jellyfin.exe
Linux:
dotnet build Jellyfin.Server --configuration Release
cd lib/Release/net11.0
./jellyfin
🗄️ PostgreSQL Setup
Quick Install
Windows:
winget install PostgreSQL.PostgreSQL
Linux:
sudo apt install postgresql postgresql-contrib
Create Database
psql -U postgres
CREATE USER jellyfin WITH PASSWORD 'your_password';
CREATE DATABASE jellyfin OWNER jellyfin;
GRANT ALL PRIVILEGES ON DATABASE jellyfin TO jellyfin;
\q
Configure Connection
Edit startup.json:
{
"DatabaseProvider": "Postgres",
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Database=jellyfin;Username=jellyfin;Password=your_password"
}
}
📖 Full guide: QUICKSTART_POSTGRESQL.md
⚙️ Configuration
OS-Specific Defaults
startup.json is auto-configured per platform:
- Windows:
C:/ProgramData/jellyfin - Linux:
/var/lib/jellyfin,/etc/jellyfin - macOS:
~/Library/Application Support/jellyfin
Priority Order
- Command-line arguments
- Environment variables
- startup.json
- Built-in defaults
📖 Docs: OS_SPECIFIC_STARTUP_CONFIG.md, STARTUP_JSON_VERIFICATION.md
🔨 Building from Source
git clone https://gitea.wpjones.com/wjones/pgsql-jellyfin.git
cd pgsql-jellyfin
dotnet restore
dotnet build --configuration Release
# Output: lib/Release/net11.0/
📖 See CENTRALIZED_LIB_FOLDER.md
📦 Creating an Installer
# 1. Install Inno Setup
winget install JRSoftware.InnoSetup
# 2. Build
.\build-installer.ps1
# 3. Result
# installer-output\JellyfinSetup-PostgreSQL-11.0.0.exe
Features:
- Windows Service installation
- Firewall rules
- PostgreSQL wizard
- .NET runtime check
📖 Guides: INSTALLER_QUICK_START.md, INSTALLER_GUIDE.md
🔄 Migration Guide
SQLite to PostgreSQL
# 1. Backup
cp jellyfin.db jellyfin-backup.db
# 2. Set up PostgreSQL
# 3. Update startup.json
# 4. Run migration
dotnet run --project Jellyfin.Server -- --migrate-database
📖 See POSTGRESQL_MIGRATION_COMPLETE.md
🔧 Troubleshooting
PostgreSQL Connection
# Check status
sudo systemctl status postgresql
# Test connection
psql -U jellyfin -d jellyfin
Service Issues
# Check logs
tail -f /var/log/jellyfin/log_*.txt
📖 Full guides: POSTGRESQL_TROUBLESHOOTING.md, TROUBLESHOOTING_EF_PENDING_CHANGES.md
📖 Documentation
Getting Started
- START_HERE.md - Start here! Quick guide for new users
- QUICK_REFERENCE.md - Quick command reference
Configuration
- OS_SPECIFIC_STARTUP_CONFIG.md
- STARTUP_JSON_VERIFICATION.md
- STARTUP_JSON_FIX.md
- HOW_TO_SWITCH_DATABASE.md - Switch between databases easily
PostgreSQL Setup & Migration
- QUICKSTART_POSTGRESQL.md
- POSTGRESQL_MIGRATION_COMPLETE.md
- POSTGRESQL_TROUBLESHOOTING.md
- MERGE_MIGRATIONS_GUIDE.md - Merge pending migrations
Performance Optimization
- ADD_INDEXES_GUIDE.md - Add performance indexes
- AUTO_APPLY_INDEXES_COMPLETE.md - Automatic index application
- ITEMVALUES_INDEXES_ADDED.md - ItemValues table optimization
- MISSING_INDEXES_FIXED.md - Index fixes
Database Diagnostics & Analysis
- DIAGNOSTICS_COMPLETE_SUMMARY.md - ⭐ Complete diagnostics overview
- DATABASE_ANALYSIS_REPORT.md - Detailed analysis
- LATEST_DIAGNOSTICS_ANALYSIS.md - Latest diagnostics
- REMOTE_DATABASE_ANALYSIS.md - Remote DB analysis
- REMOTE_ANALYSIS_SUMMARY.md - Remote DB summary
- QUICK_ACTION_PLAN.md - Performance action plan
- WEEKLY_TRACKING.md - Weekly performance tracking template
Backup
Installation & Publishing
- INSTALLER_QUICK_START.md
- INSTALLER_GUIDE.md
- CENTRALIZED_LIB_FOLDER.md
- BUILD_INSTALLER_FIXED.md
- SQL_FILES_PUBLISH_FIX.md - SQL files in publish
- SQL_PUBLISH_ISSUE_RESOLVED.md
- QUICK_PUBLISH_REFERENCE.md
Project Information
- PROJECT_COMPLETION.md
- POC_SUMMARY_REPORT.md
- IMPLEMENTATION_COMPLETE.md
- PR_DESCRIPTION.md - Pull request description
- PR_DESCRIPTION_SHORT.md - Short PR description
📝 License
GNU General Public License v2.0
Fork of Jellyfin
📞 Support
⚡ Quick Reference
# Build
dotnet build --configuration Release
# Run
cd lib/Release/net11.0 && dotnet jellyfin.dll
# Create installer
.\build-installer.ps1
# Test
dotnet test
Essential Paths:
- Windows:
C:\ProgramData\jellyfin - Linux:
/var/lib/jellyfin - macOS:
~/Library/Application Support/jellyfin
Built with ❤️ for the Jellyfin community
Jellyfin • PostgreSQL • .NET