Melarka

A self-hosted Spotify alternative for your family

Spotify is a subscription to someone else's catalogue. A self-hosted alternative flips that: you keep the music, run the server at home, and nobody can take a song away or raise the price. Melarka is a free, open-source music server built for that, with phone apps that feel like a streaming service.

What a Spotify alternative has to do

Most people who look for a Spotify alternative do not miss the logo. They want a handful of everyday things to keep working: a library that fits in a pocket, playlists and favorites, shuffle and radio, lyrics, music in the car, and music that still plays when the signal drops. A self-hosted music server can do all of that, as long as it comes with good phone apps. Melarka comes with its own iPhone, Android and web apps, built together with the server.

What Melarka does, compared with Spotify

SpotifyMelarka
Where the music comes fromSpotify's licensed catalogueYour own music folders, plus songs you download from YouTube. Melarka ships no content
CostMonthly subscription (family plans exist)Free and open source (AGPL-3.0); you pay for your own server and electricity
AccountsOne per person, or a family planOne per person: each gets their own favorites, playlists, radio, history and language
LyricsSynced lyrics in the appSynced lyrics from the file, a .lrc next to it, or online sources; anyone can shift lyrics that run early or late
OfflineDownloads for subscribersFavorites cached on the phone, with a size limit you pick
CarCar apps, Bluetooth and ConnectFavorites start by themselves when the phone connects to the car, with the lyric line on the car display
DiscoveryHuge, with editorial playlists and podcastsA nightly "For you" list of YouTube songs you do not have yet, based on what you play; tags; personal radio
PrivacyListening data goes to the serviceNo tracking; your server only contacts YouTube, lyrics services and Last.fm if you turn them on

Spotify's catalogue and recommendations are far larger than anything you can host, and that is the honest trade-off. If you mostly play the same few hundred songs, and your family's favorites are things you own or can download, the trade is worth it. If you live on new releases and podcasts, keep Spotify for those.

Self-hosted music streaming for your phone

The server runs as one Docker container on a Linux machine or NAS at home. You reach it from anywhere over HTTPS, so the apps work on mobile data as well as at home. Streaming comes in three quality tiers: lossless (the original file whenever the player can play it), high (AAC up to 256 kbps) and saver (AAC up to 128 kbps), transcoded on the fly and cached.

The iPhone and Android apps have a native playback engine: background play, gapless transitions, lock-screen and car controls, a sleep timer that fades out and volume normalization. The web app can also be added to the home screen and runs full screen.

Where the songs come from

Point Melarka at music folders you already have, in any format ffmpeg reads (FLAC, MP3, AAC/M4A, Ogg, Opus, WAV and more). Melarka only reads them and never rewrites files or tags; the titles and lyrics you fix are stored in its own database. For everything else, you can search YouTube from the app and download a song or a whole playlist. Read how the YouTube side works and the responsible-use notes before you rely on it.

Is it hard to set up?

You need a machine that stays on and has Docker. After that it is one command, shown below, which sets up Docker Compose, starts Melarka and prints the address and the admin password. For use from phones you add an HTTPS reverse proxy; the README has Caddy and nginx examples. The Docker install guide walks through it.

One honest limit: the iPhone app is not in the App Store. You sign it with your own free Apple ID, either with a Mac and Xcode or with SideStore on the phone. Android gets a signed APK on every release.

Melarka is not a way to get commercial music for free. It plays music you own and music you are allowed to download; following YouTube's terms and your local copyright law is up to you.

Install in one command

Needs a Linux machine or NAS with Docker.

curl -fsSL https://raw.githubusercontent.com/aaronsuns/melarka/main/deploy/install.sh | sh -s -- /path/to/your/music

Install in one command ★ Melarka on GitHub

Step by step and configuration: docs/install.md.

FAQ

Is there a free self-hosted alternative to Spotify?

Yes. Melarka is free and open source (AGPL-3.0). You run it on your own machine, so there is no subscription and no account with us. You provide the music.

Can Melarka stream the same songs as Spotify?

No. Melarka has no licensed catalogue. It plays your own music folders and songs you download from YouTube, so it suits listening to music you keep rather than discovering everything new.

Does it work on iPhone and Android?

Yes. There are native iPhone and Android apps and a web app for any browser. The iPhone app is installed with your own Apple ID instead of the App Store.

Can the whole family use one server?

Yes. Each person gets an account with their own favorites, playlists, radio, history and language.