This schema below is the setup exactly as explained in this guide, but it’s not the one I use today. I had to make a few changes to the initial setup I had in mind because of performances issues.

I had audio cracks and lags with Spotify Connect, MPD, and DLNA of course since UpMPDcli uses MPD as backend, especially at the beginning or end of songs. …

Part 7 — Spotify

A much appreciated feature in recent connected amplifiers is the ability to play music from streaming services. Even if I have a huge media library, everything is not in it, so I wanted to add support of Spotify on my HiFi server.

The obvious choice was Raspotify, a Raspberry Spotify client based on librespot, an open source Spotify client. However, a premium Spotify account is required.

The installation is very easy :

$ curl -sL | sh

The configuration file is located at /etc/default/raspotify

# /etc/default/raspotify --Arguments/configuration for librespot

# Device name on Spotify Connect

# Bitrate, one…

Part 6 — Audio CD

To be honest I don’t use CD anymore, I gave up my collection years ago. I don’t even have a player anymore except for my desktop optical drive. However I still get some from time to time when buying records, so I wanted to add a CD player to my setup. I bought an external 2.0 USB DVD writer, plugged it to the Pi and started digging.

I ended up with a solution very similar to what I did with USB sticks:

  • a udev rule to detect audio cd insertion, whichs starts
  • a systemd service triggering
  • a bash script to…

Part 5 — USB sticks

This part gave me more thinking than the others. What I want is automatically playing audio files contained on a usb stick when it’s plugged in. But as the pi is still headless, we need some kind of remote to control the queue.
MPD seems again a good choice to do this. Unfortunately, our MPD instance is already running in satellite mode so managing a library from a folder isn’t possible. But we can very well run another instance of MPD on the Pi, which will use usb sticks as media folder. So we need a new mpd.conf file, and…

Part 4 — DLNA/UPNP

I also wanted a protocol more standard than MPD on the other OS and in the industry. This protocol is DLNA. It comes with 3 entities :

  • Server: will store media informations and database
  • Renderer: will actually play media
  • Client: will tell renderer to play media from server.

Server Side

So I followed the same idea than from MPD mostly, and installed minidlna on the NAS to store the UPNP database.


friendly_name=”NAS upnp”


I also added minidlna to the audio group so that it could watch for changes in the media folders

$ sudo…

Part 3 — MPD

So now to make as the big boys I want to add MPD to manage my music library, but I can’t have the database managed by the Pi for various reasons:

  • Initial scan is very long because of the number of files I have, they are located on an NFS share which makes each file access longer
  • Setting up correct folder permissions from NFS seemed impossible to me, and it prevented MPD database from updating automatically.
  • Manual update of database was also very long and often ended up with a corrupted db file, ending up with me giving up on…

Part 2 — Pulseaudio TCP

Since Bluetooth and Pulseaudio now works, we can get on making the latter available on network. And it’s actually pretty easy

$ sudo apt install pulseaudio-module-zeroconf

In /etc/pulseaudio/, all you need to do then is adding the following lines according to your own network

load-module module-native-protocol-tcp auth-ip-acl=;
load-module module-zeroconf-publish

On my clients, I also install pulseaudio-zeroconf and Avahi for service discovery according to their system.

$ sudo pacman -S pulseaudio-zeroconf avahi nss-mdns #archlinux
$ sudo dnf install pulseaudio-module-zeroconf avahi #fedora
$ sudo apt install pulseaudio-module-zeroconf avahi #debian

Then, on your clients you can use paprefs to enable network discovering



Part 1 — Bluetooth

Given my prior experience, I wanted to start by the bluetooth sink. It’s my first priority to connect my amplifier and I felt it would be easier to configure the rest of my requirements according to bluetooth constraints. I found an excellent guide for the bluetooth setup, which really covered all my bluetooth needs:

  • configuration of bluetooth as audio sink with Pulseaudio
  • start Pulseaudio on boot
  • authentication though Pin code
  • post mentions some additionnal configuration with AVRCP to control volume, but it seemed to work out of the box for me, so I’ll leave it out here

First thing we…


A few years ago I bought a Raspberry Pi model B+ and a cheap mini bluetooth adaptor with the idea in mind to create a network audio server out of it and make any audio player available on IP and bluetooth. I quickly realized the Pi native jack output was crap and added a Hifiberry DAC+ Pro, a high-resolution digital-to-analog converter which connects directly on top of the Pi. I put everything in a nice wooden case and began my long journey to make the best of it.

My Pi in its natural state

Over the years, I tried many solutions like Volumio (3x times), RuneAudio

Mathieu Requillart

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store