Trilium

imported>Malacology2022年5月25日 (三) 05:04的版本 (init)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

trilium是一个开源免费可自建的知识管理软件,提供标签、无限层级、关系图等功能。

安装

# yay -S trilium-server-bin

nginx

新建/etc/nginx/conf.d/note.conf,替换 YOUR_IP YOUR_KEY_FILE YOUR_CRT_FILE YOUR_DOMAIN 为自己的内容。

 server {
            listen 80;
            server_name YOUR_DOMAIN;
            return 301 https://$server_name$request_uri;
}
server {
    listen 443 ssl http2;
    server_name YOUR_DOMAIN;
    ssl_certificate YOUR_CRT_FILR;
    ssl_certificate_key YOUR_KEY_FILE;
    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;
    
    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_pass http://YOUR_IP:8080;
        proxy_read_timeout 90;
        proxy_redirect http://YOUR_IP:8080 https://YOUR_DOMAIN;
    }
}

重启nginx

# systemctl restart nginx

自启

# cd /usr/lib/systemd/system
# vim trilium.service

添加

Description=Trilium

[Service] ExecStart=/usr/bin/trilium-server

[Install]

WantedBy=multi-user.target

启动

# systemctl enable trilium
  1. systemctl start trilium