← Blog
Guide

OpenClaw Raspberry Pi: Run Your AI Agent on a $35 Device

How to install OpenClaw on a Raspberry Pi — compatible models, install steps, performance tips, home automation use cases, and always-on agent configuration.

·8 min read

OpenClaw Raspberry Pi: Run Your AI Agent on a $35 Device

A Raspberry Pi sitting on a shelf isn't doing much. Add OpenClaw and it becomes an always-on AI agent: monitoring your home network, answering questions via Telegram, running automations, controlling smart devices, or executing scheduled tasks without anyone touching it.

This guide covers compatible Pi models, the full install process, performance expectations, practical use cases, and configuration tips that matter specifically for low-resource hardware.

Why Raspberry Pi for an AI Agent?

The obvious objection: a Pi has 4–8GB of RAM and runs on a 2.5W chip. That's not going to run a 70B parameter model locally. But that's not what OpenClaw does.

OpenClaw is a runtime and orchestration layer. The heavy AI inference happens at Anthropic (or whatever model provider you configure). The Pi sends API requests and receives responses — it doesn't run the model. The local resource requirements are therefore minimal: Node.js, network I/O, and whatever scripts your skills invoke.

What you actually need on the Pi:

  • Node.js runtime to run OpenClaw
  • Network access to reach the AI provider API
  • Enough RAM to hold the agent state and active skill context (~200–400MB in practice)

A Raspberry Pi 4 with 2GB of RAM handles this comfortably. The Pi 5 is even better. The Pi Zero 2W technically works but is tight.

The real advantage of Pi over cloud: your agent runs at your location, has access to your local network, can control local devices, reads files from your local filesystem, and costs nothing to operate after hardware purchase. No VPS monthly fee. No cloud data exposure for local operations.

Compatible Raspberry Pi Models

Raspberry Pi 5 (Recommended)

  • RAM: 4GB or 8GB
  • CPU: Cortex-A76 quad-core, 2.4GHz
  • Performance: Excellent. Handles concurrent agent sessions, multiple skills active, no lag.
  • Cost: ~$60–80

Best choice if you're buying new hardware for this purpose.

Raspberry Pi 4 Model B (2GB+)

  • RAM: 2GB, 4GB, or 8GB variants
  • CPU: Cortex-A72 quad-core, 1.8GHz
  • Performance: Good. 2GB is the minimum — use 4GB+ if you plan to run additional services alongside OpenClaw.
  • Cost: ~$35–55

Solid choice if you already have one or find it cheaper than Pi 5.

Raspberry Pi 4 Model B (1GB)

  • Technically works, but you'll feel the constraint when multiple skills are active. Not recommended for production use.

Raspberry Pi 3 Model B+

  • Works but slow. Node.js startup takes noticeably longer. Response handling is sluggish under load.
  • Fine for light personal use if it's what you have. Not for anything time-sensitive.

Raspberry Pi Zero 2W

  • Marginal. The 512MB RAM is tight. OpenClaw will run but you won't have headroom for much else. Best used as a single-purpose, single-skill node rather than a full agent host.

Raspberry Pi Zero W (original)

  • Not recommended. Single-core, 512MB RAM, 32-bit CPU. Too constrained.

What You Need Before Starting

  • Raspberry Pi 4 (2GB+) or Pi 5
  • microSD card — 16GB minimum, 32GB recommended (faster card = faster startup)
  • Power supply (official Pi power supply — underpowered supplies cause random crashes)
  • Network connection (Ethernet preferred for stability; Wi-Fi works)
  • Raspberry Pi OS Lite (64-bit) — headless install is fine, you don't need a desktop

Install Steps

Step 1: Flash Raspberry Pi OS

Use the Raspberry Pi Imager to flash Raspberry Pi OS Lite (64-bit) to your microSD card.

In the Imager settings before writing:

  • Set a hostname (e.g., openclaw-pi)
  • Enable SSH
  • Set your username and password
  • Configure Wi-Fi if needed

This gets you a headless Pi you can SSH into immediately.

Step 2: Boot and SSH In

ssh pi@openclaw-pi.local
# or use the Pi's IP address
ssh pi@192.168.1.XX

Step 3: Update the System

sudo apt update && sudo apt upgrade -y

Step 4: Install Node.js

Raspberry Pi OS's default apt package for Node.js is outdated. Use NodeSource:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
node --version
# Should output v22.x.x

OpenClaw requires Node.js 18+. Version 22 is the current LTS and works well.

Step 5: Install OpenClaw

sudo npm install -g openclaw
openclaw --version

Step 6: Configure Your API Key

OpenClaw needs a model provider API key. The fastest setup uses Anthropic:

openclaw config set model.provider anthropic
openclaw config set model.apiKey YOUR_ANTHROPIC_API_KEY

Or set via environment variable (recommended for production):

echo 'export ANTHROPIC_API_KEY=your_key_here' >> ~/.bashrc
source ~/.bashrc

Step 7: Start the Gateway

openclaw gateway start

Verify it's running:

openclaw gateway status
# Should show: ● openclaw-gateway running on port 3080

Step 8: Run OpenClaw as a System Service

