Skip to content

Build your personal knowledge base with Trilium Notes

docs(user_guide): document installing from Flathub

Elian Dorandefda32e89d2
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html
index 8329240654..1f89ef0893 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html
@@ -19,6 +19,8 @@
in:</p>
<ul>
<li><code>/home/[user]/.local/share</code> for Linux</li>
+ <li><code>/home/[user]/.var/app/org.triliumnotes.Trilium/data</code> for the
+ Flathub version on Linux</li>
<li><code>C:\Users\[user]\AppData\Roaming</code> for Windows Vista and up</li>
<li><code>/Users/[user]/Library/Application Support</code> for Mac OS</li>
<li>user's home is a fallback if some of the paths above don't exist</li>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html
index 78a2d8fabb..1e34f1b8d9 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html
@@ -8,6 +8,31 @@
<li><strong>Run the Application</strong>: Launch Trilium by executing the <code>trilium</code> executable
found within the unzipped folder.</li>
</ol>
+<h2>Installing from Flathub</h2>
+<p>On Linux, Trilium is also available on <a href="https://flathub.org/en/apps/org.triliumnotes.Trilium">Flathub</a>,
+ for both x86_64 and ARM (aarch64). Install it from your software center
+ (e.g. GNOME Software or KDE Discover), or from a terminal:</p><pre><code class="language-text-x-sh">flatpak install flathub org.triliumnotes.Trilium</code></pre>
+<p>Updates arrive through the software center or <code>flatpak update</code>,
+ like any other Flatpak.</p>
+<p>The Flathub version runs in a sandbox and keeps its <a href="#root/_help_tAassRL4RSQL">data directory</a> in <code>~/.var/app/org.triliumnotes.Trilium/data/trilium-data</code>.
+ It cannot see the data directory of a <code>.deb</code>, <code>.rpm</code>,
+ AppImage or <code>.zip</code> installation (<code>~/.local/share/trilium-data</code>),
+ so it starts with an empty database. To bring existing notes over:</p>
+<ol>
+ <li>
+ <p>Close Trilium, in both the old installation and the Flatpak.</p>
+ </li>
+ <li>
+ <p>Copy the old data directory into the sandbox:</p><pre><code class="language-text-x-sh">mkdir -p ~/.var/app/org.triliumnotes.Trilium/data
+cp -a ~/.local/share/trilium-data ~/.var/app/org.triliumnotes.Trilium/data/</code></pre>
+ </li>
+ <li>
+ <p>Start the Flatpak version.</p>
+ </li>
+</ol>
+<p>If <code>~/.var/app/org.triliumnotes.Trilium/data/trilium-data</code> already
+ exists because the Flatpak version was started before, remove or rename
+ it first.</p>
<h2>Startup Scripts</h2>
<p>Trilium offers various startup scripts to customize your experience:</p>
<ul>
diff --git a/docs/User Guide/User Guide/Installation & Setup/Data directory.md b/docs/User Guide/User Guide/Installation & Setup/Data directory.md
index 3b84301d29..61e69a1e5e 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Data directory.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Data directory.md
@@ -17,6 +17,7 @@ Here's how the location is decided:
Data directory is normally named `trilium-data` and it is stored in:
* `/home/[user]/.local/share` for Linux
+* `/home/[user]/.var/app/org.triliumnotes.Trilium/data` for the Flathub version on Linux
* `C:\Users\[user]\AppData\Roaming` for Windows Vista and up
* `/Users/[user]/Library/Application Support` for Mac OS
* user's home is a fallback if some of the paths above don't exist
diff --git a/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md b/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md
index b39241c459..40b14051ce 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md
@@ -5,6 +5,29 @@ To install Trilium on your desktop, follow these steps:
2. **Extract the Package**: Unzip the downloaded package to a location of your choice.
3. **Run the Application**: Launch Trilium by executing the `trilium` executable found within the unzipped folder.
+## Installing from Flathub
+
+On Linux, Trilium is also available on [Flathub](https://flathub.org/en/apps/org.triliumnotes.Trilium), for both x86\_64 and ARM (aarch64). Install it from your software center (e.g. GNOME Software or KDE Discover), or from a terminal:
+
+```sh
+flatpak install flathub org.triliumnotes.Trilium
+```
+
+Updates arrive through the software center or `flatpak update`, like any other Flatpak.
+
+The Flathub version runs in a sandbox and keeps its [data directory](Data%20directory.md) in `~/.var/app/org.triliumnotes.Trilium/data/trilium-data`. It cannot see the data directory of a `.deb`, `.rpm`, AppImage or `.zip` installation (`~/.local/share/trilium-data`), so it starts with an empty database. To bring existing notes over:
+
+1. Close Trilium, in both the old installation and the Flatpak.
+2. Copy the old data directory into the sandbox:
+
+ ```sh
+ mkdir -p ~/.var/app/org.triliumnotes.Trilium/data
+ cp -a ~/.local/share/trilium-data ~/.var/app/org.triliumnotes.Trilium/data/
+ ```
+3. Start the Flatpak version.
+
+If `~/.var/app/org.triliumnotes.Trilium/data/trilium-data` already exists because the Flatpak version was started before, remove or rename it first.
+
## Startup Scripts
Trilium offers various startup scripts to customize your experience: