๐Ÿฅง Raspberry Pi Setup

Run OpenClaw 24/7 on a low-power, always-on Pi

Why Raspberry Pi?

A Raspberry Pi is perfect for running OpenClaw because it's cheap (~$50-80), uses very little power (~5W), runs silently, and can stay on 24/7. It's like having a dedicated AI assistant that costs pennies per day to run.

Which Pi Should I Get?

Model RAM Performance Recommendation
Raspberry Pi 5 4GB / 8GB Excellent
Raspberry Pi 4 4GB / 8GB Good
Raspberry Pi 4 2GB Okay โš ๏ธ Works but tight
Raspberry Pi 3 1GB Slow โŒ Not recommended

What You'll Need

๐Ÿฅง Raspberry Pi 4 or 5

4GB RAM minimum, 8GB recommended

๐Ÿ’พ MicroSD Card

32GB minimum, Class 10 / A1 or better

๐Ÿ”Œ Power Supply

Official Pi power supply (5V 3A for Pi 4, 5V 5A for Pi 5)

๐ŸŒ Network

Ethernet recommended for reliability (WiFi works too)

โ„๏ธ Cooling

Optional: Heatsink or fan for 24/7 use

๐Ÿ“ฆ Case

Optional: Any case with ventilation

1

Flash Raspberry Pi OS

Download and install Raspberry Pi Imager on your computer, then:

  1. Insert your microSD card
  2. Open Raspberry Pi Imager
  3. Choose Raspberry Pi OS Lite (64-bit) โ€” no desktop needed
  4. Click the gear icon โš™๏ธ to configure:
    • Set hostname (e.g., openclaw)
    • Enable SSH
    • Set username/password
    • Configure WiFi (if not using Ethernet)
  5. Write to SD card
2

Boot and Connect

Insert the SD card into your Pi, connect power and ethernet, then SSH in:

# Find your Pi's IP (check your router, or try hostname)
ssh pi@openclaw.local
# Or use the IP address
ssh pi@192.168.1.xxx

# First boot may take a minute to resize filesystem
3

Update the System

sudo apt update && sudo apt upgrade -y
4

Install Node.js 22+

OpenClaw requires Node.js 22 or later:

# Install Node.js 22 via NodeSource
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs

# Verify installation
node --version  # Should show v22.x.x
npm --version
5

Install OpenClaw

# Install globally
sudo npm install -g openclaw@latest

# Verify installation
openclaw --version
6

Run the Onboarding Wizard

# Run onboard with daemon flag for 24/7 operation
openclaw onboard --install-daemon

# The wizard will ask you to:
# 1. Choose gateway mode (local)
# 2. Enter your Anthropic API key
# 3. Select a model (Claude Haiku recommended for Pi)
# 4. Connect a channel (Telegram is easiest)
7

Verify It's Running

# Check status
openclaw status

# Check the daemon is running
systemctl status openclaw

# Run diagnostics
openclaw doctor

๐ŸŽ‰ You're Done!

Your Pi is now running OpenClaw 24/7. Message your bot on Telegram (or whichever channel you configured) to test it out!

Optimization Tips

Use Claude Haiku for Lower Costs

Claude Haiku is much cheaper than Opus/Sonnet and works great for most tasks. Configure in your settings:

# In config, set default model to Haiku
model: anthropic/claude-3-haiku

Add Swap Space

If you have a 4GB Pi, adding swap helps prevent out-of-memory issues:

# Increase swap size
sudo dphys-swapfile swapoff
sudo nano /etc/dphys-swapfile
# Change CONF_SWAPSIZE=100 to CONF_SWAPSIZE=2048
sudo dphys-swapfile setup
sudo dphys-swapfile swapon

Set Up Remote Access

To access your Pi from outside your home network:

Enable Watchdog (Auto-Restart)

The Pi has a hardware watchdog that can auto-reboot if the system hangs:

# Enable watchdog
sudo apt install watchdog
sudo systemctl enable watchdog
sudo systemctl start watchdog

โš ๏ธ Use a Good Power Supply

Unstable power is the #1 cause of Pi problems. Use the official Raspberry Pi power supply, not a random phone charger. Undervoltage can cause SD card corruption and random crashes.

Troubleshooting

Can't find Pi on network?

# Try mDNS hostname
ping openclaw.local

# Or scan your network
nmap -sn 192.168.1.0/24 | grep -i raspberry

# Check your router's DHCP client list

OpenClaw won't start?

# Check logs
journalctl -u openclaw -f

# Check Node.js version
node --version  # Must be 22+

# Try running manually to see errors
openclaw gateway

Running slow or crashing?

Related Guides

Next up: VPS deployment

Move your OpenClaw to the cloud with a low-cost VPS.

Continue to VPS โ†’ Join Discord

Stay in the loop

The 5-minute weekly read that makes your OpenClaw smarter.