๐Ÿš€Setup & Installation

How to Run OpenClaw on Raspberry Pi

Intermediate60-90 minutesUpdated 2025-03-01

Running OpenClaw on a Raspberry Pi turns a low-cost, low-power device into a self-hosted AI assistant. This guide covers setup, performance tuning, and common pitfalls for Pi 4 and Pi 5.

Why This Is Hard to Do Yourself

These are the common pitfalls that trip people up.

๐Ÿง 

Limited RAM

Raspberry Pi has 4-8GB RAM, far less than typical servers. OpenClaw and AI models can exhaust memory quickly, causing crashes or slowdowns.

๐Ÿ”ง

ARM Compatibility

Some Node.js packages and Docker images aren't optimized for ARM architecture. You may encounter build failures or missing binaries.

๐Ÿ’พ

Slow I/O

SD cards are slow compared to SSDs. OpenClaw reads and writes conversation history, logs, and cache frequently, causing bottlenecks.

๐ŸŒก๏ธ

Heat Management

Continuous AI workloads generate heat. Without proper cooling, the Pi throttles CPU speed, degrading performance.

Step-by-Step Guide

Step 1

Check Requirements (Pi 4 4GB+ or Pi 5)

You need a Raspberry Pi 4 with at least 4GB RAM (8GB recommended) or a Pi 5. Use a high-quality power supply (official Pi adapter) and a fast SD card (A2 rated) or USB SSD boot. Add a heatsink or fan for cooling. Pi 4 2GB is not recommended โ€” too little memory. Pi 5 is faster and has better thermal management. USB SSD boot improves performance significantly.

Step 2

Flash Raspberry Pi OS

Download Raspberry Pi Imager, flash Raspberry Pi OS (64-bit, Lite recommended) to your SD card or SSD. Enable SSH during setup. Boot the Pi and SSH in. Use 64-bit OS for better performance. Lite version (no desktop) saves RAM. Change the default password immediately.

Step 3

Install Node.js for ARM

OpenClaw requires Node.js 18+. Use the official ARM builds. Install via NodeSource or use nvm for version management. Node 20 is recommended for best performance. Avoid compiling from source โ€” use pre-built binaries. Consider using Bun for faster startup (ARM build available).

Step 4

Install OpenClaw

Clone the OpenClaw repo and install dependencies. Use npm ci instead of npm install for faster, reproducible builds. Start OpenClaw and verify it runs. First start takes 2-5 minutes on a Pi. Monitor memory with htop during startup. If build fails, check for ARM-incompatible dependencies.

Step 5

Configure for Low Memory

Edit OpenClaw config to limit concurrent requests, reduce cache size, and disable memory-heavy features. Set maxConcurrency: 1, cacheSize: 50MB, and disable session recording if enabled. Limit conversation history to 100 messages. Use smaller models (GPT-3.5 instead of GPT-4) for local caching. Disable auto-save to reduce writes.

Step 6

Set Up Auto-Start with systemd

Create a systemd service to start OpenClaw on boot. This ensures the Pi restarts cleanly after power loss. Use systemctl status openclaw to check service status. Logs are in journalctl -u openclaw -f. Restart with sudo systemctl restart openclaw.

Running on Edge Devices?

Our experts optimize OpenClaw configurations for resource-constrained hardware like Raspberry Pi.

Get matched with a specialist who can help.

Sign Up for Expert Help โ†’

Frequently Asked Questions