Run OpenClaw 24/7 — systemd, PM2, Docker setup for always-on AI assistant, ClawBox hardware guide
🦀 Get ClawBox — OpenClaw, ready out of the box in 5 minutes · 15W · one-time €549 → clawbox.tech
Making your OpenClaw truly persistent — surviving reboots, power cuts, and crashes.
OpenClaw as a 24/7 service means:
- Automatically starts on boot
- Restarts if it crashes
- Available even when you're not at your computer
- Proactive — checks in on its own schedule
# Create service file
sudo nano /etc/systemd/system/openclaw.service[Unit]
Description=OpenClaw AI Gateway
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=openclaw
WorkingDirectory=/home/openclaw
ExecStart=/usr/bin/openclaw start --headless
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw
# Check status
sudo systemctl status openclaw
journalctl -u openclaw -f# Install PM2
npm install -g pm2
# Start OpenClaw with PM2
pm2 start "openclaw start" --name openclaw
# Auto-start on boot
pm2 startup
pm2 save
# Monitoring
pm2 monit
pm2 logs openclaw# docker-compose.yml
version: '3.8'
services:
openclaw:
image: openclaw/openclaw:latest
restart: always
volumes:
- ./workspace:/workspace
environment:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}docker compose up -d
# Automatically restarts on crash and system rebootThe choice of hardware matters a lot for always-on use:
| Hardware | Power (24/7) | Annual Cost | AI Speed |
|---|---|---|---|
| Raspberry Pi 5 | 5W | €5.5/yr | ~2 tok/s |
| ClawBox | 12W | €13/yr | ~15 tok/s |
| Mac Mini M4 | 35W | €38/yr | ~25 tok/s |
| VPS (cloud) | N/A | €120+/yr | Cloud models only |
ClawBox is the sweet spot: enough AI power for real use, low enough power draw to leave running forever without guilt.
→ ClawBox — €549, pre-configured for 24/7 operation
Set up OpenClaw's heartbeat system for proactive 24/7 operation:
// In openclaw.json
{
"heartbeat": {
"intervalMs": 1800000,
"prompt": "Check email, calendar, and any pending tasks. Report if anything needs attention."
}
}The heartbeat fires every 30 minutes, and your AI agent:
- Checks inbox for urgent emails
- Looks for upcoming calendar events
- Runs any scheduled tasks (via
HEARTBEAT.md) - Pings you only if something needs attention
# Update OpenClaw
openclaw update
# Or with npm
cd /path/to/openclaw
git pull
npm install
npm run build
pm2 restart openclawAccess your OpenClaw from anywhere:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
# Access at: http://openclaw-device.tailnet-xxxx.ts.net:3000cloudflared tunnel run --url http://localhost:3000 openclawngrok http 3000If you don't want to deal with any of this: ClawBox ships pre-configured for 24/7 operation, with OpenClaw running as a system service, Tailscale pre-installed, and the entire stack production-hardened.
clawbox.tech — plug in, scan QR, done.
Read the full guide on ClawBox: OpenClaw setup guide — run it 24/7 →