Trilium Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。
config.ini, document和其他一些重要的 Trilium 数据文件默认保存在数据目录中。
如果不需要,您可以通过TRILIUM_DATA_DIR环境变量将其更改为其他位置,例如:
export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
Linux
#!/bin/sh
export TRILIUM_DATA_DIR=/data/trilium-data
#./node/bin/node src/www
nohup ./node/bin/node src/www &
Windows
SET DIR=%~dp0
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
cd %DIR%
start "" trilium.exe
外部链接:先选择文本会出现弹框,点击外部链接按钮或CTRL-K
可以选择使用凭据保护共享笔记。为此,请为要保护的笔记按格式#shareCredentials="username:password"创建一个标签。通常,您希望像这样保护整个子树,因此不要忘记使该标签可继承。
请记住,默认状态是公开的,因此请确保您需要保护的所有内容都具有此标签(拥有或继承)。受密码保护的笔记的标题可能会出现在未受保护的笔记的链接和导航中。从 0.54 开始可以使用密码保护共享笔记。
Nginx 反向代理
nginx
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;
}
# 建议添加以下内容以server {}阻止不限制有效负载的大小:
# set to 0 for unlimited. Default is 1M.
client_max_body_size 0;
# This part is for proxy and HTTPS configure
server {
listen 443;
server_name trilium.example.net; #change trilium.example.net to your domain without HTTPS or HTTP.
ssl_certificate /etc/ssl/note/example.crt; #change /etc/ssl/note/example.crt to your path of crt file.
ssl_certificate_key /etc/ssl/note/example.net.key; #change /etc/ssl/note/example.net.key to your path of key file.
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log; #check the path of access.log, if it doesn't fit your file, change it
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://IP:port; #change it to your IP and port
proxy_read_timeout 90;
proxy_redirect http://IP:port https://trilium.example.net; #change them based on your IP, port and domain
}
}
# This part is for HTTPS forced
server {
listen 80;
server_name trilium.example.net; # change to your domain
return 301 https://$server_name$request_uri;
}