Add systemd services for auto-start
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
[Unit]
|
||||
Description=Obsidian Vault Server with MCP
|
||||
After=network.target
|
||||
Documentation=file:///workspace/second-brain/SETUP.md
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=intense
|
||||
Home=/home/intense
|
||||
WorkingDirectory=/workspace/second-brain
|
||||
|
||||
# For headless: use Xvfb virtual display
|
||||
Environment="DISPLAY=:99"
|
||||
|
||||
# Start Xvfb first, then Obsidian
|
||||
ExecStartPre=/usr/bin/sh -c "Xvfb :99 -screen 0 1024x768x24 &"
|
||||
ExecStart=/home/intense/.local/bin/obsidian --no-sandbox
|
||||
|
||||
# Restart policy
|
||||
Restart=always
|
||||
RestartSec=15
|
||||
StartLimitInterval=300
|
||||
StartLimitBurst=3
|
||||
|
||||
# Resource limits
|
||||
MemoryLimit=2G
|
||||
CPUQuota=80%
|
||||
|
||||
# Logging
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=obsidian
|
||||
|
||||
# Stop timeout
|
||||
TimeoutStopSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user