Create Private Music Streaming Service
Sick of Spotify's algorithm deciding what you hear? I decided to stop paying subscription fees and built my own music streaming service instead. Within an afternoon, I had my entire music library—over 50,000 tracks—streaming to my phone, laptop, and living room speakers from a modest homelab server. No cloud vendor lock-in, no ads, no monthly bills. Just music.
Why Self-Host Your Music?
Streaming services are convenient, but they come with invisible costs. You don't own the music—you rent access to it. Libraries get delisted. Prices climb. Algorithms optimize for engagement, not your taste. When I started self-hosting, the freedom was revelatory. I control which players can access my library. I keep metadata exactly as I want it. And I use whatever client I prefer, whether that's a web app, iOS app, or Android client.
I've been running Navidrome for the past two years on a repurposed HP ProDesk mini—total hardware cost was $200 used. The electricity footprint is negligible; the monthly savings on streaming subscriptions adds up fast. If you've got even a modest homelab setup or a spare VPS, you can get this running today.
Choosing Your Music Server: Subsonic vs. Navidrome
There are two mainstream options. Subsonic is the original—it's been around since 2006, is feature-complete, and has excellent client support. But it costs €11/month if you want mobile apps. Navidrome is open-source, completely free, and performs identically for 95% of use cases. I prefer Navidrome because I hate subscriptions-within-subscriptions, but Subsonic is worth considering if you need more advanced features like podcast support or scrobbling to Last.fm out of the box.
For this tutorial, I'm going with Navidrome. It runs on almost anything—Docker, Linux, macOS, Windows—and the performance is snappy even on low-end hardware.
Hardware and Hosting Requirements
You don't need much. I'm running Navidrome on a machine with 2 CPU cores and 2GB RAM, and it handles concurrent streaming to six devices without breaking a sweat. Transcoding—converting FLAC files to MP3 on-the-fly for bandwidth—does use CPU, but it scales gracefully.
If you don't have spare hardware at home, a small VPS works equally well. RackNerd offers affordable KVM VPS starting at $1.49/month, which is more than enough for a personal music server with 15% recurring commission available. I've tested Navidrome on their entry-level plans and it performs admirably.
Installing Navidrome with Docker
The fastest way to get running is Docker. If you don't have Docker installed, grab it from docker.com. I prefer Docker Compose because it's repeatable and clean.
mkdir -p ~/navidrome/music ~/navidrome/data
cd ~/navidrome
Create this docker-compose.yml file:
version: '3.8'
services:
navidrome:
image: deluan/navidrome:latest
ports:
- "4533:4533"
environment:
ND_LOGLEVEL: info
ND_BASEURL: "https://music.yourdomain.com"
ND_ENABLETRANSCODINGCONFIG: "true"
ND_DEFAULTTHEME: "Dark Blue"
volumes:
- ./music:/music:ro
- ./data:/data
restart: unless-stopped
Before you start, copy your music files into the music directory. Navidrome reads MP3, FLAC, OGG, AAC, WAV, and more. Start the container:
docker-compose up -d
Navidrome will scan your music library automatically. Depending on the size, this can take a few minutes to an hour. Check the logs:
docker-compose logs -f
Once you see "Scrobble: disabled" or similar messages, the scan is complete. Visit http://localhost:4533 in your browser. The default login is admin / password—change it immediately.
Setting Up Remote Access with Caddy
Navidrome listening only on localhost is useless if you want to stream music at the gym or while traveling. I use Caddy as a reverse proxy because it handles HTTPS automatically with Let's Encrypt.
Install Caddy on your server, then create a Caddyfile:
music.yourdomain.com {
reverse_proxy localhost:4533
}
Point your DNS A record to your server's public IP, then start Caddy:
caddy run
Caddy will automatically fetch and renew SSL certificates. Within seconds, https://music.yourdomain.com is live and encrypted. If you don't have a public IP or don't want to expose your server, use Cloudflare Tunnel instead—it's equally secure and simpler for homelabs.
Clients: Accessing Your Music
Navidrome works with any client that supports the Subsonic API. I use:
- Web Client: Built-in, accessible right from the browser. No installation needed.
- iOS: Subsonic, Staves, or Substreamer are all excellent. They cost $3–$5 once.
- Android: SubsonicShuffler, Strix Music, or Dsub are free or cheap.
- Desktop: Sublime Music (Linux), Subsonic app (Windows/Mac), or the web client everywhere.
The beauty of Subsonic API compatibility is that you're not locked into Navidrome's client ecosystem. If you switch servers in five years, your clients still work. Try the web client first—it's responsive and handles playlists, search, and browsing perfectly.
Organizing and Scanning Your Library
Navidrome respects your file structure. It reads ID3 tags for metadata, but folder hierarchy matters too. I organize mine as:
/music/Artist Name/Album Name/01 - Track Name.flac
After you add new music, Navidrome rescans automatically every hour by default, or you can force a rescan from the admin panel. If your metadata is messy, use a tool like MusicBrainz Picard to clean it up first—it saves hours of manual work.
Transcoding Setup
Transcoding converts formats on the fly. If you have a mobile connection and want to save bandwidth, Navidrome can transcode FLAC to MP3 at 128kbps. You need ffmpeg installed:
sudo apt install ffmpeg
In Navidrome's admin panel under "Transcoding," enable transcode profiles. Set up one for "Mobile" (128kbps MP3), one for "WiFi" (320kbps), and leave "Original" for lossless. Clients can select the quality on demand. The CPU hit is minimal for home use.
Backing Up Your Setup
Your music files are precious. Your Navidrome database—playlists, plays, ratings—is even more precious. I run a daily backup of the ./data directory to an external drive:
0 2 * * * rsync -av ~/navidrome/data /backup/navidrome-backup/$(date +\%Y-\%m-\%d)/
Add this to your crontab. It takes seconds and protects you from catastrophic loss. Music files themselves should be on redundant storage—a RAID-1 NAS or regular backups to cloud object storage.
Moving Forward: Advanced Features
Once your server is stable, you can layer in extras. Scrobble to Last.fm to track listening habits. Use Jellyfin if you also want to host movies and TV shows alongside music. Add a second Navidrome instance on another device for redundancy. Integrate with your home automation to skip tracks or pause playback from Node-RED.
The core setup I've described takes two hours from start to streaming music on your phone. The freedom—and the savings—pay back the effort on day one.
Conclusion
Building a private music streaming service is simpler than most people think, and it transforms how you listen. You own your data, you choose your client, and you never worry about algorithm changes or subscription hikes. Start with Navidrome, get it running on spare hardware or a cheap VPS, and enjoy uninterrupted access to your entire library.
If you're running this on a VPS, I recommend checking out RackNerd's affordable options for reliable, low-cost hosting. Next, consider adding a reverse proxy like Caddy for secure remote access, or explore connecting it to Tailscale for private networking without exposing your server publicly.