-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathkb-server.service.example
More file actions
35 lines (30 loc) · 936 Bytes
/
kb-server.service.example
File metadata and controls
35 lines (30 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Example systemd service file for Knowledge Base Server
# The install script (kb-server-install.sh) generates this automatically.
# If installing manually, replace all <PLACEHOLDER> values with your paths.
[Unit]
Description=Knowledge Base Server
After=network.target
Documentation=https://github.com/willynikes2/knowledge-base-server
[Service]
Type=simple
User=<YOUR_USER>
WorkingDirectory=<HOME>
Environment="NODE_ENV=production"
Environment="PATH=<PATH_TO_NODE_BIN_DIR>:/usr/local/bin:/usr/bin:/bin"
ExecStart=<PATH_TO_KB_BINARY> start
# Find kb path with: which kb
Restart=on-failure
RestartSec=5
StartLimitBurst=5
StartLimitIntervalSec=60
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=kb-server
# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=<HOME>/.knowledge-base <OBSIDIAN_VAULT_PATH> <HOME>/knowledgebase /tmp
ProtectHome=false
[Install]
WantedBy=multi-user.target