๐ฅง 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 | โ Best choice |
| Raspberry Pi 4 | 4GB / 8GB | Good | โ Great budget option |
| 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
Flash Raspberry Pi OS
Download and install Raspberry Pi Imager on your computer, then:
- Insert your microSD card
- Open Raspberry Pi Imager
- Choose Raspberry Pi OS Lite (64-bit) โ no desktop needed
- Click the gear icon โ๏ธ to configure:
- Set hostname (e.g.,
openclaw) - Enable SSH
- Set username/password
- Configure WiFi (if not using Ethernet)
- Set hostname (e.g.,
- Write to SD card
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
Update the System
sudo apt update && sudo apt upgrade -y
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
Install OpenClaw
# Install globally sudo npm install -g openclaw@latest # Verify installation openclaw --version
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)
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:
- Tailscale โ Easiest, encrypted mesh VPN
- Cloudflare Tunnel โ Access via browser URL
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?
- Check temperature:
vcgencmd measure_temp(should be under 80ยฐC) - Check memory:
free -h - Add more swap space (see above)
- Use Claude Haiku instead of Opus
- Add a heatsink/fan if overheating
Related Guides
- Security Checklist โ Secure your installation
- Tailscale Setup โ Remote access via VPN
- Telegram Bot Setup โ Easiest channel to configure