How I created my own music streaming server with Linux (and why you should too)

Estimated read time 4 min read


The Plattenalbum GUI.

Jack Wallen/ZDNET

Most of my day is filled with music. When I’m writing, running, or doing menial tasks, music is there for me. When I’m in my office, that music comes from a turntable. When I’m away from that room, I have several options (my phone, our Google speakers, and even a streaming server). 

Also: My 4 favorite music players for MacOS (that aren’t Apple Music)

It’s the streaming server I want to chat about today. The primary reason I set up a streaming server on my home network is because I have a very large digital music collection that includes plenty of recordings that are either out of print or unavailable on standard streaming services. So, if I want to hear Lord Groovy And The Psychedelic Zombies, my options are limited. So, I added that album to my streaming collection and I can play it anywhere on my network.

Now, setting this up on Linux used to be quite the endeavor, but it always worked. Now, it can still be a bit tricky, depending on the distribution you use. This is because I opted to go with the Plattenalbum GUI, which is a front end for MPD. The problem with this is that installing MPD on the latest release of either Ubuntu or Fedora is really tricky (and can break some things). However, if you try an alternative distribution, like the fantastic Zorin OS, you can get this up and running without a problem.

How to create your own music streaming server on Linux

What you’ll need: The only things you’ll need for this are a running instance of a Linux distribution that supports flatpak (that isn’t either Ubuntu or Fedora) and a user with sudo privileges.

That’s it. Let’s get to work.

The first thing to do is install the Music Player Daemon, which is done with the command:

sudo apt-get install mpd -y

Once that installs, you’re ready to install Plattenalbum.

Plattenalbum is installed via flatpak with the command:

flatpak install flathub de.wagnermartin.Plattenalbum

Type y when requested and the installation should go off without a hitch.

You should now find the Plattenalbum GUI in your desktop menu. If not, log out and log back in and it’ll appear. Open the app and you’ll find an error saying it cannot connect to MPD. To fix this, click the three-line menu button near the top right of the window and select Preferences. 

Also: Ubuntu 24.04: Same as it ever was, but with 5 big improvements

Scroll to the bottom of the window and click the On/Off soldier for Connect via Unix domain socket until it’s in the Off position. Next, click the Music Library folder icon and select the folder that contains the music you want to stream. Once this is done, click Reconnect and you should see the MPD error go away.

Close the Preferences window.

One caveat

One issue I discovered with MPD is that it fails to start when you attempt to create a user config file and start the service as you user. To get around that, I simply used the default config file and started MPD with the command:

Next, instead of adding music files from within Plattalbum, I added them to the default MPD directory, which is /var/lib/mpd/music. Once I did that, my music files appeared and I was able to stream them.

One last tip

At this point, your music is now streaming over the default port 6600. How you connect to the stream will depend on the app you use but you will need to know the IP address of your host OS (which can be found with the ip a command). 

It’s not perfect, but it’s one of the easier methods for streaming music to your network on Linux.





Source link

You May Also Like

More From Author

+ There are no comments

Add yours