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.ini file 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