I started self-hosting a music server a month ago with the music that I’ve purchased over the years to start out with before I discovered other methods to get music and I was able to cancel my Spotify subscription today which is a huge milestone for me. No more late nights working on this server anymore! My goals for this project were to essentially build my own personal music streaming platform meaning it had to be a fully automated system where everything is served to the user in one app on their phone. I only have to SSH into my server when I need to run patches. Im at the point where I don’t even feel like I’m the one managing it since the services manage everything, I’m just a listener. I’m now up to 11k songs so far and figured I share how I got here in a month. I’m always looking for notes to improve it so let me know if you have any ideas.
Rocky Linux -> OS running docker containers
Navidrome (w/ last.fm & musicbrainz connected) -> Organizes, serves the music, and provides the subsonic api
Access and security -> Geo blocking via firewall, Nginx reverse proxy serving my public domain with rate limiting and VLANs in place to isolate my media server from the rest of the network. I also use other methods at the OS level, file access restrictions, and services like an IPS, auto blocking known malicious IPs, strict firewall rules at all levels, and Wireguard for administrative access. I haven’t had any security issues with this setup yet. I use this setup to seamlessly access and listen to my music when I’m not at home, I also wanted it to be easy to share with my non tech savvy people. My overall goal is to make this as seamless as possible like Spotify, while still being as secure as possible and keeping the operational costs significantly cheaper than a streaming service. I know this is overkill and not needed for most but I’m an IT professional so I’m already familiar with managing this type of setup.
Authelia -> Regardless, my Navidrome is still open to the internet so I use this service for additional security. My reverse proxy redirects web traffic that isn’t using the subsonic api to Authelia for 2FA
NaviBeat (w/ last.fm & musicbrainz connected) -> For listening on any Apple device, also provides an end of the year wrapped which is nice
Feishin (w/ last.fm & musicbrainz connected) -> Desktop listening (for now)
Navidrome Lyrics Plugin -> main method of lyric handling
Octogen, Audiomuse-AI & Ollama (running Qwen) -> I use OctoGen to automatically generate personalized and mood-based playlists daily. I had to modify the source code to allow it to generate playlists without a 25 song limit as I’ve upped it to a 50 song limit, and to generate other types of mood playlists but that’s all optional. It uses Audiomuse as the backend which provides sonic analysis of my library, and I have Audiomuse hooked into my local AI which actually generates the playlists. This runs on a daily schedule.
Octo-Fiesta -> For music discovery and my primary automated download option. This is what really turns my server into its own streaming platform. I have it configured to hook into my free trial Qobuz account (for now) using a token and it serves all the songs I don’t have downloaded from Qobuz alongside my already downloaded music. This essentially allows me to stream music I don’t have, from my server. I have it configured to cache the music I don’t have so that I can stream it without downloading whatever I’m listening to, and if I choose to download a song to my server on the fly, all I have to do is heart either the song (if I only want to download that specific song) or heart the album and Octo-Fiesta uses that logic as a trigger and it automatically downloads it in the highest available lossless quality over https and places the music in the correct file paths on my server. I cannot recommend this enough. This allows me to automatically download music onto my server from anywhere at anytime on any device directly from my iOS listening client NaviBeat (there’s also a list of other clients on GitHub that this workflow would work with alternatively, Feishin also works with this setup).
Lidarr (and other ARR stack services) -> My secondary option for automated downloads and organization. I have it running in the background as a fallback method to monitor new albums. It’s not the most consistent, Lidarr definitely isn’t as good as other services in the ARR stack, but it exists.
Soulseek -> My only manual download service in case I need it.
Backblaze B2 with Restic -> I have my Navidrome databases, music, and dependencies backing up to my Backblaze B2 bucket in the cloud on a nightly timer, the monthly costs are really cheap. Big tip is to only backup what you need. I use Restic with this for encrypting the backups and retention rules. I also have a script that performs an album restore test weekly in a temp directory to ensure things are continuously operational. If there are any issues with backups, I set it up so it sends me a push notification of what failed.
NTFY iOS app -> Push notifications app I use that my server sends notifications to in the event a backup fails or in the rare event of if one of my automated services encounters an issue and wasn’t able to perform its task or needs review, it sends me the issue directly to my phone right when it happens. I tried to make this as advanced as possible so it doesn’t just tell me that something failed for example, it tells me what exactly happened, and gives me the prewritten steps to correct it.
Personal vibe-coded services to automate everything else using my local LLM:
Artwork Maintenance Service (Custom) -> A Python script that checks my music library daily and ensures there’s album artwork or song artwork being served as its own individual file in each album, if there is then it ensures the name of that artwork is “folder.jpg”if it’s anything else for example “cover.jpg”then it changes the file name to “folder.jpg” and checks the integrity of the file. It checks if it’s a real JPEG file as well. If it’s a PNG image disguised as a JPEG (which happens) then it converts it to a JPEG to make my entire music library uniform. If there’s already a folder.jpg file in the album and it passes the JPEG check, then it strips the embedded artwork from the audio files within the album. In the event that there isn’t a standalone artwork file, this service will also strip artwork from one of the audio files in an album that has the highest quality image and creates a folder.jpg image in its place using the image it extracted so that Navidrome can point to that image for album art for each of the songs. After that, it removes all of the embedded artwork from all the other audio files in the album. The purpose of this is to save space and have a more uniform music library. For example, I have an album with 30 songs in it and each of those songs has the same album artwork embedded in it, then that is unnecessary disk usage spent on artwork that I could be using for other purposes and we all know storage isn’t cheap. Since Navidrome only needs one artwork file to point to per album to serve the artwork, this has saved me quite a bit of space.
Metadata Maintenance Service (Custom) -> This one has a lot of engines, backend scripts, and safety mechanisms in place to perform its task successfully, and automatically. I never liked manually managing metadata at the OS level and I could never find the right metadata software that I liked to do it manually in a UI. So I vibe-coded an application to scan my entire music library on the backend, cache it so that it doesn’t have to do that every time which would be resource-expensive. It then connects to Deezers public API to scan their directory for each of the songs I have downloaded to find matches, it compares it against Deezer’s music library and only pulls down the artist and their features for each song if the song matches. It then adds only that specific metadata to my local file (the song artist and the features). It runs on a weekly timer and this is another piece of the puzzle that really makes this feel like a streaming platform. If the song doesn’t match then it doesn’t modify the file, and if the file already has the correct metadata, it will defer it and move on to the next song. This service also standardizes the artist name formatting as well against Deezer and changes the artist name if the name is locally formatted incorrectly in the song metadata, which is also another feature that makes it feel like a streaming service. My music library is at a 92% match rate with Deezer’s library which is really good for 11k songs, I didn’t want to restrict the matching code any further to get it closer to 100% match rate because I don’t want to sacrifice accuracy as everything it pulls down from Deezer is currently 100% accurate to the files it matches with. There’s also locks in place, it doesn’t edit any audio files metadata that I don’t already have a backup of. It also does much more but that’s the main gist. This has been working smoothly for me and has saved me from endless hours of maintaining metadata.
Storage Maintenance Service (Custom) -> I’m also including this one even though it’s not music specific, it still helps me with all forms of media and not just music on my server and it’s a nice to have. This involves a few scripts that work together as one unified application that checks my downloads directory for files that don’t have any hard links to the directory that my Navidrome or Jellyfin uses to serve the media. There are many safety checks in place for it. If it detects a file in my downloads directory that isn’t hard linked to my media directories, that lets me know I’m not actively using the file and this service will flag those files for me to approve them for deletion, I use a custom systemd command built into the service to remove those files I don’t need. When ran it accesses the backend API of my qBittorrent and deletes those files from qbittorrent which is the safest method of removal. This alone has allowed me to free up 100+GB so far and it runs on an hourly timer.
All of these custom services use SQLite for built-in caching which makes running tasks quicker and saves a ton on resource usage which is a must for large libraries or future-proofing.
My next goal would be to recreate my own version of Spotify DJ using my local AI but I’m not in a rush to do this, also if there’s already an open source service out there that already laid the ground work for this to be done, please let me know!
This was my first Reddit post, thanks for allowing me to nerd out.
Edit: Wanted to add a TLDR
- TLDR -
I replaced Spotify by using Navidrome. Using OctoGen (hooked up to Audiomuse-AI and my local AI) to automatically generate mood and personalized playlists based on my listening habits, or the time of the day (i.e. Evening Playlists). Octo-Fiesta for music discovery and downloads, Lidarr as another download option, and 3 vibe-coded automated services to manage album artwork, music metadata, and storage optimization with built in error handling to protect my music. All this to say, I hope this post helps someone out.