Skip to content

Commit 977284f

Browse files
committed
docs(user): document read-only database (closes #4341)
1 parent d271fe7 commit 977284f

File tree

4 files changed

+151
-1
lines changed

4 files changed

+151
-1
lines changed

apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Read-only database.html

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/User Guide/!!!meta.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14150,6 +14150,82 @@
1415014150
"format": "markdown",
1415114151
"dataFileName": "Nightly release.md",
1415214152
"attachments": []
14153+
},
14154+
{
14155+
"isClone": false,
14156+
"noteId": "ZmT9ln8XJX2o",
14157+
"notePath": [
14158+
"pOsGYCXsbNQG",
14159+
"tC7s2alapj8V",
14160+
"ZmT9ln8XJX2o"
14161+
],
14162+
"title": "Read-only database",
14163+
"notePosition": 270,
14164+
"prefix": null,
14165+
"isExpanded": false,
14166+
"type": "text",
14167+
"mime": "text/html",
14168+
"attributes": [
14169+
{
14170+
"type": "label",
14171+
"name": "iconClass",
14172+
"value": "bx bx-book-reader",
14173+
"isInheritable": false,
14174+
"position": 30
14175+
},
14176+
{
14177+
"type": "label",
14178+
"name": "shareAlias",
14179+
"value": "read-only-db",
14180+
"isInheritable": false,
14181+
"position": 40
14182+
},
14183+
{
14184+
"type": "relation",
14185+
"name": "internalLink",
14186+
"value": "wy8So3yZZlH9",
14187+
"isInheritable": false,
14188+
"position": 50
14189+
},
14190+
{
14191+
"type": "relation",
14192+
"name": "internalLink",
14193+
"value": "R9pX4DGra2Vt",
14194+
"isInheritable": false,
14195+
"position": 60
14196+
},
14197+
{
14198+
"type": "relation",
14199+
"name": "internalLink",
14200+
"value": "Gzjqa934BdH4",
14201+
"isInheritable": false,
14202+
"position": 70
14203+
},
14204+
{
14205+
"type": "relation",
14206+
"name": "internalLink",
14207+
"value": "eIg8jdvaoNNd",
14208+
"isInheritable": false,
14209+
"position": 80
14210+
},
14211+
{
14212+
"type": "relation",
14213+
"name": "internalLink",
14214+
"value": "GTwFsgaA0lCt",
14215+
"isInheritable": false,
14216+
"position": 90
14217+
},
14218+
{
14219+
"type": "relation",
14220+
"name": "internalLink",
14221+
"value": "KSZ04uQ2D1St",
14222+
"isInheritable": false,
14223+
"position": 100
14224+
}
14225+
],
14226+
"format": "markdown",
14227+
"dataFileName": "Read-only database.md",
14228+
"attachments": []
1415314229
}
1415414230
]
1415514231
},
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Read-only database
2+
> [!WARNING]
3+
> This functionality is still in preview, expect possible issues or even the feature disappearing completely.
4+
> Feel free to [report](../Troubleshooting/Reporting%20issues.md) any issues you might have.
5+
6+
The read-only database is an alternative to <a class="reference-link" href="Sharing.md">Sharing</a> notes. Although the share functionality works pretty well to publish pages to the Internet in a wiki, blog-like format it does not offer the full functionality behind Trilium (such as the advanced <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> or the interactivity behind <a class="reference-link" href="../Collections.md">Collections</a> or the various <a class="reference-link" href="../Note%20Types.md">Note Types</a>).
7+
8+
When the database is in read-only mode, the Trilium application can be used as normal, but editing is disabled and changes are made in-memory only.
9+
10+
## What it does
11+
12+
* All notes are read-only, without the possibility of editing them.
13+
* Features that would normally alter the database such as the list of recent notes are disabled.
14+
15+
## Limitations
16+
17+
* Some features might “slip through” and still end up creating a note, for example.
18+
* However, the database is still read-only, so all modifications will be reset if the server is restarted.
19+
* Whenever this occurs, `ERROR: read-only DB ignored` will be shown in the logs.
20+
21+
## Setting a database as read-only
22+
23+
First, make sure the database is initialized (e.g. the first set up is complete). Then modify the [config.ini](Configuration%20\(config.ini%20or%20e.md) by looking for the `[General]` section and adding a new `readOnly` field:
24+
25+
```
26+
[General]
27+
readOnly=true
28+
```
29+
30+
If your server is already running, restart it to apply the changes.
31+
32+
Similarly, to disable read-only remove the line or set it to `false`.

0 commit comments

Comments
 (0)