forked from willynikes2/knowledge-base-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkb-server.service.example
More file actions
34 lines (29 loc) · 1004 Bytes
/
Copy pathkb-server.service.example
File metadata and controls
34 lines (29 loc) · 1004 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
# 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=<PATH_TO_KNOWLEDGE_BASE_SERVER>
Environment="NODE_ENV=production"
Environment="PATH=<PATH_TO_NODE_BIN_DIR>:/usr/local/bin:/usr/bin:/bin"
ExecStart=<PATH_TO_NODE_BIN> <PATH_TO_KNOWLEDGE_BASE_SERVER>/bin/kb.js start
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 <PATH_TO_KNOWLEDGE_BASE_SERVER> <OBSIDIAN_VAULT_PATH> <HOME>/knowledgebase /tmp
ProtectHome=false
[Install]
WantedBy=multi-user.target