Sync your Spotify playlists to Navidrome automatically.
NaviSync is a native Navidrome plugin that periodically fetches your Spotify playlists and recreates them in Navidrome by matching tracks against your local library.
- Download
navisync.ndpfrom Releases - Copy it to your Navidrome plugins directory
- Enable plugins in
navidrome.toml:[Plugins] Enabled = true
- Restart Navidrome
- In Navidrome UI, go to Settings > Plugins and assign users to NaviSync
- Go to Spotify Developer Dashboard
- Create a new app
- Add redirect URI:
http://localhost:8888/callback(for the token helper script) - Save your Client ID and Client Secret
Use the included helper script to obtain a Spotify refresh token:
node scripts/get_token.js <CLIENT_ID> <CLIENT_SECRET>Follow the browser prompt to authorize, then copy the refresh token.
In Navidrome UI, go to Settings > Plugins > NaviSync:
- Spotify Client ID: Your app's Client ID
- Spotify Client Secret: Your app's Client Secret
- Spotify Refresh Token: The token from step 3
- Sync Interval: Cron expression (default:
0 */6 * * *= every 6 hours) - Playlists Filter: Leave empty to sync all, or comma-separated playlist names
- On each scheduled sync, NaviSync fetches all users assigned to the plugin
- For each user, it retrieves their Spotify refresh token from Navidrome's KVStore (falling back to the global config)
- It authenticates with Spotify and fetches the user's playlists
- For each playlist (optionally filtered), it searches Navidrome's library via the Subsonic API to match tracks by artist and title
- Matched tracks are assembled into a Navidrome playlist (created or updated)
- Automatic scheduled sync via Navidrome's scheduler
- Per-user Spotify tokens stored in Navidrome's KVStore
- Track matching: exact case-insensitive match, with fuzzy contains-based fallback
- Playlist filtering by name
- Automatic Spotify token refresh with rotation support
- Manual sync and connection test triggers via plugin settings
Plugin won't load?
- Ensure you're running Navidrome with plugin support enabled
- Check logs: set
Plugins.LogLevel = "debug"in your Navidrome config - Verify the
.ndpfile is in the plugins directory
No users found?
- Users must be explicitly assigned to the plugin in Settings > Plugins > NaviSync
Tracks not matching?
- NaviSync matches by artist name and track title against your Navidrome library
- Ensure your library has accurate metadata (tools like MusicBrainz Picard help)
- Check debug logs for "Unmatched" entries to see which tracks couldn't be found
Token errors?
- Verify your Spotify Client ID and Client Secret are correct
- Re-run the token helper script to get a fresh refresh token
- Check that
api.spotify.comandaccounts.spotify.comare allowed in the plugin's HTTP permissions
- Go 1.25+
- TinyGo 0.40+
# Quick build
make build
# Or use the helper script
./build.shThis produces navisync.ndp (a zip containing manifest.json + plugin.wasm).
main.go - Plugin registration (lifecycle + scheduler)
sync/sync.go - Sync orchestration (OnInit, OnCallback, PerformSync)
navidrome/navidrome.go - Navidrome host function wrappers (Subsonic API, KVStore, Users)
spotify/client.go - Spotify API client (playlists, tracks, token refresh)
manifest.json - Plugin manifest with permissions and config schema
MIT