After months of delaying, I finally sat down and began the long, strenuous task of building up a local music library to replace Spotify. I did this for myself as well as my partner so we could stop supporting a shitty company AND cut down on another subscription. Going into this I knew it would be a pretty long-winded project as we both have many, many years of music built up on the app, but so far it's proving to be a good move!
When I set out, I had three requirements in mind: we need to be able to stream the music from anywhere, I need to have complete control over the files and the process can't make me suicidal. Right off the bat I knew this meant using Navidrome as it's been the defacto for DIY streaming for many years now. In terms of sourcing the music, there's no place like Soulseek, even with trolls sharing AI generated Homer Simpson covers. Getting music off of slsk and onto Navidrome is where I began to come up short; there aren't a lot of great solutions for automating searches + downloads and I wasn't about to start downloading 3,000 albums by hand. After some searching around, I found out that Lidarr has a plugin you can use to add slsk as an indexer and download client. So with my """stack"""am i tech writing yet decided I got to work.
To start, I deployed a VPS with 2GB of memory and 1 vCPU running Debian Trixie. Using it for this purpose assuredly violates some sort of TOS clause with my hosting provider, but I was not interested in doing it at home on a network I don't control. After the usual basics that comes with a new box, I set up Lidarr and slskd; slskd is a daemonized client for Soulseek that's accessible through your web browser and meant to be exposed to the internet. It also exposes an API that allows you to automate downloads, which is what the aforementioned Lidarr plugin uses to communicate with the network. I ran both applications in a Docker container and set up Caddy as a reverse proxy. After configuring everything to work nice with each other, I connected Lidarr to Spotify using its import list feature and began to download my library. It took a little bit of finagling to get it to download optimally and even then there are some things it just won't be able to get on its own. I think in the grand scheme, I had to download about 80 albums by hand which is obviously not ideal, but not nearly as bad as that plus 2,920 more!
During the download of my library, it became quickly clear that the 50GB the box came with was not going to cut it in terms of storage. I ended up adding 200GB of detachable storage to the host and worked as quick as possible to avoid paying for a full month of that. Thankfully Lidarr handled organizing and tagging my newly acquired files, so I was able to attach the expanded storage, move everything downloaded thus far over to it and symlink the old location to the new drive; Lidarr was able to pick up right where it left off (after a restart) and keep on chugging along. After my library finished downloading, it was time to prepare it for streaming. Once before I had tried using Navidrome as a replacement to Spotify but in doing so I quickly realized that it will munch up data if you aren't careful. I very much wanted to avoid blowing through my mobile data in a day, so I opted to transcode the library from lossless (i.e. WAV, FLAC) to a much more conservative format. I know Navidrome supports transcoding on the server, but I decided to forego that completely so as to save resources.
After a litte bit of research, I learned that AAC audio was the successor to MP3, boasting higher quality playback at a lower bitrate. Everyone's favorite multimedia tool ffmpeg is completely capable of encoding to that format, but unfortunately the best AAC encoder available (Fraunhofer FDK) has a proprietary license, which means I would be compiling from source on Debian. I will spare you the recounting of compiling ffmpeg from source but don't worry, it only took forever. The only thing slower is compiling any Rust program am i tech writing yet. Anyway, with my proprietary copy of ffmpeg I was able to transcode every file in my library down to a much more reasonably sized VBR M4A file. As I sit here writing this, I realized that my approach was totally inefficient and that I should have used Lidarr custom script functionality to transcode the file during the import, but fuck it, we ball.
Having downloaded, tagged and transcoded my library, the only thing left to do was make sure the ReplayGain tags were all well and good. For the unintiated, ReplayGain is the format of tags that tells your music player how to normalize the volume of your music. If you shuffled your library and listened without it some songs would be INCREDIBLY LOUD!!!! and others would be as quiet as a mouse. After a little bit more research, I found that rsgain seemed like the best option for the task in my situation, and I was right! I was able to use the tool's "easy" mode and have it tag all of my files for both shuffled playback and album playback. There are always going to be some discrepancies, but I've been very happy with the volume of my songs as I drive around. Much like before, I realize that I should have down the rsgain tagging during the import process, but fortunately it was very easy to recursively tag all of my files.
Now that my library was completely done, I set out to do the same exact thing for my partner's. So picture me doing everything I just mentioned once more, albeit with some overlap and less steps. Anyway, fast-forwarding again, now that both libraries were done and ready to be listened to, I used rsync to clone the entire directory tree over to where Navidrome was going to live. With all of the files reencoded the grand total size was about 30GB, which is much better than the ~100GB that I originally downloaded. Once the transfer had finished, I pointed Navidrome at the new directory and prepared to jam out. A third little bit of research told me that Symfonium was the app most would recommend for this use case and a closer look had me convinced. Both me and my partner happily paid the one-time fee of $6 to use the app forever; $12 one time is much better than the $20 a month Spotify was charging for a shittier experience. It's been about a week since migrating and we're both very content.