Self Hosted Music Streaming Serice

Intro

Self hosted streaming of music is easy, getting that music is far more difficult. I have been working on this project on and off for over a two months now and its finally in a state where I feel like I can leave it alone for more than 5 minutes without it falling apart, which is good enough for me to start transferring my life off of Spotify. Also, this post was written over the course of a month, during that time this project underwent significant changes so keep that in mind while reading.

The Stack

I am using the following software to enable my tomfoolery:

Every single piece of software I just listed has been a pleasure to work with ... is what I would say if I were writing this two months ago, Unfortunately I'm not. I don't want to bash FOSS software, but I had more problems with this project than I have had with all of my previous projects COMBINED. This is not for new homelabers, it's not anything like video, it's about 100x more difficult.

Minor Update

As I am writing this, everything is now broken so perhaps instead of explaining how my stack currently works (because it doesn't) I'll explain how I want it to work and compare that to what I eventually get working.

What I want out of this project

I am looking for something very specific with this project, I want a self-hosted music streaming service that can surpass Spotify in terms of music quality, user experience and perceived library size. I say perceived library size because I obviously can't fit a library larger than Spotify's on my homelab with a meager 11 TiB of storage, so I want to have the option to browse Spotify's library for anything I want and immediately download and import it into my library for streaming with as little delay as possible. This is not an easy thing to achieve, but I believe that with some refinement it is possible with my proposed stack:

In theory this can be accomplished pretty easily using the two folders:

Unfortunately this doesn't seem to work as intended, whether it be docker compose not properly updating volumes to beets not re-scanning its import directory quickly enough, to imports being too slow and Soularr sending another download request to SLSKD which clogs up beets because its already imported that album. There really does not seem to be an easy way to accomplish want I want, but that's never stopped me before and it's not going to now.

Later

Usually I finish a project with a very different software stack than I started with. This one is no different, as of February third the project is in a working state, barely. It is now February seventh and I have realized that it is SLOW, like extremely slow. This is likely due to the nature of SoulSeek being a peer-to-peer network but damn, this is going to take a while. I set up and import list through Lidarr and connected it to my Spotify account, I set it up to download the discographies of very artist on one of my playlists (about 200 artists), 4 days later its maybe 25% of the way done, and my library is sitting at about 3000 songs. For reference the playlist I handed Lidarr was about 200 songs long, my liked songs playlist on Spotify is 3300 songs long, and I can't forget about the 171 other playlists I have on Spotify that also need to be transferred over. I do acknowledge that what I have given this stack (which will be explained in a sec) is a hefty task but in comparison to what I have planned, It's nothing.

The final stack

Like I said earlier, I tend to switch up the software I'm using in an effort to circumnavigate problems I'm having. Here is my final software stack for the server side:

Yep, that's it, fuck that big fancy stack I had before, it didn't work, and I couldn't fix it, so I simplified things until it started working. One of the reasons it took me so long to do this was because I really, really wanted to use Beets for metadata management because I have heard a lot of bad things about how Lidarr manages metadata. But "in the end, it doesn't even matter" because beets just plain didn't work and Lidarr is good enough.

Why?

Why do this, Why go through all this effort when you could just keep using Spotify? Because I hate Spotify, their desktop client is so bad I have to modify it to make it usable, and their mobile app is straight garbage, and don't get me started on how often they are changing the UI in objectively worse ways. But why not just use another streaming service that works better? Because I have the ability to host it myself; Therefor I have to. If you know how to make this process any faster please contact me on discord.

bye, I guess.