Skip to content

Admin settings

Pauli Järvinen edited this page Jan 2, 2025 · 5 revisions

The following keys may be defined in the file <cloud root>/config/config.php for server-wide settings of the Music app. This description is valid for Music v2.1.0. On older versions, some of the keys are not present and some have different default values.

music.lastfm_api_key

To see the artist biography and other information from Last.fm in the details view, you need to create an API account with Last.fm. For this, use the Last.fm form. Only 'Contact email' and 'Application name' need to be filled in the form. You are then provided with an API key which should be used as a value for this key. For more details, see the tutorial.

music.cover_size

Large album cover images are down-scaled to this size on the server before providing them for the web browser or the Subsonic/Ampache client. Smaller images are not up-scaled. The default size is 380 pixels. The value should be given as a single integer.

music.relay_podcast_stream

When enabled, the podcast audio streams are relayed to the web browser via the cloud server. When disabled, the web browser plays the streams directly from their original source. In the latter case, the source needs to be allowed by the setting music.allowed_stream_src. The default is true.

music.relay_radio_stream

When enabled, the internet radio audio streams are relayed to the web browser via the cloud server. When disabled, the web browser plays the streams directly from their original source. In the latter case, the source needs to be allowed by the setting musicallowed_stream_src. The default is true.

music.relay_radio_stream_on_share

Like music.relay_radio_stream but affects only playlist files in link-shared folders. The default is to use the value of music.relay_radio_stream.

music.enable_radio_hls

Enable streaming HLS-type radio stations. These are always relayed via the cloud server. Default is true. When enabled, the sources data: and blob: will be added to the Content-Security-Policy header media-src.

music.enable_radio_hls_on_share

Like music.enable_radio_hls but affects only playlist files in link-shared folders. The default is to use the value of music.enable_radio_hls.

music.allowed_stream_src

Array of allowed radio and podcast streaming hosts. These are not needed for HLS-type streams. Non-HLS stream sources need to be allowed if and only if the streams are not relayed via the cloud server. Default is [], i.e. no sources are allowed. If you are not concerned about the security implications, it's possible to allow any source URL by defining the value ['http://*:*', 'https://*:*']. The given URLs will be added to the Content-Security-Policy header media-src.

music.podcast_auto_update_interval

The interval for automatic podcast update checks in hours. Decimal value can be used for sub-hour resolution. Negative value will disable automatic updating. The default value is 24 hours. Note: the update rate is limited also by the execution rate of your cloud background task.

music.ampache_api_default_ver

The Ampache API major version to use in case the client doesn't specify any version. The default is 6.

music.ampache_session_expiry_time

The Ampache session expiry time in seconds. The default is 6000 and the maximum is 31536000.