Melarka

YouTube to self-hosted music: how Melarka does it

A lot of music you care about lives only on YouTube. Melarka lets you search it from the app, download songs and playlists to your own server, and listen on any phone without YouTube ever seeing the phone. This page covers what it does and what to watch out for.

Search and download

From the search screen you can search your library and YouTube together, with view counts shown. Download a single song, a whole playlist (up to 200 entries), or paste a link. A downloaded playlist becomes a Melarka playlist. Downloads are saved as m4a in a library called youtube, separate from your own music folders. The download engine is yt-dlp, which ships in the Docker image; admins can update it from the admin console.

Preview before you keep

Play any YouTube video as a preview before deciding to keep it. Keep moves it into your music or your channels without a second download, and previews that you do not keep are temporary.

Follow YouTube channels without an account

The Channels section follows channels (podcasts, talks, music shows) without a YouTube account. New episodes download by themselves and play with resume and speed control. They expire after a while unless you keep them, so storage does not grow without limit.

Watch videos through your server

The Video section searches and plays YouTube videos through your server, with your own history and suggestions. The phone never contacts YouTube directly: searches, thumbnails and videos all come through the server, which is the only machine that talks to YouTube.

Nightly suggestions

Every night Melarka suggests YouTube songs you do not have yet, based on what you play and favorite most, in the For you list. You choose what to download.

Tidying up names

YouTube titles are messy: "Official Video", extra tags, the artist in the wrong place. Admins can edit title, artist, album and year as overrides, and an optional AI agent skill can clean up names in batches. Clean names also help lyrics matching.

In mainland China

YouTube is blocked in mainland China, so the YouTube features need a proxy on the server; phones need none. Your own music, lyrics and the apps work without one. See docs/install.md.

Responsible use

You are responsible for what you download. Follow YouTube's Terms of Service and the copyright law where you live, and download only what you are allowed to. Melarka ships no music, lyrics, covers or videos. Downloaders can also break when YouTube changes; the admin console can update yt-dlp, but a failure now and then is normal.

Melarka is a tool for listening to your own collection at home. For the bigger picture see the Spotify alternative guide.

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

Can I download a YouTube playlist to my own server?

Yes. Melarka downloads a whole playlist, up to 200 entries, and turns it into a Melarka playlist.

Does the phone talk to YouTube?

No. Searches, thumbnails and videos all go through your server, which is the only machine that contacts YouTube.

Is it legal?

That depends on what you download and where you live. You are responsible for following YouTube's terms and local copyright law.

Does it work in China?

The YouTube features need a proxy on the server because YouTube is blocked there. Your own music, lyrics and the apps work without one.