Notes from a migration of Logitech Media Server from a physical server install running on an ancient Centos 6 server to a dedicated Ubuntu 20.10 LTS LXC container running on a Proxmox 6 host
New server setup
Created a new LXC container on Proxmox, left all as defaults apart from unsetting the 'unprivileged container' checkbox.
apt update /
apt upgrade to get things all up to date
Install required dependencies
apt install perl libssl-dev
Downloaded latest stable Squeezebox server image from http://downloads.slimdevices.com/
Installed the package
dpkg -i logitechmediaserver_8.1.1_amd64.deb
(at this point I got an error as I'd missed the perl installation, so I installed perl and ran
apt --fix-broken install as prompted, the installation was then complete)
rsync the files over
So the installation was now done, but music/playlist files are not available, so I move these over to a folder on the Proxmox host as I have my files saved locally on there.
I ssh onto the Proxmox host and create a local folder in my storage at /data/Audio/SqueezeShare
Then use rsync to copy the SqueezeShare folder from the remote server (in a folder called /usr/media/share/Audio/SqueezeShare) to my server
Syntax below is as follows: rsync source destination -flags
rsync [email protected]:/usr/media/share/Audio/SqueezeShare/ /data/Audio/SqueezeShare -anv
Remote server username and IP/hostname is specified, the flags at the end are;
- -a : archive, copy all files & folders and follow links etc. (basically will grab everything)
- -n : dry-run, this sync won't happen with this flag specified, so use this first time, every time to confirm what's about to happen
- -v : verbose, show whats happening/whats being copied. With the dry-run flag you see the files it will copy, without dry-run it shows what is being copied
That all looked good, so the command is ran again without the -n dry-run flag
rsync [email protected]:/usr/media/share/Audio/SqueezeShare/ /data/Audio/SqueezeShare -av
Proxmox bind mount
So creating the data folder locally on the host maybe isn't the best idea depending on how you manage your data. For me I want the data available to multiple containers and via networking sharing. It's probably more sensible to have LMS music storage within the container for easier backups, or a separate container running Samba/NFS for sharing the folder.
So for my Proxmox specific setup - I mount the host audio location to the LXC container by editing the machine config of the 'squeezebox' container.
First create the mount point on the LXC container, I have created /data/Audio/SqueezeShare (which incidentally matches the host location)
Now the config file needs to be edited, so check the ID in Proxmox GUI, then edit this on the Proxmox host
Add this line
mp0: /data/Audio/SqueezeShare,mp=/data/Audio/SqueezeShare After re-clicking the Resources tab of the machine this is displayed in the Proxmox GUI.
Reboot the squeezbox LXC container for the mount to take effect. Now we can browse to the folder and check that the files are in place.
LMS will now be available either on the IP address of the server or the hostname at port 9000, so for my server I just go to: http://squeezebox:9000 in the browser.
Setup requires mysqueezebox.com account details apparently, so I managed to dig this out of my emails from ~10 years ago and sign in.
Then the media data locations are chosen for Music and Playlists and LMS is ready to go.
Due to this setup there isn't really much extra going on, and not worried about history (if that exists in LMS?) so just skipped this and preferences files. All that remains is to re-enable the BBC iPlayer (now Sounds) app in the Plugins set up, and disable Tidal & Deezer to clean up the interface and it's all done.
One final thing - Squeezebox Server takes the local time of the server and displays that as the current time, so as there is no time setup during this build the time is wrong.
timedatectl is used to check the current time and set timezone settings - running it without arguments displays the current time:
[email protected]:~# timedatectl Local time: Sat 2021-08-07 19:06:31 UTC Universal time: Sat 2021-08-07 19:06:31 UTC RTC time: n/a Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes NTP service: inactive RTC in local TZ: no
timedatectl list-timezones | grep Lon displays a list of all timezones (the grep command limiting the list), I am on UK / British Summer Time so Europe/London is my current timezone. Now set the timezone with
timedatectl set-timezone Europe/London and recheck the time:
[email protected]:~# timedatectl Local time: Sat 2021-08-07 20:11:37 BST Universal time: Sat 2021-08-07 19:11:37 UTC RTC time: n/a Time zone: Europe/London (BST, +0100) System clock synchronized: yes systemd-timesyncd.service active: yes RTC in local TZ: no
Loads of extra support available for Logitech Media Server over on the Slimdevices support forum - forums.slimdevices.com