feat(docs): add documentation around setting the various environment variables to control upload size limit

This commit is contained in:
perf3ct 2025-05-13 09:49:18 -07:00
parent ae83f0a1c7
commit 2ea60bc4a7
3 changed files with 32 additions and 9 deletions

View File

@ -37,13 +37,22 @@
and other important Trilium data files are stored in the <a href="#root/_help_tAassRL4RSQL">data directory</a>. and other important Trilium data files are stored in the <a href="#root/_help_tAassRL4RSQL">data directory</a>.
If you prefer a different location, you can change it by setting the <code>TRILIUM_DATA_DIR</code> environment If you prefer a different location, you can change it by setting the <code>TRILIUM_DATA_DIR</code> environment
variable:</p><pre><code class="language-text-x-trilium-auto">export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre> variable:</p><pre><code class="language-text-x-trilium-auto">export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre>
<h3>Disabling / Modifying the Upload Limit</h3>
<p>If you're running into the 250MB limit imposed on the server by default,
and you'd like to increase the upload limit, you can set the <code>TRILIUM_NO_UPLOAD_LIMIT</code> environment
variable to <code>true</code> disable it completely:</p><pre><code class="language-text-x-trilium-auto">export TRILIUM_NO_UPLOAD_LIMIT=true </code></pre>
<p>Or, if you'd simply like to <em>increase</em> the upload limit size to something
beyond 250MB, you can set the <code>MAX_ALLOWED_FILE_SIZE_MB</code> environment
variable to something larger than the integer <code>250</code> (e.g. <code>450</code> in
the following example):</p><pre><code class="language-text-x-trilium-auto">export MAX_ALLOWED_FILE_SIZE_MB=450</code></pre>
<h3>Disabling Authentication</h3> <h3>Disabling Authentication</h3>
<p>If you are running Trilium on localhost only or if authentication is handled <p>If you are running Trilium on localhost only or if authentication is handled
by another component, you can disable Triliums authentication by adding by another component, you can disable Triliums authentication by adding
the following to <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General] the following to <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General]
noAuthentication=true</code></pre> noAuthentication=true</code></pre>
<h2>Reverse Proxy Setup</h2> <h2>Reverse Proxy Setup</h2>
<p>To configure a reverse proxy for Trilium, you can use either <strong>nginx</strong> or <strong>Apache</strong>.</p> <p>To configure a reverse proxy for Trilium, you can use either <strong>nginx</strong> or <strong>Apache</strong>.
You can also check out the documentation stored in the Reverse proxy folder.</p>
<h3>nginx</h3> <h3>nginx</h3>
<p>Add the following configuration to your <code>nginx</code> setup to proxy <p>Add the following configuration to your <code>nginx</code> setup to proxy
requests to Trilium:</p><pre><code class="language-text-x-trilium-auto">location /trilium/ { requests to Trilium:</p><pre><code class="language-text-x-trilium-auto">location /trilium/ {

View File

@ -87,19 +87,19 @@
"type": "text", "type": "text",
"mime": "text/html", "mime": "text/html",
"attributes": [ "attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "BRhQZHgwaGyw",
"isInheritable": false,
"position": 10
},
{ {
"type": "label", "type": "label",
"name": "iconClass", "name": "iconClass",
"value": "bx bx-package", "value": "bx bx-package",
"isInheritable": false, "isInheritable": false,
"position": 10 "position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "BRhQZHgwaGyw",
"isInheritable": false,
"position": 20
} }
], ],
"format": "markdown", "format": "markdown",

View File

@ -30,6 +30,20 @@ By default, `config.ini`, the [database](../Advanced%20Usage/Database.md), and o
export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
``` ```
### Disabling / Modifying the Upload Limit
If you're running into the 250MB limit imposed on the server by default, and you'd like to increase the upload limit, you can set the `TRILIUM_NO_UPLOAD_LIMIT` environment variable to `true` disable it completely:
```
export TRILIUM_NO_UPLOAD_LIMIT=true
```
Or, if you'd simply like to _increase_ the upload limit size to something beyond 250MB, you can set the `MAX_ALLOWED_FILE_SIZE_MB` environment variable to something larger than the integer `250` (e.g. `450` in the following example):
```
export MAX_ALLOWED_FILE_SIZE_MB=450
```
### Disabling Authentication ### Disabling Authentication
If you are running Trilium on localhost only or if authentication is handled by another component, you can disable Triliums authentication by adding the following to `config.ini`: If you are running Trilium on localhost only or if authentication is handled by another component, you can disable Triliums authentication by adding the following to `config.ini`:
@ -41,7 +55,7 @@ noAuthentication=true
## Reverse Proxy Setup ## Reverse Proxy Setup
To configure a reverse proxy for Trilium, you can use either **nginx** or **Apache**. To configure a reverse proxy for Trilium, you can use either **nginx** or **Apache**. You can also check out the documentation stored in the Reverse proxy folder.
### nginx ### nginx