Building a Logitech Media Server using a Raspberry Pi and HifiBerry DAC

Recipe for building a high-end media server using Logitech Media Server and a HifiBerry DAC+ Pro, Spotify, YouTube using a USB CD/DVD player.
Originally I started this page as a log book for myself. There is so much to configure!

Alternatives (in most cases much easier then what is presented here): PicorePlayer and Max2Play.

This manual is useful if you need to install Node-Red for controlling room correction filters.
HifiBerry has released new and better DAC boards which I didn't tried out yet.

The HifiBerry DAC+ DSP allows you to do room correction. 
And there is still an issue: when music is very soft (e.g. speech or meditative music), the output is muted shortly, which is very annoying.
No real solution has been published yet. See also:
t seems as if the guy with the DSP knowledge has left the company?



How does the HifiBerry DAC+ Pro sound?

After the modification (see below), it sounds fabulous!
At first, I compared the HifiBerry DAC+ Pro against my other media player with a high-end DAC ("B-DAC", 1200 euro).
Unfortunately, the difference was rather big: the stereo image was not very detailed and it sounded a bit dull.
I think the reason for this is the noisy power supply of the Raspberry Pi.
Although the board has a buit-in voltage regulator, this does not work well for high frequency noise that comes from the power supply.
So adding a passive filter before the voltage regulator assures that the noise from the Raspberry doesn't reach the DAC.
Adding this filter improved the audio quality a lot! I cannot tell the difference with the high-end DAC anymore!

So how do you do this for the DAC+ Pro?
First you have to remove R14 (0 Ohm) SMD resistor.
The filter consists of an inductor two ceramic capacitors, a resistor of 22 Ohm and two capacitors of 4700 uF/10V (Conrad art.number 422027).
The inductor and resistor are placed in series and replace R14.
The ceramic capacitor is connected between the connection of inductor and resistor and ground.
The two capacitors of 4700 uF are placed in parallel after the resistor and connected to ground.
Check that the electrotrolytic capacitors are mounted with the right polarity!

Do not place the capacitor at the right hand side above de DAC chip!
The capacitor might become too hot and start leaking and thus damaging the print.

Or use the following board:


Which storage devices can I use?

Probably the best and cheapest way is to use an USB SSD drive.
SSD drives are much faster, more reliable when powering off and have a longer lifetime.
Booting from SSD is supported by Raspberry Pi models 3B and 4.
Probably it is wise to make two partitions. One for the OS and one for the music.
In this way it is easy to make a backup of the OS partition.

Currently, I use a small (16Gb) high quality SD card for the OS and applications only.
Two 256 Gb SD cards in the USB slots are used to store the music files (but you could use one 512 Gb SD card as well).
Also it is possible to use one big internal SD card.

Although it didn't happen to me, SD cards can get corrupt when the power is disconnected.
Therefore I make a backup image of the small SD card.


How to install the Operating System



How to install Logitech Media Server

Install Media Server (see this link):

You can uninstall as follows: sudo apt-get purge logitechmediaserver

To install an older version:


How to install the SqueezeLite music player

Install Squeeze Lite (see this link).
Alternatively (I did not yet tried out): enable the "Local player" plugin.

mkdir squeezelite
cd squeezelite
sudo wget -O squeezelite-armv6hf.tar.gz
# for newest version see:

tar -xvzf squeezelite-armv6hf.tar.gz
mv squeezelite squeezelite-armv6hf
sudo mv squeezelite-armv6hf /usr/bin
sudo chmod a+x /usr/bin/squeezelite-armv6hf
cd /home/pi/squeezelite
sudo wget
sudo mv /usr/local/bin
sudo chmod a+x /usr/local/bin/
sudo wget
sudo mv /etc/init.d/squeezelite
sudo chmod a+x /etc/init.d/squeezelite
sudo wget
sudo mv squeezelite.service /etc/systemd/system
sudo systemctl enable squeezelite.service
cd /home/pi

