selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
musikat logo

Self-host musikat

Music downloader for Navidrome with Deezer/Spotify search

BetaOpen SourceMIT
Updated6 months ago
LanguagePython
Setup difficultyModerate
Stars
179
Port
8000 (HTTP API and web UI)
Requires
Ffmpeg
Install with Docker Compose
Main interface showing search and catalog selectionDownload queue with progress bars

What is musikat?

Musikat is a self-hosted web app that downloads music from YouTube using track information from Deezer (no API key needed) or Spotify (with credentials). It writes ID3 tags and cover art to each file, then either places the music into one or more Navidrome library folders on the server or sends it to the browser for local saving. The stack is FastAPI plus vanilla JavaScript, with yt-dlp and FFmpeg handling audio extraction and mutagen doing the tagging. Multiple Navidrome roots are supported, a background sync can mark tracks already present in the library, and YouTube cookies can be supplied to avoid bot blocks. You can deploy with Docker Compose or a plain Python virtual environment. The code is MIT-licensed and meant for personal use.

Should you self-host musikat?

musikat scores 41/100 on selfhost.directory (how scoring works) and ranks #43 of 59 in Music Streaming. It has 179 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is koel (75/100, 17 320 stars). It scores higher overall, so compare the two before you pick. See musikat vs koel side by side.

Features

  • Album download
  • Background library sync
  • Deezer catalog search
  • Duplicate Detection
  • ID3 tagging with cover art
  • Local browser download
  • Reverse proxy subpath support
  • Reverse YouTube to metadata
  • Spotify catalog search
  • Web UI with download queue
  • YouTube audio download
  • YouTube cookies support

musikat README

How to install musikat

Install musikat with Docker Compose

Docker and Docker Compose

git clone https://github.com/soggy8/musikat.git cd musikat

cp backend/env.example backend/.env

Edit backend/.env: Navidrome path(s), optional Spotify, DEFAULT_METADATA_PROVIDER

docker-compose up -d

Mount your Navidrome music directory in docker-compose.yml

How to configure musikat

  • API_HOST0.0.0.0Bind address for the API server

    Bind address for the API server

  • API_PORT8000Port for the API server

    Port for the API server

  • AUDIO_QUALITY128Default audio quality in kbps

    Default audio quality in kbps

  • CORS_ORIGINShttp://localhost:3000,http://127.0.0.1:3000Comma-separated allowed CORS origins

    Comma-separated allowed CORS origins

  • DEFAULT_METADATA_PROVIDERdeezerMetadata catalog to use: deezer (default) or spotify

    Metadata catalog to use: deezer (default) or spotify

    values: deezer, spotify

  • DOWNLOAD_DIR./downloadsServer temporary directory for downloads

    Server temporary directory for downloads

  • NAVIDROME_API_URLhttp://localhost:4533Navidrome base URL for triggering library scans

    Navidrome base URL for triggering library scans

  • NAVIDROME_MUSIC_LABELSLabels for each path in NAVIDROME_MUSIC_PATHS, shown in UI

    Labels for each path in NAVIDROME_MUSIC_PATHS, shown in UI

  • NAVIDROME_MUSIC_PATH/musicSingle absolute path to Navidrome music library (used when NAVIDROME_MUSIC_PATHS is not set)

    Single absolute path to Navidrome music library (used when NAVIDROME_MUSIC_PATHS is not set)

  • NAVIDROME_MUSIC_PATHSComma- or newline-separated absolute paths for multiple Navidrome libraries

    Comma- or newline-separated absolute paths for multiple Navidrome libraries

  • NAVIDROME_PASSWORDNavidrome admin password for API access

    Navidrome admin password for API access

  • NAVIDROME_SYNC_ENABLEDtrueEnable background library sync to mark downloaded tracks

    Enable background library sync to mark downloaded tracks

    values: true, false

  • NAVIDROME_SYNC_INITIAL_DELAY_SEC120Delay before first sync after startup

    Delay before first sync after startup

  • NAVIDROME_SYNC_INTERVAL_HOURS4Hours between sync runs

    Hours between sync runs

  • NAVIDROME_USERNAMENavidrome admin username for API access

    Navidrome admin username for API access

  • OUTPUT_FORMATmp3Default audio output format

    Default audio output format

  • SPOTIFY_CLIENT_IDSpotify API client ID (required for Spotify catalog)

    Spotify API client ID (required for Spotify catalog)

  • SPOTIFY_CLIENT_SECRETSpotify API client secret (required for Spotify catalog)

    Spotify API client secret (required for Spotify catalog)

  • SPOTIFY_REDIRECT_URIhttp://localhost:8000/callbackOAuth redirect URI for Spotify

    OAuth redirect URI for Spotify

  • YOUTUBE_COOKIES_PATHPath to Netscape-format YouTube cookies file for yt-dlp

    Path to Netscape-format YouTube cookies file for yt-dlp

FAQ

How do I configure Musikat behind a reverse proxy with a subpath like /musikat/?

Configure nginx to forward requests and send X-Forwarded-Prefix: /musikat header. The frontend also infers the subpath from the browser URL when the header is missing.

How do I fix CORS errors when accessing from a different origin?

Add your site origin to CORS_ORIGINS in .env (required if the browser loads the UI from a different origin than the API, e.g. another port or domain).

Why don't downloaded files appear in Navidrome?

Ensure the music paths are writable by the Musikat process, match the paths configured in NAVIDROME_MUSIC_PATHS, and check that GET /api/navidrome/libraries matches your Docker mounts and permissions.

How do I fix YouTube errors like 'Sign in to confirm you're not a bot' or 403?

Install FFmpeg and ensure it's on PATH. Export YouTube cookies in Netscape format and set YOUTUBE_COOKIES_PATH in the environment.

Why are there no search results?

Try the other catalog (Deezer or Spotify) or use a more specific query with artist and title.

More in Audio

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…