Auto-generate startup.json and add database presets

Introduces automatic creation of a self-documenting startup.json file on first startup, with example path configurations for Linux, Windows, and portable setups. Adds preset database configurations to database.xml for easy switching between SQLite and PostgreSQL. Refactors database config classes for XML serialization compatibility and ensures database.xml is never empty. Comprehensive documentation and migration guides included.
This commit is contained in:
2026-02-25 16:29:08 -05:00
parent c38adfc0f7
commit 69c213f13c
13 changed files with 1759 additions and 5 deletions
+18 -1
View File
@@ -3,6 +3,8 @@
## Overview
Jellyfin now supports file-based configuration for all startup paths in addition to command-line options and environment variables. This provides a persistent, portable way to configure your Jellyfin installation.
**New in this version:** The `startup.json` file is **automatically created** on first startup if it doesn't exist, with example configurations for Linux, Windows, and portable installations. See [AUTO_GENERATED_STARTUP_CONFIG.md](AUTO_GENERATED_STARTUP_CONFIG.md) for details.
## Configuration Priority
When determining which path to use, Jellyfin follows this priority (highest to lowest):
@@ -14,6 +16,21 @@ When determining which path to use, Jellyfin follows this priority (highest to l
This allows you to set defaults in a file, override them with environment variables for different environments, and temporarily override with command-line options for testing.
## Automatic File Creation ⭐ NEW
On first startup, if no `startup.json` file is found, Jellyfin will automatically create one with:
- All path properties set to `null` (uses defaults)
- Example configurations for Linux, Windows, and portable setups
- Inline documentation and comments
**You'll see:**
```
Created default startup configuration at: /path/to/startup.json
You can customize this file to set default paths for Jellyfin.
```
Simply edit the file and restart Jellyfin to apply your custom paths. See [AUTO_GENERATED_STARTUP_CONFIG.md](AUTO_GENERATED_STARTUP_CONFIG.md) for complete details on the auto-generation feature.
## Configuration File Location
The `startup.json` file is searched in the following locations (in order):
@@ -26,7 +43,7 @@ The first file found will be used.
## File Format
Create a file named `startup.json` with the following structure:
Create a file named `startup.json` with the following structure (or let it be auto-generated):
```json
{