↓ Skip to main content

Personal Music Library (1): Building with Navidrome, Feishin, and Picard

Jin Li
Author
Jin Li
Fate lies within the lightcone.
Personal Music Library Series - This article is part of a series.
Part 1: This Article

Motivation
#

In my earlier post on building a personal media library with Jellyfin, I added both films and music to Jellyfin. That let me listen to the files on my hard drive from other devices, but for finding albums and following lyrics I wanted a player designed around music. There was also the question of how to organize the files. For example, I might have a FLAC and an MP3 of the same song, plus original-language and bilingual lyrics. I’d like to keep those files together and still see just one song in the player.

I first moved the music out of Jellyfin’s media directory and gave Navidrome its own directory to scan. Navidrome has a web player, and I later added Feishin for browsing and listening. New music goes through Picard first. That way I can fix the tags or artwork on an album while the rest of the library is available to play.

This is the first article in the Personal Music Library series. I later switched to Copyparty and Tagr for uploading files and editing tags, as described in part 2. Other articles in this series:

Install Navidrome and Feishin
#

Install and Set Up Navidrome
#

Navidrome scans the audio files, indexes the library, and streams the music. The Docker container needs two mounts. /data holds its database and cache and needs to be writable. /music is the music directory on the host, and the container only needs read access. The host can still add files to that directory. The first time you open Navidrome, create an admin account, wait for the scan, and try playing a track in its built-in player. See the Navidrome Docker installation guide for mounts and permissions.

Configure Feishin and the Reverse Proxy
#

The Feishin container serves the web app. Once the page opens, the browser requests the library and audio directly from Navidrome, so both services need addresses the browser can reach. Here I use music.example.com for the player and navidrome.example.com for the server. In my setup, the existing Traefik and Cloudflare Tunnel route to ports 9180 and 4533 inside the respective containers. I covered the proxy setup in earlier posts on Traefik and Cloudflare Tunnel.

These settings in Feishin’s Compose file prefill the server details. With SERVER_LOCK enabled, the login form only needs a Navidrome username and password. SERVER_URL should be the HTTPS URL the browser can reach. A URL like http://navidrome:4533 works inside the Docker network. Since the two domains are different origins, the browser also needs Navidrome’s responses to allow cross-origin requests. See the Feishin Docker instructions for the image and the other settings.

1
2
3
4
5
6
environment:
  SERVER_NAME: My Music
  SERVER_TYPE: navidrome
  SERVER_URL: https://navidrome.example.com
  SERVER_LOCK: "true"
  LEGACY_AUTHENTICATION: "false"

Login Settings
#

At first I put Authelia in front of Feishin, so opening the page meant logging into Authelia and then logging into Navidrome. I removed the extra login from Feishin. Anyone can now open the player’s login page, while reading the private library and playing its tracks still require Navidrome authentication. I kept Authelia on Picard because its web interface can edit files on the server.

Install and Use Picard
#

Introduction to Picard
#

MusicBrainz is a music database, and Picard is a tool for writing tags to local files. Suppose an album has files named 01.mp3 and 02.mp3. Once you’ve matched the right release, Picard can write the title, artist, album, and track number into each file. The changes are written when you click Save, and the tags travel with the files if you switch players later.

Install Picard with Docker
#

Picard is a desktop application. I use the community-maintained jlesage/musicbrainz-picard image to open its desktop in the browser, so the server itself can run without a desktop environment. The web interface listens on port 5800 in the container. /config holds the settings, /storage/staging is writable, and /storage/library is a read-only view of the main library. Some Chinese characters originally showed up as squares in the interface. Mounting Noto CJK fonts into the container fixed that. The image options are listed in the Picard container documentation.

Match Albums
#

I usually put a copy of an album in /storage/staging/incoming and open it with Add Folder. For files that already have some tags, I can use Cluster to group an album and then Lookup to search by those tags. For files with very little information, Scan can search using audio fingerprints. Before saving a match, I check the number and order of tracks and the cover. A reissue, a live recording, and a studio version can have the same title.

