69c213f13c
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.
106 lines
3.3 KiB
XML
106 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Jellyfin Database Configuration File
|
|
|
|
This file is automatically created on first startup with default settings.
|
|
To switch between database providers, simply change the DatabaseType property.
|
|
|
|
Location: {ConfigDir}/database.xml
|
|
-->
|
|
<DatabaseConfigurationOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
|
|
<!--
|
|
ACTIVE CONFIGURATION
|
|
Change DatabaseType to switch between database providers.
|
|
Options: "Jellyfin-SQLite" or "Jellyfin-PostgreSQL"
|
|
-->
|
|
<DatabaseType>Jellyfin-SQLite</DatabaseType>
|
|
|
|
<!--
|
|
LOCKING BEHAVIOR
|
|
Options: NoLock, Pessimistic, Optimistic
|
|
Default: NoLock (recommended for most installations)
|
|
-->
|
|
<LockingBehavior>NoLock</LockingBehavior>
|
|
|
|
<!--
|
|
CUSTOM PROVIDER OPTIONS (Only for Jellyfin-PostgreSQL)
|
|
Configure PostgreSQL connection settings here when using PostgreSQL.
|
|
Remove or comment out this section when using SQLite.
|
|
-->
|
|
<!--
|
|
<CustomProviderOptions>
|
|
<PluginName>Jellyfin.Database.Providers.Postgres</PluginName>
|
|
<PluginAssembly>Jellyfin.Database.Providers.Postgres.dll</PluginAssembly>
|
|
<ConnectionString></ConnectionString>
|
|
<Options>
|
|
<CustomDatabaseOption>
|
|
<Key>host</Key>
|
|
<Value>localhost</Value>
|
|
</CustomDatabaseOption>
|
|
<CustomDatabaseOption>
|
|
<Key>port</Key>
|
|
<Value>5432</Value>
|
|
</CustomDatabaseOption>
|
|
<CustomDatabaseOption>
|
|
<Key>database</Key>
|
|
<Value>jellyfin</Value>
|
|
</CustomDatabaseOption>
|
|
<CustomDatabaseOption>
|
|
<Key>username</Key>
|
|
<Value>jellyfin</Value>
|
|
</CustomDatabaseOption>
|
|
<CustomDatabaseOption>
|
|
<Key>password</Key>
|
|
<Value>your_password_here</Value>
|
|
</CustomDatabaseOption>
|
|
<CustomDatabaseOption>
|
|
<Key>connection-timeout</Key>
|
|
<Value>15</Value>
|
|
</CustomDatabaseOption>
|
|
</Options>
|
|
</CustomProviderOptions>
|
|
-->
|
|
|
|
<!--
|
|
BACKUP OPTIONS (Optional)
|
|
Configure automatic database backups
|
|
-->
|
|
<BackupOptions>
|
|
<EnableAutoBackup>false</EnableAutoBackup>
|
|
<BackupRetentionDays>30</BackupRetentionDays>
|
|
</BackupOptions>
|
|
|
|
<!--
|
|
PRESET CONFIGURATIONS
|
|
These are example configurations for quick reference.
|
|
They are NOT used by Jellyfin - they're just templates.
|
|
To activate a preset, copy its DatabaseType to the active configuration above,
|
|
and if needed, uncomment and configure the CustomProviderOptions section.
|
|
-->
|
|
<PresetConfigurations>
|
|
|
|
<!-- SQLite Preset (Default) -->
|
|
<PresetConfiguration>
|
|
<key>SQLite</key>
|
|
<value>
|
|
<DatabaseType>Jellyfin-SQLite</DatabaseType>
|
|
<LockingBehavior>NoLock</LockingBehavior>
|
|
<Description>Default SQLite database configuration. Database stored in data directory.</Description>
|
|
</value>
|
|
</PresetConfiguration>
|
|
|
|
<!-- PostgreSQL Local Preset -->
|
|
<PresetConfiguration>
|
|
<key>PostgreSQL-Local</key>
|
|
<value>
|
|
<DatabaseType>Jellyfin-PostgreSQL</DatabaseType>
|
|
<LockingBehavior>NoLock</LockingBehavior>
|
|
<Description>PostgreSQL database on localhost. Update Options with your database credentials.</Description>
|
|
</value>
|
|
</PresetConfiguration>
|
|
|
|
</PresetConfigurations>
|
|
|
|
</DatabaseConfigurationOptions>
|