服务端配置
构建 joplin server
1 2 3 4 5
| $ cd /home/runsisi/runsisi.com/ $ git clone https://github.com/laurent22/joplin.git $ cd joplin/packages/server/ $ npm install $ npm run tsc
|
创建 joplin 用户
创建用户:
1
| $ sudo useradd -M joplin -s /usr/sbin/nologin
|
并且为 joplin 用户添加 joplin/packages/server/ 目录访问权限:
1 2
| $ cd .. $ setfacl -m u:joplin:rwx server/
|
创建 systemd 服务
1 2 3
| $ sudo vi /etc/default/joplin APP_BASE_URL=https://joplin.runsisi.com APP_PORT=8080
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| $ sudo vi /lib/systemd/system/joplin.service [Unit] Description=joplin After=network.target
[Service] EnvironmentFile=-/etc/default/joplin ExecStart=/usr/bin/npm run start --prefix /home/runsisi/runsisi.com/joplin/packages/server/ ExecReload=/bin/kill -HUP $MAINPID KillMode=control-group Restart=on-failure RestartPreventExitStatus=255 Type=simple User=joplin Group=joplin
[Install] WantedBy=multi-user.target
|
数据默认使用 SQLite 进行存储,DB 路径为(路径是代码中写死的,因为 joplin 默认 SQLite 数据存储仅用于开发、测试环境,虽然我个人认为对于个人用户而言 SQLite 已经足够了):
1 2
| $ ll db-prod.sqlite -rw-r--r-- 1 joplin joplin 786432 Apr 18 21:45 db-prod.sqlite
|
配置 nginx
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| $ sudo vi /etc/nginx/conf.d/runsisi.com.conf server { listen 443 ssl; server_name joplin.runsisi.com; ssl_certificate /home/runsisi/runsisi.com/certs/joplin.runsisi.com.crt; ssl_certificate_key /home/runsisi/runsisi.com/certs/joplin.runsisi.com.key;
location / { proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; } }
|
启动 systemd 服务
1 2 3
| $ sudo systemctl daemon-reload $ sudo systemctl enable joplin $ sudo systemctl start joplin
|
创建同步用户
访问登录页面:
1
| https://joplin.runsisi.com/login
|

默认用户名、密码:
admin@localhost / admin
创建新的同步用户:

客户端配置
1 2 3
| $ cd .config/ $ rm -rf @joplin/ $ rm -rf joplin-desktop/
|
启动:
Joplin-1.7.11.AppImage
配置同步:
