You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
863 B
41 lines
863 B
[Unit] |
|
Description=OpenClaw Agent Health Monitor |
|
Documentation=https://docs.openclaw.ai |
|
After=network-online.target |
|
Wants=network-online.target |
|
|
|
[Service] |
|
Type=simple |
|
User=root |
|
WorkingDirectory=/root/.openclaw/workspace |
|
Environment=NODE_ENV=production |
|
Environment=HOME=/root |
|
Environment=XDG_RUNTIME_DIR=/run/user/0 |
|
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus |
|
|
|
# Monitor process |
|
ExecStart=/usr/bin/node /root/.openclaw/workspace/agent-monitor.js |
|
|
|
# Auto-healing configuration |
|
Restart=always |
|
RestartSec=5 |
|
StartLimitInterval=300 |
|
StartLimitBurst=10 |
|
|
|
# Resource limits |
|
MemoryLimit=512M |
|
CPUQuota=20% |
|
|
|
# Logging |
|
StandardOutput=journal |
|
StandardError=journal |
|
SyslogIdentifier=openclaw-monitor |
|
|
|
# Security |
|
NoNewPrivileges=true |
|
ProtectSystem=strict |
|
ProtectHome=read-only |
|
ReadWritePaths=/root/.openclaw/workspace/logs |
|
|
|
[Install] |
|
WantedBy=multi-user.target
|
|
|