Where Does Trilium Store Notes?
Trilium document database on desktop and server, and why live syncing that file corrupts it.
Last updated
Trilium keeps every note in one SQLite file, document.db, inside a trilium-data folder: %APPDATA%\trilium-data on Windows, ~/Library/Application Support/trilium-data on Mac, ~/.local/share/trilium-data on Linux. Backups, logs and config.ini sit beside it.
Never point Dropbox or Drive at the live database; syncing an open SQLite file corrupts it. Use the built in sync server instead (server data follows TRILIUM_DATA_DIR, often ~/trilium-data in Docker). For file backup, copy document.db alone and ignore the -wal and -shm sidecars.
Where Trilium Notes stores this, by platform
%APPDATA%\trilium-data\document.db
All notes in this SQLite file; config.ini, backup/ and log/ alongside in trilium-data. Confirm via the About dialog. Server installs follow TRILIUM_DATA_DIR instead.
~/Library/Application Support/trilium-data/document.db
Same trilium-data layout (TriliumNext supports Mac fully; original Trilium called it unsupported). Never live sync this file with cloud drives.
~/.local/share/trilium-data/document.db
Same layout under ~/.local/share (falls back to home if missing). Fine grained overrides: TRILIUM_DOCUMENT_PATH, TRILIUM_BACKUP_DIR, TRILIUM_LOG_DIR.
Frequently asked questions
Can I sync Trilium with Dropbox or Nextcloud?
Not the live database: cloud sync of an open SQLite file corrupts it. Run Trilium sync server between instances, and use file backup only on a stopped copy of document.db.
What do I back up for Trilium?
document.db alone holds every note. Ignore the -wal and -shm sidecars, and let the built in backup/ folder handle history. Server setups back up whatever TRILIUM_DATA_DIR points at.
Notice an outdated path? Let us know.