You want OpenClaw to start automatically on boot and restart if it crashes:

sudo openclaw gateway install-service
sudo systemctl enable openclaw-gateway
sudo systemctl start openclaw-gateway

Check service status:

systemctl status openclaw-gateway

Now your agent starts automatically whenever the Pi boots. This is what "always-on" actually means.

Performance Expectations

Response Time

API round-trips (Pi → Anthropic → Pi) take 1–5 seconds depending on network and prompt complexity. The Pi itself adds no meaningful latency to this — the bottleneck is the API call, not local processing.

Concurrent Sessions

A Pi 4 with 4GB handles 2–3 concurrent agent sessions comfortably. Beyond that you'll see memory pressure. The Pi 5 handles 4–5.

Skill Execution

Skills that run local scripts (bash, Python, Node.js) execute as fast as the Pi's CPU allows. For a weather API check or a file read, you won't notice any difference from a cloud VPS. For compute-heavy scripts (image processing, large file parsing), the Pi is slower — plan accordingly.

Memory Usage

OpenClaw at idle: ~100–150MB. Under active use with multiple skills loaded: 200–400MB. Keep total system memory usage under 70% to avoid swap thrashing. On a 2GB Pi, that means leaving ~600MB headroom.

Monitor memory:

free -h
# Watch live:
watch -n 2 free -h

Use Cases

Home Automation Assistant

With OpenClaw running on-premises, your agent can control local devices via scripts. Install Home Assistant alongside OpenClaw, then write a skill that calls the Home Assistant API:

# skill: scripts/control-light.sh
#!/bin/bash
# Usage: ./control-light.sh living_room on
curl -s -X POST \
  -H "Authorization: Bearer $HA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"entity_id": "light.'$1'"}' \
  http://homeassistant.local:8123/api/services/light/turn_$2

Now you can ask your Telegram-connected agent to turn off the lights before bed.

Always-On Telegram Assistant

Connect your Pi-hosted OpenClaw to a Telegram bot. The agent is reachable 24/7 from your phone, answers questions, runs searches, checks your calendar, sends reminders. No cloud subscription, no data leaving your network (except the API call to Anthropic for inference).

Network Monitor

Write a skill that runs periodic network checks — ping monitors, service health checks, port scans — and alerts you via Telegram when something is down. The Pi is always on, so the agent catches issues the moment they happen.

Scheduled Task Runner

Use OpenClaw's heartbeat system to schedule recurring tasks: pull daily news briefings, check stock prices, generate daily summaries of your todo list, send you a morning weather report.

Local File Agent

Because the agent runs locally, it can read and write files on your filesystem — your documents, logs, code projects. Ask it to summarize a log file, generate a report from a CSV, or search through your notes. This stays entirely on your hardware.

Pi-Specific Configuration Tips

Reduce Bootstrap Max Chars on Low-RAM Models

If you're on a 2GB Pi with many skills installed, trim the context window to reduce memory pressure:

{
  "agents": {
    "defaults": {
      "bootstrapMaxChars": 8000,
      "bootstrapTotalMaxChars": 20000
    }
  }
}

Use a Fast microSD or USB SSD

Node.js startup time on a slow microSD card is noticeably painful. Class 10 / A2-rated cards are significantly faster. For a production setup, boot from a USB SSD via the Pi 4/5's USB 3.0 port — this eliminates most I/O wait times.

Enable a Swap File (2GB Pi Only)

sudo dphys-swapfile swapoff
sudo nano /etc/dphys-swapfile
# Set CONF_SWAPSIZE=1024
sudo dphys-swapfile setup
sudo dphys-swapfile swapon

This gives you a buffer when memory spikes. Not a substitute for sufficient RAM, but prevents crashes under brief peaks.

Keep the Pi Cool

The Pi 4 and Pi 5 throttle under sustained load when overheated. Use a case with heatsinks or active cooling. A Pi that's throttling to 600MHz will feel like a completely different device.

Use Ethernet, Not Wi-Fi

API calls to Anthropic fail if the network is flaky. Ethernet is more reliable than Wi-Fi, especially in a home with many devices competing for bandwidth. If you must use Wi-Fi, place the Pi close to your router.

Tailscale for Remote Access

Install Tailscale on the Pi to access your agent from anywhere without opening ports on your router:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

After setup, your Pi is reachable at openclaw-pi.tail12345.ts.net from any device on your Tailscale network. OpenClaw's node pairing works over Tailscale natively — see the OpenClaw node connect guide for details.

Summary

A Raspberry Pi running OpenClaw is one of the most cost-effective ways to have a personal AI agent that's:

  • Always on
  • Fully under your control
  • Running on hardware you own
  • Connected to your local network and devices
  • Accessible from anywhere via Tailscale

Pi 4 (4GB) is the minimum comfortable configuration. Pi 5 is the recommended choice if you're buying new. Install Raspberry Pi OS Lite 64-bit, Node.js 22 via NodeSource, OpenClaw via npm, configure your API key, and run it as a systemd service. That's the full setup.

The agent does the work. The Pi keeps it running.


If a Pi can host an always-on AI agent, the real question becomes which workflow you should automate first and how you will monitor it once it is live.