- Updated: January 6, 2026
- 6 min read
Build Your Own Self‑Hosted Music Server: A Cost‑Effective Alternative to Spotify
Self‑hosting your own music server with a Hetzner VPS, Jellyfin, WireGuard VPN and Docker‑Compose is a practical, cost‑effective alternative to Spotify after its recent price increase.
How to Build a Self‑Hosting Music Server After Spotify’s Price Hike
When Spotify announced a steep price increase for German Premium users in August 2025, many music lovers started asking: Is there a cheaper way to keep my library streaming 24/7? The answer is a DIY self‑hosting music server that you control from end‑to‑end. In this guide we break down the entire process—hardware, software, networking, and automation—so you can stream your collection without monthly subscription fees.
For the full story behind the price hike, read the original blog post here. Below you’ll find a step‑by‑step walkthrough, plus a handful of UBOS resources that can accelerate your deployment.
Why Spotify’s Price Increase Matters
Spotify’s August 2025 announcement raised the Premium monthly fee in Germany by €1.99, pushing the price from €9.99 to €11.98. While the company justified the hike with higher royalty costs, users quickly noticed a simultaneous degradation of the free tier:
- Mandatory shuffle after a limited number of tracks.
- Inability to scrub the progress bar on free accounts.
- Increased ad frequency even for long‑time subscribers.
These changes, combined with similar price adjustments across Netflix, Amazon Prime, and Disney+, have sparked a broader conversation about the value‑for‑money ratio of streaming services. For tech‑savvy listeners, the logical next step is to reclaim control over their media library.
The Self‑Hosting Stack: Hetzner VPS, Storage Box, Jellyfin, WireGuard & Docker‑Compose
Hetzner VPS
We start with a Hetzner Cloud VPS (CAX21 – 4 vCPU, 8 GB RAM, 80 GB SSD, 20 TB traffic). This configuration offers enough compute power for transcoding, while keeping monthly costs under €10.
Hetzner Storage Box
Instead of filling the VPS SSD with media files, we mount a Storage Box. It provides cheap, scalable storage (up to several TB) and can be accessed via SMB from any device, including your MacBook.
Jellyfin Media Server
Jellyfin is a fully open‑source alternative to Plex. It supports a wide range of codecs, offers a sleek web UI, and integrates seamlessly with Docker. For a self‑hosted music server, Jellyfin’s library management and transcoding capabilities are more than sufficient.
WireGuard VPN
Secure remote access is handled by WireGuard, a lightweight VPN that runs in a single Docker container. It creates a private tunnel between your devices and the Hetzner server, ensuring that your music streams stay encrypted.
Docker‑Compose Orchestration
All components—WireGuard, Jellyfin, and optional monitoring tools—are defined in a docker-compose.yml file. This makes deployment repeatable, version‑controlled, and easy to update.
Why Self‑Host? Benefits & A Practical Walkthrough
Key Benefits
- Cost Savings: After the initial VPS and storage costs, you avoid recurring subscription fees.
- Full Control: No ads, no shuffle‑only restrictions, and complete ownership of your metadata.
- Privacy: Your listening habits never leave your own server.
- Scalability: Add more storage or CPU power as your library grows.
- Automation: Integrate with UBOS tools for automated backups, metadata fetching, and AI‑driven recommendations.
Step‑by‑Step Deployment
- Provision the Hetzner VPS – Sign up at Hetzner, select the CAX21 plan, and note the public IP address.
- Create a Storage Box – Allocate the desired capacity, then mount it on the VPS via
sshfsor NFS. - Install Docker & Docker‑Compose – Run:
apt-get update && apt-get install -y docker.io docker-compose - Configure WireGuard – Generate server and client keys, then create
wg0.conf:[Interface] Address = 10.13.13.1/24 ListenPort = 51820 PrivateKey = <SERVER_PRIVATE_KEY> [Peer] PublicKey = <CLIENT_PUBLIC_KEY> AllowedIPs = 10.13.13.2/32Add the same config to each device (phone, laptop, router). For home routers like FRITZ!Box, you can import the peer directly.
- Write the Docker‑Compose file – Save the following as
docker-compose.yml:version: "3.9" services: wireguard: image: linuxserver/wireguard:latest container_name: wireguard cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=Etc/UTC - SERVERPORT=51820 - SERVERURL=${SERVER_IP} volumes: - ./wireguard/config:/config - /lib/modules:/lib/modules:ro ports: - "51820:51820/udp" sysctls: - net.ipv4.conf.all.src_valid_mark=1 restart: unless-stopped jellyfin: image: jellyfin/jellyfin:latest container_name: jellyfin network_mode: "service:wireguard" user: "1000:1000" volumes: - ./jellyfin/config:/config - /mnt/storagebox:/media:ro environment: - TZ=UTC restart: unless-stopped depends_on: - wireguard - Launch the stack – Run
docker-compose up -d. Verify that Jellyfin is reachable only through the WireGuard tunnel (e.g.,http://10.13.13.1:8096). - Configure Jellyfin – Add your mounted
/mediafolder as a music library, enable transcoding, and set up user accounts. - Optional: Add AI‑enhanced features – Use UBOS’s AI marketing agents to generate personalized playlists, or integrate the OpenAI ChatGPT integration for voice‑controlled search.
Once the stack is up, you can stream your entire collection from any device—phone, laptop, smart TV—without ever seeing an ad or paying a monthly fee.
Your Self‑Hosted Music Architecture

Illustration: UBOS AI‑generated overview of the self‑hosting stack.
Accelerate Your Project with UBOS
UBOS offers a suite of tools that can turn this DIY guide into a production‑ready solution in minutes:
- Explore the UBOS templates for quick start—including a pre‑configured Jellyfin + WireGuard stack.
- Use the Workflow automation studio to schedule nightly backups of your Storage Box.
- Leverage the Web app editor on UBOS to build a custom front‑end for your music library.
- Check out the UBOS platform overview for deeper integration possibilities, such as AI‑driven recommendation engines.
- Need a budget estimate? The UBOS pricing plans are transparent and scale with your usage.
- Start small with the AI Article Copywriter template to generate documentation for your server.
- Boost SEO for your personal music blog using the AI SEO Analyzer – perfect for sharing your setup online.
Ready to dive in? Visit the UBOS homepage and sign up for a free trial. Our community forums and partner program also provide hands‑on support for self‑hosting enthusiasts.
Conclusion: Take Back Your Music
Spotify’s price hike has highlighted a growing frustration among listeners: paying more for less freedom. By deploying a self‑hosted music server on a Hetzner VPS, you regain control, protect your privacy, and eliminate recurring fees. The stack—Hetzner, Jellyfin, WireGuard, Docker‑Compose—offers a robust, scalable foundation, while UBOS’s ecosystem supplies ready‑made templates, automation, and AI enhancements to streamline the process.
Whether you’re a solo audiophile or a small team looking to share a curated library, the steps outlined above empower you to build a resilient, cost‑effective solution that grows with your needs. The future of streaming is shifting from centralized giants to decentralized, user‑owned platforms—be part of that movement today.
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.