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.
50 lines
1.2 KiB
50 lines
1.2 KiB
[Unit] |
|
Description=OpenClaw Agent - 张大师 (Life Assistant) |
|
Documentation=https://docs.openclaw.ai |
|
After=network.target network-online.target |
|
Wants=network-online.target |
|
|
|
[Service] |
|
Type=simple |
|
User=root |
|
WorkingDirectory=/root/.openclaw |
|
|
|
# Environment variables |
|
Environment=NODE_ENV=production |
|
Environment=AGENT_ID=life |
|
Environment=AGENT_PORT=18790 |
|
Environment=DASHSCOPE_API_KEY=sk-4111c9dba5334510968f9ae72728944e |
|
Environment=TAVILY_API_KEY=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 |
|
Environment=XDG_RUNTIME_DIR=/run/user/0 |
|
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus |
|
|
|
# Start the agent gateway on port 18790 |
|
ExecStart=/usr/bin/node /www/server/nodejs/v24.13.1/bin/openclaw gateway start --port 18790 --agent-id life |
|
ExecReload=/bin/kill -HUP $MAINPID |
|
|
|
# Auto-healing configuration |
|
Restart=always |
|
RestartSec=10 |
|
StartLimitInterval=300 |
|
StartLimitBurst=5 |
|
|
|
# Resource limits |
|
MemoryLimit=1G |
|
CPUQuota=40% |
|
|
|
# Logging |
|
StandardOutput=journal |
|
StandardError=journal |
|
SyslogIdentifier=openclaw-agent-life |
|
|
|
# Security hardening |
|
NoNewPrivileges=true |
|
ProtectSystem=strict |
|
ProtectHome=read-only |
|
ReadWritePaths=/root/.openclaw |
|
|
|
# Watchdog for health monitoring |
|
WatchdogSec=30 |
|
|
|
[Install] |
|
WantedBy=multi-user.target
|
|
|