MusicLounge: Upgrade Server To Editon 2023

Upgrade MusicLounge Server Editon 2021 To Editon 2023

# Important Notice: The image disk of the 2023 edition for Raspberry PI 4, Odroid C4 and amd64 platform are available for download HERE.
# follow the instructions below to upgrade your edition 2021 of MusicLounge. The audiophile server must be already installed and operational.
# be sure your data partition is resized
# Odroid C4 with Armbian

  1. $ sudo systemctl enable armbian-resize-filesystem
  2. $ sudo reboot

# Raspberry PI 4 with RaspPI OS, simply run raspi-config and select Advanced Options > Expand Filesystem and reboot

  1. $ sudo raspi-config

# expanding your partition during the boot can take a while (depending the size of your SD Card) so be patient,

# at first boot you should see

Usage of /: 71% of 3.7G

# after expansion on 16GB SD Card

Usage of /: 19% of 14G

# for debian amd64 expand your hard drive if needed using gparted on live distro or from desktop PC is easy
# first move the swap sda2 to end and then resize sda1
# click this link to read the tutorial to expand your disk with GParted

# First, ensure your system is up-to-date in it’s current release.
# update unpncli signature
# go to
# download lesbonscomptes.gpg and copy to /usr/share/keyrings/

  1. $ cd ~/Downloads/
  2. $ sudo cp lesbonscomptes.gpg /usr/share/keyrings/

# update buster (ed. 2021) pkgs, the distro must be up to date

  1. $ sudo apt update

# now upgrade pkgs, during installation
# keep local smb.conf
# choose the internal hard drive /dev/sda to install grub if needed (and NOT /dev/sda1)
# otherwise select [default=N] reply

  1. $ sudo apt upgrade

# make a full upgrade to be sure

  1. $ sudo apt full-upgrade

# run update again and you should read
# All packages are up to date.

  1. $ sudo apt update

# now update sources list

  1. $ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
  2. $ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*.list

# update to bullseye sources.list with the entries below

  1. $ sudo nano /etc/apt/sources.list
deb bullseye main contrib non-free
deb-src bullseye main contrib non-free
deb bullseye-updates main contrib non-free
deb-src bullseye-updates main contrib non-free
deb bullseye-backports main contrib non-free
deb-src bullseye-backports main contrib non-free
deb bullseye-security main contrib non-free
deb-src bullseye-security main contrib non-free

