bvandeusenandClaude Opus 5.5 9462052625
release / go (push) Successful in 2m6s
release / web (push) Successful in 1m15s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 4m46s
release / android (push) Successful in 4m47s
release / Build signed APK (push) Successful in 5m38s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 31s
release / Verify release artifacts (tag releases only) (push) Skipped
feat(library): removing a bad file keeps its track, waiting for a good copy
Reports, Duplicates and Suspect sources now end the same way: the file
goes and the track stays, marked missing with its likes, plays and
playlist places, until a good copy lands in the library and move
adoption or missing-pair folding brings it back.

- library.RemoveFile removes one track's file and marks the track
  missing with the queue it was removed from and who removed it
  (tracks.removed_reason / removed_by, migration 0104). The duplicate
  resolver's wrong-slot removal shares the same marking.
- POST /api/admin/quarantine/{id}/remove-file removes a reported file,
  clears the listeners' reports, marks open playback errors deleted and
  records removed_file in the Reports history. A wrong-file or
  wrong-tags report drops the file's recording MBID.
- POST /api/admin/library/suspect-sources/{id}/remove removes a video
  rip's file and its MBID, and writes a suspect_file_remove audit row.
- The removal reason clears with the missing mark when a file returns.

Grimoire #7743 (milestone 635).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:17:26 -05:00
2026-04-18 17:33:35 +00:00

Minstrel logo

Minstrel

A self-hosted music server that picks what to play next.

Minstrel serves your music library to the web, to its own Android app, and to any Subsonic client. Shuffle, radio, likes and play history are worked out on the server, so every device gets the same mixes and the same history. It is for anyone who keeps their own music collection and wants it to sound like more than a random shuffle.

Minstrel home — your library at a glance

Quick start

# compose.yaml
services:
  minstrel:
    image: git.fabledsword.com/bvandeusen/minstrel:latest
    ports: ['4533:4533']
    volumes:
      - ./music:/music              # your library; must be writable by uid 1000
      - minstrel-data:/app/data     # art and caches
    environment:
      MINSTREL_DATABASE_URL: postgres://minstrel:minstrel@db:5432/minstrel?sslmode=disable
      MINSTREL_LIBRARY_SCAN_PATHS: /music
    depends_on: [db]

  db:
    image: postgres:17
    environment:
      POSTGRES_USER: minstrel
      POSTGRES_PASSWORD: minstrel
      POSTGRES_DB: minstrel
    volumes: [pgdata:/var/lib/postgresql/data]   # users, likes, history: back this up

volumes:
  minstrel-data:
  pgdata:
docker compose up -d
docker compose logs minstrel | grep setup_token

Open http://<host>:4533/register and create the first account with that setup token. The first account is the administrator.

First run

  1. Let the first scan finish. Minstrel scans the library on startup. Watch it, or scan again, on the Admin page (/admin). Later scans only pick up what changed.
  2. Install the Android app. In Settings (/settings), the Install the Android app card downloads the app this server ships. It updates itself from your server after that.
  3. Invite the household. In Admin › Users (/admin/users), make an invite token or turn on open registration. Each person gets their own likes, history and recommendations.
  4. Optional: connect ListenBrainz. Each person adds their own ListenBrainz token in Settings › Connections.

The Admin page, where the library scan runs and reports progress

Configuration

The quick start sets everything that's required. These are the settings people most often change:

Variable What it does
MINSTREL_DATABASE_URL Postgres connection string. Required.
MINSTREL_LIBRARY_SCAN_PATHS Library folders inside the container, colon-separated (/music:/audiobooks). They are used on first start only; after that, change them in Admin › Library.
MINSTREL_BRANDING_APP_NAME The name shown in the header, the browser tab and link previews.
MINSTREL_LOG_LEVEL debug, info, warn or error.

ListenBrainz, email, metadata sources and recommendation tuning are set in the web UI and take effect without a restart. The full file-based surface is in config.example.yaml; to use it, mount your copy at /etc/smartmusic/config.yaml.

Setup pitfalls

  • The library mount has to be writable by uid 1000. Minstrel deletes a file when an admin asks it to, and when the duplicate resolver removes a copy. It never moves, renames or retags your files. Mount the library :ro to forbid writes: those actions then refuse and say why.
  • MINSTREL_LIBRARY_SCAN_PATHS names the path inside the container (/music), not the folder on your host.
  • On the internet, put it behind HTTPS. Plain http:// is fine on a network you trust. For a public server, bind the port to 127.0.0.1 and put a reverse proxy in front: see docs/hosting.md.

Updating and backups

docker compose pull && docker compose up -d

Database migrations run at startup. Image tags:

  • :latest: the stable release. Most people should run this.
  • :<commit-sha>: one fixed build. Pin one to stop updates, or to roll back.
  • :dev: the test channel, rebuilt on every change. It may break, and the fix is the next build.

Every image carries a signed Android app, all with the same key, so a phone can move between channels without reinstalling. Rolling back a SHA tag rolls back the app it carries too.

Back up the Postgres volume with pg_dump. It holds accounts, likes, play history, playlists and settings, and a migration can only be undone by restoring a dump. The minstrel-data volume holds artwork and caches that Minstrel rebuilds if lost.

Features

Listening

  • Smart shuffle that weighs what you like, what you skip and what you've heard lately, instead of picking at random.
  • Two kinds of like: a song you love, and a song that's right for what you're listening to now.
  • Radio that starts from any song, using ListenBrainz similarity as well as your own history.
  • Daily mixes and system playlists built from your listening.
  • Playback on Sonos and other UPnP speakers from the Android app.
  • Loudness levelling between tracks, so you never reach for the volume.

Your library

  • Browse by artist, album, genre and year, with search across everything.
  • Duplicates, missing files and suspect copies are found and listed under Collection for an admin to fix.
  • Missing album art and MusicBrainz ids are filled in automatically.

Clients and accounts

  • A full web app, built into the server.
  • A native Android app that ships inside the server image, keeps playing what it has cached when the server is out of reach, and updates itself from your server.
  • OpenSubsonic-compatible, so existing clients such as DSub, Symfonium and play:Sub connect as they are.
  • Separate accounts for each person, with invites, and an inbox for what happened while you were away.

Scope and responsible use

Minstrel indexes the files you point it at and streams them to your own clients. It does not find or download music, and it does no DRM circumvention.

What you put in your library is your responsibility. Copyright law applies to your collection as it does to any other software that plays a file; please respect it, and the terms of any service you connect.

Minstrel is not affiliated with or endorsed by ListenBrainz, MusicBrainz or Subsonic.

Development

  • Backend: docker compose up in this repo runs Postgres and Minstrel on :4533.
  • Web: cd web && npm install && npm run dev starts Vite on :5173. It proxies /api/* and /rest/* to :4533.
  • Tests: make test-short runs the unit tests. make test-integration also runs the database tests, against a separate minstrel_test database so your dev data is never truncated.
  • Image: docker build -t minstrel . builds the web app and embeds it in the server binary.
  • Branches: work lands on dev; main changes through pull requests from dev.

How accounts and sessions are protected: docs/security.md.

License

MIT. See LICENSE.

S
Description
Self-hosted music server with OpenSubsonic compatibility, server-side smart shuffle, dual-like model, session-aware radio, and Lidarr integration. Go + Postgres.
Readme MIT
68 MiB
2026-10-26 12:47:56 -04:00
Languages
Go 51.9%
Kotlin 23.5%
TypeScript 13.2%
Svelte 10.4%
Python 0.3%
Other 0.5%