↓ Skip to main content

Personal Music Library (2): Replacing Picard with Copyparty and Tagr

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

Motivation
#

In the previous post, I set up Navidrome and Feishin for listening. New music went through Picard for tags and artwork first, and rsync then copied it into the library. After using this for a while, two parts still felt awkward.

The first was adding files. Picard can only open files on the server, so a new song on another computer had to be copied over with scp first. The second was Picard itself. It is a desktop application, and the container runs a whole virtual desktop that the browser only shows as a stream. That interface can’t use the local Chinese input method, which makes typing Chinese titles inconvenient, and it responds slowly.

So I wanted two web tools instead: one to upload files from any browser, and one to edit tags directly on a web page. After comparing the options, I chose Copyparty for uploading and moving files and Tagr for editing tags. The previous post also mentioned splitting songs with vocals from instrumentals, and this time I did that with Navidrome’s multi-library support. The Picard container is still around for now.

Other articles in this series:

Comparing the Options
#

Uploading and Moving Files
#

Tools for uploading files to a server from a browser fall roughly into three groups: dedicated file servers (such as Copyparty), web file managers (such as FileBrowser Quantum), and full cloud storage suites (such as Nextcloud). My needs were modest: upload files, move them from a staging folder into the library, and ideally keep library files from being deleted by accident.

Cloudflare Tunnel added one more requirement. Cloudflare’s free plan limits a single request to 100 MB, and one WAV file can exceed that. Copyparty’s uploader splits files into chunks and uploads them separately, and an interrupted upload can resume, so the limit doesn’t apply. Its file browser also supports cut and paste, which moves an audio file and its matching .lrc together and replaces the earlier rsync step.

I looked at a few others as well. The original File Browser was archived in July 2026 and is no longer maintained; its fork FileBrowser Quantum is still actively developed, and I come back to it at the end. I already run Nextcloud, but it writes files as its own web server user, which differs from the user Navidrome and Tagr run as, so permissions get messy. Navidrome itself has no upload feature, and its FAQ says this is out of scope for the project.

Editing Tags
#

Web-based tag editors use ordinary input fields, so the local Chinese input method just works. I compared three:

ToolStrengthsWeaknesses
TagrMusicBrainz lookup, cover art and lyrics fields; every change is recorded and can be reverted; built-in login; usable on phonesNo APE support; anonymous usage statistics on by default; very frequent releases
Metadata RemoteVery light, no database; suggests tags from filenames like Artist - Title and can rename filesNo login; no APE support; edit history is lost on restart
Music Tag WebFetches metadata from NetEase Cloud Music, QQ Music, Kugou, Kuwo, and Migu; supports APE and WAV; converts between simplified and traditional ChineseAt the time of writing, V2 is closed source, needs an activation code obtained by sponsoring, and contacts an activation server; only the old V1 is open source

My library is mostly singles, so tools that organize by album release don’t fit well. For example, beets-flask explicitly doesn’t support loose single tracks, and wrtag also works per release. I also checked whether Chinese input could work inside the Picard container. At the time of writing, the upstream issue about Chinese input has been open since December 2024, so the only option would be a custom image with ibus. In the end I chose Tagr: it has the most complete feature set, mistakes can be reverted, and it is fully open source.

The Workflow
#

Adding music now takes four steps, with an inbox folder holding files that still need work:

  1. Upload the audio files and their .lrc files to inbox in Copyparty.
  2. Scan inbox in Tagr and fix the tags and cover art.
  3. Back in Copyparty, move the finished files into the library’s song or pure-music folder.
  4. Navidrome notices the new files and adds them to the library.

This is what each program sees, using ~/docker_data/navidrome as the data directory:

Host folderCopypartyTagrNavidrome
inbox/inbox: upload, move, and delete/music/inbox: read-writeNot mounted
music/song/library/song: upload and move, no deletionNot mountedDefault library, read-only
music/pure-music/library/pure-music: same as aboveNot mountedSecond library, read-only

With inbox, unfinished files never show up in Navidrome. Tagr only sees inbox as well, so it can’t change songs that are already in the library by mistake.

Install and Configure Copyparty
#

Copyparty Overview
#

