update
This commit is contained in:
@@ -13,6 +13,19 @@ EnvironmentFile=/etc/bookstack-mcp/env
|
||||
WorkingDirectory=/opt/bookstack-mcp
|
||||
ExecStart=/opt/bookstack-mcp/venv/bin/python -m bookstack_mcp
|
||||
|
||||
# ProtectSystem=strict makes everything read-only, but the MCP library writes
|
||||
# to a data directory under $HOME (OAuth client registrations, caches). The
|
||||
# service user's home is /opt/bookstack-mcp, which is part of the read-only
|
||||
# tree -- so point HOME and the XDG dirs at directories systemd creates and
|
||||
# grants write access to. Without this the service dies with
|
||||
# "OSError: [Errno 30] Read-only file system: '/opt/bookstack-mcp/.local'".
|
||||
StateDirectory=bookstack-mcp
|
||||
CacheDirectory=bookstack-mcp
|
||||
Environment=HOME=/var/lib/bookstack-mcp
|
||||
Environment=XDG_DATA_HOME=/var/lib/bookstack-mcp
|
||||
Environment=XDG_CONFIG_HOME=/var/lib/bookstack-mcp
|
||||
Environment=XDG_CACHE_HOME=/var/cache/bookstack-mcp
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
TimeoutStopSec=20s
|
||||
|
||||
Reference in New Issue
Block a user