Configuration files

Configuration files#

You can configure myMPD in different ways:

  1. With environment variables

    1. Set environment variables as described below

    2. Start myMPD. myMPD grabs the environment variables and writes it’s configuration files accordingly.

  2. Use mympd-config

    1. Type mympd-config to configure myMPD with a ncurses based interface.

    2. Start myMPD.

  3. Use mympd -c

    1. Type mympd -c to create the initial configuration in the /var/lib/mympd/config/ directory.

    2. Edit the files and start myMPD.

Hint

Use systemd-run, if you use a distribution with systemd, e.g.:

systemd-run -p DynamicUser=yes -p StateDirectory=mympd -p CacheDirectory=mympd -E MYMPD_LOGLEVEL=4 -E MYMPD_HTTP=false -E MYMPD_SSL_PORT=1333 mympd -c

General options#

FILE / ENVIRONMENT

TYPE

DEFAULT

DESCRIPTION

acl
MYMPD_ACL
string



ACL to access the myMPD webserver: ACL,
allows all hosts in the default configuration.
album_group_tag
MYMPD_ALBUM_GROUP_TAG
string

Date

Additional tag to group albums

album_mode
MYMPD_ALBUM_MODE
string

adv

Set the album mode: adv or simple

album_unknown
MYMPD_ALBUM_UNKNOWN
boolean

false

Groups songs with empty album tag in a special
Unknown Album album.
cache_cover_keep_days
MYMPD_CACHE_COVER_KEEP_DAYS

number


31


How long to keep images in the cover cache:
0 = disable the cache
-1 =o disable pruning of the cache
cache_http_keep_days
MYMPD_CACHE_HTTP_KEEP_DAYS


number



31



How long to keep successful responses in the http
client cache:
0 = disable the cache
-1 = disable pruning of the cache.
cache_lyrics_keep_days
MYMPD_CACHE_LYRICS_KEEP_DAYS

number


31


How long to keep lyrics in the lyrics cache:
0 = disable the cache
-1 = disable pruning of thecache
cache_misc_keep_days
MYMPD_CACHE_MISC_KEEP_DAYS
number

1

How long to keep files in the misc cache.

cache_thumbs_keep_days
MYMPD_CACHE_THUMBS_KEEP_DAYS

number


31


How long to keep images in the thumbnail cache:
0 = disable the cache
-1 = disable pruning of the cache
ca_cert_store
MYMPD_CA_CERT_STORE
string


Path to the system CA certificate store.

cert_check
MYMPD_CERT_CHECK
boolean

true

Enable certificate checking for outgoing https
connections.
http
MYMPD_HTTP
boolean

true

true = Enable listening on http_port

http_host
MYMPD_HTTP_HOST
string

[::]

IP address to listen on, use [::] to listen on
IPv6 and IPv4.
http_port
MYMPD_HTTP_PORT
number

8080

Port to listen for plain http requests. Redirects to
ssl_port if ssl is set to true. [1]
jukebox_queue_length_album
MYMPD_JUKEBOX_QUEUE_LENGTH_ALBUM
number

25

Length of the internal jukebox queue for albums
(5 - 250).
jukebox_queue_length_album_min
MYMPD_JUKEBOX_QUEUE_LENGTH_ALBUM_MIN
number

5

Minimum length of the internal jukebox queue for
albums (5 - 125).
jukebox_queue_length_song
MYMPD_JUKEBOX_QUEUE_LENGTH_SONG
number

100

Desired Length of the internal jukebox queue for
songs (10 - 1000).
jukebox_queue_length_song_min
MYMPD_JUKEBOX_QUEUE_LENGTH_SONG_MIN
number

10

Minimum length of the internal jukebox queue for
songs (10 - 500).
loglevel
MYMPD_LOGLEVEL
number

5

mympd_uri
MYMPD_MYMPD_URI
string

auto

auto or uri to myMPD listening port,
e.g. https://192.168.1.1/mympd
pin_hash
N/A
string



SHA256 hash of pin, create it with mympd -p

plist_len_max
MYMPD_PLIST_LEN_MAX
number

16384

Maximum playlist length.

scriptacl
MYMPD_SCRIPTACL
string

+127.0.0.1

ACL for the myMPD script backend: ACL,
The acl above must also grant access.
scripts_external
MYMPD_SCRIPTS_EXTERNAL
boolean

false

Allow myMPD to execute external scripts vie the
/script-api-Endpoint.
smartpls_per_tag_value_max
MYMPD_SMARTPLS_PER_TAG_VALUE_MAX
number

1000

Maximum number of tag values for automatic
smartpls creation.
stickers
MYMPD_STICKERS
boolean

true

Enables the support for MPD stickers.

stickers_pad_int
MYMPD_STICKERS_PAD_INT
boolean

false

Enables the padding of integer sticker values
(12 digits).
webradiodb
MYMPD_WEBRADIODB
boolean

true

Enables the WebradioDB integration.

SSL options#

FILE / ENVIRONMENT

TYPE

DEFAULT

DESCRIPTION

ssl
MYMPD_SSL

boolean

true

true` = enable listening on ssl_port, enables also the redirection from http_port to ssl_port.

ssl_port
MYMPD_SSL_PORT

number

8443

Port to listen for https requests.

ssl_san
MYMPD_SSL_SAN

string

Additional SAN for certificate creation.

custom_cert
MYMPD_CUSTOM_CERT

boolean

false

true = use custom ssl key and certificate.

ssl_cert
MYMPD_SSL_CERT

string

Path to custom ssl certificate file.

ssl_key
MYMPD_SSL_KEY

string

Path to custom ssl key file.

  • More details on SSL