mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	
		
			
				
	
	
	
		
			1.3 KiB
		
	
	
	
	
	
		
			Vendored
		
	
	
	
			
		
		
	
	
			1.3 KiB
		
	
	
	
	
	
		
			Vendored
		
	
	
	
Configuration (config.ini or environment variables)
Trilium supports configuration via a file named config.ini and environment variables. Please review the file named config-sample.ini in the Notes repository to see what values are supported.
You can provide the same values via environment variables instead of the config.ini file, and these environment variables use the following format:
- Environment variables should be prefixed with TRILIUM_and use underscores to represent the INI section structure.
- The format is: TRILIUM_<SECTION>_<KEY>=<VALUE>
- The environment variables will override any matching values from config.ini
For example, if you have this in your config.ini:
[Network]
host=localhost
port=8080
You can override these values using environment variables:
TRILIUM_NETWORK_HOST=0.0.0.0
TRILIUM_NETWORK_PORT=9000
The code will:
- First load the config.inifile as before
- Then scan all environment variables for ones starting with TRILIUM_
- Parse these variables into section/key pairs
- Merge them with the config from the file, with environment variables taking precedence
