Build your own music streaming service to achieve more control and autonomy

I wanted to move away from Spotify to have more control over my music and my music-consumption experience.

Without writing a line of code (I wouldn't know how to anyway), I built my own music streaming service. This guide spells out the different components of the system I built and the steps needed for anyone to build their own music streaming service.

This post is a little long. If you want to go straight to the main takeaways, I suggest you scroll down and check out the following sections:

But if you got time and are curious (hey fellow nerd 👋🏻), read away! Also, let me know if you have feedback on the streaming service I built—any suggestion to improve it is welcome—or if you experienced challenges while building it for yourself!

Intro

I've been on Spotify since 2012. With Spotify, I've been able to easily discover new artists and tracks; keep my music at my fingertips whether I'm on my laptop, phone, or even someone else's device; and seamlessly share playlists with friends. Like most streaming services nowadays—Apple Music, YouTube Music, Deezer—Spotify is easy to use. It is seamless and extremely convenient.

But like most things in this world, when something is so convenient, there is a darker side to it. The business model of streaming services leaves artists in the dust, with minuscule payouts for the vast majority of them; massive profits for the streaming platforms, which flow back into global capitalism; and even for users who have become used to a convenient, seamless experience, the service is becoming increasingly enshittified with features we don't want and don't need.

Using a streaming service like Spotify also means we don't own our music: tracks we love become at times 'unavailable' due to copyright changes; and changes in the company's business priorities can just lock us out of a music library we've spent years building.

In general, I like the idea of moving past ownership and instead sharing, borrowing, or renting the things we use (when it comes to physical goods, sharing, borrowing, or renting are the only ways we can meaningfully address the environmental crisis); but I'm not willing to rent my music when it is from a billion-dollar company that exploits artists and reinvests in AI killing drones.

All of this to say: time to let go of our beloved streaming services.

It took me a few months of research and tweaking, but I managed to build my own music streaming service. This post describes the streaming service I built and explains why I made the decisions I made. Hopefully, it can help others build their own streaming service without having having to do all the research and testing I did. And to be clear, I don't code and I don't have the skills to manage servers. So the system I built should be accessible to anyone, even without technical skills. You just need to be comfortable with tech and be willing to put in a bit of time into it.

Objectives and results

My objectives in building this music streaming service were to:

The solution I came up with:

The setup

Below is a description of the streaming services I built. The list of components may sound like a lot, and it is a lot, but once you set up the system and get used to it, it becomes fairly seamless to use.

Also, because every part of the system is open, replacing one component with something you like better is easy (using a different music server; buying your music from a different store; selecting a different mobile app to stream your music; etc).

Music server

This is where the music files are hosted and what the apps you use (whether on mobile or on your computer) will connect to in order to stream or download music from.

The solution I recommend is Navidrome. There are other good solutions out there (Jellyfin is the main one that comes to mind), but Navidrome came on top for me because it focuses exclusively on music (other solutions often support all media types, including films and tv shows) and because it can be installed and managed without technical skills. Navidrome also supports multi-users: you can get your whole family on it so everyone has access to the same music library but each person gets their own account and playlists!

Navidrome is actively being developed, so we see improvements released on a regular basis. It is free and open-source, and can be supported with monthly donations.

Host

The beautiful thing about a music server like Navidrome is that you can install it anywhere: on your computer, on a server at home, or on a remote server.

To me, it is important to have uninterrupted access to my music: I want to be able to listen to it at any time and from any device. I also want my family to have access to my music. This is why I opted for installing Navidrome using a professional hosting service. This way, I don't want to have to worry about whether my home's internet connection is good enough or if the server is up and running. Using a professional service is also more energy-efficient than having a single server running from home.

This has some privacy drawback: people working for the host can access my music if they really want to; but it's just music, so I don't mind. Plus, it's still a significant step up in terms of privacy, given that corporate streaming services like Spotify collect an enormous amount of data and sell it to advertisers, like most hyper-capitalist internet companies.

PikaPods is the best solution I found for this. In just a few clicks, without any coding, you can install Navidrome on a server only you have access to. Every time Navidrome releases an update, PikaPods takes care of upgrading to the latest version. And if you want to get fancy, you can connect your own domain (my server is at https://music.raphmim.com).

PikaPods is cheap: I pay $4 per month. And it has a revenue-sharing agreement with Navidrome, so part of what I pay goes to Navidrome developers!

Music stores

Buying actual music files (good'ol mp3!) hits two birds with one stone: it gets me the ownership over my music library, and it gets artists much higher compensation that from streaming services.

Any new song I discover and like, I buy from Bandcamp, which is a platform entirely dedicated to supporting artists. If I can't find a file on Bandcamp, I'll buy it from Qobuz's music store. Each track is anywhere between $1 and $2. Looking at my usage of Spotify over the past few years, I usually add to my library between 5 and 15 new songs per month. So with an average of 10 new songs per month at an average of $1.5 per song, that's $15 per month.

The difference in artist compensation is drastic. If I stream a song 50 times on Spotify, the artist will get paid about $0.15. Yep, that's just 15 cents of a US dollar for 50 streams. And that's for songs I listen to a lot. Most songs I will never listen to 50 times in my entire life. By contrast, if I buy the file on Basecamp for $1, the artist or label gets about 0.80 cents. Pretty good deal.

Personal music library

It's technically possible to store all music files directly on the music server, but I find it much easier to instead store my library on my computer and once in a while, sync my library with the server. This way, I only have to do any work on the server once in a while.

So I simply have a library folder on my computer where I store all my music files. It is important to keep those files organized, or at least properly tagged. These tags (like artist , title , genre , album , etc) make it possible for an app to organize your files and make them easily findable. A well-tagged library is pretty important to make it easy and seamless to navigate your music. To tag my music, I use Strawberry, a super old-looking piece of software that's nonetheless very powerful and, once you get used to the outdated interface, does the job perfectly. It's free for Linux but costs $5 per month for Mac and Windows. Tagging hundreds of songs or albums can be a time-consuming so apps like MusicBrainz Picard can automate the process. I donate $2 per month to MusicBrainz Picard.

And to sync your library from your computer with the music server, tools like FileZilla do a good job. FileZilla lets you connect to the server and upload your files through a relatively accessible user interface—no command-line work needed. To make things even smoother, I suggest buying a FileZilla Pro license to get access to the 'sync' feature: this avoids having to re-upload the entire library each time and instead only uploading files that were recently added to the library or files of which tags were recently updated.

So once it's set up, managing your library only means 1) adding newly purchased files to the library folder on your computer 2) ensuring the new files are properly tagged and 3) syncing the library from your computer to the music server.

Clients

Now that we have a music server with a well-organized music library, the only missing piece are the clients we'll need to actually listen to the music: mobile and desktop apps.

Because Navidrome is an open app that uses open standards (specifically the open Subsonic API), there are dozens of apps that can stream music from a Navidrome server. All you have to do is go through the list of compatible apps, test a few, and pick the one you like best.

As my Android client, I use Symfonium. It's a $5 one-time payment, but there is a trial period to see if it's a good fit for your need. Symfonium is great because it lets you completely customize the app's interface.

And for desktop, I recommend Feishin. It's functional and does the job well (my only issue is that you can't download your music for offline listening; but in a few months, Feishin will be replaced by another player that will support offline playback). I donate $2 per month to Feishin too.

Discovering new music (optional)

One of the drawbacks of this personal music server is music discoverability. Streaming music services make it easy to listen to new artists, albums, or tracks, and this has been a key way for me to discover new music. A personal music server, by definition, cannot fulfill this need to discover new music because it only hosts the music I already own. There are two separate challenges here:

  1. Discovering new music passively, meaning just listening to music in hope of finding a gem here and there. With corporate streaming platforms, you could just let the algorithm feed you music it thinks you'll like (algorithm-based music discovery is problematic in its own right). With your own personal music server, the best way to replace algorithms is to revert back to internet radios. This fits especially well with the setup I outline here because the apps and tools outlined above are built to be part of an open ecosystem, and as such many of them include the option to stream internet radios directly from inside their apps. So you can add the radio stations you like to your Navidrome server, and if your client supports it, you'll have access to these radio stations directly from your mobile or desktop app. Super easy to set up and convenient.

  2. Actively exploring music. This is where it gets a bit tricky. If I discover a new track I love, I often want to listen to the rest of the album, or other albums by the same artist, or other artists from the same genre, place, or era. Streaming services made this a breeze. In this case, I suggest two options:

    1. Bandcamp lets you listen to any track for free and in full, at least 3 times, before you purchase. And if Bandcamp doesn't have the music you're looking for, Qobuz has a much larger library and lets you listen to the first 30 seconds of any song.

    2. This first solution isn't enough for me because Bandcamp often doesn't have the music I want to explore and Qobuz's 30 second limitations kills it for me. So I signed up for Qobuz's basic streaming plan ($10/month). Qobuz pays artists four times what Spotify pays per stream, so it's ethically acceptable, and it lets me do everything expected from a normal music streaming plan: check out all the albums released by an artist, search by genre, etc. My brother thinks that signing up for a streaming service defeats the point of this whole system; he is not wrong, but the only alternative I can think of would be to stream Youtube Music, but that means listening to ads every two songs and putting money into Google's pocket. At the end of the day, streaming on Qobuz is an acceptable compromise for me: I only use Qobuz to discover new music, and not to build playlists or listen to my library, so I don't become beholden to the service; and I still get access to a huge library of music I can freely explore before purchasing it.

Cost

So looking back at the whole streaming service, the cost for each component is:

Total cost: $19 to $34/month

Getting started

If you're looking to build this streaming service for your own usage, here is how to get started:

  1. Create an account on PikaPods, add some money, and install Navidrome.

  2. Create your library on your computer with music files you already own or by purchasing albums or songs on Bandcamp or Qobuz. If you want to transfer your library from a streaming service, it will take a bit of work but it's doable (you can use a service like Tune My Music to transfer your songs to YouTube Music, and then download from YouTube Music using yt-dlp; if you do that, consider buying some merch or albums from your favorite artists on Bandcamp).

  3. Tag your library using an automatic tool like MusicBrainz Picard or manually using Strawberry.

  4. Sync your library from your computer to the Navidrome server using FileZilla or a similar solution that supports SFTP.

  5. Install a mobile or desktop app that supports the Subsonic API and connect it to your Navidrome server.

  6. Enjoy your music, free from capitalist exploitation and algorithmic manipulation!

Concluding thoughts


Subscribe to receive future posts like this directly to your inbox. No spam, ever.