What this setup means for Navidrome
With this unit:
-
/mnt/musicis a FUSE mount -
inotify events are simulated at best
-
file mtimes and size changes are often delayed
-
directory listings are cached (
--dir-cache-time 1m)
👉 Result:
Navidrome cannot reliably detect changes and therefore disables internal periodic scanning.
This is expected and unavoidable with rclone mounts.
🚫 Why “scan every 5 minutes” is a bad idea here
A Navidrome scan on a rclone mount does:
-
thousands of
stat()calls -
recursive directory walks
-
metadata reads that trigger OneDrive API calls
At 5 minutes, this will:
-
hammer OneDrive
-
cause random playback stalls
-
eventually get you rate-limited
So even if Navidrome allowed it, it’d be self-harm 😅
✅ The correct architecture (cloud-safe + stable)
Use an external scan trigger
This is the only sane approach with rclone mounts.
You already have (or should have) this:
navidrome-scan.service
[Unit]
Description=Trigger Navidrome Library Scan
[Service]
Type=oneshot
ExecStart=/usr/bin/curl -fsS -X POST http://127.0.0.1:4533/api/scannavidrome-scan.timer
[Unit]
Description=Run Navidrome scan periodically
[Timer]
OnBootSec=10min
OnUnitActiveSec=15min
AccuracySec=1min
Persistent=true
[Install]
WantedBy=timers.target👉 15 minutes is the sweet spot for OneDrive.
🔧 Improvements to your rclone mount (important)
1️⃣ Increase directory cache time
Your current setting:
--dir-cache-time 1mThis causes Navidrome scans to constantly re-list directories.
✅ Change to:
--dir-cache-time 30mNavidrome doesn’t need second-level freshness — the timer handles that.
2️⃣ Lower poll pressure (or disable it)
--poll-interval 30sPolling + Navidrome scanning = duplicated API hits.
If you rely on the timer, you can safely do:
--poll-interval 5mor even:
--poll-interval 0(0 disables polling completely)
3️⃣ VFS cache mode tweak (recommended)
You’re using:
--vfs-cache-mode writesFor read-mostly music libraries, this is better:
--vfs-cache-mode fullWhy:
-
prevents partial reads during FLAC streaming
-
avoids repeated OneDrive fetches
-
smoother playback during scans
✅ Recommended final rclone ExecStart
ExecStart=/usr/bin/rclone mount onedrive-ondemand:"MAIN/Public/Music/Albums" /mnt/music \
--vfs-cache-mode full \
--vfs-cache-max-size 5G \
--vfs-cache-max-age 12h \
--vfs-read-chunk-size 32M \
--vfs-read-chunk-size-limit 128M \
--dir-cache-time 30m \
--poll-interval 5m \
--buffer-size 32M \
--allow-other \
--timeout 1h🧹 Navidrome config (keep it simple)
Remove all scan-related keys from navidrome.toml:
# DO NOT set ScanInterval or ScanScheduleLet the timer do the work.
🏁 Final mental model (important)
-
rclone mount ≠ real filesystem
-
Navidrome watcher ≠ reliable
-
periodic scan inside Navidrome = intentionally disabled
-
external timer = correct solution
This is exactly how people run Navidrome on:
-
OneDrive
-
Google Drive
-
Dropbox
-
NAS WebDAV mounts
Totally fair question — this is the last confusing bit, and once it’s done you’re set. I’ll walk you through it step-by-step, no assumptions.
You’re going to create two systemd unit files and put them in the system-wide systemd directory.
📁 Where these files go
For system services and timers, put them here:
/etc/systemd/system/
You’ll create:
/etc/systemd/system/navidrome-scan.service
/etc/systemd/system/navidrome-scan.timer
1️⃣ Create the .service file
Run:
sudo nano /etc/systemd/system/navidrome-scan.servicePaste this exactly:
[Unit]
Description=Trigger Navidrome Library Scan
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/bin/curl -fsS -X POST http://127.0.0.1:4533/api/scanSave and exit (Ctrl+O, Enter, Ctrl+X).
2️⃣ Create the .timer file
Run:
sudo nano /etc/systemd/system/navidrome-scan.timerPaste:
[Unit]
Description=Run Navidrome library scan every 15 minutes
[Timer]
OnBootSec=10min
OnUnitActiveSec=15min
AccuracySec=1min
Persistent=true
[Install]
WantedBy=timers.targetSave and exit.
🔧 If you really want 5 minutes, change
15min→5min
(not recommended for OneDrive, but it’ll work)
3️⃣ Tell systemd the files exist
This step is mandatory:
sudo systemctl daemon-reload4️⃣ Enable and start the timer
You enable the timer, not the service:
sudo systemctl enable --now navidrome-scan.timerThis will:
-
start it immediately
-
start it automatically on boot
5️⃣ Verify it’s working
Check that the timer is scheduled:
systemctl list-timers | grep navidromeYou should see something like:
navidrome-scan.timer ... 15min
Manually test a scan:
sudo systemctl start navidrome-scan.serviceThen watch Navidrome logs:
journalctl -u navidrome -fYou should see:
Starting library scan
Finished library scan
🧠 How this works (quick mental model)
-
.timer= “when should this happen?” -
.service= “what should actually run?” -
systemd automatically runs the service on schedule
-
Navidrome doesn’t need to support periodic scans anymore
🧹 Optional cleanup (recommended)
In navidrome.toml, remove any of these if present:
ScanInterval
ScanSchedule
EnablePeriodicScanThey’re not used in your setup.
✅ That’s it — you’re done
From now on:
-
rclone handles OneDrive
-
systemd handles scheduling
-
Navidrome just scans when told to
If you want, next we can:
-
add a manual “Scan now” button
-
delay scans until rclone mount is ready
-
avoid scans while music is playing
-
move to a local cache mirror for even better performance
Just say what you want to tweak 😄