π΅ Adding Lyrics to Selfhost Music
This guide explains how Selfhost Music searches for lyrics and how you can easily add them to your music files.
β Quick Overview
Selfhost Music supports:
- π External lyric files (
.lrcor.txt) - π·οΈ Embedded lyrics inside audio file tags
By default, Selfhost Music searches in this order:
.lrc β .txt β embedded
This is controlled by the environment variable:
ND_LYRICSPRIORITY
Default value:
.lrc,.txt,embedded
1οΈβ£ External Synced Lyrics (.lrc)
This is the best option if you want synchronized (karaoke-style) lyrics.
π Step 1 β Match the filename exactly
The lyric file must:
- Have the same base name as the audio file
- Be in the same folder
Example:
01 - My Song.mp3 01 - My Song.lrc
β οΈ On Linux systems, filenames are case-sensitive.
π Step 2 β Use correct LRC format
Example:
[00:12.00] First line of lyrics [00:34.50] Second line of lyrics
Format:
[mm:ss.xx] Lyrics line
Selfhost Music will automatically sync the lyrics during playback.
2οΈβ£ Embedded Lyrics (Unsynchronized)
Use this if you only want static lyrics (no timing).
Lyrics are stored inside the audio file metadata:
- MP3 β
USLTtag - FLAC / OGG β
LYRICSorUNSYNCEDLYRICSfield
π Tools to Add Embedded Lyrics
Mp3tag (Windows)
- Open file
- Go to Extended Tags
- Add or edit the
LYRICSfield
Kid3 (Windows / Linux / macOS)
- Edit the Unsynchronised lyrics field
CLI Tools (for advanced users)
eyeD3mid3v2vorbiscomment
Useful for bulk scripting.
3οΈβ£ Configure Lyrics Priority
You can change the search order using:
ND_LYRICSPRIORITY
Example values:
.lrc,.txt,embedded embedded,.lrc
Restart-Service
4οΈβ£ Force a Library Rescan
After adding lyrics:
- Restart Selfhost Music
- Use the Scan option in the Admin panel
- Modify the file date to trigger re-indexing
5οΈβ£ Minimal LRC Example
[00:00.00] Intro [00:15.20] Verse 1 line 1 [00:22.50] Verse 1 line 2
π§ Troubleshooting
βοΈ Filenames must match exactly βοΈ Check ND_LYRICSPRIORITY βοΈ If embedded lyrics donβt show, confirm correct tag field βοΈ Enable debug logs with:
ND_LOGLEVEL=debug