Question about changing directory. And how to read the files that are already saved in database. #6385
Replies: 1 comment
-
To change where Trilium stores your data, you need to set the TRILIUM_DATA_DIR environment variable—editing config.ini will not work for this. On Windows, open Command Prompt and run set TRILIUM_DATA_DIR=L:\doctuments then start Trilium from that same window. On PowerShell, use $env:TRILIUM_DATA_DIR="L:\doctuments"; Start-Process .\trilium.exe. On Linux, use export TRILIUM_DATA_DIR=/your/path then launch Trilium from the same terminal. To make it permanent, add the export command to your .bashrc or edit your desktop shortcut to include the variable before the command. See more details in the official guide. Trilium does not automatically move your data when you change the directory. You need to close Trilium, copy your entire current data directory (usually called trilium-data) to the new location, and then launch Trilium with the new TRILIUM_DATA_DIR setting. This ensures all your notes and attachments are preserved. You can run Trilium from a NAS, but it may be slower or less reliable than a local drive, especially if your network is slow or unstable. Manual server installs (including on NAS) are less supported and may have issues—using Docker or packaged builds is recommended for server setups, but for desktop use, a local drive is usually safest for performance and reliability source. If Trilium ever stops working, your notes are stored in an SQLite database file (trilium-data.db) inside the data directory. You can open this file with a tool like DB Browser for SQLite and extract your notes from the note_contents table source. Let me know if you want step-by-step instructions for your specific OS! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm a new user sorry for asking so many questions. I just started using trilium and it already filled up almost a 1gigabite of space in just a couple days of using it. I was thinking about changing the directory and I read the github page about directory page and it said about changing the environment variable. how exactly is this done? do I just go into config.ini and type out [environment variable] then TRILIUM_DATA_DIR =l:\doctuments?
How do will this exactly work? after I do that will it just duplicate the trilium I have already have with all my info into the new directory? Or is there something else I have to do to move it?is it recommended that I have trilium on my main drive? or can I just have it on my nas server directory so that I don't take up all my space? And just in case something goes wrong with trilium how do I read all the notes I already saved in trilium? Thank you for reading.
Beta Was this translation helpful? Give feedback.
All reactions