Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 248ba95

Browse files
authored
Merge pull request #282 from mark-monteiro/configuration-docs
Add Configuration Documentation Page
2 parents 161b4ab + d444497 commit 248ba95

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
uid: admin-configuration
3+
title: Configuration
4+
---
5+
6+
# Configuration
7+
8+
There are several entry points available for administrators to manage the configuration of their server. This section aims to outline all those configuration methods, explain what options are available, and what each option does.
9+
10+
> [!NOTE]
11+
> The configuration options here are distinct from the [runtime settings](xref:server-settings) available from the Administrator Dashboard in the web client. The configuration options here are generally meant to be static and set before starting the server.
12+
13+
## Command Line Options
14+
15+
Documentation for the available command line options can be obtained by adding the `--help` flag when running the Jellyfin executable.
16+
17+
## Server Paths
18+
19+
The file paths used by the server are determined according the rules outline below. In general, the [XDG specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) is followed by default for non-Windows systems.
20+
21+
### Data Directory
22+
23+
This is the directory that will hold all Jellyfin data, and is also used as a default base directory for some other paths below. It is set from the following sources in order of decreasing precedence.
24+
25+
1. Command line option `--datadir`, if specified
26+
2. Environment variable `JELLYFIN_DATA_DIR`, if specified
27+
3. `<%APPDATA%>/jellyfin`, if running on Windows
28+
4. `$XDG_DATA_HOME/jellyfin`, if `$XDG_DATA_HOME` exists
29+
5. `$HOME/.local/share/jellyfin`
30+
31+
### Configuration Directory
32+
33+
This is the directory containing the server configuration files. It is set from the following sources in order of decreasing precedence.
34+
35+
1. Command line option `--configdir`, if specified
36+
2. Environment variable `JELLYFIN_CONFIG_DIR`, if specified
37+
3. `<Data Directory>/config`, if it exists or if running on Windows
38+
4. `$XDG_CONFIG_HOME/jellyfin` if `$XDG_CONFIG_HOME` exists
39+
5. `$HOME/.config/jellyfin`
40+
41+
### Cache Directory
42+
43+
This is the directory containing the server cache. It is set from the following sources in order of decreasing precedence.
44+
45+
1. Command line option `--cachedir`, if specified
46+
2. Environment variable `$JELLYFIN_CACHE_DIR`, if specified
47+
3. `<Data Directory>/cache`, if Windows
48+
4. `$XDG_CACHE_HOME/jellyfin` if `$XDG_CACHE_HOME` exists
49+
5. `$HOME/.cache/jellyfin`
50+
51+
### Web Directory
52+
53+
This is the directory containing the built files from a [web client](https://github.com/jellyfin/jellyfin-web) release. It is set from the following sources in order of decreasing precedence.
54+
55+
1. Command line option `--webdir`, if specified
56+
2. Environment variable `$JELLYFIN_WEB_DIR`, if specified
57+
3. `<Binary Directory>/jellyfin-web`, where `<Binary Directory>` is the directory containing the Jellyfin executable
58+
59+
> [!NOTE]
60+
> This setting is only used when the server is configured to host the web client. See the `hostwebclient` option in the [Main Configuration Options](#main-configuration-options) section below for additional details.
61+
62+
### Log Directory
63+
64+
This is the directory where the Jellyfin logs will be stored. It is set from the following sources in order of decreasing precedence.
65+
66+
1. Command line option `--logdir`, if specified
67+
2. Environment variable `$JELLYFIN_LOG_DIR`, if specified
68+
3. `<Data Directory>/log`
69+
70+
## Main Configuration
71+
72+
The main server configuration is built upon the ASP .NET [configuration framework](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-3.1), which provides a tiered approach to loading configuration. The base directory to locate the configuration files is set using the [configuration directory](#configuration-directory) setting. The configuration sources are as follows, with later sources having higher priority and overwriting the values in earlier sources.
73+
74+
1. **Hard-coded default values**: These defaults are specified specified in the Jellyfin [source code](https://github.com/jellyfin/jellyfin/blob/master/Emby.Server.Implementations/ConfigurationOptions.cs) and cannot be changed.
75+
2. **Default logging configuration file** (`logging.default.json`): This file should not be modified manually by users. It is reserved by the server to be overwritten with new settings on each new release.
76+
3. **System-specific logging configuration file** (`logging.json`): This is the file you should change if you want to have a custom logging setup. Jellyfin uses the [Serilog](https://serilog.net/) logging framework, and you can read about the configuration options available in their [documentation](https://github.com/serilog/serilog-settings-configuration).
77+
78+
> [!NOTE]
79+
> This file can be changed at runtime, which will automatically reload the configuration and apply the changes immediately.
80+
81+
4. **Environment variables**: The [documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-3.1#environment-variables) provided by Microsoft explains how to set these configuration options via environment variables. Jellyfin uses its own custom `JELLYFIN_` prefix for these variables. For example, to set a value for the `HttpListenerHost:DefaultRedirectPath` setting, you would set a value for the `JELLYFIN_HttpListenerHost__DefaultRedirectPath` environment variable.
82+
5. **Command line options**: Certain command line options are loaded into the configuration system and have the highest priority. The following command line options are mapped to associated configuration options.
83+
84+
- `--nowebcontent` sets the `hostwebclient` configuration setting to false
85+
- `--plugin-manifest-url` sets a value for the `InstallationManager:PluginManifestUrl` configuration setting
86+
87+
### Main Configuration Options
88+
89+
This section lists all the configuration options available and explains their function.
90+
91+
|Key|Default Value|Description|
92+
|---|-------------|-----------|
93+
|`hostwebclient`|`True`|Set to `True` if the server should host the web client.|
94+
|`HttpListenerHost:DefaultRedirectPath`|`"web/index.html"` if `hostwebclient` is true; `"swagger/index.html"` if `hostwebclient` is false|The default redirect path to use for requests where the URL base prefix is invalid or missing|
95+
|`InstallationManager:PluginManifestUrl`|`"https://repo.jellyfin.org/releases/plugin/manifest.json"`|The URL for the plugin repository JSON manifest.|
96+
|`FFmpeg:probesize`|`"1G"`|Value to set for the FFmpeg `probesize` format option. See the FFmpg [documentation](https://ffmpeg.org/ffmpeg-formats.html#Format-Options) for more details.|
97+
|`FFmpeg:analyzeduration`|`"200M"`|The value to set for the FFmpeg `analyzeduration` format option. See the FFmpg [documentation](https://ffmpeg.org/ffmpeg-formats.html#Format-Options) for more details.|
98+
|`playlists:allowDuplicates`|`True`|Whether playlists should allow duplicate items or automatically filter out duplicates.|

general/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
items:
1010
- uid: admin-installing
1111
- uid: admin-building
12+
- uid: admin-configuration
1213
- uid: admin-migrate-from-emby
1314
- uid: admin-hardware-acceleration
1415
- uid: admin-troubleshoot

0 commit comments

Comments
 (0)