1.8 KiB
1.8 KiB
Specification: Correct Navidrome Database and Plugins Location (fix_navidrome_paths)
Overview
Force Navidrome to use the /data LiteFS mount for its SQLite database by setting the DATAFOLDER to /data. To avoid the "Operation not permitted" error caused by LiteFS's restriction on directory creation, redirect the Navidrome plugins folder to persistent shared storage.
Functional Requirements
- Nomad Job Configuration (
navidrome-litefs-v2.nomad):- Set
ND_DATAFOLDER="/data". This will force Navidrome to create and usenavidrome.dbon the LiteFS mount. - Set
ND_PLUGINSFOLDER="/shared_data/plugins". This prevents Navidrome from attempting to create apluginsdirectory in the read-only/virtual/datamount. - Keep
ND_CACHEFOLDERandND_BACKUP_PATHpointing to/shared_datasubdirectories.
- Set
- Entrypoint Logic (
entrypoint.sh):- Ensure it creates
/shared_data/pluginsif it doesn't exist. - Remove the explicit
export ND_DATABASE_PATHif it conflicts with the newDATAFOLDERlogic, or keep it as an explicit override.
- Ensure it creates
- Verification:
- Confirm via
lsofthat Navidrome is finally using/data/navidrome.db. - Confirm that LiteFS
/debug/varsnow reports the database in its active set.
- Confirm via
Non-Functional Requirements
- Persistence: Ensure all non-database files (plugins, cache, backups) are stored on the shared host mount (
/shared_data) to survive container restarts and migrations.
Acceptance Criteria
- Navidrome successfully starts with
/dataas its data folder. - No "Operation not permitted" errors occur during startup.
lsofconfirms/data/navidrome.dbis open by the Navidrome process.- LiteFS
txidincreases on the Primary and replicates to Replicas when Navidrome writes to the DB.