Internal Dev Repo. A lightweight stand-alone database proxy server for mpd. Uses mpd-dbcreate for database updates.
Find a file
2025-11-27 23:00:10 -05:00
doc initialize 2025-11-26 21:19:13 -05:00
src build cleanup. systemd service. no docs yet. 2025-11-27 22:57:31 -05:00
subprojects initialize 2025-11-26 21:19:13 -05:00
systemd build cleanup. systemd service. no docs yet. 2025-11-27 22:57:31 -05:00
AUTHORS initialize 2025-11-26 21:19:13 -05:00
config.h initialize 2025-11-26 21:19:13 -05:00
COPYING initialize 2025-11-26 21:19:13 -05:00
LICENSE Add LICENSE file 2025-11-27 23:00:10 -05:00
meson.build build cleanup. systemd service. no docs yet. 2025-11-27 22:57:31 -05:00
meson_options.txt build cleanup. systemd service. no docs yet. 2025-11-27 22:57:31 -05:00
mpd-dbproxy.conf.example initialize 2025-11-26 21:19:13 -05:00
mpd.svg initialize 2025-11-26 21:19:13 -05:00
NEWS initialize 2025-11-26 21:19:13 -05:00
README.md initialize 2025-11-26 21:19:13 -05:00

mpd-dbproxy

A lightweight MPD protocol server for serving database queries from an existing MPD database file.

Building

mpd-dbproxy is built as part of the MPD build system using Meson.

Prerequisites

  • Meson 1.2+
  • Ninja
  • GCC 12+ or Clang 14+
  • Required dependencies (same as MPD core)

Build Commands

# Configure the build (from MPD root directory)
meson setup . output/dbproxy --buildtype=debugoptimized

# Build mpd-dbproxy
ninja -C output/dbproxy src/dbproxy/mpd-dbproxy

# The binary will be at:
# output/dbproxy/src/dbproxy/mpd-dbproxy

Build Options

# Debug build with verbose output
meson setup . output/debug --buildtype=debug

# Release build
meson setup . output/release --buildtype=release -Db_ndebug=true

# Reconfigure existing build
meson configure output/dbproxy --buildtype=release

Usage

# Using a config file
mpd-dbproxy --config /etc/mpd-dbproxy.conf

# Using command-line options
mpd-dbproxy --music-dir /mnt/music --database /var/lib/mpd/mpd.db --port 6600

# With verbose logging
mpd-dbproxy --config /etc/mpd-dbproxy.conf --verbose

Command-Line Options

Option Short Description
--config <file> -c Path to configuration file
--music-dir <path> -m Music directory (overrides config)
--database <file> -d Database file (overrides config)
--port <port> -p TCP port (overrides config)
--verbose -v Enable verbose logging
--help -h Show help message

Configuration

See mpd-dbproxy.conf.example for a complete example configuration file.

Architecture

mpd-dbproxy serves an existing MPD SimpleDatabase file and responds to MPD protocol queries. When it receives update or rescan commands, it spawns mpd-dbcreate to update the database file, then reloads the database and notifies connected clients.

Supported Commands

  • Database: find, search, findadd, searchadd, list, count, listall, listallinfo, lsinfo, listfiles
  • Stats: stats
  • Protocol: ping, close, kill, password, idle, noidle, tagtypes, commands, notcommands, urlhandlers
  • Update: update, rescan (spawns mpd-dbcreate)

Use with MPD Proxy Database Plugin

Configure your main MPD instance to use the proxy database plugin:

database {
    plugin "proxy"
    host "localhost"
    port 6600
    password "your_password"
    keepalive yes
}

This allows MPD to delegate all database operations to mpd-dbproxy.