stop at startup when the database location isn't writable

The ownership sweep only covers /config and /media/frigate, so a database.path on another volume stayed root-owned after upgrading and Frigate boot-looped on a SQLite error. Frigate now checks the database directory and files before opening them and exits with an error naming the path, the runtime uid/gid, and the new docs section. backup.db is checked only when a migration is about to write it.
This commit is contained in:
Josh Hawkins
2026-11-28 13:24:02 -06:00
parent 48d15f44cd
commit fc3ace56c6
4 changed files with 108 additions and 12 deletions
+10
View File
@@ -86,6 +86,16 @@ Once the volumes are aligned, start Frigate normally. A file at `/config/.permis
If something under your volumes can't be chowned, a read-only btrfs snapshot directory for example, the sweep warns and names the path and doesn't record the migration as finished. It retries on the next boot instead. Either move those paths outside `/media/frigate` or expect the scan to repeat.
### Custom database location
The sweep only covers `/config` and `/media/frigate`. If `database.path` points somewhere else, such as a separate volume, align that directory yourself before upgrading, and again after running with `FRIGATE_RUN_AS_ROOT=true`:
```bash
chown -R 1000:1000 /path/to/your/database/dir
```
Use your `PUID` and `PGID` if you've changed them. Until the directory and its files are writable, Frigate stops at startup with an error naming the path it can't write.
### Network storage
Recordings on a NAS behave differently, so check what you have before migrating: