Home
Research
Blog
Portfolio
Resume

ME

HomeResearchBlogPortfolioResume

SITE

AboutContactPrivacy PolicySecurity Policy

SOCIALS

connect with me:EmailLinkedInGitHubGoogle ScholarORCIDItch.ioArtStationBehanceFacebookInstagram

© 2026 - All Rights Reserved

software

SongMirror

Ahnaf An Nafee

Ahnaf An Nafee / July 11, 2026

Repository

python

typescript

react

docker

tailwindcss

rest-api

Self-hosted playlist and favorites sync, multi-source merges, account-to-account transfers, and scheduled backups across streaming services and your own music library.

SongMirror project cover

SongMirror is the self-hosted music app I built to keep libraries connected across services. Run the official Docker image to use its browser interface and scheduler, with playlist and favorites syncs, multi-source merges, one-off transfers, track-list imports, and metadata backups. A FastAPI backend and React interface share the same Python engine as the headless CLI, so the browser and scheduled jobs apply the same matching and removal rules.

Run the Official Docker Image

Recommended setup: Docker with Compose v2.24 or newer. Configure your accounts in the browser.

Docker imageGitHubSetup guide

Use ghcr.io/ahnafnafee/songmirror:latest. Save the official Compose file as compose.yaml in a new folder, open a terminal in that folder, and run:

bash
docker compose up -d --pull always --no-build

Open localhost:8888, connect services under Accounts, then choose Transfers for a copy or Sync for a scheduled job. Use Preview before applying a sync. The image is prebuilt for AMD64 and ARM64, with no Git checkout or environment file required. Configuration and history persist in ./data, with downloads in ./downloads by default. Keep the interface on a trusted network because it has no login.

Choose How Your Library Stays Connected

Spotify, TIDAL, Qobuz, Deezer, Amazon Music, Apple Music, and YouTube Music support playlist and native favorites workflows. Jobs can use one source of truth, merge several source playlists into one destination, let a selected authoritative group contribute edits, or reconcile all selected services as N-way peers. Each named job has its own schedule and safety caps.

The provider set now extends beyond streaming catalogs. Last.fm contributes listening collections and supports incoming loves; ListenBrainz Loved Recordings can also be a source or, with authorization, a favorites destination. Navidrome/Subsonic supports playlist and starred-song sync against music already on the server. Jellyfin provides playlist browsing alongside a separate local audio mirror. The provider setup guide explains the newer connections and their capabilities.

Migrations, Imports, and Backups

A transfer can copy between services or two accounts on the same service, using a library selection or public playlist URL. YouTube transfers retain video IDs, including regular video playlists. Pause, resume, stop, and manual match review accompany a persistent audit history with confirmed counts and failure details. Restarted copies skip items already in their destination.

Track-list imports accept pasted text and TXT, CSV, TSV, M3U, or M3U8 files, with a review stage before creating or extending a playlist. Scheduled JSON/XML backups preserve an account's playlist metadata independently of sync jobs, with retention controls and run history. Manual exports include a Soundiiz-compatible JSON option.

SongMirror transfer setup selecting source and destination accounts for a playlist copy

Transfers work across services and between separate accounts on the same service.

Engineering the Shared Core

ISRC-first resolution falls back to title, artist, duration, and recording-version comparisons. Saved resolutions make repeat passes cheaper, while the Mappings page lets users correct a bad match or retry cached misses. Per-provider snapshots suppress sync echoes, and complete-read checks keep temporary catalog failures from becoming deletions.

The removal path is opt-in and capped. The CLI previews by default, and the browser exposes a separate Preview action. A services layer serializes engine access for syncs, transfers, and backups; server-sent events report progress without moving reconciliation logic into the web layer.

The Docker image supports AMD64 and ARM64 and runs the browser app and scheduler together. Configuration, credentials, caches, playlist snapshots, and transfer history live in persistent storage. The interface supports 15 languages, including right-to-left Arabic, and offers feature tours for setup.

Local Audio and Screenshots

The optional audio mirror first copies matches from an existing music library in their original format, preserving real FLAC files. spotDL fills remaining gaps, and playlist folders, covers, and .m3u8 files make the results usable in Jellyfin.

SongMirror sync wizard for choosing participating accounts and a reconciliation modeSongMirror Accounts page for connecting streaming services and personal music serversSongMirror playlist browser showing libraries across connected accountsPersistent SongMirror transfer history with filters and recorded copy attempts

The full engineering write-up explains reconciliation modes, matching, and the safeguards around unattended writes. SongMirror is MIT-licensed, with source and issue tracking on GitHub.

Edit on GitHub