Upgrade MusicLounge Server Editon 2021 To Editon 2023
# be sure to resize (expand) your data partition
# Odroid C4 with Armbian
$ sudo systemctl enable armbian-resize-filesystem
$ sudo reboot
# Raspberry PI 4 with RaspPI OS, simply run raspi-config and select Advanced Options > Expand Filesystem and reboot
$ 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 https://www.lesbonscomptes.com/pages/signatures.html
# download lesbonscomptes.gpg and copy to /usr/share/keyrings/
$ cd ~/Downloads/
$ sudo cp lesbonscomptes.gpg /usr/share/keyrings/
# update buster (ed. 2021) pkgs, the distro must be up to date
$ 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
$ sudo apt upgrade
# make a full upgrade to be sure
$ sudo apt full-upgrade
# run update again and you should read
# All packages are up to date.
$ sudo apt update
# now update sources list
$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*.list
# update to bullseye sources.list with the entries below
$ sudo nano /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free deb-src http://deb.debian.org/debian bullseye main contrib non-free deb http://deb.debian.org/debian bullseye-updates main contrib non-free deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free deb http://deb.debian.org/debian bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free deb-src http://security.debian.org/debian-security/ bullseye-security main contrib non-free
# check and update upnpcli source list
$ sudo nano /etc/apt/sources.list.d/*
deb [signed-by=/usr/share/keyrings/lesbonscomptes.gpg] http://www.lesbonscomptes.com/upmpdcli/downloads/debian/ bullseye main deb-src [signed-by=/usr/share/keyrings/lesbonscomptes.gpg] http://www.lesbonscomptes.com/upmpdcli/downloads/debian/ bullseye main
$ sudo apt clean
$ 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
[default=N]
$ sudo apt upgrade
# may require to remove gcc 8 base if the command failed during upgrade because of libc6-dev
$ 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
$ sudo apt full-upgrade
# run update again and you should read
# All packages are up to date.
# otherwise run $ sudo apt full-upgrade AGAIN
$ sudo apt update
# cleanup pkgs
$ sudo apt autoremove -y
# reboot
$ sudo shutdown -r now
# MPD Upgrade
# check the latest release version available on offical website musicpd.org
# for example to download and extract release 0.23.12 in mpd-0.23.12/
$ cd ~/Downloads/
$ sudo wget https://www.musicpd.org/download/mpd/0.23/mpd-0.23.12.tar.xz
$ sudo tar xf mpd-0.23.12.tar.xz
# or get the very latest (unstable dev release) by cloning the MPD git to MPD/
$ sudo git clone https://github.com/MusicPlayerDaemon/MPD.git
#
# 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
$ sudo systemctl enable mpd
$ sudo systemctl start mpd
$ sudo reboot
# check mpd
$ sudo systemctl status mpd
# myMPD Upgrade
$ cd Downloads/
# rename current directory if exists
$ 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
$ sudo systemd-run -t -p DynamicUser=yes -p StateDirectory=mympd -p CacheDirectory=mympd /usr/bin/mympd -c
# change port to 8080
$ sudo nano /var/lib/mympd/config/http_port
# deactivate SSL (false)
$ sudo nano /var/lib/mympd/config/ssl
# enable and start service
$ sudo systemctl enable mympd
$ sudo systemctl start mympd
$ sudo reboot
# check
$ sudo systemctl status mympd
# Raspotify Upgrade
# Install latest version of Raspotify on armhf
# before installing purge old version of raspotify
$ sudo apt purge raspotify
# attention on amd64 you need to remove the Raspotify docker image
$ sudo docker stop spot
# list images
$ sudo docker images
# get IMAGE ID and remove it
$ 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 https://dtcooper.github.io/raspotify/install.sh | sh
# Edit Raspotify configuration:
$ sudo nano /etc/raspotify/conf
# and change these options only
LIBRESPOT_DEVICE_NAME="MusicLounge" LIBRESPOT_BITRATE="160" LIBRESPOT_DEVICE="plughw:1,0"
# CTRL+O to save
# CTRL+X to exit
# now enable and start the service
$ sudo systemctl daemon-reload
$ sudo systemctl enable raspotify
$ sudo systemctl start raspotify
$ sudo reboot
# check the status
$ sudo systemctl status raspotify
#
# TROUBLESHOOTING
# 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
$ sudo nano /etc/raspotify/conf
#LIBRESPOT_DISABLE_CREDENTIAL_CACHE= ... # Disable zeroconf discovery mode. LIBRESPOT_DISABLE_DISCOVERY= ... LIBRESPOT_USERNAME="...." LIBRESPOT_PASSWORD="...."
# NGINX
# check nginx service
$ sudo systemctl status nginx
# in case of error
nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
# make the following changes:
$ sudo mkdir /etc/systemd/system/nginx.service.d
$ sudo nano /etc/systemd/system/nginx.service.d/override.conf
# enter these lines
[Service] ExecStartPost=/bin/sleep 0.1
# CTRL + X and Y to SAVE
$ sudo systemctl daemon-reload
$ sudo reboot
# open the ssh session and check the status
$ sudo systemctl status nginx
# check the status of minidlna service
$ 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
$ sudo nano /lib/systemd/system/minidlna.service
# and replace autofs by autofs.service
# CTRL + X and Y to SAVE
$ sudo systemctl daemon-reload
$ sudo reboot
# 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!