Contents

Cocofy

My own music streaming app.

Chapter 4Mergedcocofy into mainself-hosted · cloudSource on GitHub (opens in a new tab)

Context

No accounts, no ads, no subscriptions. Just my music, on my own hardware.

You search for a song or an artist, click a result, and playback starts as soon as the download is ready. Every song stays on the server afterwards, so the library grows on its own as I listen.

Changes

  • A FastAPI backend that searches YouTube’s music catalog, downloads with yt-dlp and streams the result.
  • MP3s at the best available quality, with full metadata and embedded cover art.
  • A single-file frontend in plain HTML, CSS and JavaScript. It works fine on a phone over Tailscale and has keyboard shortcuts on desktop.
  • Navidrome compatibility: songs land in the folder Navidrome watches, so they also show up in any Subsonic app for offline listening.

Deployment

Every push to main builds a new Docker image with GitHub Actions and pushes it to GHCR. Watchtower picks it up within 30 seconds and restarts the container. I never have to log into the server to deploy.

Next

The list is long: queues with shuffle and repeat, playlists, favorites, lyrics, YouTube playlist import, an equalizer, a sleep timer, a full-screen now-playing view, and offline PWA support.

Turn the pageChapter 5: Shift