Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How to Set Up OpenClaw (Moltbot/Clawdbot) on a Raspberry Pi

Description and use

A reliable OpenClaw node is deployed on a Raspberry Pi running as an isolated systemd service under a dedicated non-root user, with layered heartbeat health checks (process, dependencies, deterministic task, model probe), hybrid model routing, sandboxing, and API-level observability via Apidog.

Problem

Set up a reliable OpenClaw agent node on a Raspberry Pi with service isolation, heartbeat-driven health checks, selective model invocation, and API-level observability.

Outcome

A reliable OpenClaw node is deployed on a Raspberry Pi running as an isolated systemd service under a dedicated non-root user, with layered heartbeat health checks (process, dependencies, deterministic task, model probe), hybrid model routing, sandboxing, and API-level observability via Apidog.

Workflow

  • Decide architecture: Option A (Pi as orchestrator, model offloaded), Option B (Pi for lightweight local models only), or Option C (hybrid routing).
  • Install recommended hardware: Raspberry Pi 5 (8GB) preferred; Raspberry Pi 4 (4GB+) works; NVMe or high-quality SSD over microSD; stable power supply and active cooling.
  • Use Raspberry Pi OS Lite (64-bit) or Ubuntu Server 24.04 for ARM64.
  • Update OS: sudo apt update && sudo apt upgrade -y && sudo reboot.
  • Set hostname: sudo hostnamectl set-hostname openclaw-pi; enable NTP: sudo timedatectl set-ntp true.
  • Install runtime dependencies: git curl wget jq build-essential pkg-config python3 python3-venv python3-pip nodejs npm redis-server sqlite3.
  • Create dedicated service user: sudo useradd -m -s /bin/bash openclaw; sudo usermod -aG sudo openclaw; create /opt/openclaw and chown -R openclaw:openclaw /opt/openclaw.
  • Clone OpenClaw repo into /opt/openclaw/app; create Python venv and install requirements; run npm ci if Node service exists.
  • Copy .env.example to .env; configure OPENCLAW_HOST=0.0.0.0, OPENCLAW_PORT=8080, STATE_BACKEND=redis, REDIS_URL, DB_URL=sqlite:////opt/openclaw/app/data/openclaw.db, MODEL_ROUTER=hybrid, LOCAL_MODEL_ENABLED=true, REMOTE_MODEL_ENABLED=true, HEARTBEAT_INTERVAL_SEC=15, HEARTBEAT_TIMEOUT_SEC=5, CHEAP_CHECKS_ENABLED=true, SANDBOX_MODE=on, SANDBOX_PROVIDER=process; chmod 600 .env.
  • Create systemd service at /etc/systemd/system/openclaw.service with Type=simple, User=openclaw, WorkingDirectory=/opt/openclaw/app, ExecStart=/opt/openclaw/app/.venv/bin/python -m openclaw.server, Restart=always, RestartSec=3, TimeoutStartSec=30, TimeoutStopSec=20, and hardening directives (NoNewPrivileges=true, PrivateTmp=true, ProtectSystem=full, ProtectHome=true, ReadWritePaths=/opt/openclaw/app/data /opt/openclaw/app/logs).
  • Enable and start: sudo systemctl daemon-reload; sudo systemctl enable openclaw; sudo systemctl start openclaw; tail logs with journalctl -u openclaw -f.
  • Implement layered heartbeat strategy: L0 process check (TCP port 127.0.0.1:8080), L1 dependency check (redis_ping, db_read), L2 deterministic task check (python scripts/selfcheck.py), L3 model-backed probe (enabled only when previous checks pass but confidence is low).
  • Secure execution with sandbox boundaries: run tools under non-privileged user, deny broad filesystem writes, whitelist directories, set subprocess timeout and memory limits.
  • Validate OpenClaw endpoints with Apidog; build regression tests; document local API surface for team use.

Evidence

This guide is for deep technical builders. You’ll set up OpenClaw with: reproducible system dependencies, service isolation, heartbeat-driven health checks (cheap checks first), selective model invocation, optional secure sandboxing patterns, and API-level observability.

Source

OpenClaw moved fast: from Moltbot to Clawdbot naming turbulence to a stable identity and rapidly growing community adoption.

Source

  • Record date: 2026-10-21T03:41:14.880Z