Self Hosted Music Streaming
I subscribed to Spotify for about 10 years, it was cool and convenient. I could remotely set my PlayStation 3 to play practically any music I wanted to listen to from my mobile phone!
But… I noticed that sometimes music that was once available to me was then region locked or completely removed from the platform. I read that artists on Spotify barely see any revenue from people listening to their music (however I do accept that I have found music I may have never heard through the suggested artists algorithm, which is fantastic imo, I created a python script to extract a users spotify playlists here)
Considering the money I had spent on Spotify, roughly £1078.80 over ten years, I decided on self hosting my music library from my home server using the music I own. Turning this:
Into this:
The tools I have used to set this up are:
debian linux
a ThinkCentre M720q Tiny computer
WireGuard
a cloud hosted vps (virtual private server)
Jellyfin
Finamp
Sound Juicer
To start, I needed a machine to store my media so I used a second hand ThinkCentre Tiny PC. This PC uses very little electricity which is great as it's switched on 24/7.
I installed Jellyfin on that machine to index, organise and manage the music.
I've then used Finamp on my mobile devices to stream the media in my own home, it works great… when I am at home…
As I extract all media from the CD's using Sound Juicer in a lossless format (flac) the files themselves are very large, compared to mp3.
Finamp allows you to download those files to your device to be played offline, should you choose. Unfortunately doing so would fill up a mobile device very quickly and I wanted to stream whatever music I wanted from outside of my house.
This is where WireGuard comes in. I provisioned a virtual private server (VPS) that costs me about £2 per month to run, the sole purpose of this machine is to provide a VPN tunnel through to my media server, so it only needed 1 CPU core and 1GB of ram.
My mobile device connects to this WireGuard Virtual Private Network and then Jellyfin serves Finamp the media, over an encrypted tunnel on the internet.
Thankfully Jellyfin will transcode those large flac files on demand when you stream a media file to a device. so I don't run out of mobile data on my mobile phone contract when I am out of the house. This setting can be configured in the Finamp application settings on the client device.
Hopefully this might spark some interest to anyone reading and may get you to tinker with self hosting your own media too!
Cheers, T

