Copyparty is a file server written in Python. Besides its web interface it supports WebDAV, FTP, SMB, and other protocols, and it can index files, generate thumbnails, and search. I only use a few of its features: chunked uploads from the browser, moving files in its file browser, and per-folder permissions. It is light, using about 40 MB of memory on my server.

Docker Compose Configuration
#

Copyparty comes in several image editions of different sizes. The recommended ac edition includes FFmpeg, which reads audio tags more completely and can also generate audio thumbnails and transcode. The container’s web port is 3923. I don’t publish it on the host; only Traefik reaches it over the Docker network.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
services:
  copyparty:
    image: copyparty/ac:1.20.28
    user: "1000:100"
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true
    environment:
      XDG_CONFIG_HOME: /state
    volumes:
      - ./cfg:/cfg:ro
      - state:/state
      - /home/user/docker_data/navidrome/inbox:/w/inbox
      - /home/user/docker_data/navidrome/music:/w/library
    networks:
      - traefik-net
    restart: unless-stopped

volumes:
  state:

networks:
  traefik-net:
    external: true

user matches the user and group of Navidrome and Tagr, so uploaded files belong to that user directly. Copyparty runs as a normal user and needs no extra privileges, so cap_drop removes all of the container’s capabilities. /cfg holds the configuration file and is mounted read-only. The official image sets XDG_CONFIG_HOME to /cfg, where Copyparty keeps some runtime data, so I moved it to the writable state named volume. By default Copyparty also creates a .hist folder in every shared folder for its file index and thumbnails. The configuration file moves that into state too, which keeps the music folders clean.

Configuration File
#

cfg/copyparty.conf looks like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[global]
  e2dsa
  e2ts
  hist: /state/hist
  xff-src: 172.18.0.0/16
  xff-hdr: cf-connecting-ip
  rproxy: 1
  idp-h-usr: remote-user
  idp-h-grp: remote-groups
  idp-logout: https://authelia.example.com/logout
  df: 10
  no-robots

[/inbox]
  /w/inbox
  accs:
    rwmda: @admins
  flags:
    scan: 60

[/library]
  /w/library
  accs:
    rwm: @admins

e2dsa makes Copyparty build a file index and scan all shared folders at startup; resumable uploads and search both depend on this index. e2ts reads audio tags, so the file list shows artist, title, and album, and files can be searched by tag.

xff-src is followed by the Docker network that Traefik runs on. Copyparty trusts the username and group headers named by idp-h-usr and idp-h-grp only for requests from that range. Without this restriction, anyone who could reach the container directly could add the header and pose as any user. Conversely, if a Traefik route lacks the Authelia middleware, requests arrive without these headers and Copyparty grants no access at all. xff-hdr and rproxy make Copyparty use the real client address passed on by Cloudflare. Copyparty bans the source address of suspicious requests, and if it only saw Traefik’s address, the ban would lock out everyone.

idp-logout is the Authelia page that logging out leads to. df: 10 makes Copyparty refuse uploads when less than 10 GiB of disk space is free, and no-robots asks search engines not to index anything.

The last two sections define the two shared folders and their permissions. The letters under accs mean: r read, w upload, m move and rename, d delete, and a admin (for example, reloading the configuration from the control panel). @admins refers to the admins group in Authelia. The library only gets rwm, so files can be moved in and out but not deleted. If a file with the same name already exists at the destination, Copyparty refuses the move instead of overwriting it. Tagr edits the files in inbox directly, and scan: 60 makes Copyparty rescan that folder every minute to update its index.

To add a comment after a setting, leave two spaces before the #. After changing shared folders or permissions, click [reload cfg] in Copyparty’s control panel to reload them; changes under [global] need a container restart.

Log In Through Authelia
#

Installing and configuring Authelia is covered in Authentication: Deploying Authelia for Private Identity Service, which uses Nginx. In Traefik, Authelia plugs in as a forwardAuth middleware: every request is checked by Authelia first, and users who haven’t logged in are sent to the login page. For logged-in users, Traefik puts the username and groups returned by Authelia into the Remote-User and Remote-Groups headers and forwards the request to the service. Copyparty reads these two headers, so there is no second login. The middleware is defined like this, and authResponseHeaders must include both headers:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
http:
  middlewares:
    authelia:
      forwardAuth:
        address: http://authelia:9091/api/verify?rd=https://authelia.example.com/
        trustForwardHeader: true
        authResponseHeaders:
          - Remote-User
          - Remote-Groups
          - Remote-Name
          - Remote-Email

