The Raspberry Pi is the go-to device for self-hosting projects. It's cheap, silent, sips power, and fits in a drawer. So naturally, when people discover OpenClaw β an open-source AI agent that runs 24/7, connects to Telegram, and does things autonomously β the first question is: "Can I run this on my Pi?"
The short answer: yes, technically. OpenClaw runs on ARM64 Linux, and the Raspberry Pi 4 and 5 both qualify.
The longer answer: it works, but you'll hit real limitations β RAM, CPU, storage, and missing software that's trivial on x86. This guide walks you through the full setup, covers every pitfall, and helps you decide whether a Pi is the right home for your AI agent.
If you'd rather skip the hardware project entirely, LobsterLair gives you a fully managed OpenClaw instance β AI included, no server needed, $19/month, cancel anytime.
Which Raspberry Pi Do You Need?
Not all Pis are created equal. OpenClaw has real hardware requirements.
| Model | RAM | CPU | Verdict |
|---|---|---|---|
| Pi Zero / Zero 2 | 512 MB | Single/Quad ARM11 | No β not enough RAM |
| Pi 3B+ | 1 GB | Quad Cortex-A53 | Barely β will swap constantly |
| Pi 4 (2 GB) | 2 GB | Quad Cortex-A72 | Minimum β tight but possible |
| Pi 4 (4/8 GB) | 4/8 GB | Quad Cortex-A72 | Recommended minimum |
| Pi 5 (4/8 GB) | 4/8 GB | Quad Cortex-A76 | Best option |
The realistic minimum is a Pi 4 with 4 GB RAM. OpenClaw's gateway process alone uses 300-500 MB at idle. Add the OS, Docker overhead, and Node.js garbage collection spikes, and 2 GB is uncomfortably tight. You'll be swapping to the SD card, which kills both performance and the card's lifespan.
A Pi 5 with 8 GB is the sweet spot if you're serious about this.
What You'll Need
- Raspberry Pi 4 (4+ GB) or Pi 5 β the board itself
- Quality power supply β the official USB-C PSU (5V/3A for Pi 4, 5V/5A for Pi 5). Underpowered supplies cause random crashes under load
- MicroSD card (32+ GB, A2 rated) or NVMe SSD (Pi 5 via HAT) β SSDs dramatically improve performance
- Ethernet or WiFi β wired is more reliable for a 24/7 service
- A computer to flash the OS β for Raspberry Pi Imager
- An AI provider API key β Anthropic, OpenAI, Google, or any OpenAI-compatible provider
- SSH access β you'll do everything headless (no monitor needed)
Budget Reality Check
| Component | Cost |
|---|---|
| Raspberry Pi 5 (8 GB) | ~$80 |
| Official power supply | ~$12 |
| 64 GB A2 microSD | ~$12 |
| Case with cooling | ~$10-15 |
| Total hardware | ~$115-120 |
| AI API costs (monthly) | $5-30 |
That's $115+ upfront before your bot sends its first message. Plus ongoing API costs. Keep that in mind when comparing to managed alternatives.
Step 1: Flash the OS
Use Raspberry Pi OS Lite (64-bit) β the headless version without a desktop environment. You need the 64-bit (arm64) version; the 32-bit version won't work with modern Node.js.
- Download Raspberry Pi Imager
- Choose OS β Raspberry Pi OS (other) β Raspberry Pi OS Lite (64-bit)
- Choose your SD card
- Click the gear icon to pre-configure:
- Enable SSH (password or key authentication)
- Set hostname (e.g.,
openclaw-pi) - Configure WiFi (if not using Ethernet)
- Set username and password
- Flash the card
Insert the card into your Pi and power it on. Wait 1-2 minutes for the first boot, then SSH in:
ssh your-username@openclaw-pi.local
Step 2: System Setup
Update everything first:
sudo apt update && sudo apt upgrade -y
Install Node.js 22
The default Node.js in Raspberry Pi OS is outdated. You need v22+:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
node --version # Should show v22.x.x
Install Docker
Docker is the recommended way to run OpenClaw as a persistent service:
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
Log out and back in for the group change to take effect.
Verify:
docker --version
docker run --rm hello-world
Increase Swap (Important for 4 GB Pi)
The default swap on Raspberry Pi OS is 100 MB β not enough. Increase it:
sudo dphys-swapfile swapoff
sudo sed -i 's/CONF_SWAPSIZE=100/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
This gives you 2 GB of swap. On an SD card, swap is slow and wears the card β another reason to use an SSD.
Step 3: Install OpenClaw
Option A: Docker (Recommended)
Pull the official ARM64 image:
docker pull openclaw/openclaw:latest
This pulls the linux/arm64 variant automatically.
Create directories for persistent data:
mkdir -p ~/.openclaw/config ~/.openclaw/workspace
Run OpenClaw in gateway mode:
docker run -d \
--name openclaw \
--restart unless-stopped \
-v ~/.openclaw:/home/node/.openclaw \
-e ANTHROPIC_API_KEY="sk-ant-your-key-here" \
openclaw/openclaw:latest \
gateway
Option B: npm Global Install
npm install -g openclaw
This works on ARM64, but some native dependencies may need compilation β which is slow on a Pi. Expect the install to take 5-10 minutes instead of 30 seconds on a desktop.
Step 4: Configure OpenClaw
Create or edit ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-6"
},
"sandbox": {
"mode": "off"
}
}
},
"gateway": {
"port": 18789,
"bind": "lan",
"auth": {
"mode": "token",
"token": "generate-a-random-token-here"
}
}
}
Important: Set sandbox.mode to "off" on the Pi. The sandbox uses additional resources and isn't necessary if the Pi is dedicated to OpenClaw.
Generate a secure gateway token:
openssl rand -hex 32
Step 5: Connect Telegram
This is the same process as on any platform β but it's the reason most people want OpenClaw on a Pi in the first place: a silent, always-on Telegram bot sitting on your shelf.
Create Your Bot
- Message @BotFather on Telegram
- Send
/newbot, choose a name and username - Copy the bot token
Get Your User ID
Message @userinfobot β it replies with your numeric ID.
Add Telegram to Config
Edit ~/.openclaw/openclaw.json and add channels + plugins:
{
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-6"
},
"sandbox": { "mode": "off" }
}
},
"gateway": {
"port": 18789,
"bind": "lan",
"auth": { "mode": "token", "token": "your-token" }
},
"channels": {
"telegram": {
"enabled": true,
"botToken": "7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"dmPolicy": "allowlist",
"allowFrom": ["123456789"],
"groupPolicy": "disabled",
"streaming": "partial"
}
},
"plugins": {
"entries": {
"telegram": {
"enabled": true
}
}
}
}
Don't forget plugins.entries.telegram.enabled: true β without it, OpenClaw silently disables Telegram even though the channel is configured. This catches almost everyone on the first attempt.
Restart:
docker restart openclaw
For a complete Telegram setup walkthrough, see our OpenClaw Telegram Bot Setup guide.
Raspberry Pi-Specific Problems
Here's where the Pi experience diverges from a normal server. These are real issues you'll encounter.
1. Startup CPU Spike
OpenClaw indexes files and compiles skills on startup. On an x86 server, this takes 30-60 seconds. On a Pi 4, expect 2-5 minutes of 100% CPU across all cores. During this time, the Pi is essentially unresponsive, and Telegram won't connect until the gateway finishes booting.
On a Pi 5, it's faster (~1-2 minutes) but still noticeable.
Don't panic. Wait it out. Check progress with:
docker logs openclaw --tail 20
2. Memory Pressure
OpenClaw's idle memory usage (300-500 MB) is fine on an 8 GB Pi. On a 4 GB Pi, you're using 25-50% of RAM before you do anything. When the bot processes a complex request β especially one involving web browsing or file operations β memory spikes to 1-1.5 GB temporarily.
With 4 GB total, that pushes the OS into swap territory. On an SD card, swap is extremely slow (10-20 MB/s random read). The bot becomes unresponsive for seconds at a time.
Mitigations:
- Use an NVMe SSD (Pi 5) β swap on SSD is 10-50x faster than SD
- Close everything else β don't run other services on the same Pi
- Set Node.js memory limits in your Docker run command:
docker run -d \
--name openclaw \
--restart unless-stopped \
--memory=3g \
-v ~/.openclaw:/home/node/.openclaw \
-e ANTHROPIC_API_KEY="sk-ant-..." \
-e NODE_OPTIONS="--max-old-space-size=2048" \
openclaw/openclaw:latest \
gateway
3. No Chromium (Browser Automation)
Many OpenClaw skills need a browser β web search, screenshot tools, page scraping. On x86, you install Chromium and it just works.
On a Raspberry Pi, Chromium exists but headless Chromium is painfully slow. Page loads that take 2 seconds on a VPS take 15-30 seconds on a Pi. Complex pages may time out entirely. And running Chromium alongside OpenClaw on 4 GB RAM is a recipe for OOM kills.
If you need browser automation, the Pi is the wrong platform. Skills that rely on web browsing (Playwright, Puppeteer, screenshots) will be frustratingly slow or non-functional.
4. SD Card Wear
OpenClaw writes to disk regularly β memory files, logs, session data, skill caches. SD cards have limited write cycles. Running a write-heavy service 24/7 on an SD card will kill it within months.
Solutions:
- NVMe SSD (Pi 5 with HAT, or Pi 4 via USB 3.0 enclosure) β the proper fix
- Move OpenClaw data to USB storage β external SSD for the workspace directory
- Disable unnecessary logging β reduce write frequency
- Use a high-endurance SD card β Samsung PRO Endurance or similar, designed for continuous write workloads
5. ARM64 Compatibility Gaps
Most OpenClaw skills are pure JavaScript and work fine on ARM64. But some skills use native binaries compiled for x86 only. If a skill install fails with architecture errors, there's often no fix β you need to wait for the skill author to provide an ARM build, or find an alternative.
Common tools that work fine on ARM64: Node.js, Python, ffmpeg, git, curl.
Tools that may have issues: some Go binaries distributed as pre-built x86, Chromium CDP in Docker (works but slow), certain npm packages with native addons.
6. Power and Heat
Under sustained load (long AI conversations, startup indexing), a Pi 4 throttles at 80Β°C. A Pi 5 runs hotter and throttles more aggressively. Throttling means slower performance right when you need it most.
Solutions:
- Use an active cooling case (fan) β passive heatsinks aren't enough for sustained loads
- Don't put the Pi in an enclosed space
- Monitor temperature:
vcgencmd measure_temp
Running OpenClaw as a Persistent Service
Docker with --restart unless-stopped handles most of this, but here's a proper systemd setup for npm installs:
[Unit]
Description=OpenClaw AI Agent
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=pi
Environment=ANTHROPIC_API_KEY=sk-ant-...
Environment=NODE_OPTIONS=--max-old-space-size=2048
WorkingDirectory=/home/pi
ExecStart=/usr/bin/npx openclaw gateway
Restart=always
RestartSec=15
WatchdogSec=300
[Install]
WantedBy=multi-user.target
Note RestartSec=15 instead of the usual 5 β give the Pi time to free up resources between restarts.
sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw
Performance: Pi vs. VPS vs. Managed Hosting
Let's be honest about what you're getting:
| Metric | Pi 4 (4 GB) | Pi 5 (8 GB) | $5 VPS | LobsterLair |
|---|---|---|---|---|
| Startup time | 2-5 min | 1-2 min | 30-60s | ~15s |
| Idle RAM used | 300-500 MB | 300-500 MB | 300-500 MB | Managed |
| First response | 3-8s | 2-5s | 1-3s | 1-3s |
| Browser automation | Unusable | Very slow | Works | Pre-configured |
| Handles complex tasks | Barely | OK | Good | Good |
| Power consumption | ~5W | ~8W | N/A | N/A |
| Noise | Silent | Silent | N/A | N/A |
| Monthly cost (after hardware) | $0 + API | $0 + API | $5-8 + API | $19 (AI included) |
The Pi wins on power consumption and noise. It loses everywhere else.
When a Raspberry Pi Actually Makes Sense
Despite the limitations, there are legitimate reasons to run OpenClaw on a Pi:
- You already have a Pi sitting idle β might as well use it
- Privacy β everything runs on your local network, no data leaves your home (except API calls to your AI provider)
- Learning project β great way to learn Linux, Docker, and self-hosting
- Light usage β you message your bot a few times a day, no browser skills, no heavy tasks
- Power outage resilience β a Pi on a small UPS can run for hours on battery
When It Doesn't
Skip the Pi if:
- You need browser automation β Chromium on ARM is too slow for real use
- You send many messages per day β the Pi can't handle concurrent conversations
- You want skills that need native x86 binaries β some simply won't work
- Reliability matters β SD card failures, power supply issues, and thermal throttling make Pis less reliable than a proper server
- Your time is valuable β the setup, troubleshooting, and maintenance overhead is significant
The Easier Way: Skip the Hardware
If you've read this far and thought "that's a lot of work for a chat bot" β you're right. Running OpenClaw on a Pi is a fun project, but it's not the most practical path to a working AI agent.
LobsterLair gives you everything a Pi setup provides β and more β without buying hardware or managing infrastructure:
- 2-minute setup β Sign up, name your bot, optionally connect Telegram, done
- AI included β No API key needed. MiniMax M2.5 with a 200K context window, included in the price
- Always online β No SD card failures, no power supply issues, no thermal throttling
- Browser automation β Chromium, ffmpeg, whisper, yt-dlp, and 500+ tools pre-installed and fast
- Automatic updates β New OpenClaw versions rolled out with zero downtime
- Daily backups β Offsite, automatic, tested
- Cancel anytime β No contracts, no hardware purchase
$19/month. Less than the electricity and API costs of running a Pi for a year, and no $120 hardware investment upfront.
Get started at lobsterlair.xyz
Summary
Running OpenClaw on a Raspberry Pi is possible and can be rewarding as a project. Here's the honest assessment:
| Raspberry Pi | LobsterLair | |
|---|---|---|
| Hardware cost | $115-120 upfront | $0 |
| Monthly cost | $5-30 (API only) | $19 (AI included) |
| Setup time | 2-4 hours | 2 minutes |
| Browser skills | Slow/broken | Fast, pre-configured |
| Reliability | SD card wear, thermal throttle, power issues | Managed, monitored, auto-restart |
| Performance | Adequate for light use | Consistent |
| Maintenance | Updates, backups, monitoring = your job | Automatic |
| Break-even vs. managed | ~6 months (if API costs match) | Immediate |
If you enjoy tinkering with hardware and don't mind the limitations, a Pi is a perfectly valid choice for light OpenClaw usage. But if you want a reliable AI agent that just works β on Telegram, with full browser automation, no hardware to buy β LobsterLair has you covered.