For years I’ve been using Vortexbox as my music server at home. It’s basically a headless linux server configured with Logitech Music Server, an automatic CD ripper, a software player (for local sound playback) and a reasonable web interface. Vortexbox however hasn’t been updated for years. The maintainer is promising an update but I didn’t want to wait and instead set out to build my own. This is running on a HP micro-server (1.2GHz Atom) and I have Naim DAC plugged into it via USB for music.
It should be possible for anyone to install this but it is complicated and I’m not sure I’d recomend this to anyone with either no Linux experience or no desire to learn Linux.
Install Lubunutu – This version comes with a GUI. I could have used one of the server versions, but the GUI is handy for the intial setup. My thought process on the distro didn’t going beyond this! I’m not going to go into detail here on the install becuase there plenty of tutorials online.
Setup a user, my is
We will also need ssh to remote login
sudo apt-get install openssh-server. The rest of the set up can be done locally or now remotely via SSH.
My server has 3 hard drives. One contains the OS, one is the music, one is for backup. The music files are going to be stored in the user home space rather than the root. So I edited fstab to mount my music drive in
/home/phil/storage/. Your setup may well be different. My music is held in
Install LMS (Logitech Media Server). It has a dependancy so run
sudo apt-get install libio-socket-ssl-perlto install it. Download the latest version of LMS from http://www.mysqueezebox.com/. Once downloaded
sudo dpkg -i logitechmediaserver_7.9.2~1530185314_amd64.deb. You will need to change the name of the .deb file for the version you downloaded. Then run
sudo apt-get -f installand start the service
sudo service logitechmediaserver start. You should then configure the users and group settings.
sudo usermod -aG audio squeezeboxserver sudo usermod -aG lms squeezeboxserver sudo usermod -aG audio phil
Playlistfolder somewhere and set the file group ownership to
sudo chown phil:lms -R Playlistand maybe
sudo chmod -R 744 Playlist. The music files also need to belong to the
sudo chown -R phil:lms /home/phil/storage/music/flac
Open a web browser and the address will be http://[ip address of your machine]:9000. Configure LMS so that it knows the location of the music and playlist folders. Rescan the LMS music library. LMS should now be running. It’s probably not a bad idea to fix the IP address of your machine. You can normally do this with your routers web interface, or by setting the network configuration of your server (the router method is normally the easiest.)
To add music to our folder over the home network we need samba to share a folder.
sudo apt-get install samba, and create a samba user
sudo smbpasswd -a phil. Edit the samba config
sudo vi /etc/samba/smb.confand add to the end
[music] path = /home/phil/storage/music valid users = phil read only = no
Restart the service with
sudo service smbd restartand test the smb.conf config is valid by running
Install squeezelite player via the systems package manager(
sudo apt-get intsall squeezelite). [Update: the repo version is rather old and seems unstable on my system. I recommend instead building from the source code. see here ].Now run
squeezelite -lwhich should list the available audio devices. Running
squeezelitefrom the console will start the program. If you are like me running squeezelite from the console works – it should appear as a player under the LMS webpage. ^C kills the player.
The problem here is I would need to log in and run the command every time. It’s far better to run this as a service that starts automatically on boot. The service should be installed via the package mangager but the default configuration probably does not work. I think this is becuase the default sound card option is via pulse audio and this cannot be run as root. In the output of
squeezelite -lthere is (hopefully) one option starting with
hw:, in my case it is
hw:CARD=Audiophilleocom,DEV=0. This is the direct hardware option and it is the one we want. In
/etc/default/squeezeliteadd the line
SL_SOUNDCARD="hw:CARD=Audiophilleocom,DEV=0"or whatever your equivalent is. Restart the service with
sudo service squeezelite restartand hopefully it is all working. 1
Since the server is headless we don’t need to waste resources running the GUI. Switch to console login via
sudo systemctl set-default multi-user.target
Vortexbox automatically ripped CDs when inserted. See here for my version that uses abcde.
TODO A web gui
On site and off site backups
1: I have had a few problems with Squeezelite crashing and I am currenlty looking into this. I suspect the pulseaudio might be the problem and it might need to be disabled. Since we aren’t using the desktop, this should be ok. Do not uninstall pulseaudio as some forums suggest. It can be disabled gobally by editting
/etc/pulse/client.conf and changing the line
; autospawn = on to
autospawn = off. Note the removal of the
;. My system now seems stable, however, its hard to say if it was pulseaudio or rebuilding the squeezelite from source that solved the problem. If you still have problems, it might be an idea to increase the ASLA buffersize