Copyparty’s route uses this middleware. See the post on Traefik for how Traefik itself is configured:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
http:
  routers:
    copyparty:
      rule: "Host(`upload.example.com`)"
      entryPoints:
        - websecure
      middlewares:
        - authelia
      service: copyparty
      tls:
        certResolver: le
  services:
    copyparty:
      loadBalancer:
        servers:
          - url: "http://copyparty:3923"

Use Copyparty
#

Open https://upload.example.com/inbox/ and drag files or whole folders onto the page to start uploading. If an upload is interrupted, dragging the same files in again resumes it.

To move files, click a file’s row (not its name) to select it; hold Shift and click another row to select a range. Press Ctrl+X to cut, open the destination folder, and press Ctrl+V to paste. Press F2 to rename the selected file. Navidrome pairs lyrics with audio by filename, so when renaming an audio file, rename the matching .lrc file with it.

Install and Use Tagr
#

Tagr Overview
#

Tagr is a web-based music tag editor. Its interface has three panels: folders on the left, the song list in the middle, and details of the selected song on the right. It can edit more than 40 tag fields, including title, artist, album, year, genre, and lyrics, and it can replace cover art. Every change is recorded and can be reverted. Deleted songs go to a trash folder first and are only removed for good after 30 days by default. It supports common formats such as MP3, FLAC, WAV, OGG, and M4A, but not APE. Because it is an ordinary web page, Chinese tags can be typed with the local input method. I tested it with FLAC and MP3 files, and Tagr read and wrote Chinese tags correctly.

Docker Compose Configuration
#

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
services:
  tagr:
    image: ghcr.io/suitux/tagr:1.19.0
    security_opt:
      - no-new-privileges:true
    environment:
      PUID: 1000
      PGID: 100
      NODE_ENV: production
      DATABASE_URL: file:/data/tagr.db
      AUTH_URL: https://tags.example.com
      AUTH_USER: ${AUTH_USER}
      AUTH_PASSWORD: ${AUTH_PASSWORD}
      AUTH_SECRET: ${AUTH_SECRET}
      MUSIC_FOLDERS: /music/inbox
      TAGR_INSIGHTS: "false"
    volumes:
      - data:/data
      - /home/user/docker_data/navidrome/inbox:/music/inbox
    networks:
      - traefik-net
    restart: unless-stopped

volumes:
  data:

networks:
  traefik-net:
    external: true

AUTH_USER and AUTH_PASSWORD are the admin username and password, and AUTH_SECRET signs the login sessions; openssl rand -hex 32 can generate one. Don’t write these three directly into the Compose file; they can go in an .env file in the same directory. I keep them encrypted with SOPS and generate the environment file at deployment time, as described in NixOS (9): Managing Secrets with sops-nix. AUTH_URL is the address the browser uses to reach Tagr. The data volume only holds Tagr’s SQLite index and edit history; the tags themselves are written into the audio files.

MUSIC_FOLDERS limits Tagr’s scan to /music/inbox. It also determines where the trash goes: Tagr moves deleted songs into __tagr_trash__ at the root of the music folder. If it stays at the default /music while the actual mount is /music/inbox, the trash ends up in the container’s own filesystem and disappears when the container is recreated. With the mount point set explicitly, the trash is inbox/__tagr_trash__, which stays on the host.

Setting TAGR_INSIGHTS to false turns off the anonymous usage statistics. Otherwise the admin sees a notice after logging in, and if statistics are kept on, Tagr sends a report once a day with counts such as the number of songs and the version.

PUID and PGID set the user that runs the program. Tagr’s startup script sets the owner of /data as root and then switches to this user; it doesn’t change the permissions of the music folder. If the image already has a user with that UID (UID 1000 is one), the script uses that user’s own group and ignores PGID. So files that Tagr creates, such as the trash folder, get group 1000, while edited files keep their original owner and group.

Tagr’s web port is 3000, and its route sits behind Authelia, just like Copyparty’s.

Use Tagr
#

