owntone-server/docs/configuration.md

1442 lines
31 KiB
Markdown
Raw Permalink Normal View History

2024-04-22 11:32:53 -04:00
# Configuration
The configuration of OwnTone - usually located in `/etc/owntone.conf` - is split into multiple sections:
- [`general`](#general-settings) - Main settings of OwnTone.
- [`library`](#library-settings) - Settings of local library.
- [`audio`](#local-audio-settings) - Settings for the local audio.
- [`alsa`](#per-alsa-device-settings) - Settings for ALSA devices.
- [`fifo`](#fifo-settings) - Settings for named pipe.
- [`airplay_shared`](#shared-airplay-settings) - Settings shared across AirPlay devices.
- [`airplay`](#per-airplay-device-settings) - Settings for a specific AirPlay device.
2024-04-22 11:32:53 -04:00
- [`chromecast`](#per-chromecast-device-settings) - Settings for a specific Chromecast device.
- [`spotify`](#spotify-settings) - Settings for the Spotify playback.
- [`rcp`](#rcp--roku-soundbridge-settings) - Settings for RCP / Roku Soundbridge devices.
- [`mpd`](#mpd-settings) - Settings for MPD clients.
- [`sqlite`](#sqlite-settings) - Settings for SQLite operation.
- [`streaming`](#streaming-settings) - Settings for the streaming.
## Format
Each section consists of a name enclosing settings within parentheses.
Each setting consists of a name and a value. There are different types of settings: string, integer, boolean, and list.
Comments are preceded by a hash sign.
The format is as follow:
```conf
# Section
section {
# String value
setting = "<string-value>"
# Integer value
setting = <integer-value>
# Boolean
setting = <true|false>
# List
setting = { "value a", "value b", "value n"}
}
```
**Note:** For a regular use, the most important settings are:
- the `directories` (see [`library`](#library-settings) section), which should be the location of your media, and
- the `uid` (see [`general`](#general-settings) section), which must have read access to those directories.
## General Settings
```conf
general {
2024-04-22 11:32:53 -04:00
}
```
The `general` section accepts the settings below.
### uid
2024-04-22 11:32:53 -04:00
Identifier of the user running OwnTone.
2024-04-22 11:32:53 -04:00
**Notes:**
2024-04-22 11:32:53 -04:00
- Make sure that this user has read access to the `directories` ([`library`](#library-settings) section) section and write access to the database (`db_path`), log file (`logfile`) and local audio ([`audio`](#local-audio-settings) section).
- This setting is mandatory.
2024-04-22 11:32:53 -04:00
**Default:** `"nobody"`
2024-04-22 11:32:53 -04:00
```conf
uid = "<user-identifier>"
```
2024-04-22 11:32:53 -04:00
### db_path
2024-04-22 11:32:53 -04:00
Full path to the database file.
2024-04-22 11:32:53 -04:00
**Note:** This setting is mandatory.
2024-04-22 11:32:53 -04:00
**Default:** `"/var/cache/owntone/songs3.db"`
2024-04-22 11:32:53 -04:00
```conf
db_path = "<path-to-database-file>"
```
2024-04-22 11:32:53 -04:00
### db_backup_path
2024-04-22 11:32:53 -04:00
Full path to the database file backup.
2024-04-22 11:32:53 -04:00
**Note:** Backups are triggered from an API endpoint.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
db_backup_path = "<path-to-database-backup-file>"
```
2024-04-22 11:32:53 -04:00
### logfile
2024-04-22 11:32:53 -04:00
Full path to the log file.
2024-04-22 11:32:53 -04:00
**Default:** `"/var/log/owntone.log"`
2024-04-22 11:32:53 -04:00
```conf
logfile = "<path-to-log-file>"
```
2024-04-22 11:32:53 -04:00
### loglevel
2024-04-22 11:32:53 -04:00
Level of verbosity of the logging.
2024-04-22 11:32:53 -04:00
**Note:** There are 6 levels of verbosity (hereunder from the less verbose to the most verbose). The level `log` is recommended for regular usage.
2024-04-22 11:32:53 -04:00
**Valid values:** `fatal`, `log`, `warning`, `info`, `debug`, `spam`
2024-04-22 11:32:53 -04:00
**Default:** `"log"`
2024-04-22 11:32:53 -04:00
```conf
loglevel = "<fatal|log|warning|info|debug|spam>"
```
2024-04-22 11:32:53 -04:00
### admin_password
2024-04-22 11:32:53 -04:00
Password for the web interface.
2024-04-22 11:32:53 -04:00
**Note:** If a user is accessing the web interface from a device located in one of the `trusted_networks`, no password is required.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
admin_password = "<password>"
```
2024-04-22 11:32:53 -04:00
### websocket_port
2024-04-22 11:32:53 -04:00
Port number used to answer requests from the web interface.
2024-04-22 11:32:53 -04:00
**Default:** `3688`
2024-04-22 11:32:53 -04:00
```conf
websocket_port = <port-number>
```
2024-04-22 11:32:53 -04:00
### websocket_interface
2024-04-22 11:32:53 -04:00
Network interface on which the web socket is listening: e.g., eth0, en0.
2024-04-22 11:32:53 -04:00
**Note:** When this setting is unset, it means that the web socket listens on all available interfaces.
2024-04-22 11:32:53 -04:00
**Default:** unset
```conf
websocket_interface = "<interface>"
```
2024-04-22 11:32:53 -04:00
### trusted_networks
2024-04-22 11:32:53 -04:00
List of networks considered safe to access OwnTone without authorisation (see also `admin_password`).
2024-04-22 11:32:53 -04:00
**Note:** This applies to these client types: remotes, DAAP clients (e.g., Apple Music, iTunes) and the web interface.
2024-04-22 11:32:53 -04:00
**Valid values:** `any`, `localhost`, or the prefix to one or more IP networks.
2024-04-22 11:32:53 -04:00
**Default:** `{ "localhost", "192.168", "fd" }`
2024-04-22 11:32:53 -04:00
```conf
trusted_networks = { <"any"|"localhost"|"ip-range-prefix">, <...> }
```
2024-04-22 11:32:53 -04:00
### ipv6
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not IPv6 must used.
2024-04-22 11:32:53 -04:00
**Default:** `true`
2024-04-22 11:32:53 -04:00
```conf
ipv6 = <true|false>
```
### bind_address
Specific IP address to which the server is bound.
**Note:** It can be an IPv4 or IPv6 address and by default the server listens on all IP addresses.
**Default:** unset
```conf
bind_address = "<ip-address>"
```
### cache_path
Full path to the cache database file.
**Default:** unset
```conf
cache_path = "<path-to-database-cache-file>"
```
### cache_daap_threshold
Threshold in milliseconds for DAAP requests.
**Note:** Set to `0` to disable caching.
**Default:** `1000`
```conf
cache_daap_threshold = <threshold>
```
2024-04-22 11:32:53 -04:00
### speaker_autoselect
2024-04-22 11:32:53 -04:00
Flag to automatically select the speaker when starting the playback if none of the previously selected speakers / outputs are available.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
speaker_autoselect = <true|false>
```
2024-04-22 11:32:53 -04:00
### high_resolution_clock
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the high-resolution clock must be set.
2024-04-22 11:32:53 -04:00
**Note:** Most modern operating systems have a high-resolution clock, but if OwnTone is running on an unusual platform and drop-outs are experienced, this setting set to `true`.
2024-04-22 11:32:53 -04:00
**Default:** `false` on FreeBSD-based operating systems, `true` otherwise
2024-04-22 11:32:53 -04:00
```conf
high_resolution_clock = <true|false>
```
2024-04-22 11:32:53 -04:00
## Library Settings
```conf
library {
2024-04-22 11:32:53 -04:00
}
```
The `library` section accepts the settings below.
### name
Name of the library as displayed by the clients.
**Notes:**
- If you change the name after pairing with Remote you may have to redo the pairing.
- The place holder `%h` can be used to display the hostname.
**Default:** `"My Music on %h"`
```conf
name = "<library-name>"
```
### port
TCP port to listen on.
**Default:** `3689`
```conf
port = 3689
```
### password
Password for the library.
**Default:** unset
```conf
password = "<password>"
```
### directories
Path to the directories containing the media to index.
**Default:** unset
```conf
directories = { "<path-to-media>", "<...>" }
```
### follow_symlinks
Flag to indicate whether or not symbolic links must be followed.
**Default:** `true`.
```conf
follow_symlinks = <true|false>
```
### podcasts
List of directories containing podcasts.
**Note:** For each directory that is indexed, the path is matched against these names. If there is a match, all items in the directory are marked as podcasts. If you index `/srv/music`, and your podcasts are in `/srv/music/Podcasts`, then you can set this to `{ "/Podcasts" }`. Changing this setting only takes effect after a rescan.
**Default:** unset
```conf
podcasts = { "<podcast-directory>", "<...>" }
```
### audiobooks
2024-04-22 11:32:53 -04:00
List of directories containing audiobooks.
2024-04-22 11:32:53 -04:00
**Note:** For each directory that is indexed, the path is matched against these names. If there is a match, all items in the directory are marked as audiobooks. If you index `/srv/music`, and your podcasts are in `/srv/music/Audiobooks`, then you can set this to `{ "/Audiobooks" }`.Changing this setting only takes effect after a rescan.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
audiobooks = { "/Audiobooks" }
```
2024-04-22 11:32:53 -04:00
### compilations
2024-04-22 11:32:53 -04:00
List of directories containing compilations: e.g., greatest hits, best of, soundtracks.
2024-04-22 11:32:53 -04:00
**Note:** For each directory that is indexed, the path is matched against these names. If there is a match, all items in the directory are marked as compilations.Changing this setting only takes effect after a rescan.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
compilations = { "/Compilations" }
```
2024-04-22 11:32:53 -04:00
### compilation_artist
2024-04-22 11:32:53 -04:00
Artist name of compilation albums.
2024-04-22 11:32:53 -04:00
**Note:** Compilations usually have multiple artists, and sometimes may have no album artist. If you don't want every artist to be listed, you can set a single name which will be used for all compilation tracks without an album artist, and for all tracks in the compilation directories. Changing this setting only takes effect after a rescan.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
compilation_artist = "<various-artists>"
```
2024-04-22 11:32:53 -04:00
### hide_singles
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not single albums must be hidden.
2024-04-22 11:32:53 -04:00
**Note:** If your album and artist lists are cluttered, you can choose to hide albums and artists with only one track. The tracks will still be visible in other lists, e.g., tracks and playlists. This setting currently only works with some remotes.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
hide_singles = <true|false>
```
2024-04-22 11:32:53 -04:00
### radio_playlists
2024-04-22 11:32:53 -04:00
Flag to show internet streams in normal playlists.
2024-04-22 11:32:53 -04:00
**Note:** By default the internet streams are shown in the "Radio" library, like iTunes does. However, some clients (like TunesRemote+) won't show the "Radio" library.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
radio_playlists = <true|false>
```
2024-04-22 11:32:53 -04:00
### name_library
2024-04-22 11:32:53 -04:00
Name of the default playlist _Library_.
2024-04-22 11:32:53 -04:00
**Note:** This is a default playlist, which can be renamed with this setting.
2024-04-22 11:32:53 -04:00
**Default:** `"Library"`
2024-04-22 11:32:53 -04:00
```conf
name_library = "<library-playlist-name>"
```
2024-04-22 11:32:53 -04:00
### name_music
2024-04-22 11:32:53 -04:00
Name of the default playlist _Music_.
2024-04-22 11:32:53 -04:00
**Note:** This is a default playlist, which can be renamed with this setting.
2024-04-22 11:32:53 -04:00
**Default:** `"Music"`
2024-04-22 11:32:53 -04:00
```conf
name_music = "<music-playlist-name>"
```
2024-04-22 11:32:53 -04:00
### name_movies
2024-04-22 11:32:53 -04:00
Name of the default playlist _Movies_.
2024-04-22 11:32:53 -04:00
**Note:** This is a default playlist, which can be renamed with this setting.
2024-04-22 11:32:53 -04:00
**Default:** `"Movies"`
2024-04-22 11:32:53 -04:00
```conf
name_movies = "<movies-playlist-name>"
```
2024-04-22 11:32:53 -04:00
### name_tvshows
2024-04-22 11:32:53 -04:00
Name of the default playlist _TV Shows_.
2024-04-22 11:32:53 -04:00
**Note:** This is a default playlist, which can be renamed with this setting.
2024-04-22 11:32:53 -04:00
**Default:** `"TV Shows"`
2024-04-22 11:32:53 -04:00
```conf
name_tvshows = "<tv-shows-playlist-name>"
```
2024-04-22 11:32:53 -04:00
### name_podcasts
2024-04-22 11:32:53 -04:00
Name of the default playlist _Podcasts_.
2024-04-22 11:32:53 -04:00
**Note:** This is a default playlist, which can be renamed with this setting.
2024-04-22 11:32:53 -04:00
**Default:** `"Podcasts"`
2024-04-22 11:32:53 -04:00
```conf
name_podcasts = "<podcasts-playlist-name>"
```
### name_audiobooks
Name of the default playlist _Audiobooks_.
**Note:** This is a default playlist, which can be renamed with this setting.
**Default:** `"Audiobooks"`
2024-04-22 11:32:53 -04:00
```conf
name_audiobooks = "<audiobooks-playlist-name>"
```
2024-04-22 11:32:53 -04:00
### name_radio
2024-04-22 11:32:53 -04:00
Name of the default playlist _Radio_.
2024-04-22 11:32:53 -04:00
**Note:** This is a default playlist, which can be renamed with this setting.
2024-04-22 11:32:53 -04:00
**Default:** `"Radio"`
2024-04-22 11:32:53 -04:00
```conf
name_radio = "<radio-playlist-name>"
```
2024-04-22 11:32:53 -04:00
### name_unknown_title
2024-04-22 11:32:53 -04:00
Name of tracks having an undefined title.
2024-04-22 11:32:53 -04:00
**Default:** `"Unknown title"`
2024-04-22 11:32:53 -04:00
```conf
name_unknown_title = "<unknown-title-name>"
```
2024-04-22 11:32:53 -04:00
### name_unknown_artist
2024-04-22 11:32:53 -04:00
Name of artist having an undefined name.
2024-04-22 11:32:53 -04:00
**Default:** `"Unknown artist"`
2024-04-22 11:32:53 -04:00
```conf
name_unknown_artist = "<unknown-artist-name>"
```
2024-04-22 11:32:53 -04:00
### name_unknown_album
2024-04-22 11:32:53 -04:00
Name of album having an undefined title.
2024-04-22 11:32:53 -04:00
**Default:** `"Unknown album"`
2024-04-22 11:32:53 -04:00
```conf
name_unknown_album = "<unknown-album-name>"
```
2024-04-22 11:32:53 -04:00
### name_unknown_genre
2024-04-22 11:32:53 -04:00
Name of genre having an undefined name.
2024-04-22 11:32:53 -04:00
**Default:** `"Unknown genre"`
2024-04-22 11:32:53 -04:00
```conf
name_unknown_genre = "<unknown-genre-name>"
```
2024-04-22 11:32:53 -04:00
### name_unknown_composer
2024-04-22 11:32:53 -04:00
Name of composer having an undefined name.
2024-04-22 11:32:53 -04:00
**Default:** `"Unknown composer"`
2024-04-22 11:32:53 -04:00
```conf
name_unknown_composer = "<unknown-composer-name>"
```
2024-04-22 11:32:53 -04:00
### artwork_basenames
2024-04-22 11:32:53 -04:00
List of base names for artwork files (file names without extension).
2024-04-22 11:32:53 -04:00
**Note:**
2024-04-22 11:32:53 -04:00
- OwnTone searches for JPEG and PNG files with these base names.
- More information regarding artwork can be found [here](artwork.md).
2024-04-22 11:32:53 -04:00
**Default:** `{ "artwork", "cover", "Folder" }`
2024-04-22 11:32:53 -04:00
```conf
artwork_basenames = { "<file-name>", "<...>" }
```
2024-04-22 11:32:53 -04:00
### artwork_individual
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the search for artwork corresponding to each individual media file must be done instead of only looking for the album artwork.
2024-04-22 11:32:53 -04:00
**Notes:**
2024-04-22 11:32:53 -04:00
- Disable this setting to reduce cache size.
- More information regarding artwork can be found [here](artwork.md).
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
artwork_individual = <true|false>
```
2024-04-22 11:32:53 -04:00
### artwork_online_sources
2024-04-22 11:32:53 -04:00
List of online resources for artwork.
2024-04-22 11:32:53 -04:00
**Notes:**
2024-04-22 11:32:53 -04:00
- More information regarding artwork can be found [here](artwork.md).
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
artwork_online_sources = { "<link-to-source>", "<...>"}
```
2024-04-22 11:32:53 -04:00
### filetypes_ignore
2024-04-22 11:32:53 -04:00
List of file types ignored by the scanner.
2024-04-22 11:32:53 -04:00
**Note:** Non-audio files will never be added to the database, but here you can prevent the scanner from even probing them. This might reduce scan time.
2024-04-22 11:32:53 -04:00
**Default:** `{ ".db", ".ini", ".db-journal", ".pdf", ".metadata" }`
2024-04-22 11:32:53 -04:00
```conf
filetypes_ignore = { "<extension>", "<...>" }
```
2024-04-22 11:32:53 -04:00
### filepath_ignore
2024-04-22 11:32:53 -04:00
List of paths ignored by the scanner.
2024-04-22 11:32:53 -04:00
**Note:** If you want to exclude files on a more advanced basis you can enter one or more POSIX regular expressions, and any file with a matching path will be ignored.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
filepath_ignore = { "<path|regular-expression>" }
```
2024-04-22 11:32:53 -04:00
### filescan_disable
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the startup file scanning must be disabled.
2024-04-22 11:32:53 -04:00
**Note:** When OwnTone starts it will do an initial file scan of the library and then watch it for changes. If you are sure your library never changes while OwnTone is not running, you can disable the initial file scan and save some system ressources. Disabling this scan may lead to OwnTone's database coming out of sync with the library. If that happens read the instructions in the README on how to trigger a rescan.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
filescan_disable = <true|false>
```
2024-04-22 11:32:53 -04:00
### only_first_genre
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the first genre only found in metadata must be displayed.
2024-04-22 11:32:53 -04:00
**Note:** Some tracks have multiple genres separated by semicolon in the same tag, e.g., 'Pop;Rock'. If you don't want them listed like this, you can enable this setting and only the first genre will be used (i.e. 'Pop').
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
only_first_genre = <true|false>
```
2024-04-22 11:32:53 -04:00
### m3u_overrides
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the metadata provided by radio streams must be overridden by metadata from m3u playlists, e.g., artist and title in EXTINF.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
m3u_overrides = <true|false>
```
2024-04-22 11:32:53 -04:00
### itunes_overrides
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the library metadata must be overridden by iTunes metadata.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
itunes_overrides = <true|false>
```
2024-04-22 11:32:53 -04:00
### itunes_smartpl
2024-04-22 11:32:53 -04:00
Flag to import Should we import the content of iTunes smart playlists.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
itunes_smartpl = <true|false>
```
2024-04-22 11:32:53 -04:00
### no_decode
2024-04-22 11:32:53 -04:00
List of formats that are never decoded.
2024-04-22 11:32:53 -04:00
**Note:** Decoding options for DAAP and RSP clients. Since iTunes has native support for mpeg, mp4a, mp4v, alac and wav, such files will be sent as they are. Any other formats will be decoded to raw wav. If OwnTone detects a non-iTunes DAAP client, it is assumed to only support mpeg and wav, other formats will be decoded. Here you can change when to decode. Note that these settings only affect serving media to DAAP and RSP clients, they have no effect on direct AirPlay, Chromecast and local audio playback
2024-04-22 11:32:53 -04:00
**Valid values:** `mp4a`, `mp4v`, `mpeg`, `alac`, `flac`, `mpc`, `ogg`, `wma`, `wmal`, `wmav`, `aif`, `wav`.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
no_decode = { "<format>", "<...>" }
```
2024-04-22 11:32:53 -04:00
### force_decode
2024-04-22 11:32:53 -04:00
List of formats that are always decoded.
2024-04-22 11:32:53 -04:00
**Note:** See note for `no_decode` setting.
2024-04-22 11:32:53 -04:00
**Valid values:** `mp4a`, `mp4v`, `mpeg`, `alac`, `flac`, `mpc`, `ogg`, `wma`, `wmal`, `wmav`, `aif`, `wav`.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
force_decode = { "<format>", "<...>" }
```
2024-04-22 11:32:53 -04:00
### prefer_format
2024-04-22 11:32:53 -04:00
Preferred format to be used.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
prefer_format = "<format>"
```
2024-04-22 11:32:53 -04:00
### decode_audio_filters
2024-04-22 11:32:53 -04:00
List of audio filters used at decoding time.
2024-04-22 11:32:53 -04:00
**Note:** These filters are ffmpeg filters: i.e. similar to those specified on the command line `ffmpeg -af <filter>`. Examples: `"volume=replaygain=track"` to use replay gain of the track metadata, or `loudnorm=I=-16:LRA=11:TP=-1.5` to normalise volume.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
decode_audio_filters = { "<filter>" }
```
2024-04-22 11:32:53 -04:00
### decode_video_filters
2024-04-22 11:32:53 -04:00
List of video filters used at decoding time.
2024-04-22 11:32:53 -04:00
**Note:** These filters are ffmpeg filters: i.e. similar to those specified on the command line `ffmpeg -vf <filter>`.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
decode_video_filters = { "<filter>" }
```
2024-04-22 11:32:53 -04:00
### pipe_autostart
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not named pipes must start automatically when data is provided.
2024-04-22 11:32:53 -04:00
**Note:** To exclude specific pipes from watching, consider using the `filepath_ignore` setting.
2024-04-22 11:32:53 -04:00
```conf
pipe_autostart = true
```
2024-04-22 11:32:53 -04:00
### pipe_sample_rate
2024-04-22 11:32:53 -04:00
Sampling rate of the pipe.
2024-04-22 11:32:53 -04:00
**Default:** `44100`.
2024-04-22 11:32:53 -04:00
```conf
pipe_sample_rate = <integer>
```
2024-04-22 11:32:53 -04:00
### pipe_bits_per_sample
2024-04-22 11:32:53 -04:00
Bits per sample of the pipe.
2024-04-22 11:32:53 -04:00
**Default:** `16`
2024-04-22 11:32:53 -04:00
```conf
pipe_bits_per_sample = <integer>
```
2024-04-22 11:32:53 -04:00
### rating_updates
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not ratings are automatically updated.
2024-04-22 11:32:53 -04:00
**Note:** When enabled, the rating is automatically updated after a song has either been played or skipped (only skipping to the next song is taken into account). The calculation is taken from the beets plugin "mpdstats" (see [here](https://beets.readthedocs.io/en/latest/plugins/mpdstats.html)). It consists of calculating a stable rating based only on the play and skip count and a rolling rating based on the current rating and the action (played or skipped). Both results are combined with a mix factor of 0.75. **Formula:** new rating = 0.75 × stable rating + 0.25 × rolling rating
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
rating_updates = <true|false>
```
2024-04-22 11:32:53 -04:00
### read_rating
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the rating is read from media file metadata.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
read_rating = <true|false>
```
2024-04-22 11:32:53 -04:00
### write_rating
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not the rating is written back to the file metadata.
2024-04-22 11:32:53 -04:00
**Note:** By default, ratings are only saved in the database. To avoid excessive writing to the library, automatic rating updates are not written, even with the write_rating setting enabled.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
write_rating = <true|false>
```
2024-04-22 11:32:53 -04:00
### max_rating
2024-04-22 11:32:53 -04:00
Scale used when reading and writing ratings to media files.
**Default:** `100`
```conf
max_rating = <integer>
```
### allow_modifying_stored_playlists
Flag to indicate whether or not M3U playlists can be created, modified, or deleted in the playlist directories.
**Note:** This setting is only supported through the web interface and some MPD clients.
**Default:** `false`
```conf
allow_modifying_stored_playlists = false
```
### default_playlist_directory
Name of the directory in one of the library directories that will be used as the default playlist directory.
**Note:** OwnTone creates new playlists in this directory. This setting requires `allow_modify_stored_playlists` set to true.
**Default:** unset
```conf
default_playlist_directory = "<path-to-playlist-directory>"
```
### clear_queue_on_stop_disable
Flag to indicate whether or not the queue is cleared when the playback is stopped.
**Note:** By default OwnTone will, like iTunes, clear the play queue if playback stops. Setting clear_queue_on_stop_disable to true will keep the playlist like MPD does. Moreover, some dacp clients do not show the play queue if playback is stopped.
**Default:** `false`
```conf
clear_queue_on_stop_disable = <true|false>
```
2024-04-22 11:32:53 -04:00
## Local Audio Settings
```conf
audio {
2024-04-22 11:32:53 -04:00
}
```
The `audio` section is meant to configure the local audio output. It accepts the settings below.
### nickname
Name appearing in the speaker list.
2024-04-22 11:32:53 -04:00
**Default:** `"Computer"`
2024-04-22 11:32:53 -04:00
```conf
nickname = "Computer"
```
### type
2024-04-22 11:32:53 -04:00
Type of the output.
2024-04-22 11:32:53 -04:00
**Valid values:** `alsa`, `pulseaudio`, `dummy`, `disabled`
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
type = "<alsa|pulseaudio|dummy|disabled>"
```
2024-04-22 11:32:53 -04:00
- `server` - For pulseaudio output, an optional server hostname or IP can be specified (e.g. "localhost"). If not set, connection is made via local socket.
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
server = "<hostname|ip-address>"
```
2024-04-22 11:32:53 -04:00
- `card` - Name of the local audio PCM device.
**Note:** ALSA only.
**Default:** `"default"`
```conf
card = "<device-name>"
```
### mixer
Mixer channel used for volume control.
2024-04-22 11:32:53 -04:00
**Note:** Usable with ALSA only. If not set, PCM will be used if available, otherwise Master.
2024-04-22 11:32:53 -04:00
**Default:** unset
```conf
mixer = "<mixer>"
```
2024-04-22 11:32:53 -04:00
### mixer_device
2024-04-22 11:32:53 -04:00
Name of the mixer device to use for volume control.
2024-04-22 11:32:53 -04:00
**Note:** Usable with ALSA only.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
mixer_device = "<mixer-device>"
```
2024-04-22 11:32:53 -04:00
### sync_disable
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not audio resampling has to be enabled to keep local audio in sync with, for example, AirPlay.
2024-04-22 11:32:53 -04:00
**Note:** This feature relies on accurate ALSA measurements of delay, and some devices don't provide that. If that is the case you are better off disabling the feature.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
sync_disable = <true|false>
```
2024-04-22 11:32:53 -04:00
### offset_ms
2024-04-22 11:32:53 -04:00
Start delay in milliseconds relatively to other speakers, for example AirPlay.
2024-04-22 11:32:53 -04:00
**Note:** Negative values correspond to moving local audio ahead, positive correspond to delaying it.
2024-04-22 11:32:53 -04:00
**Valid values:** -1000 to 1000
2024-04-22 11:32:53 -04:00
**Default:** `0`
2024-04-22 11:32:53 -04:00
```conf
offset_ms = 0
```
2024-04-22 11:32:53 -04:00
### adjust_period_seconds
2024-04-22 11:32:53 -04:00
Period in seconds used to collect measurements for drift and latency adjustments.
2024-04-22 11:32:53 -04:00
**Note:** To calculate if resampling is required and if yes what value, local audio delay is measured each second. After a period the collected measurements are used to estimate drift and latency, which determines if corrections are required.
2024-04-22 11:32:53 -04:00
**Default:** `100`
2024-04-22 11:32:53 -04:00
```conf
adjust_period_seconds = <integer>
```
2024-04-22 11:32:53 -04:00
## Per ALSA Device Settings
```conf
alsa "<card-name>" {
….
}
2024-04-22 11:32:53 -04:00
```
Each `alsa` section is meant to configure a named ALSA output: one named section per device. It accepts the settings below.
**Note:** Make sure to set the `"<card-name>"` correctly. Moreover, these settings will override the ALSA settings in the `audio` section above.
### nickname
2024-04-22 11:32:53 -04:00
Name appearing in the speaker list.
2024-04-22 11:32:53 -04:00
**Default:** `"<card-name>"`
2024-04-22 11:32:53 -04:00
```conf
nickname = "<speaker-name>"
```
### mixer
Mixer channel used for volume control.
**Note:** If not set, PCM will be used if available, otherwise Master.
2024-04-22 11:32:53 -04:00
```conf
mixer = "<mixer>"
```
2024-04-22 11:32:53 -04:00
### mixer_device
2024-04-22 11:32:53 -04:00
Name of the mixer device to use for volume control.
2024-04-22 11:32:53 -04:00
**Default:** `"<card-name>"`
2024-04-22 11:32:53 -04:00
```conf
mixer_device = "<mixer-device>"
```
2024-04-22 11:32:53 -04:00
### offset_ms
2024-04-22 11:32:53 -04:00
Start delay in milliseconds relatively to other speakers, for example AirPlay.
2024-04-22 11:32:53 -04:00
**Note:** Negative values correspond to moving local audio ahead, positive correspond to delaying it.
2024-04-22 11:32:53 -04:00
**Valid values:** -1000 to 1000
2024-04-22 11:32:53 -04:00
**Default:** `0`
```conf
offset_ms = 0
```
2024-04-22 11:32:53 -04:00
## FIFO Settings
```conf
fifo {
2024-04-22 11:32:53 -04:00
}
```
The `fifo` section, is meant to configure the named pipe audio output. It accepts the settings below.
### nickname
The name appearing in the speaker list.
2024-04-22 11:32:53 -04:00
**Default:** `"fifo"`
```conf
nickname = "<fifo-name>"
```
2024-04-22 11:32:53 -04:00
### path
2024-04-22 11:32:53 -04:00
Path to the named pipe.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
path = "<path-to-fifo>"
```
2024-04-22 11:32:53 -04:00
## Shared AirPlay Settings
```conf
airplay_shared {
2024-04-22 11:32:53 -04:00
}
```
The `airplay_shared` section describes the settings that are shared across all the AirPlay devices.
### control_port
Number of the UDP control port used when AirPlay devices make connections back to OwnTone.
**Note:** Choosing specific ports may be helpful when running OwnTone behind a firewall.
2024-04-22 11:32:53 -04:00
**Default:** `0`
2024-04-22 11:32:53 -04:00
```conf
control_port = 0
```
### timing_port
2024-04-22 11:32:53 -04:00
Number of the UDP timing port used when AirPlay devices make connections back to OwnTone.
2024-04-22 11:32:53 -04:00
**Note:** Choosing specific ports may be helpful when running OwnTone behind a firewall.
2024-04-22 11:32:53 -04:00
**Default:** `0`
2024-04-22 11:32:53 -04:00
```conf
timing_port = 0
```
2024-04-22 11:32:53 -04:00
### uncompressed_alac
2024-04-22 11:32:53 -04:00
Switch AirPlay 1 streams to uncompressed ALAC (as opposed to regular, compressed ALAC). Reduces CPU use at the cost of network bandwidth.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
uncompressed_alac = <true|false>
```
2024-04-22 11:32:53 -04:00
## Per AirPlay Device Settings
```conf
airplay "<airplay-device>" {
}
```
Each `airplay` section is meant to configure a named AirPlay output: one named section per device. It accepts the settings below.
2024-04-22 11:32:53 -04:00
**Note:** The capitalisation of the device name is relevant.
### max_volume
2024-04-22 11:32:53 -04:00
Maximum value of the volume.
2024-04-22 11:32:53 -04:00
**Note:** If that's more than your setup can handle set a lower value.
2024-04-22 11:32:53 -04:00
**Default:** `11`
2024-04-22 11:32:53 -04:00
```conf
max_volume = <integer>
```
2024-04-22 11:32:53 -04:00
### exclude
2024-04-22 11:32:53 -04:00
Flag indicating if the device must be excluded from the speaker list.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
exclude = <true|false>
```
2024-04-22 11:32:53 -04:00
### permanent
2024-04-22 11:32:53 -04:00
Flag to indicate to keep the device in the speaker list and thus ignore mdns notifications about it no longer being present. The speaker will remain until restart of OwnTone.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
permanent = <true|false>
```
2024-04-22 11:32:53 -04:00
### reconnect
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not OwnTone must explicitly reconnect with the device.
2024-04-22 11:32:53 -04:00
**Note:** Some devices spuriously disconnect during playback, and based on the device type OwnTone may attempt to reconnect.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
reconnect = <true|false>
```
2024-04-22 11:32:53 -04:00
### password
2024-04-22 11:32:53 -04:00
- ``- Password of the device.
2024-04-22 11:32:53 -04:00
**Default:** unset
2024-04-22 11:32:53 -04:00
```conf
password = "<password>"
```
### raop_disable
Flag to indicate whether or not AirPlay 1 (RAOP) must be disabled.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
raop_disable = <true|false>
```
### nickname
Name appearing in the speaker list.
**Note:** The defined name overrides the name of the device.
**Default:** unset
```conf
nickname = "<speaker-name>"
```
2024-04-22 11:32:53 -04:00
## Per Chromecast Device Settings
```conf
chromecast "<chromecast-device>" {
2024-04-22 11:32:53 -04:00
}
```
Each `chromecast` section is meant to configure a named Chromecast output: one named section per device. It accepts the settings below.
**Note:** The capitalisation of the device name is relevant.
### max_volume
2024-04-22 11:32:53 -04:00
Maximum value of the volume.
2024-04-22 11:32:53 -04:00
**Note:** If that's more than your setup can handle set a lower value.
2024-04-22 11:32:53 -04:00
**Default:** `11`
2024-04-22 11:32:53 -04:00
```conf
max_volume = <integer>
```
2024-04-22 11:32:53 -04:00
### exclude
2024-04-22 11:32:53 -04:00
Flag indicating if the device must be excluded from the speaker list.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
exclude = <true|false>
```
### nickname
Name appearing in the speaker list.
2024-04-22 11:32:53 -04:00
**Note:** The defined name overrides the name of the device.
2024-04-22 11:32:53 -04:00
**Default:** unset
```conf
nickname = "<speaker-name>"
```
2024-04-22 11:32:53 -04:00
## Spotify Settings
```conf
spotify {
2024-04-22 11:32:53 -04:00
}
```
The `spotify` section accepts the settings below.
**Note:** These settings only have effect if OwnTone is built with Spotify support.
### bitrate
Bit rate of the stream.
**Valid values:** `0` (No preference), `1` (96 kb/s), `2` (160 kb/s), `3` (320 kb/s)
**Default:** `0`
```conf
bitrate = <0|1|2|3>
```
2024-04-22 11:32:53 -04:00
### base_playlist_disable
2024-04-22 11:32:53 -04:00
Flag to indicate whether or not Spotify playlists are placed into the library playlist folder.
2024-04-22 11:32:53 -04:00
**Note:** Spotify playlists are by default located in a _Spotify_ playlist folder.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
base_playlist_disable = <true|false>
```
2024-04-22 11:32:53 -04:00
### artist_override
2024-04-22 11:32:53 -04:00
Flag indicating whether or not the compilation artist must be used as the album artist.
2024-04-22 11:32:53 -04:00
**Note:** Spotify playlists usually have many artists, and if you don't want every artist to be listed when artist browsing in Remote, you can set this flag to true.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
artist_override = <true|false>
```
2024-04-22 11:32:53 -04:00
### album_override
2024-04-22 11:32:53 -04:00
Flag to indicate to use the playlist name as the album name.
2024-04-22 11:32:53 -04:00
**Note:** Similar to the different artists in Spotify playlists, the playlist items belong to different albums, and if you do not want every album to be listed when browsing in Remote, you can set the album_override flag to true. Moreover, if an item is in more than one playlist, it will only appear randomly in one album when browsing.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
album_override = <true|false>
```
2024-04-22 11:32:53 -04:00
## RCP / Roku Soundbridge Settings
```conf
rcp "<device-name>" {
}
```
Each `rcp` section is meant to configure a named RCP output: one named section per device. It accepts the settings below.
**Note:** The capitalisation of the device name is relevant.
### exclude
2024-04-22 11:32:53 -04:00
Enable this option to exclude the device from the speaker list.
2024-04-22 11:32:53 -04:00
**Default:** `false`
2024-04-22 11:32:53 -04:00
```conf
exclude = <true|false>
```
2024-04-22 11:32:53 -04:00
### clear_on_close
2024-04-22 11:32:53 -04:00
Flag indicating whether or not the power on the device is maintained.
2024-04-22 11:32:53 -04:00
**Note:** A Roku / SoundBridge can power up in 2 modes: (default) reconnect to the previously used library (i.e. OwnTone) or in a _cleared library_ mode. The Roku power up behaviour is affected by how OwnTone disconnects from the Roku device. Set to false to maintain the default Roku _power on_ behaviour.
**Default:** `false`
```conf
clear_on_close = false
```
2024-04-22 11:32:53 -04:00
## MPD Settings
```conf
mpd {
2024-04-22 11:32:53 -04:00
}
```
The `mpd` section defines the settings for MPD clients. It accepts the settings below.
**Note:** These settings only have effect if OwnTone is built with Spotify support.
### port
TCP port to listen for MPD client requests.
2024-04-22 11:32:53 -04:00
**Note:** Setting the port to `0` disables the support for MPD.
2024-04-22 11:32:53 -04:00
**Default:** `6600`
2024-04-22 11:32:53 -04:00
```conf
port = 6600
```
### http_port
2024-04-22 11:32:53 -04:00
HTTP port to listen for artwork requests.
2024-04-22 11:32:53 -04:00
**Notes:**
2024-04-22 11:32:53 -04:00
- This setting is only supported by some MPD clients and will need additional configuration in the MPD client to work.
- Setting the port to `0` disables the serving of artwork.
2024-04-22 11:32:53 -04:00
**Default:** `0`
2024-04-22 11:32:53 -04:00
```conf
http_port = 0
```
2024-04-22 11:32:53 -04:00
## SQLite Settings
```conf
sqlite {
2024-04-22 11:32:53 -04:00
}
```
The `sqlite` section defines how the SQLite database operates and accepts the settings below.
**Note:** Make sure to read the SQLite documentation for the corresponding PRAGMA statements as changing them from the defaults may increase the possibility of database corruption. By default, the SQLite default values are used.
### pragma_cache_size_library
Cache size in number of database pages for the library database.
**Note:** SQLite default page size is 1024 bytes and cache size is 2000 pages.
```conf
pragma_cache_size_library = <pages>
```
### pragma_cache_size_cache
Cache size in number of db pages for the cache database.
**Note:** SQLite default page size is 1024 bytes and cache size is 2000 pages.
```conf
pragma_cache_size_cache = <pages>
```
2024-04-22 11:32:53 -04:00
### pragma_journal_mode
2024-04-22 11:32:53 -04:00
Sets the journal mode for the database. Valid values are: `DELETE`, `TRUNCATE`, `PERSIST`, `MEMORY`, `WAL`, and `OFF`.
2024-04-22 11:32:53 -04:00
**Default:** `"DELETE"`
2024-04-22 11:32:53 -04:00
```conf
pragma_journal_mode = "<DELETE|TRUNCATE|PERSIST|MEMORY|WAL|OFF>"
```
2024-04-22 11:32:53 -04:00
### pragma_synchronous
2024-04-22 11:32:53 -04:00
Change the setting of the "synchronous" flag.
2024-04-22 11:32:53 -04:00
**Valid values:** `0` (off), `1` (normal), `2` (full)
2024-04-22 11:32:53 -04:00
**Default:** `2`
2024-04-22 11:32:53 -04:00
```conf
pragma_synchronous = <0|1|2>
```
2024-04-22 11:32:53 -04:00
### pragma_mmap_size_library
2024-04-22 11:32:53 -04:00
Number of bytes set aside for memory-mapped I/O for the library database.
2024-04-22 11:32:53 -04:00
**Notes:** This setting requires SQLite 3.7.17+.
2024-04-22 11:32:53 -04:00
**Valid values:** `0` (mmap disabled), `<integer>` (bytes for mmap)
2024-04-22 11:32:53 -04:00
**Default:** `0`
2024-04-22 11:32:53 -04:00
```conf
pragma_mmap_size_library = <integer>
```
2024-04-22 11:32:53 -04:00
### pragma_mmap_size_cache
2024-04-22 11:32:53 -04:00
Number of bytes set aside for memory-mapped I/O for the cache database.
2024-04-22 11:32:53 -04:00
**Note:** This setting requires SQLite 3.7.17+.
2024-04-22 11:32:53 -04:00
**Valid values:** `0` (mmap disabled), `<integer>` (bytes for mmap)
2024-04-22 11:32:53 -04:00
```conf
pragma_mmap_size_cache = <integer>
```
2024-04-22 11:32:53 -04:00
### vacuum
2024-04-22 11:32:53 -04:00
Flag indicating whether or not the database must be vacuumed on startup.
2024-04-22 11:32:53 -04:00
**Note:** This setting increases the startup time, but may reduce database size.
2024-04-22 11:32:53 -04:00
**Default:** `true`
2024-04-22 11:32:53 -04:00
```conf
vacuum = <true|false>
```
2024-04-22 11:32:53 -04:00
## Streaming Settings
```conf
streaming {
2024-04-22 11:32:53 -04:00
}
```
The `streaming` section defines the audio settings for the streaming URL (`http://<server-name>:<port-number>/stream.mp3`) and accepts the settings below.
### sample_rate
Sampling rate of the stream: e.g., 44100, 48000, etc.
**Default:** `44100`
```conf
sample_rate = <integer>
```
2024-04-22 11:32:53 -04:00
### bit_rate
2024-04-22 11:32:53 -04:00
Bit rate of the stream (in kb/s).
2024-04-22 11:32:53 -04:00
**Valid values:** `64`, `96`, `128`, `192`, and `320`.
2024-04-22 11:32:53 -04:00
**Default:** `192`
2024-04-22 11:32:53 -04:00
```conf
bit_rate = <64|96|128|192|320>
```
2024-04-22 11:32:53 -04:00
### icy_metaint
2024-04-22 11:32:53 -04:00
Number of bytes of media stream data between each metadata chunk.
2024-04-22 11:32:53 -04:00
**Default:** `16384`
2024-04-22 11:32:53 -04:00
```conf
icy_metaint = <integer>
```