rmpd is a modern, high-performance, memory-safe music server written in pure Rust. It aims for 100% compatibility with the Music Player Daemon (MPD) protocol while providing first-class extensibility through a plugin architecture.
- 🎵 MPD Protocol Compatible - Works with existing MPD clients (ncmpcpp, mpc, Cantata)
- 🦀 Pure Rust - Memory-safe, fast, and reliable
- 🔌 Extensible - Plugin system for decoders, outputs, and inputs
- 🎧 High-Quality Audio - DSD support, ReplayGain, gapless playback, crossfade
- 🎼 Format Support - FLAC, MP3, Ogg Vorbis, WAV, AAC, DSD (DoP and native)
- 🏠 Multi-Room - Plays to all enabled outputs at once; stream over HTTP (
httpdoutput) or feed an external Snapcast server via FIFO - 🖥️ Desktop Integration - Native MPRIS D-Bus interface (media keys,
playerctl, GNOME/KDE) plus mDNS auto-discovery - 🌐 Remote Libraries - Browse and stream from OpenSubsonic servers (Navidrome, Airsonic, gonic) as a music source, built behind the
subsonicCargo feature - ⚡ Efficient - Runs on everything from Raspberry Pi to high-end servers
rmpd/
├── rmpd/ # Main binary
├── rmpd-core/ # Core types and traits
├── rmpd-protocol/ # MPD protocol implementation
├── rmpd-player/ # Audio playback engine
├── rmpd-library/ # Music library/database
├── rmpd-plugin/ # Plugin system
└── rmpd-stream/ # Streaming support
System dependencies:
# Ubuntu/Debian
sudo apt-get install libasound2-dev pkg-config
# macOS
brew install pkg-configcargo build --release./target/release/rmpd --bind 127.0.0.1 --port 6600 --music-dir ~/Music# Check status
mpc status
# Update library
mpc update
# Add and play music
mpc add /
mpc play
# Play internet radio (any HTTP/HTTPS stream URL)
mpc add https://stream.example/radio.mp3
mpc play
mpc current # shows the live ICY "now playing" title for streamsrmpd does not require you to create a config file. On first start, if no
config file is found, rmpd writes a commented starter config to
~/.config/rmpd/rmpd.toml and logs the path it chose. You can also manage
this explicitly:
--generate-configwrites the starter config on demand and refuses to overwrite an existing file.--print-config-pathprints the path that would be used, without writing anything.--no-configskips file discovery entirely and runs on built-in defaults.
When --config is not given, rmpd searches these locations in order and
uses the first one that exists:
- the path given to
--config $XDG_CONFIG_HOME/rmpd/rmpd.toml(usually~/.config/rmpd/rmpd.toml)~/.rmpd.toml~/.rmpd/rmpd.toml/etc/rmpd/rmpd.toml
This mirrors MPD's own search order ($XDG_CONFIG_HOME/mpd/mpd.conf,
~/.mpdconf, ~/.mpd/mpd.conf, /etc/mpd.conf).
Every section and key is optional — anything omitted uses a built-in
default, so a partial config is valid. Paths beginning with ~ are
expanded.
A minimal config:
[general]
music_directory = "~/Music"
log_level = "info"
[network]
bind_address = "127.0.0.1"
port = 6600
[audio]
default_output = "alsa"
replay_gain = "auto"See rmpd.toml for a complete, annotated configuration example.
Unrecognized keys are reported at startup instead of being silently ignored, with a suggestion when a typo is likely, for example:
unknown config key `general.msic_directory` (did you mean `music_directory`?)
Keys carried over from mpd.conf produce a migration hint pointing at the
rmpd equivalent. Unknown keys only warn — they never stop the daemon.
An explicitly passed --config file that cannot be read or parsed is
fatal, since a config you asked for by name should never be silently
substituted with defaults.
A missing or nonexistent music_directory is not fatal: rmpd warns,
starts anyway, and skips library scanning, matching MPD's
degrade-don't-die behaviour.
log_level under [general] controls logging (trace/debug/info/
warn/error). --verbose forces debug, and the RUST_LOG environment
variable overrides both.
The following keys were parsed in older versions but never did anything and have been removed; a config that still sets them gets a startup warning naming each one:
audio.gapless— gapless playback is always on- the entire
[decoder]section, includingdecoder.enabled— decoders come from a compile-time registry database.cache_sizedatabase.fts_enabled
rmpd can aggregate a remote OpenSubsonic
server (Navidrome, Airsonic, gonic, …) into its library as a music source.
The remote catalog is synced into the database at startup and on update, and
tracks stream on demand through the same HTTP path used for internet radio — so
any MPD client browses and plays them like local files (under mount-style paths
such as home/Artist/Album/<id>.flac, where the source name is the mount point).
Build with the subsonic feature, then add one or more [[source]] blocks:
cargo build --release --features subsonic[[source]]
name = "home" # becomes the mount point (top-level directory)
type = "subsonic"
enabled = true
url = "https://music.example.com"
username = "alice"
password = "secret" # or use `api_key = "..."` instead
# max_bitrate = 320 # optional server-side transcode cap (kbps)
# format = "mp3" # optional transcode target ("raw" = no transcode)Credentials are never written to logs. An unreachable server is skipped at startup without aborting (previously-synced tracks remain browsable).
rmpd exposes a native MPRIS interface on the session D-Bus as org.mpris.MediaPlayer2.rmpd. This lets Linux desktops (GNOME Shell, KDE Plasma), playerctl, lock screens, and multimedia keys discover and control rmpd directly — no external bridge such as mpDris2 required.
It is enabled by default and can be toggled with mpris under [network]. Verify it with:
playerctl -p rmpd metadata
busctl --user introspect org.mpris.MediaPlayer2.rmpd /org/mpris/MediaPlayer2rmpd also advertises itself over mDNS/Zeroconf so MPD clients on the local network can auto-discover the server.
- Lossless: FLAC, WAV, ALAC, APE, WavPack, TrueAudio
- Lossy: MP3, Ogg Vorbis, Opus, AAC, MP4
- High-Resolution: DSD (DSF, DFF) with DoP and native playback
- Streaming: HTTP streams, Icecast, internet radio
rmpd includes comprehensive DSD support:
- DSD64, DSD128, DSD256 and higher sample rates
- DoP (DSD over PCM) for wider DAC compatibility
- Native DSD playback for compatible hardware
- Automatic format detection and conversion
- DSD-to-PCM fallback decodes to a 44.1 kHz-family rate and resamples to the output device's native rate using the configured
resampler_quality, so a sound server (e.g. PipeWire) never resamples internally — avoiding underruns and keeping DSD's ultrasonic noise out of the audible band
cargo test --workspace --all-features# Format code
cargo fmt
# Run clippy
cargo clippy --workspace --all-targets --all-featuresThis project uses GitHub Actions for CI/CD with:
- Multi-platform testing (Ubuntu, macOS)
- Multi-architecture builds (x86_64, ARM64)
- Strict linting with Clippy
- Security audits with cargo-audit and cargo-deny
- Code coverage reporting
- Automated dependency updates via Renovate
See CI.md for detailed CI/CD documentation.
-
Core Infrastructure
- MPD protocol server (TCP/Unix sockets)
- Event bus system
- Configuration management
- Logging with tracing
-
Audio Playback
- Multi-format decoding (FLAC, MP3, Vorbis, WAV, AAC, DSD)
- High-rate DSD support (DSD128, DSD256+)
- Multiple output types (ALSA, PulseAudio, PipeWire)
- Gapless playback
- Crossfade and MixRamp transitions
- ReplayGain support
- Internet radio: HTTP(S) streaming input with Shoutcast/Icecast (ICY) "now playing" metadata
httpdoutput streams to browsers (HTTP/1.0) and to Shoutcast/Icecast clients (ICY 200 OKgreeting + interleaved ICYStreamTitlemetadata)
-
Library Management
- Filesystem scanning
- SQLite database
- Metadata extraction with lofty
- Full-text search with tantivy
- Album art support
-
MPD Protocol
- Core playback commands (play, pause, stop, seek)
- Queue management (add, delete, move, shuffle)
- Database queries (find, search, list)
- Status and statistics
- Playlist management (
.m3u,.pls, XSPF/ASX;.cuesheets expand into range-restricted virtual tracks) - Output control
-
Desktop Integration
- Native MPRIS D-Bus interface (
org.mpris.MediaPlayer2.rmpd) - Media keys,
playerctl, and GNOME/KDE media controls - mDNS/Zeroconf service advertisement for client auto-discovery
- Native MPRIS D-Bus interface (
-
Remote Libraries
- OpenSubsonic music sources (Navidrome, Airsonic, gonic) via the
subsonicCargo feature
- OpenSubsonic music sources (Navidrome, Airsonic, gonic) via the
- Compressed stream encoders (FLAC / Opus / Vorbis) for the
httpdoutput - Network storage backends (SMB / NFS)
- ✅ mpc - Command-line client
- ✅ ncmpcpp - TUI client
- ✅ Cantata - Qt GUI client
- ✅ rmpc - Modern TUI client
- 🚧 MPDroid - Android client (testing in progress)
- 🚧 MPDluxe - iOS client (testing in progress)
rmpd plays to all enabled outputs simultaneously, so local audio and a network stream can run at once. Two routes to networked/multi-room playback:
- HTTP streaming — enable a
type = "httpd"output (default port 8000) and point any browser, phone, or another MPD/VLC athttp://<host>:8000. Works today, no extra daemon required (encoder = "wav"or"pcm"). - Snapcast (synchronized) — enable a
type = "fifo"output writing to/tmp/snapfifoand run an external Snapcastsnapserverreading that FIFO for sample-accurate multi-room sync.
rmpd is designed for efficiency:
- Startup time: < 500ms with 100k song library
- Memory usage: < 20MB idle, < 150MB with 100k songs loaded
- CPU usage: < 5% during FLAC playback
- MSRV: Rust 1.75.0+
- 100% MPD Compatibility - Drop-in replacement for MPD
- Modern Architecture - Clean, modular, testable code
- Extensibility - Plugin system for community contributions
- Performance - Efficient resource usage
- Multi-Protocol - MPD, OpenSubsonic support
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
cargo fmtandcargo clippy - Submit a pull request
See CI.md for development guidelines and CI/CD information.
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
- Inspired by the original Music Player Daemon
- Built with modern Rust audio libraries: Symphonia, cpal, lofty
- Special thanks to the Rust audio community
- Documentation: CI.md - CI/CD and development guide
- MPD Protocol: MPD Protocol Documentation
- Issue Tracker: GitHub Issues
- Discussions: GitHub Discussions
