This pages describes installing Trilium on your own server. You might want to do this in case you want to set up sync or you want to use it as online version of Trilium accessible from anywhere. The server installation is a fully functioning instance i.e. “web editor”.
There are several options how to do this, each one with some advantage:
Server installation has both web and mobile frontend.
For server installations, you might want to configure e.g. port or TLS. This is done in the Trilium config file, by default it’s in config.ini
in the data directory. You can start creating your configuration by copying the provided config-sample.ini
with default values to config.ini
.
config.ini
, database and some other important Trilium data files are by default persisted in the data directory]].
If this is not desired, you may change it via TRILIUM_DATA_DIR
environment variable to some other location, e.g.:
export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
Among others, you can also disable authentication (in case you run on localhost only or authentication is handled by another component) by adding the following to config.ini
:
[General]
noAuthentication=true
location /trilium/ {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
It’s also advised to add following to server {}
block to not limit size of payloads:
# set to 0 for unlimited. Default is 1M.
client_max_body_size 0;
See Apache proxy setup.