OpenClaw on Raspberry Pi: Build a $50 AI Agent Station
Quick Answer: You can run OpenClaw on a Raspberry Pi 4 or 5 with 4GB+ RAM for under $50 in hardware. Install Node.js 22, clone OpenClaw, configure your API key, and you have an always-on AI agent. Use Ollama for fully local inference, or connect to Claude/GPT-4o APIs for more powerful responses.
A Raspberry Pi running OpenClaw draws just 5-15 watts — pennies per day in electricity — while giving you 24/7 AI automation across WhatsApp, Telegram, Slack, Discord, and more.
What Hardware Do You Need?
Everything you need to build your AI agent station. Total cost: under $50 for the basic setup.
Raspberry Pi 4 (4GB)
Minimum viable option. Adequate for API-based LLM usage.
Raspberry Pi 4 (8GB)
Better headroom for multiple concurrent automations.
Raspberry Pi 5 (8GB)
RECOMMENDEDBest performance. 2-3x faster than Pi 4. Recommended.
microSD Card (32GB+)
Class 10 or UHS-I minimum. A1-rated for better random I/O.
USB-C Power Supply (5V/3A)
Official Pi power supply recommended. Underpowered supplies cause instability.
Case with Passive Cooling
Heatsink case prevents thermal throttling during sustained use.
How Do You Set Up OpenClaw on Raspberry Pi?
From unboxing to running AI automations. The entire setup takes about 30 minutes.
Step 1: Flash Raspberry Pi OS (64-bit)
Download Raspberry Pi Imager and flash the 64-bit version of Raspberry Pi OS (Bookworm) to your microSD card. The 64-bit version is required for Node.js 22 support.
- Download Raspberry Pi Imager from raspberrypi.com
- Select Raspberry Pi OS (64-bit) — NOT the 32-bit version
- Configure Wi-Fi, hostname, and SSH in the imager settings
- Flash to your microSD card and insert into the Pi
Step 2: Install Node.js 22
Connect to your Pi via SSH or terminal and install Node.js 22 using nvm (Node Version Manager). This gives you the exact version OpenClaw requires.
- SSH in: ssh pi@your-pi-hostname.local
- Install nvm: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
- Restart terminal, then: nvm install 22
- Verify: node --version (should show v22.x.x)
Step 3: Install and Configure OpenClaw
Clone the OpenClaw repository, install dependencies, and configure your API key. The installation process is the same as any Linux system.
- Clone: git clone https://github.com/openclaw/openclaw.git
- cd openclaw && npm install
- Create .env file with your API key (ANTHROPIC_API_KEY or OPENAI_API_KEY)
- Run initial setup: npx openclaw setup
Step 4: Configure as a Background Service
Set up OpenClaw as a systemd service so it starts automatically on boot and restarts if it crashes. This makes your Pi a true always-on AI agent.
- Create service file: sudo nano /etc/systemd/system/openclaw.service
- Configure with your user, working directory, and environment
- Enable: sudo systemctl enable openclaw
- Start: sudo systemctl start openclaw
- Check status: sudo systemctl status openclaw
Step 5: Connect Messaging Platforms
Configure OpenClaw to connect to your messaging platforms. The Pi's always-on nature makes it ideal for WhatsApp, Telegram, Slack, and Discord integrations.
- Add messaging API tokens to your .env file
- Install relevant ClawHub skills for your platforms
- Test each integration with a simple automation
- Monitor logs: journalctl -u openclaw -f
What Performance Can You Expect?
Real-world performance numbers for OpenClaw on Raspberry Pi hardware.
~2 seconds
OpenClaw startup time (Pi 5)
Time from service start to ready state
~200MB
RAM usage (idle)
OpenClaw base memory footprint without active tasks
1-3 seconds
API response latency (added)
Additional latency vs desktop due to Pi's slower networking
5-15W
Power consumption
Idle to full load. Annual electricity cost: $5-15
What Does It Cost to Run?
Complete cost breakdown for a Raspberry Pi OpenClaw setup.
| Item | One-Time Cost | Monthly Cost |
|---|---|---|
| Raspberry Pi 4 (4GB) | $35 | - |
| microSD Card (32GB) | $8 | - |
| Power Supply | $8 | - |
| Electricity (5-15W 24/7) | - | $1-2 |
| LLM API Usage (typical) | - | $5-50 |
| Internet (existing) | - | $0 |
| Total | ~$51 | $6-52 |
Local vs Cloud LLMs on Raspberry Pi
OpenClaw is model-agnostic, so you can choose between local and cloud-based LLMs. Here is how they compare on Raspberry Pi:
Cloud APIs (Recommended for Pi)
- Full Claude, GPT-4o, Gemini capabilities
- Fast response times (1-3s added latency)
- No hardware limitations on model quality
- Pay-per-use: $5-50/month typical
Local via Ollama (Limited on Pi)
- Full privacy — no data leaves your Pi
- Zero API costs after hardware purchase
- Limited to small models (TinyLlama, Phi-2)
- Slower responses: 10-60+ seconds per query
Frequently Asked Questions
Stop Wasting 40-60% of Your AI Budget
Download the free '6 Token Drains' guide — identify the hidden patterns burning through your tokens and get copy-paste fixes for each one.
Read the Free GuideYour Competitors Are Already Automating. Are You?
Every week we send one automation that saves 10+ hours of manual work — the same playbooks our clients use to run their businesses on autopilot. Miss a week, miss the edge.
Get the Automation Playbook (Free)
One deploy-ready automation every week. Same strategies our clients pay thousands for. 400+ business owners already inside.
Need it done for you?
Book a Free Strategy Call See what we've built for real businesses →