After logging in, click the ⋮ menu at the top of the left panel and choose Quick scan under Rescan library. If the page shows a Scan library button instead, click that. Tagr doesn’t discover new files on its own, so run a scan after every upload. Quick scan only processes new files and files whose modification time has changed, so it finishes quickly.

Then click inbox in the left panel and pick a song; the right panel shows its tags. To edit them:

  • Move the mouse over a field’s row, and a pencil icon appears on the right. Click it to edit.
  • Press Enter or click the green check mark to save; press Esc or click the red cross to cancel. Multi-line fields such as lyrics save with Ctrl+Enter.
  • Each field saves separately, straight into the file, and there is no “save all” button. Clicking elsewhere doesn’t save, and switching to another song while a field is still open discards what was typed.

If the song has a MusicBrainz entry, click the MusicBrainz button in the right panel’s toolbar to search for it. After you pick a recording, Tagr lists the current values next to the MusicBrainz values; tick the fields you want and click Apply Selected to write them. The cover art can be replaced at the same time.

To edit several songs at once, right-click a song and choose Select song or Select entire folder, and an action bar appears at the bottom of the page. Edit writes the same value to all selected songs, such as a common album artist; Look up on MusicBrainz matches the selected songs to the tracks of one album; Set cover and Get covers from MusicBrainz set the cover art. If something goes wrong, revert it from the song’s edit history.

Tagr has some limits too. It only looks things up on MusicBrainz, which doesn’t always have Chinese singles, so those need to be filled in by hand. It has no acoustic fingerprinting like Picard, so a song with no tags and an uninformative filename can still go back to Picard. Tagr doesn’t rename files either; to keep a filename in line with a changed title, rename the audio file and its .lrc together in Copyparty. Also, version 1.19.0 fails to save some MP3s: if a file contains an ID3v2 frame that can be read but not written back (a malformed UFID frame, for instance), none of the edits to that file can be saved, the interface shows no error, and the change reverts on reload. 1.19.1 drops such frames when saving and shows an error when a save fails.

Tagr Login
#

