Skip to main content

OpenClaw on Raspberry Pi

Goal

Run a persistent, always-on OpenClaw Gateway on a Raspberry Pi for ~$35-80 one-time cost (no monthly fees). Perfect for:
  • 24/7 personal AI assistant
  • Home automation hub
  • Low-power, always-available Telegram/WhatsApp bot

Hardware Requirements

Minimum specs: 1GB RAM, 1 core, 500MB disk
Recommended: 2GB+ RAM, 64-bit OS, 16GB+ SD card (or USB SSD)

What You’ll Need

  • Raspberry Pi 4 or 5 (2GB+ recommended)
  • MicroSD card (16GB+) or USB SSD (better performance)
  • Power supply (official Pi PSU recommended)
  • Network connection (Ethernet or WiFi)
  • ~30 minutes

1) Flash the OS

Use Raspberry Pi OS Lite (64-bit) — no desktop needed for a headless server.
  1. Download Raspberry Pi Imager
  2. Choose OS: Raspberry Pi OS Lite (64-bit)
  3. Click the gear icon (⚙️) to pre-configure:
    • Set hostname: gateway-host
    • Enable SSH
    • Set username/password
    • Configure WiFi (if not using Ethernet)
  4. Flash to your SD card / USB drive
  5. Insert and boot the Pi

2) Connect via SSH

3) System Setup

4) Install Node.js 22 (ARM64)

5) Add Swap (Important for 2GB or less)

Swap prevents out-of-memory crashes:

6) Install OpenClaw

Option B: Hackable Install (For tinkering)

The hackable install gives you direct access to logs and code — useful for debugging ARM-specific issues.

7) Run Onboarding

Follow the wizard:
  1. Gateway mode: Local
  2. Auth: API keys recommended (OAuth can be finicky on headless Pi)
  3. Channels: Telegram is easiest to start with
  4. Daemon: Yes (systemd)

8) Verify Installation

9) Access the Dashboard

Since the Pi is headless, use an SSH tunnel:
Or use Tailscale for always-on access:

Performance Optimizations

Use a USB SSD (Huge Improvement)

SD cards are slow and wear out. A USB SSD dramatically improves performance:
See Pi USB boot guide for setup.

Speed up CLI startup (module compile cache)

On lower-power Pi hosts, enable Node’s module compile cache so repeated CLI runs are faster:
Notes:
  • NODE_COMPILE_CACHE speeds up subsequent runs (status, health, --help).
  • /var/tmp survives reboots better than /tmp.
  • OPENCLAW_NO_RESPAWN=1 avoids extra startup cost from CLI self-respawn.
  • First run warms the cache; later runs benefit most.

systemd startup tuning (optional)

If this Pi is mostly running OpenClaw, add a service drop-in to reduce restart jitter and keep startup env stable:
Then apply:
If possible, keep OpenClaw state/cache on SSD-backed storage to avoid SD-card random-I/O bottlenecks during cold starts. How Restart= policies help automated recovery: systemd can automate service recovery.

Reduce Memory Usage

Monitor Resources


ARM-Specific Notes

Binary Compatibility

Most OpenClaw features work on ARM64, but some external binaries may need ARM builds: If a skill fails, check if its binary has an ARM build. Many Go/Rust tools do; some don’t.

32-bit vs 64-bit

Always use 64-bit OS. Node.js and many modern tools require it. Check with:

Since the Pi is just the Gateway (models run in the cloud), use API-based models:
Don’t try to run local LLMs on a Pi — even small models are too slow. Let Claude/GPT do the heavy lifting.

Auto-Start on Boot

The onboarding wizard sets this up, but to verify:

Troubleshooting

Out of Memory (OOM)

Slow Performance

  • Use USB SSD instead of SD card
  • Disable unused services: sudo systemctl disable cups bluetooth avahi-daemon
  • Check CPU throttling: vcgencmd get_throttled (should return 0x0)

Service Won’t Start

ARM Binary Issues

If a skill fails with “exec format error”:
  1. Check if the binary has an ARM64 build
  2. Try building from source
  3. Or use a Docker container with ARM support

WiFi Drops

For headless Pis on WiFi:

Cost Comparison

Break-even: A Pi pays for itself in ~6-12 months vs cloud VPS.

See Also