latest release stable The latest stable release, this is the preferred image for daily, hassle-free usage
master stable the latest releases are created from the master branch
devel unstable this branch is for stabilizing and testing the upcoming new myMPD release
other branches unstable very unstable development branches with breaking changes

Get the appropriated tarball or clone the git repository and switch to the wanted branch.

Example: Clone and use devel branch:

git clone
git checkout devel


The script is the one stop shop for building and packaging myMPD.

Build Dependencies

myMPD has only a few dependencies beside the standard c libraries. Not installing the optional dependencies leads only to a smaller subset of myMPD functions.

  • cmake >= 3.4
  • libasan3 - for debug builds only
  • Perl - to create translation files
  • pcre - for pcre support
  • Optional (devel packages):
    • OpenSSL >= 1.1.0 - for https support
    • libid3tag - to extract embedded coverimages
    • flac - to extract embedded coverimages
    • liblua >= 5.3.0 - for scripting myMPD

You can type ./ installdeps as root to install the dependencies (works only for supported distributions). For all other distributions you must install the packages manually.


You can self create packages for your distribution:

  • ./ pkgalpine for Alpine Linux
  • ./ pkgarch for Arch based distributions (e.g. Manjaro)
  • ./ pkgdebian for Debian based distributions (e.g. Ubuntu. Raspbian)
  • ./ pkgrpm for RPM based distributions (e.g. openSUSE, Fedora)
  • ./ pkgdocker to create a Docker image based on Alpine Linux
  • For gentoo you have to create a local overlay:, the ebuild file is in the directory contrib/packaging/gentoo
  • Build a OpenWrt package

Compiling and installing

Compile time options

Compile time options are set through environment variables.

MYMPD_INSTALL_PREFIX /usr Installation prefix for myMPD
ENABLE_SSL ON ON = Enables SSL, requires OpenSSL >= 1.1.0
ENABLE_LIBID3TAG ON ON = Enables libid3tag usage for extracting coverimages
ENABLE_FLAC ON ON = Enables flac usage for extracting coverimages
ENABLE_LUA ON ON = Enables scripting support with lua
EMBEDDED_ASSETS - ON = Embeds assets in binary, default ON for release else OFF
MANPAGES ON ON = build manpages
ENABLE_LIBASAN - ON = compile with libasan, default ON for memcheck else OFF

There are three compile targets for myMPD.

If compilation fails and you are building on top of an old version, try to run ./ cleanup before.


  • ./ release builds the release binaries
    • Directory: release
    • Assets embedded in binary
    • Binary is stripped
  • ./ install installs the release binaries (run as root)

You can use ./ releaseinstall to compile and install in one step.


  • ./ debug builds the debug binaries
    • Directory: debug
    • Plain assets in htdocs directory
    • Use this to debug mympd with valgrind or gdb
  • ./ memcheck builds the debug binaries
    • Directory: debug
    • Plain assets in htdocs directory
    • Binary is statically linked with libasan3


To run the unit tests:

  • ./ test


  • ./ uninstall to remove only binaries
  • ./ purge to remove all

Advanced Options

For advanced options type ./ help.

Cross compiling with Debian

The build script can use sbuild and qemu to cross compile debian packages, thanks to #264 @tsunulukai.

  1. Set target distributions: export DISTROS="buster stretch"
  2. Set target architectures: export TARGETS="armhf armel"
  3. sudo -E ./ sbuild_chroots to create chroot environments for build
  4. sudo -E ./ sbuild_build to build the packages

The successfully build packages can be found in the packager/builds directory.

Note: Since v6.12.0 the source does not include prebuild assets. If you do not use the provided build scripts, you must build the assets before, e. g.:

export MYMPD_BUILDIR="build"
./ createassets