Customizing Persistent IDs in Navidrome
Persistent IDs in Navidrome
Persistent IDs (PIDs) are configurable identifiers introduced to provide stable references for Tracks and Albums in Navidrome, significantly improving how media is managed and identified.
Overview of Persistent IDs
Persistent IDs are unique, user-configurable identifiers for tracks and albums, enabling Navidrome to accurately detect and manage moved or re-tagged files, and disambiguate albums with identical names or duplicated entries.
Key Features
- Configurable and Flexible: Users can define their PID structure using various tags, including
musicbrainz_trackid,albumid,discnumber,tracknumber,title,folder,albumartistid,catalognumber, Discogs IDs, or even custom tags - Accurate File Detection: Navidrome recognizes moved or re-tagged files, preventing duplication or mismatches.
- Album Disambiguation: Easily differentiate albums with identical names through custom tags like
albumversion(e.g., Deluxe Editions).
Default Configuration
The default configuration prioritizes MusicBrainz IDs (MBIDs) when available:
PID.Track = "musicbrainz_trackid|albumid,discnumber,tracknumber,title"
PID.Album = "musicbrainz_albumid|albumartistid,album,albumversion"
Track PID:
- Uses
musicbrainz_trackidif available. - Otherwise, combines
albumid,discnumber,tracknumber, andtitle. (albumidis derived fromPID.Album.)
- Uses
Album PID:
- Uses
musicbrainz_albumidif available. - Otherwise, combines
albumartistid,album, andalbumversion.
- Uses
Before 0.65.0, the default PID.Album also included releasedate:
musicbrainz_albumid|albumartistid,album,albumversion,releasedate. With that spec, an album that mixes M4A or WMA
files with MP3 or FLAC files can be split in two, because only some of its files get a release date from their year tag.
When you upgrade to 0.65.0, each library that was scanned with the old default keeps it as its own Album grouping
override, so its album IDs do not change. In the library settings, these libraries show
Custom with the old spec. To use the new default in one of them, set its Album grouping to Use global
setting. This starts a full rescan of that library. If your configuration file sets PID.Album to the old spec,
Use global setting keeps the old spec. Remove PID.Album from your configuration file first.
Customizing PIDs
You can create custom PID configurations to meet specific needs, such as:
Grouping albums by folder:
PID.Album = "folder"Using Discogs or custom IDs for albums:
Tags.discogs_release_id.Aliases = ['DISCOGS_RELEASE_ID'] PID.Album = 'discogs_release_id|albumartistid,album,albumversion'Using the pre-0.55.0 (pre-BFR) behaviour:
PID.Album = "album_legacy" PID.Track = "track_legacy"This will use the old ID generation method, which is based on the file path for tracks and name+releaseDate for albums.
- Full Rescan Required: Changing PID configurations triggers a full rescan of the affected libraries. Navidrome will reassign PIDs accordingly, preserving playlists, shares, and track stars, ratings and playcounts. Album stars and ratings move to the new albums where an old album maps to a new one. When several old albums merge into one new album, only one of them keeps its star and rating.
- Backup Your Database: Before changing PID configurations, back up your Navidrome database to prevent data loss.
Per-library Persistent IDs
Each library can override the global PID.Album and PID.Track
settings. This is useful when your libraries are organized differently. For example, your main music library can use
the default MusicBrainz-based grouping, and an audiobooks or classical library can group albums by folder.
To change it, go to Settings → Libraries, open a library, and find the Persistent IDs section. The same section is also available when you create a new library.

- Album grouping sets the album PID for this library:
- Use global setting: uses the
PID.Albumvalue from your configuration file. This is the default. - Folder (one album per folder): same as
PID.Album = "folder". - Custom: enter your own PID spec, using the same syntax as
PID.Album. The field starts with the global value, so you can edit it instead of typing it from scratch.
- Use global setting: uses the
- Track identity sets the track PID for this library. It has the same options, except Folder.
Navidrome checks a custom spec when you save it. It rejects unknown tags and attributes. Album specs must use the tag
name, not one of its aliases (for example catalognumber, not wm/catalogno), and cannot use albumid.
When you save a change, Navidrome asks you to confirm it:

After you confirm, Navidrome rescans only this library in full. If a scan is already running, the rescan starts when it finishes. A new library uses its PID settings from its first scan, so it does not need an extra full scan.
When you change the global PID.Album or PID.Track settings, Navidrome rescans in full only the libraries that use
the changed setting. A library that has its own value for that setting is not affected.
Handling File Moves and Retagging
When files are moved, Navidrome uses PIDs to accurately identify and reconnect these files on the next scan:
- First, Navidrome attempts to match a missing file with new ones based on exact tags.
- If exact tags do not match, Navidrome checks for a matching PID.
- Finally, if no PID match is found, it attempts to match the file based on the original file path, excluding the
file extension (ex:
/artist/album/01-track.mp3→/artist/album/01-track.flac).
This ensures minimal disruption to playlists, ratings, and play counts when managing your media library.
You can also retag your files, and Navidrome will automatically update the PIDs based on the new tags.
Retagging and moving files cannot be done in the same scan, because Navidrome will not match new files with the old ones. First, retag the files and perform a scan, then move them and scan again, or move first, scan, and then retag.
Artist IDs
Currently, Artist PIDs rely solely on the artist name due to limitations in TagLib/Picard regarding MBIDs for
composer and other roles, potentially causing duplicate entries. For this reason they are not configurable.
Future enhancements are planned to address this.
Troubleshooting and Support
If issues arise when enabling or configuring PIDs:
- Review Navidrome logs.
- Validate your configuration file.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can make this documentation even better.
Sorry to hear that. Please tell us how we can improve this documentation.