-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathndcourts-mcp.service
More file actions
43 lines (37 loc) · 1.23 KB
/
Copy pathndcourts-mcp.service
File metadata and controls
43 lines (37 loc) · 1.23 KB
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
36
37
38
39
40
41
42
43
# systemd unit — ndcourts-mcp over Streamable HTTP, bound to localhost.
# Install to /etc/systemd/system/ndcourts-mcp.service (see deploy/SETUP.md).
#
# Adjust User/paths if you don't use the /srv/ndcourts layout from SETUP.md.
[Unit]
Description=ndcourts-mcp (MCP server, Streamable HTTP)
After=network-online.target
Wants=network-online.target
[Service]
User=ndcourts
Group=ndcourts
WorkingDirectory=/srv/ndcourts/ndcourts-mcp
# Transport + bind. Host stays on localhost — only Caddy is public.
Environment=NDCOURTS_TRANSPORT=http
Environment=NDCOURTS_HOST=127.0.0.1
Environment=NDCOURTS_PORT=8000
Environment=NDCOURTS_DB=/srv/ndcourts/opinions.db
ExecStart=/srv/ndcourts/ndcourts-mcp/.venv/bin/ndcourts-mcp
Restart=on-failure
RestartSec=2
# --- Hardening ---
# The app only READS opinions, but SQLite WAL mode writes -wal/-shm files
# next to the DB, so the DB directory must stay writable: hence the
# ReadWritePaths exception under ProtectSystem=strict.
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/srv/ndcourts
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictSUIDSGID=true
RestrictNamespaces=true
LockPersonality=true
[Install]
WantedBy=multi-user.target