Skip to content

Setup Guide

This guide walks through setting up DR Mobile with a NAS/home server. It assumes you already have an MPD server running and a music library on a NAS.

What you need

  • An MPD server on your local network, reachable from iOS devices
  • A music library with files the app can read (FLAC, ALAC, M4A, MP3, AAC, WAV, AIFF)
  • Optional: a WebDAV endpoint exposing the same library — enables bit-perfect local playback with a USB DAC

1. MPD server (required)

DR Mobile connects to MPD using its native TCP protocol. If you already run MPD, you just need the host and port.

Don't have MPD yet?

MPD runs on Linux, macOS, FreeBSD. On Debian/Ubuntu:

sudo apt install mpd
Edit /etc/mpd.conf and set music_directory to your library path. Enable bind_to_address "any" so the iOS device can connect.

Minimum checklist:

  • music_directory points to your library (or NFS/SMB mount of it)
  • bind_to_address allows connections from your LAN
  • port "6600" (default)
  • Library indexed (mpc update finishes without errors)

In the app: Settings → MPD Connection → enter the server host/IP and port → Connect.

Once connected, tap the Refresh Library button in Settings to load albums.


2. WebDAV (optional — for bit-perfect local playback)

When enabled, DR Mobile downloads files directly from a WebDAV server and plays them through the iOS audio stack at each file's native sample rate. Paired with a USB DAC this gives bit-perfect output — no resampling, no MPD transcoding.

The app still uses MPD for browsing, metadata, stickers, and the queue. WebDAV only serves the raw audio files.

Why this matters

MPD's HTTP output always transcodes (it can't send different sample rates in the same stream). That means:

  • MP3 streaming is lossy.
  • Even FLAC streaming is re-encoded through a fixed-format pipeline.
  • Your DAC never receives the file's native rate.

By bypassing MPD's HTTP output and reading the file directly, iOS can ask AVAudioSession to adopt the file's sample rate (44.1 / 48 / 88.2 / 96 / 176.4 / 192 kHz) and pass the bytes straight to your DAC.

Setting up WebDAV on nginx

On the same machine that has the files (or any host that can read them), install nginx with the WebDAV extensions:

sudo apt install nginx-extras apache2-utils

Create an htpasswd file for basic auth:

sudo htpasswd -c /etc/nginx/.htpasswd_music drmobile
# enter a password

Create /etc/nginx/sites-available/music-dav.conf:

server {
    listen 8090;
    server_name _;

    client_max_body_size 0;
    charset utf-8;
    charset_types application/xml;

    location /music/ {
        alias /path/to/your/music/;   # <- same path as MPD's music_directory
        autoindex on;

        auth_basic "Music";
        auth_basic_user_file /etc/nginx/.htpasswd_music;

        dav_methods off;
        dav_ext_methods PROPFIND OPTIONS;
    }
}

Path must match MPD's music_directory

DR Mobile asks MPD for file paths (relative to music_directory) and concatenates them to the WebDAV base URL. Both must point to the same directory tree.

Enable and reload:

sudo ln -s /etc/nginx/sites-available/music-dav.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Test from any machine on your LAN:

curl -u drmobile -o /dev/null -w "%{http_code}\n" http://<server>:8090/music/
# expect HTTP 200

Configure DR Mobile

Settings → Local Playback:

  • URL: http://<server>:8090/music/ (trailing slash matters)
  • User / Password: whatever you put in htpasswd
  • Toggle: ON
  • Tap Test — should report Reachable

How to know it's working

When a track is playing in local mode with a USB DAC connected and the DAC supports the file's sample rate, the BIT-PERFECT badge appears in the Now Playing view along with the DAC's name and the session rate. If you see the badge, nothing between the file and your DAC is resampling.

DSD (DSF/DFF)

iOS cannot decode DSD natively. DSD albums fall back to MPD streaming (not bit-perfect). Other formats — FLAC, ALAC, M4A, MP3, AAC, WAV, AIFF — are supported locally.


3. Optional integrations

These aren't required but unlock extra features:

  • Last.fm API key → album cover art fallback. Get one at last.fm/api.
  • Discogs API key/secret → pressing metadata, release details. Get one at discogs.com/settings/developers.
  • LRCLib → synchronized lyrics. No key needed, works out of the box.
  • MusicBrainz → credits, artist info. No key needed.
  • Wikipedia → artist and album bios. No key needed.

All keys are stored in the app, never sent anywhere except the respective API.


Troubleshooting

Local Playback toggle is on but playback still goes through MPD

Check that the track's extension is one of the supported formats. DSD files (.dsf, .dff) always fall back to MPD. Also verify the WebDAV URL ends with a trailing slash.

BIT-PERFECT badge never appears

The badge requires all three:

  1. Local mode is on (Settings → Local Playback)
  2. Output route is a wired DAC — USB Audio, Lightning, HDMI, or wired headphones. AirPlay and Bluetooth are not considered bit-perfect because those protocols re-encode.
  3. The session sample rate matches the file's native rate — the DAC must support that rate.
WebDAV returns 403 Forbidden

nginx's www-data user needs read permissions on the music directory. On OpenMediaVault NAS, add it to the users group: sudo usermod -a -G users www-data.

App connects to MPD but shows no albums

In Settings, tap Refresh Library to trigger a full scan. If your library is huge (10k+ albums), the initial scan may take 30–60 seconds.