Find your USB card name: sudo /usr/bin/squeezelite-armv6hf -l
For the HifiBerry DAC+ Pro you should see "sndrpihifiberry" listed. For HifiBerry DAC+ DSP it is not yet listed.
If not (e.g. with older HifiBerry cards, hardware version 2.2), then (see:

Edit the script:sudo leafpad /usr/local/bin/ 

You might need to disable the driver for the build-in audio:






How to install Samba (file sharing)

Install and configure Samba using this link or this link:


How to automatically reboot the system every night

Rebooting the system at night (e.g. at 5 am) can improve stability:


How to prepare a large (256Gb) intern SD  card

Instead of a small (8Gb) SD card and an external disk you can use a large internal SD card.
Even 512 Gb SD cards are cheap enough to buy now.
Suppose a configured image file of 8 Gb is available on your Windows PC.
With Win32 Disk Imager, the image is copied to the SD disk.
With Windows Disk Management you can now see a FAT boot partition of 42 Mb.
Next to that you will see a 7.4 Gb partition (containing the Raspbian OS).
And next to that you will see an unallocated partition of 231 Gb.
The unallocated partition must be formatted, preferably with NTFS on Windows, otherwise with exFAT on a Mac.
When formatted, put the SD card in the Raspberry.
You can find the name of the disk/device using the "df" command.
Create folder for mount point on the :
sudo mkdir /media/internaldisk
sudo chmod 777 /media/internaldisk
sudo mkdir /media/internaldisk/Music
sudo chmod 777 /media/internaldisk/Music
sudo leafpad /etc/fstab

Add line:
/dev/mmcblk0p3 /media/internaldisk ntfs-3g defaults,nofail 0 0

if the partition was formatted with exFAT, then add the following line instead:
/dev/mmcblk0p3 /media/internaldisk vfat defaults,nofail 0 0

Add section for network share:

sudo leafpad /etc/samba/smb.conf
Add section:
comment=Raspberry Pi Media Share
only guest=no
create mask=0777
directory mask=0777
After Logitech Media Server has started, you can configure the new media folder ("media/internaldisk").


My basic setting page looks like this (support internal dis and external USB disk):


How to prepare for an external USB disk/Memory stick

 Prepare the SSD/USB disk e.g. on Windows:

I found, that when having two USB memory sticks, one was not always mounted.
A solution may be, is to add the line boot_delay=3 to /boot/config.txt

Add section for network share:
sudo leafpad /etc/samba/smb.conf
Add section:
comment=Raspberry Pi Media Share
only guest=no
create mask=0777
directory mask=0777

If you have a second USB stick, you can create folders and a share in the same way (e.g. /media/usbdisk2).


How to add a new USB memory stick

If you want to add or replace the USB disk/memory stick, while the software on Raspberry already has been configured:

If the disk was formatted with exFAT, you have to modify file "/etc/fstab":


How to use a NAS for storage

Instead of using local storage for the music, you could use an existing NAS.
Suppose the location of the NAS is: //
Preferrably you should use a name instead of the IP number.
Now enter the following commands to test the connection:

You can now configure Logitech Media Server with the location of the music (/media/nas)

To mount the NAS automatically at boot time do:


How to configure Spotty plugin

You need Spotify Premium account to get this working.
With the latest version of Logitech Media server, the Triode Spotify plugin is not supported anymore.
Instead , you can install the Spotty plugin.

But first you have to install (may be not necessary anymore):

How to control Spotify

After installing the Spotty plugin, there are two ways to use Spotify:


How to configure the YouTube plugin

With the YouTube plugin you can play a lot of music without commercials and for free.
You can enter a search string and there is a history of what you have played.
For configuration, using your Google account, you need to get a:

In the Settings of this plugin it is described how to get these. But it may not be easy.


How to configure Jivelite

JiveLite is a graphical user interface for LMS. It runs on a 7" Raspberry Pi touchscreen.
You can configure the icons by pressing on an icon a bit longer.
In Settings you bring back hidden icons to the main screen.
A Home button is missing unfortunately, but the function is available by pressing long on the backbutton.

When using JiveLite on another Raspberry Pi (not where the LMS is installed), it is probably handy to use PiCorePlayer that has buildin suppport for JiveLite.

sudo apt-get install git libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libexpat1-dev

git clone
cd luajit-2.0
sudo make install
sudo ldconfig

git clone
cd jivelite
cd ..
sudo mv ./jivelite /opt

sudo leafpad ./

Add contents:

sudo chmod +x ./

mkdir /home/pi/.config/openbox

Change some element in order to create file: openbox/lxde-pi-rc.xml

Information about autostart can be found here:,It%20then%20looks%20for%20.

leafpad /home/pi/.config/openbox/lxde-pi-rc.xml

Insert the following section within the "applications" section:

   <application name="jivelite">

mkdir .config/autostart

leafpad .config/autostart/jivelite.desktop
Add the following text:
[Desktop Entry]

When configuring JiveLite, select: grid skin 800x480
You can change the skin in: Settings --> Display --> select skin

Show time when playing stopped:
Settings --> Display > Screensaver --> When stopped > some clock
You can also adjust the delay (default 30 seconds).

By default, a screen saver is enabled in the operating system. 
This can be disabled in the Raspberry Pi Configuration: Display --> disable Screen blanking



SqueezePlay is no longer working on my Windows 10 PC. No idea why. 
Alternatively, try SqueeLite-X app on Windows or use the browser.

SqueezePlay is also a graphical user interface for LMS, but it runs on Windows, Linux, Mac.

Download from: LMS Clients - Browse /squeezeplay at



From the Microsoft Store, install SqueezeLite-X.
It looks the same as the browser.


How to configure a CD player

You can attach a USB DVD player/burner to play audio CD's.
The advantage is that you do not need a preamplifier to switch between the Raspberry and CD player.
We found however that such a PC DVD player is a bit noisy sometimes and not always reliable. But you can give it a try.
The Raspberry is not capable of supplying enough current via the USB port.
So either use an external drive with own power supply (there are a lot of secondhand available) or use a powered USB hub.
Be sure to disable the power connector pin in the USB connector (e.g. by using tape).
I prefer the old drives because they are heavy. Modern lightweight drives have to be operated with two hands.

Before you can use the CDPlayer plugin, you must run the following commands to install the cdda2wav tool in this way:

Next you must enable the CDPlayer plugin:
From any browser: use the IP address of the raspberry followed by ":9000". E.g.:

In Settings, you must select the database to use: "Lookup CDs on MusicBrainz".

I found out that the Raspberry did not boot in combination with a Soundblaster USB dongle when the CD drive was powered on.
It did boot when the CD drive was powered off during booting however.

When you want to play the whole CD, you cannot do this by starting the first track.
In order to play the whole CD, click on the + symbol right to the CD title.

Note that the + symbol is not available on Jivelite.
A solution ( can be found here:
Announce: CDplayer plugin - Page 61 (
File location to patch: /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/CDplayer

This solution works if you long press the disc title (mediabrainz result or raw CD) and click "play now". It does not work if you click on the first song.
For some reason, LMS doesn't show a header inside the playlist allowing to play all songs for opml playlists.


How to set the volume to maximum?

* sudo apt-get install pimixer

Run pimixer (or alsamixer)

Use arrow up/down or PgUp/PgDn keys to adjust the volume


How to control the Logitech Media Server

Apps on Android: "Squeeze Ctrl" (the most user friendly one), "Squeeze Controller" (OK and free) and " "Squeezer" (OK and free).
Apps for iPhone/iPad: "iPeng" (difficult to configure home screen), "SqueezePad" (for iPad only).
From any browser. Use the IP address followed by ":9000". E.g.:


Use ethernet cable or Wifi?

Using a network cable is highly preferable above a wifi connection:


Slow Wifi?

The internal Wifi of a Raspberry Pi is slow.
The best alternative is to buy an fast (300 Mbps) external USB Wifi dongle.

How to configure the Wifi connection?

You can configure the Wifi connection by attaching a keyboard, mouse and HDMI monitor.
In the upper right corner you will see the Wifi icon which allows you to configure the Wifi connection.
But your monitor might not have a HDMI connection. So here is an alternative using a PC or tablet.


How to put your music on the server 

On a Windows PC: 


How to synchronize with the music collection on a PC

For reliability reasons it is important to have a copy of your music collection somewhere else.
Suppose you have your master collection on a Windows PC in folder "c:\MyMusic".
And the music on the Rasperry is accessible via share \\RaspberryPi\InternalDisk\Music.
Then you can use the following batch file to make a copy (mirror) of the files from the PC on the Raspberry:

robocopy.exe "c:\MyMusic" "\\RaspberryPi\InternalDisk\Music" /MIR


Help: the radio does not work

Sometimes no music is heard when a radio channel is selected (e.g. NPO radio 4).
The reason is that the default format of the stream for the selected radio is not supported by Logitech Media Server.
The solution is to select another stream format. This is how:

 This is the list I added for my music server:


How to remote shutdown the Raspberry from your smartphone

It is always safer to shutdown the Raspberry Pi than removing the power directly.
This reduces the risk of damaging the SD card.
This can be easily accomplished by installing Node-RED and creating a simple program to shutdown the Raspberry.
With Node-RED it is simple to create a web page with just a shutdown button.
Using the browser on your smartphone you can pin this application to the start screen.

See section: HifiBerry DAC+ DSP filter selection


Backup the image

Before you make a backup of the SD card, you may want to shrink it (e.g. to about 7Gb).
This can be done by installing the tool "gparted" on the Raspberry Pi.
You cannot shrink the running SD card.
The SD card must be put in an USB adapter inserted in a USB port.

Creating the image will take some time.
Therefore it is important to backup the image of the SD card to file.
On Windows you can use "Win32DiskImager".
You can also use the exisiting "SD card copier" application (in Accessories) on the Raspberry Pi.

I found that after putting in a copy of the SD card, Logitech Media Server only worked well after rebooting once.


Room correction

Better than doing room correction by software is to treat the room. For instance with an acoustic ceiling (e.g. stosilent).

The HifiBerry DAC+ DSP allows you to do room correction.

When you unplug the power of the Raspberry Pi without a proper shutdown, you might get a problem with this card.
I got error message: "10 filters given, but filter bank has only 0.0 slots." The Hifiberry forum shows that that many people have encountered the same issue.
The solution is to:

1. Load dacdsp-default.xml

2. Persist profile to EEPROM

3. Shutdown the Raspberry

4. Unplug power and reconnect power again.


For configuration see the next chapter.


The Inguz plugin does not work any more because it relies upon an old version of Mono.
Also it works only for FLAC files of your own music collection.
So, it does not work for the other sources (Spotify, radio, CD).
Still you could install it because of the test signals it supplies (see below).

An alternative plugin for Room Correction is:
See also:
t is faster than Inguz plugin but it is complicated to configure. 


HifiBerry DAC+ DSP configuration

For making a DSP profile file I ordered the following hardware for my laptop:
* USB-C DAC Toslink Optical AUX Audio Adapter 192kHz 24bit Headset Amplifier USB Sound Card

* 2M Mini 3.5mm Plug Digital Optical Audio Cable SPDIF Optical Fiber Line To Round Mouth TOSLINK Optical Audio Connector Dropship
* miniDSP UMIK-1 Omni-Directional USB Measurement Calibrated Microphone or Dayton Audio UMM-6 measuring microphone UMM-6

I found some issues during installation and configuration. Answers can be found on the Community pages (strangely enough not in the documentation).

After mounting the board, checkout:

It says that you must modify /boot/config.txt:
* sudo leafpad /boot/config.txt
* add line: 

The next step is to follow the installation instructions in:
or, on Github:
Currently there are small differences between these two documents.

Install the dsptoolkit:

* bash <(curl
You will see that the last command fails: mv: failed to preserve ownership for '/boot/config.txt': Operation not permitted
This error message can be ignored and is due to the fact that the boot folder is on a FAT partition.
* sudo leafpad /boot/config.txt
* Assure that the following line exists: dtparam=spi=on

Reboot the Raspberry Pi.

The DSP is loaded with some profile in the factory.
When you would install a filter right now, you get error message: "15 filters given, but filter bank has only 0 slots".
Therefore you have to install the default profile first: 
* dsptoolkit install-profile

I found that sometimes after a power down, I cannot load filters any more. I had to reinstall the profile and reboot the Raspberry Pi!
This command seems to help: dsptoolkit store
The documentation of the dsptoolkit is not very clear about this:

Note that the colors of the output connectors (red, white) on the DAC board are wrong. They should be reversed. So red is left!

This profile has an automute function. This gives a problem if you play the music (or radio) very softly.
This is very annoying. In the Community pages of this issue is mentioned and it is advised to load profile dspdac-noautomute.xml.
However, this profile creates a DC offset of 1V at the output. No idea why. This gave me a problem with my amplifier. The profile also does not work.
I made an issue for this. This is there answer: "
We don't work on this profile anymore. The profile is provided as-is. There won't be any further updated from us on this profile."

The next thing to do is to download the program REW and create your profile as described in this documentation.
Note that the DSP supports 16 filters at maximum.
You might prevent REW creating more filters by disabling 5 filters in the Settings menu.
The nice thing is that you can modify the desired curve. You can filters with different slopes and try out what sounds best for you.

For creating your own profile, see this documentation.
Sample profiles can be found here.
Sample profiles projects can be found here.



And the result in one word: fabulous!


HifiBerry DAC+ DSP filter selection

Once you have created one or more room correction filters, you want to be able to select them from your phone or tablet.
This can be easily accomplished by a simple program in Node-RED.

You can follow these steps:

Create a folder for the filter files and export this folder via Samba:

* sudo mkdir /media/internaldisk/roomcorrection
* sudo chmod 777 /media/internaldisk/roomcorrection
* sudo leafpad /etc/samba/smb.conf

Add following section and reboot afterwards:
 comment=Room correction files
 only guest=no
 create mask=0777
 directory mask=0777

Install Node-RED:

* sudo apt-get update
* sudo apt-get upgrade
* bash <(curl -sL
* sudo systemctl enable nodered.service
* reboot

By adding a setting in settings.js, flow variables are saved automatically every 30 seconds:
* leafpad .node-red/settings.js
Add setting:
    contextStorage: { default: { module:"localfilesystem" }, },

Now it is time to reboot the Raspberry.

Show the editor: launch a web browser and type in the address bar: <ip address raspberry>:1880

Install "Dashboard" plugin: click on the menu button (three horizontal line in upper right corner) and Manage Palette.
Click on "Install" and type "dashboard" in the search bar. Install: node-red-dashboard

Import the program: click on the menu button (three horizontal line in upper right corner), Import and paste the code from this file.

Install the program: click on the Deploy button in the upper right corner.

Show user interface in your browser: launch a web browser and type in the address bar: <ip address raspberry>:1880/ui
Your browser on your phone and tablet has an option to add this page to your start screen. 
Now it behaves as an app. It has three tabs (or pages). One allows you to shutdown/reboot the Raspberry.

Example screenshot


HifiBerry DAC+ DSP power supply modification

3D printed case for Raspberry Pi 3B and HifiBerry DAC+ DSP, designed by Alfred Homsma. You can download the 3D files here.



This DAC supports room correction.

Although the board has a voltage regulator, this does not work well for higher frequencies.
So adding a passive filter before the voltage regulator assures that the noise from the Raspberry doesn't reach the DAC.

Due to the DSP, the power consumption of this model is higher than the DAC+ Pro.
Therefore the resistor of 22 Ohm is not possible here.
The 3.3V input regulator on the board requires an input voltage of at least 4.2 V.
The Raspberry Pi voltage is at least 5.1V.
Therefor the voltage drop over the inductor is about 0.9V.
With an average current consumption of 0.2A, the resistance of the inductor should be no more than 4.5 Ohm.
The pin layout of the Raspberry Pi can be found here.
Do not place the capacitors above the hot electronic devices (voltage regulators)!

First cut the +5V track.
The filter consists of two inductors of 470 uH and two capacitors of 4700 uF/10V (Conrad art.number 422027).




How to configure the Inguz EQ plugin

Currently, I cannot get it working. An older version of Mono is required!

I tried with the following instructions, but without succes:

I think that it is only useful for the test signals. The room correction can be done better with the Hifiberry DAC+ DSP.

Inguz EQ is a plugin for supplying equalizer functionality and DRC (Digital Room Correction).
It also supplies test signals like left/right identifier, noise, etc. Very nice!
Those test signals are a good reason to install this plugin anyway!
Once installed, you can find them in menu: Extras --> EQ --> Settings --> Test Signals

You can find the software here:

There is no support any more for this plugin unfortunately.
Note that a small change in the file is required for LMS version 7.9.1.

How to install the Inguz EQ plugin:

First, update the OS:
sudo apt-get update
sudo apt-get upgrade
Now get Mono (this supplies .NET functionallity):

TODO we need an older version of mono. The next line will install the latest mono version!
sudo apt-get install mono-complete



Download two zip files: EQ processor and DSP processor from:
After downloading you will find the downloads in: /home/pi/Downloads
In File Manager right click on the file and do: Extract here (extracts a folder).
In File Manager right click on the file and do: Extract here (extracts 3 files).

sudo mv /home/pi/Downloads/InguzEQ /usr/share/squeezeboxserver/Plugins
sudo chown squeezeboxserver /usr/share/squeezeboxserver/Plugins/InguzEQ
sudo mv /home/pi/Downloads/InguzDSP.exe /usr/sbin
sudo mv /home/pi/Downloads/InguzDSP.exe.config /usr/sbin
sudo mv /home/pi/Downloads/DSPUtil.dll /usr/sbin
cd /usr/sbin
sudo chmod +x DSPUtil.dll
sudo chmod +x InguzDSP.exe
sudo mkdir /usr/share/squeezeboxserver/.wapi
sudo chown squeezeboxserver /usr/share/squeezeboxserver/.wapi

Now create the file /usr/sbin/InguzDSP:
sudo leafpad /usr/sbin/InguzDSP
Enter contents:
#! /bin/sh
mono /usr/sbin/InguzDSP.exe $* 2>/usr/share/InguzEQ/error

sudo chmod +x /usr/sbin/InguzDSP
sudo chmod 777 InguzDSP

There is some deprecated code in that prevents the plugin from starting.

sudo leafpad /usr/share/squeezeboxserver/Plugins/InguzEQ/
Change line 3138 to ("%h->" change to "$h"):

         $request->addResultLoop( 'Points_loop', $cnt, $ff, $h{$ff} );

In Settings of LMS enable the EQ plugin.
Note that the user interface is crippled because no Silverlight can be installed (not a real issue).

Multiple reboots might be needed in order to get it working (it did not the first time with me).
Configuration and log files are created in: /usr/share/InguzEQ

The equalizer settings files are created in:

To restart the Logitech Media Server:
sudo service logitechmediaserver stop
sudo service logitechmediaserver start

You cannot configure the plugin from the browser anymore because this requires SilverLight (which is deprecated).
But you can configure the plugin (equalizer, room correction) from your app on your phone or tablet.

Create a folder for the room correction files:
sudo mkdir /usr/share/InguzEQ
sudo chmod 777 InguzEQ
sudo mkdir /usr/share/InguzEQ/Impulses

When sharing this folder for everyone, also change the folder permission:
sudo chmod 777 /usr/share/InguzEQ/Impulses

Make a share for the room correction Impulses folder:
sudo leafpad /etc/samba/smb.conf
Add section:
 comment=Room correction files
 only guest=no
 create mask=0777
 directory mask=0777


How to create a DRC correction file for InguzEQ

This can be done using one of the following tools:

For Inguz EQ plugin, room correction files (44100 hz) must be saved to: /usr/share/InguzEQ/Impulses