mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	Merge pull request #1921 from TriliumNext/docs/add-upload-size-env-var-docs
Add documentation around setting the various environment variables to control upload size limit
This commit is contained in:
		| @@ -37,13 +37,22 @@ | ||||
|   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 | ||||
|   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> | ||||
| <p>If you are running Trilium on localhost only or if authentication is handled | ||||
|   by another component, you can disable Trilium’s authentication by adding | ||||
|   the following to <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General] | ||||
| noAuthentication=true</code></pre> | ||||
| <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> | ||||
| <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/ { | ||||
|   | ||||
| @@ -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 | ||||
| ``` | ||||
|  | ||||
| ### 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 | ||||
|  | ||||
| If you are running Trilium on localhost only or if authentication is handled by another component, you can disable Trilium’s authentication by adding the following to `config.ini`: | ||||
| @@ -41,7 +55,7 @@ noAuthentication=true | ||||
|  | ||||
| ## 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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user