Edit Tags and Cover Art Manually
#

Some files in my collection had no automatic match. I can still select a file and fill in the title, artist, and album in the tag panel below. If the suggested cover is wrong, I can upload a replacement to the staging directory and right-click the cover area to select Choose local file… before saving. To keep the artwork in the audio file, enable embedding in Picard’s cover art settings. See the Picard user guide.

Organize Music Files
#

Add External Lyrics
#

I use Picard here for tags and artwork and keep my existing lyrics beside the audio files. For example, 01 - Night Walk.flac can have a sidecar called 01 - Night Walk.lrc. If the audio filename changes, the lyrics filename needs to change with it. Picard’s Move additional files option can move *.lrc files, but it won’t necessarily rename them to match each track. I leave automatic renaming off and check the pairs before copying them to the library.

When lyrics didn’t show up in Navidrome’s own web player, I initially thought the files hadn’t been read. There are two things to check. Can Navidrome find the file by name, and can a client such as Feishin display the lyrics it receives? Navidrome’s LyricsPriority setting controls where it looks first, such as embedded tags or a matching .lrc file. Clients also vary in the formats they display. For now I keep the local files and haven’t enabled a plugin to download missing lyrics. See the Navidrome configuration reference and the discussion on external lyrics.

Store Alternate Audio and Lyrics
#

My original idea was to split songs with vocals and instrumentals into two groups, with a folder per album and a subfolder per track. This would keep the lossless copy, the compressed copy, and several lyric versions together. It makes files easy to find on disk, but the folder layout alone doesn’t make the player group two audio files into one track or offer a switch between bilingual lyrics and a pronunciation guide. A simple way to get one entry in the player is to put one copy of the audio and its matching lyrics in the scanned directory and keep the other versions separately. If the main reason to keep a smaller copy is to save mobile data, playback transcoding is another option.

Add Music to Navidrome
#

Copy Music Files with rsync
#

Picard can move saved files to a chosen directory. I set mine to /storage/staging/ready. Before copying anything, I check that the files I want to import have been saved and that the lyrics are alongside them. The commands below run on the host and use ~/docker_data as the example data directory. First, use --dry-run and --itemize-changes to see which files will be added or replaced.

1
2
3
rsync -a --dry-run --itemize-changes \
  ~/docker_data/picard/staging/ready/ \
  ~/docker_data/navidrome/music/

Once the list looks right, run the copy.

1
2
3
rsync -a \
  ~/docker_data/picard/staging/ready/ \
  ~/docker_data/navidrome/music/

The trailing slash in ready/ copies the contents of the directory. I leave out --delete so the other albums stay in place. If a track has been renamed, its old file will also stay in place, so I check that the new copy plays before dealing with the old one. My Navidrome scans once an hour (I later found that this setting had no effect; see “Scheduled Scans” in part 2), and I can also start a scan from its admin interface to check an import immediately.

Batch Organization with Beets
#

I also looked at Beets. It can match tags in batches, organize paths according to rules, and handle duplicate imports from the command line. At the moment I usually work on one album at a time and check the cover and lyrics along the way, so Picard and these rsync commands are enough. Beets would be more useful if I had a large batch that needed a consistent naming scheme.

Troubleshooting
#

Feishin Cannot Play Music
#

At one point the same track played in Navidrome’s web player and kept loading in Feishin. The audio request was reaching Navidrome, and the server was returning a valid byte-range response. I upgraded Feishin from 1.15.1 to 1.17.0 and confirmed playback in the browser. Version 1.16.0 included a web player audio-initialization fix, as noted in the release notes. If the browser keeps loading the old interface after an upgrade, clear the site data for Feishin and sign in again. That also clears any settings Feishin saved in that browser.

Personal Music Library Series - This article is part of a series.
Part 1: This Article