# check and update upnpcli source list

  1. $ sudo nano /etc/apt/sources.list.d/*
deb [signed-by=/usr/share/keyrings/lesbonscomptes.gpg] bullseye main
deb-src [signed-by=/usr/share/keyrings/lesbonscomptes.gpg] bullseye main
  1. $ sudo apt clean
  2. $ sudo apt update

# IMPORTANT: on any error fix your sources list before going further

# say YES for restarting services automatically
# for all request (i.e. update conf files) during the upgrade say no

  1. $ sudo apt upgrade

# may require to remove gcc 8 base if the command failed during upgrade because of libc6-dev

  1. $ sudo apt-get remove libgcc-8-dev

# for all request during the upgrade say ‘n’
[default=N] # and obviously keep smb.conf
# make a full upgrade

  1. $ sudo apt full-upgrade

# run update again and you should read
# All packages are up to date.
# otherwise run $ sudo apt full-upgrade AGAIN

  1. $ sudo apt update

# cleanup pkgs

  1. $ sudo apt autoremove -y

# reboot

  1. $ sudo shutdown -r now

# MPD Upgrade
# check the latest release version available on offical website
# for example to download and extract release 0.23.12 in mpd-0.23.12/

  1. $ cd ~/Downloads/
  2. $ sudo wget
  3. $ sudo tar xf mpd-0.23.12.tar.xz

# or get the very latest (unstable dev release) by cloning the MPD git to MPD/

  1. $ sudo git clone

# notice: libboost-dev dependency is no longer needed
# read the mpd tutorial to compile and install the latest version of MPD (version 0.23.12 or greater)

# after compilation and installation enable and start the service

  1. $ sudo systemctl enable mpd
  2. $ sudo systemctl start mpd
  3. $ sudo reboot

# check mpd

  1. $ sudo systemctl status mpd

# in case of error (generally occurs within 5s just after playing) :

alsa_output: Decoder is too slow; playing silence to avoid xrun

# adding the following lines to all your audio output in mpd configuration (/etc/mpd.conf) may help

buffer_time "200000"
period_time "5084"

# edit mpd.conf and scroll to audio output area to add the 2 lines

  1. $ sudo nano /etc/mpd.conf
audio_output {
type "alsa"
name "Default"
device "hw:1,0"
mixer_type "none"
dop "no"
buffer_time "200000"
period_time "5084"

audio_output {
type "alsa"
device "hw:1,0"
mixer_type "none"
dop "yes"
buffer_time "200000"
period_time "5084"

# in case of non fatal binding error

server_socket: bind to '' failed (continuing anyway, because binding to '[::]:8000' succeeded): Failed to bind socket: Address already in use

# a binding already exists due to ipv6, however mpd is running correctly. if you do not need ipv6 support follow these instructions to disable it by using sysctl command and by adding the kernel option ipv6.disable=1
# edit your nginx.conf to remove ipv6 listening by
# commenting listen [::]:80 default_server; on server block

  1. $ sudo nano /etc/nginx/sites-available/default
server {
        listen 80 default_server;
#       listen [::]:80 default_server;

# myMPD Upgrade

  1. $ cd Downloads/

# rename current directory if exists

  1. $ mv myMPD/ myMPD-10.1.7/

# read the myMPD tutorial on website
# to compile and install the latest version of myMPD (version 10.2.0 or greater)
# after compilation and installation generate the config files

  1. $ sudo systemd-run -t -p DynamicUser=yes -p StateDirectory=mympd -p CacheDirectory=mympd /usr/bin/mympd -c

# change port to 8080

  1. $ sudo nano /var/lib/mympd/config/http_port

# deactivate SSL (false)

  1. $ sudo nano /var/lib/mympd/config/ssl

# enable and start service

  1. $ sudo systemctl enable mympd
  2. $ sudo systemctl start mympd
  3. $ sudo reboot

# check

  1. $ sudo systemctl status mympd

# Raspotify Upgrade
# Install latest version of Raspotify on armhf
# before installing purge old version of raspotify

  1. $ sudo apt purge raspotify

# attention on amd64 you need to remove the Raspotify docker image

  1. $ sudo docker stop spot
  2. $ sudo docker rm spot

# list images

  1. $ sudo docker images

# get IMAGE ID and remove it

  1. $ sudo docker rmi IMAGE_ID

# if docker is no longer used you can remove it as well
# for more info see the tutorial on page:
# MusicLounge: Spotify Connect (On amd64 Distro Using Docker)
# docker image is now removed
# to install Raspotify type the following command:

$ sudo apt-get -y install curl && curl -sL | sh

# Edit Raspotify configuration:

  1. $ sudo nano /etc/raspotify/conf

# and change these options only


# CTRL+O to save
# CTRL+X to exit
# now enable and start the service

  1. $ sudo systemctl daemon-reload
  2. $ sudo systemctl enable raspotify
  3. $ sudo systemctl start raspotify
  4. $ sudo reboot

# check the status

  1. $ sudo systemctl status raspotify

# in case of warning related to libmdns

WARN  libmdns::fsm] dropping truncated packet from 192.168.x.x:5353

# this error is probably due to a bad implementation of mDNS in your router,
# you may update your router firmware or disable zeroconf (librespot discovery) and
# add your credentials to the Raspotify config
# edit conf and enable credential cache, disable discovery
# add your Spotify username and password

  1. $ sudo nano /etc/raspotify/conf
# Disable zeroconf discovery mode.

# check nginx service

  1. $ sudo systemctl status nginx

# in case of error

nginx.service: Failed to parse PID from file /run/ Invalid argument

# make the following changes:

  1. $ sudo mkdir /etc/systemd/system/nginx.service.d
  2. $ sudo nano /etc/systemd/system/nginx.service.d/override.conf

# enter these lines

ExecStartPost=/bin/sleep 0.1

# CTRL + X and Y to SAVE

  1. $ sudo systemctl daemon-reload
  2. $ sudo reboot

# open the ssh session and check the status

  1. $ sudo systemctl status nginx

# check the status of minidlna service

  1. $ sudo systemctl status minidlna

# in case of error related to autofs

/lib/systemd/system/minidlna.service:4: Failed to add dependency on autofs, ignoring: Invalid argument

# edit service to apply this fix

  1. $ sudo nano /lib/systemd/system/minidlna.service

# and replace autofs by autofs.service
# CTRL + X and Y to SAVE

  1. $ sudo systemctl daemon-reload
  2. $ sudo reboot

# check your fstab entry and journalctl (sudo journalctl -f )
# in case of error type:

CIFS VFS: Server 192.168.x.x has not responded in xxx seconds. Reconnecting...

# read carefully the SAMBA tutorial chapter “CIFS Mounts Disconnecting Issue – Read More…” (end of the page)
# otherwise disable the cron job (comment line)

  1. $ sudo nano /etc/cron.d/smb_v1_fix
#*/10 *   *   *   *   root    /home/pi/scripts/ >/dev/null 2>&1

# in case of dhcpcd error type

dhcpcd.service: Failed to locate executable /usr/lib/dhcpcd5/dhcpcd: No such file or directory

# check if you have an error in the status of the service

  1. $ sudo systemctl status dhcpcd
Failed to start DHCP Client Daemon.

# edit the service
# to change ExecStart command to /usr/sbin/dhcpcd -q -w

  1. $ sudo nano /etc/systemd/system/dhcpcd.service.d/wait.conf
ExecStart=/usr/sbin/dhcpcd -q -w

# restart service and check again the status

  1. $ sudo systemctl daemon-reload
  2. $ sudo systemctl restart dhcpcd
  3. $ sudo systemctl status dhcpcd

# check the status of all other services ( airplay, roon, etc.) should be okay

# Congrats!
# Your MusicLounge audiophile server is fully updated to edition 2023
# now update the music library (database)
# use DroidMyMPD or MALP Android client
# or open your browser with http://musiclounge:8080 (or IP address)
# Enjoy!