Run OpenClaw on Raspberry Pi
Deploy the self-hosted OpenClaw AI agent on a Raspberry Pi 4 or Pi 5 for a low-cost, always-on home server. This guide covers hardware requirements, ARM64 installation, performance tuning, and practical limitations so you get a stable 24/7 agent without overloading your Pi.
1. Overview
OpenClaw runs on Raspberry Pi because it is built on Node.js, which has first-class ARM64 support. Running OpenClaw on a Pi gives you:
- Cost-effective 24/7 hosting - No cloud bill; the Pi stays on at home
- Privacy - Data stays on your network; combine with API-based LLMs (Claude, GPT, DeepSeek) for a hybrid setup
- Low power - Typical Pi 4/5 draws a few watts; suitable for always-on home labs
This guide covers:
- Hardware requirements (recommended Pi 4/5, RAM, storage)
- Raspberry Pi OS 64-bit and Node.js 22+ on ARM64
- Step-by-step installation (one-line installer and manual option)
- Performance tips: swap, cooling, and light workloads
- Limitations: using API-based models instead of heavy local LLMs
- Common issues and next steps
2. Hardware Requirements
Use a Raspberry Pi model and configuration that can run Node.js 22+ and the OpenClaw gateway comfortably.
| Component | Minimum | Recommended |
|---|---|---|
| Model | Raspberry Pi 4 (2 GB) | Raspberry Pi 4 (4 GB or 8 GB) or Raspberry Pi 5 (4 GB+) |
| RAM | 2 GB | 4 GB or more (8 GB ideal for multiple channels/skills) |
| Storage | 8 GB SD/microSD | 16 GB+ or SSD via USB (faster and more durable) |
| Architecture | ARM64 (aarch64) - use 64-bit OS | |
Why 64-bit? OpenClaw and Node.js 22 run best on Raspberry Pi OS (64-bit). The 32-bit OS can limit available memory and package support. Download the 64-bit image from the official Raspberry Pi OS page.
Cooling: For 24/7 use, a small heatsink or fan helps avoid thermal throttling on Pi 4/5, especially when the agent is under load.
3. Prerequisites
- OS: Raspberry Pi OS (64-bit) - bookworm or later. Use
uname -mto confirmaarch64. - Node.js 22+ - Required. The one-line installer can install it; otherwise install it manually (see below). Check with
node -v. - Network: Wired Ethernet recommended for stability; Wi‑Fi is possible.
- LLM API key - OpenClaw on Pi is best used with cloud API models (Anthropic Claude, OpenAI, DeepSeek, etc.) rather than running a local LLM on the Pi. Have at least one key ready: Anthropic, OpenAI, DeepSeek. For local models, see Ollama (typically on a more powerful machine).
- Optional: A messaging account for your first channel - e.g. Telegram, Discord, WhatsApp.
4. Quick Install (One-Line Installer)
SSH into your Pi or open a terminal on the desktop, then run:
curl -fsSL https://openclaw.ai/install.sh | bash
The script will:
- Detect Raspberry Pi OS (Linux ARM64)
- Install Node.js 22+ if needed (via NodeSource or nvm for ARM64)
- Download and install OpenClaw
- Create
~/.openclawand start the onboarding wizard
After it finishes, run openclaw setup if the wizard did not start. Complete the onboarding (choose model provider, add API key, optionally add a channel). See the Quick Start Guide for detailed steps.
5. Manual Installation (Optional)
If you prefer not to use the install script, install Node.js 22+ on Raspberry Pi OS first.
Install Node.js 22+ on Raspberry Pi OS (ARM64)
Using NodeSource (recommended for ARM64):
# NodeSource setup for Node.js 22 (Debian/Ubuntu-based, including Raspberry Pi OS)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify
node -v # should show v22.x.x
npm -v
Alternatively, use nodejs.org to download the Linux ARM64 binary and install it manually.
Install OpenClaw
# Clone and install (use official repo)
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
npm run setup
Or install the CLI globally if available: npm install -g openclaw then openclaw setup. Ensure openclaw is on your PATH. If you get “openclaw command not found”, see Troubleshooting.
6. Run OpenClaw in the Background (systemd)
To keep OpenClaw running 24/7 and start it on boot:
# Install the systemd service (run as the user that owns ~/.openclaw)
sudo openclaw service install --systemd
# Enable and start
sudo systemctl enable openclaw
sudo systemctl start openclaw
sudo systemctl status openclaw
Use journalctl -u openclaw -f to follow logs. For security, keep the gateway bound to 127.0.0.1 and access remotely via SSH tunnel or VPN; see Security Best Practices and Network Isolation.
7. Performance Tips for Raspberry Pi
- Enable swap: If you have 2 GB RAM, add swap to reduce OOM risk:
sudo dphys-swapfile swapoff && sudo nano /etc/dphys-swapfile(setCONF_SWAPSIZE=2048), thensudo dphys-swapfile setup && sudo dphys-swapfile swapon. Reboot if needed. - Use an SSD: Booting and running from USB SSD is faster and more reliable than SD for 24/7 use.
- Limit heavy skills: Avoid installing many memory-heavy skills at once; start with one or two channels and add gradually. See ClawHub for lightweight options.
- Cooling: Ensure adequate cooling so the Pi does not throttle under load.
- Use API-based models: Run inference in the cloud (Claude, GPT, DeepSeek APIs) rather than Ollama on the Pi for best responsiveness; see Model Providers.
8. Limitations and Expectations
- No heavy local LLMs on Pi: Running large models (e.g. full-size Ollama) on a Pi is slow or impractical. Use cloud API providers for the LLM; the Pi runs the gateway, routing, and skills.
- Concurrent load: A Pi 4/5 can handle light to moderate use (e.g. personal use, 1–2 channels, a few skills). For many concurrent users or heavy automation, consider a VPS or Linux server.
- ARM64 only: Use Raspberry Pi OS 64-bit; 32-bit is not recommended for Node.js 22 and OpenClaw.
9. Common Issues
| Issue | Solution |
|---|---|
| openclaw command not found | Add npm global bin to PATH (e.g. export PATH=$PATH:$HOME/.npm-global/bin or /usr/local/bin). See Installation Errors. |
| Node version too old | Install Node.js 22+ via NodeSource or nodejs.org ARM64 build; run node -v to confirm. |
| Out of memory (OOM) | Enable swap (see Performance Tips); reduce number of skills/channels; use 4 GB+ Pi if possible. |
| Gateway won’t start | Check openclaw doctor and logs; ensure config is valid and ports are free. See Gateway Issues. |
| Slow or timeouts | Use API-based LLMs instead of local; ensure good network; add swap and cooling. |
For more solutions, see the full Troubleshooting Guide.
10. Best Practices
- Harden the installation: follow Security Best Practices and keep the gateway bound to localhost; use Network Isolation or SSH/VPN for remote access.
- Run through the Security Checklist after setup.
- Update OpenClaw and the OS regularly:
npm update -g openclaw(or re-run install script) andsudo apt update && sudo apt upgrade. - Monitor logs and disk space; back up
~/.openclaw(config and data) periodically.
11. Next Steps
- Post-Installation Setup - Onboarding, first channel, and config
- Connect Telegram or Discord - Popular first channels
- Install skills from ClawHub - Add capabilities (start with lightweight ones on Pi)
- Use Cases - Ideas for what to do with your agent
- OpenClaw Community - Discord, GitHub, and support
Other installation options: Installation hub - macOS, Windows (WSL2), Linux, Docker, VPS.