2025-04-18 01:28:32 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Configuration (config.ini or environment variables)
 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Trilium supports configuration via a file named `config.ini`  and environment variables. This document provides a comprehensive reference for all configuration options.
							 
						 
					
						
							
								
									
										
										
										
											2025-03-10 21:15:33 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Configuration Precedence
 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-10 21:15:33 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Configuration values are loaded in the following order of precedence (highest to lowest):
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.   **Environment variables **  (checked first)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								2.   **config.ini file values ** 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								3.   **Default values ** 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-10 21:15:33 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Environment Variable Patterns
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Trilium supports multiple environment variable patterns for flexibility. The primary pattern is: `TRILIUM_[SECTION]_[KEY]` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Where:
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `SECTION`  is the INI section name in UPPERCASE
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `KEY`  is the camelCase configuration key converted to UPPERCASE (e.g., `instanceName`  → `INSTANCENAME` )
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Additionally, shorter aliases are available for common configurations (see Alternative Variables section below).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Environment Variable Reference
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### General Section
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| Environment Variable | Type | Default | Description |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| --- | --- | --- | --- |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_GENERAL_INSTANCENAME`  | string | ""  | Instance name for API identification |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_GENERAL_NOAUTHENTICATION`  | boolean | false | Disable authentication (server only) |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_GENERAL_NOBACKUP`  | boolean | false | Disable automatic backups |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_GENERAL_NODESKTOPICON`  | boolean | false | Disable desktop icon creation |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_GENERAL_READONLY`  | boolean | false | Enable read-only mode |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Network Section
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| Environment Variable | Type | Default | Description |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| --- | --- | --- | --- |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_HOST`  | string | "0.0.0.0" | Server host binding |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_PORT`  | string | "3000" | Server port |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_HTTPS`  | boolean | false | Enable HTTPS |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_CERTPATH`  | string | ""  | SSL certificate path |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_KEYPATH`  | string | ""  | SSL key path |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_TRUSTEDREVERSEPROXY`  | boolean/string | false | Reverse proxy trust settings |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_CORSALLOWORIGIN`  | string | ""  | CORS allowed origins |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_CORSALLOWMETHODS`  | string | ""  | CORS allowed methods |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_NETWORK_CORSALLOWHEADERS`  | string | ""  | CORS allowed headers |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Session Section
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| Environment Variable | Type | Default | Description |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| --- | --- | --- | --- |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_SESSION_COOKIEMAXAGE`  | integer | 1814400 | Session cookie max age in seconds (21 days) |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Sync Section
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| Environment Variable | Type | Default | Description |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| --- | --- | --- | --- |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_SYNC_SYNCSERVERHOST`  | string | ""  | Sync server host URL |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_SYNC_SYNCSERVERTIMEOUT`  | string | "120000" | Sync server timeout in milliseconds |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_SYNC_SYNCPROXY`  | string | ""  | Sync proxy URL |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### MultiFactorAuthentication Section
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| Environment Variable | Type | Default | Description |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| --- | --- | --- | --- |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL`  | string | ""  | OAuth/OpenID base URL |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTID`  | string | ""  | OAuth client ID |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTSECRET`  | string | ""  | OAuth client secret |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERBASEURL`  | string | "[https://accounts.google.com ](https://accounts.google.com )" | OAuth issuer base URL |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERNAME`  | string | "Google" | OAuth issuer display name |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERICON`  | string | ""  | OAuth issuer icon URL |
							 
						 
					
						
							
								
									
										
										
										
											2025-03-10 21:15:33 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Logging Section
 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-10 21:15:33 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| Environment Variable | Type | Default | Description |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								| --- | --- | --- | --- |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								| `TRILIUM_LOGGING_RETENTIONDAYS`  | integer | 90  | Number of days to retain log files |
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Alternative Environment Variables
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The following alternative environment variable names are also supported and work identically to their longer counterparts:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Network CORS Variables
 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_NETWORK_CORS_ALLOW_ORIGIN`  (alternative to `TRILIUM_NETWORK_CORSALLOWORIGIN` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_NETWORK_CORS_ALLOW_METHODS`  (alternative to `TRILIUM_NETWORK_CORSALLOWMETHODS` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_NETWORK_CORS_ALLOW_HEADERS`  (alternative to `TRILIUM_NETWORK_CORSALLOWHEADERS` )
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Sync Variables
 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_SYNC_SERVER_HOST`  (alternative to `TRILIUM_SYNC_SYNCSERVERHOST` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_SYNC_SERVER_TIMEOUT`  (alternative to `TRILIUM_SYNC_SYNCSERVERTIMEOUT` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_SYNC_SERVER_PROXY`  (alternative to `TRILIUM_SYNC_SYNCPROXY` )
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### OAuth/MFA Variables
 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_OAUTH_BASE_URL`  (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_OAUTH_CLIENT_ID`  (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTID` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_OAUTH_CLIENT_SECRET`  (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTSECRET` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_OAUTH_ISSUER_BASE_URL`  (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERBASEURL` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_OAUTH_ISSUER_NAME`  (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERNAME` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_OAUTH_ISSUER_ICON`  (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERICON` )
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Logging Variables
 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    `TRILIUM_LOGGING_RETENTION_DAYS`  (alternative to `TRILIUM_LOGGING_RETENTIONDAYS` )
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Boolean Values
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Boolean environment variables accept the following values:
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    **True ** : `"true"` , `"1"` , `1` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    **False ** : `"false"` , `"0"` , `0` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    Any other value defaults to `false` 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Using Environment Variables
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Both naming patterns are fully supported and can be used interchangeably:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								*    The longer format follows the section/key pattern for consistency with the INI file structure
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    The shorter alternatives provide convenience for common configurations
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*    You can use whichever format you prefer - both are equally valid
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Examples
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Docker Compose Example
 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```yaml
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								services:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  trilium:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    image: triliumnext/notes
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    environment:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # Using full format
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      TRILIUM_GENERAL_INSTANCENAME: "My Trilium Instance"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      TRILIUM_NETWORK_PORT: "8080"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      TRILIUM_NETWORK_CORSALLOWORIGIN: "https://myapp.com"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      TRILIUM_SYNC_SYNCSERVERHOST: "https://sync.example.com"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL: "https://auth.example.com"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # Or using shorter alternatives (equally valid)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # TRILIUM_NETWORK_CORS_ALLOW_ORIGIN: "https://myapp.com"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # TRILIUM_SYNC_SERVER_HOST: "https://sync.example.com"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # TRILIUM_OAUTH_BASE_URL: "https://auth.example.com"
							 
						 
					
						
							
								
									
										
										
										
											2025-03-11 20:23:36 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Shell Export Example
 
							 
						 
					
						
							
								
									
										
										
										
											2025-08-26 19:44:01 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```sh
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Using either format
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export TRILIUM_GENERAL_NOAUTHENTICATION=false
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export TRILIUM_NETWORK_HTTPS=true
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export TRILIUM_NETWORK_CERTPATH=/path/to/cert.pem
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export TRILIUM_NETWORK_KEYPATH=/path/to/key.pem
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export TRILIUM_LOGGING_RETENTIONDAYS=30
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Start Trilium
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								npm start
							 
						 
					
						
							
								
									
										
										
										
											2025-03-10 21:15:33 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## config.ini Reference
 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-10 21:15:33 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-08-21 02:21:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								For the complete list of configuration options and their INI file format, please review the [config-sample.ini ](https://github.com/TriliumNext/Trilium/blob/main/apps/server/src/assets/config-sample.ini ) file in the Trilium repository