Tagr requires its own account; it has no option to trust the username passed on by Authelia, so for now there are two logins. Fortunately, Tagr’s login lasts 30 days and is extended automatically whenever it’s used, so I rarely have to type the password. Someone has already requested OIDC single sign-on on Tagr’s GitHub (#47), and I submitted a suggestion for header-based login (#82). My Authelia already provides OIDC login for several other services, so Tagr can be connected once it supports either.

Separate Songs and Instrumentals in Navidrome
#

Multiple Libraries
#

Navidrome has supported multiple libraries since version 0.58. Each library maps to a folder, and the folders of different libraries can’t contain each other. I wanted to keep all music under one folder, so I created two subfolders in music:

1
2
3
music/
├── song/        # songs with vocals, the default library
└── pure-music/  # instrumentals, the second library

The location of the default library comes from the ND_MUSICFOLDER environment variable. The container still mounts the whole music folder at /music; only this variable changes from /music to /music/song. The second library is added under Settings → Libraries in Navidrome’s web interface: click +, enter a name, and set the path to /music/pure-music. Admins automatically have access to all libraries; for other users, edit the user under Settings → Users and tick the libraries they may access in the Libraries section. Navidrome’s web interface then shows a library selector in the top-left corner, and Feishin’s list views have a menu for choosing the music folder.

Move the Existing Songs
#

All my songs were directly under music, so they had to move into song first. Navidrome stores each file’s path relative to the library folder, and at every start it updates the default library’s location from ND_MUSICFOLDER. So if the files move while Navidrome is stopped and it then starts with the new path, every song’s relative path is unchanged, and play counts and playlists are kept.

Before starting, stop Navidrome and back up navidrome.db in its data directory, together with navidrome.db-wal and navidrome.db-shm if they exist. Then move the files on the host:

1
2
3
cd ~/docker_data/navidrome/music
mkdir song pure-music
find . -maxdepth 1 -type f -exec mv -n -t song/ {} +

-maxdepth 1 -type f selects only the files directly under music without descending into subfolders; mv -n doesn’t overwrite existing files, and -t song/ sets the target folder. My songs were all directly under music; if the music is organized in album subfolders, those folders need to move into song too. After changing ND_MUSICFOLDER and starting Navidrome, I compared the track count, play counts, and playlists, and all of them matched what they were before the move.

After the first start, the log showed that the file watcher was still watching the old /music; it switched to /music/song only after another restart. So after the change, look for the Watcher started for library line in the log and check that the path is right. Copyparty also mounts the library, and its index doesn’t update right away when files are moved directly on the host; restarting Copyparty makes it rescan.

From now on, Navidrome also recognizes a file moved from one library to another as the same song and keeps its play count, rating, and favorite status. The condition is not to change its tags in the same scan: edit the tags first, wait for Navidrome to finish scanning, and then move the file.

Scheduled Scans
#

Navidrome watches the library folders and rescans soon after files change. In the previous post I said my Navidrome scans once an hour, using the ND_SCANSCHEDULE environment variable. This time the startup log showed that Navidrome 0.63 no longer reads that variable: it logged Periodic scan is DISABLED. After switching to the new variable name, the log showed Scheduling periodic scan, and the hourly scan finally took effect:

1
2
3
environment:
  ND_MUSICFOLDER: /music/song
  ND_SCANNER_SCHEDULE: "@every 1h"

Troubleshooting
#

A New Subdomain Does Not Load
#

I added a subdomain each for Copyparty and Tagr. After the DNS records were created, the first attempt to open Copyparty’s address in the browser reached neither Authelia nor Copyparty. That fits negative DNS caching: if the name was looked up before the record existed, DNS resolvers cache the “no such name” answer for a while, for a time set by the domain’s SOA record. My domain is on Cloudflare, where this is 1800 seconds, so up to 30 minutes. After a while, the name resolved normally.

Waiting for the cache to expire is enough, or the local DNS cache can be flushed:

1
2
3
4
5
6
# Linux (systemd-resolved)
resolvectl flush-caches
# macOS
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
# Windows
ipconfig /flushdns

Chrome also has its own cache, which can be cleared at chrome://net-internals/#dns. If the router or an upstream DNS server cached the answer as well, the only option is to wait for it to expire. When adding a subdomain later, create the DNS record before opening the address, and this won’t happen.

Tagr’s Edit Buttons Disappear
#

After a while, the pencil icons in Tagr disappeared and only came back after reloading the page and logging in to Authelia again. This is caused by the Authelia session expiring. My Authelia sets inactivity to 5 minutes, so if “Remember me” isn’t ticked at login, the session ends after 5 minutes without any request. When I then switch back to the Tagr page, Tagr checks its own login status in the background, and Authelia blocks that request. Tagr concludes it has been logged out and hides the edit buttons until the page is reloaded. In fact Authelia blocks every request at this point, so saving would fail even if the buttons were still there, and the same goes for uploading and moving files in Copyparty.

The fix is to tick “Remember me” when logging in to Authelia. The session then follows the remember_me setting, which I set to one month, and the 5-minute limit no longer applies. Raising inactivity also works, but it applies to every service behind Authelia.

Edit Buttons Not Visible
#

Tagr’s pencil icons are normally hidden and only appear when the mouse is over the row, so they are easy to miss the first time. On screens narrower than 768 pixels the pencils are always shown, but on wider touch screens, with no mouse hover, they may never become visible. In that case, use bulk editing: right-click (long-press on a touch screen) the song, choose Select song, and click Edit at the bottom. Every field is listed as an input box, and only the fields that change are written.

Alternatives
#

If you don’t like Copyparty’s interface style, consider FileBrowser Quantum. It is a fork of File Browser with a more modern interface. It can read the username from a reverse proxy header, so it works with Authelia without a second login. One instance can serve several folders, such as inbox and the library. Moving a file needs modify permission on both the source and the destination, and deletion is a separate permission, so the library can also allow moves but not deletion. Uploads are split into 5 MB chunks by default, which stays under Cloudflare’s limit, and files can be moved between folders. The drawback is weight: the project lists 512 MB as the minimum memory, while Copyparty uses about 40 MB here, so I kept Copyparty.

Conclusion
#

Now, from any computer, I can open a browser, upload new songs to the server, fix the tags with the local input method, and move them into song or pure-music, where Navidrome picks them up shortly. The Picard container hasn’t been removed yet, so songs with no tags and uninformative filenames can still go through Picard’s acoustic fingerprinting.

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