Skip to content

OpenClaw on a Raspberry Pi: Low-Cost Local Setup

nacre.sh TeamMay 4, 20267 min read

Run OpenClaw on a Raspberry Pi 4 or 5 for a self-contained, private local setup. Complete installation and configuration guide.

openclaw hostingraspberry pilocal hostingself hosted

Running OpenClaw on a Raspberry Pi keeps your AI agent entirely on local hardware — no cloud provider, no monthly hosting bill beyond electricity. A Raspberry Pi 5 with 8GB RAM handles OpenClaw comfortably and is an excellent choice for privacy-focused users who want their agent running at home.

Hardware Requirements

Minimum: Raspberry Pi 4 with 4GB RAM Recommended: Raspberry Pi 5 with 8GB RAM Storage: 32GB+ microSD (Class 10 or better) or USB SSD for better performance Power: Official Pi power adapter (Pi 5 needs 27W USB-C) Network: Ethernet recommended over WiFi for stability

Raspberry Pi 5 with 8GB costs approximately $80–$100 one-time. At $0.10/kWh electricity, running 24/7 costs about $1.50/month.

Step 1: Install Raspberry Pi OS 64-bit

Use the Raspberry Pi Imager tool:

  1. Download from raspberrypi.com/software
  2. Select Raspberry Pi OS Lite (64-bit) — no desktop needed
  3. Click the gear icon to pre-configure: hostname, SSH, WiFi, timezone
  4. Flash to your SD card or SSD

Step 2: Initial Setup

ssh pi@raspberrypi.local  # or use the IP address

sudo apt update && sudo apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com | bash
sudo usermod -aG docker pi

# Logout and log back in to apply docker group

Step 3: Install OpenClaw

mkdir ~/openclaw && cd ~/openclaw
curl -O https://github.com/OpenClaw/OpenClaw/releases/latest/download/docker-compose.yml
cp .env.example .env
nano .env  # Add your API keys
docker compose up -d

OpenClaw's Docker image includes ARM64 builds, so it runs natively on the Pi without emulation.

Step 4: Access from Outside Your Home Network

For Telegram/WhatsApp channel connectivity, OpenClaw needs to reach external servers, and ideally you want to access the web UI from anywhere.

Option A: Cloudflare Tunnel (Recommended, Free)

# Install cloudflared
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb
sudo dpkg -i cloudflared-linux-arm64.deb

# Authenticate and create tunnel
cloudflared tunnel login
cloudflared tunnel create openclaw-pi
cloudflared tunnel route dns openclaw-pi openclaw.yourdomain.com
cloudflared tunnel run openclaw-pi

Option B: Tailscale VPN Access your Pi from anywhere via Tailscale's private network — no port forwarding required.

Performance Notes

Raspberry Pi 5 (8GB) handles typical OpenClaw workloads well. Performance characteristics:

  • Startup time: ~30 seconds
  • Response latency: 2–5 seconds (depends primarily on your LLM API, not Pi hardware)
  • Memory pressure: OpenClaw uses ~500MB–1.5GB depending on skills and memory

For local LLM inference (Ollama), the Pi 5 can run small models (Llama 3.2 3B, Qwen 2.5 0.5B) but performance is slow — 2–5 tokens/second. For fast local LLM inference, use a Mac Mini with Apple Silicon instead.

Frequently Asked Questions

Can I run this on a Raspberry Pi 3?

The Pi 3's 1GB RAM makes OpenClaw very tight. Memory pressure causes slowdowns and potential crashes. Pi 4 (4GB+) is the practical minimum.

What happens to my agent if the Pi reboots?

Configure Docker with restart: unless-stopped in your compose file (it's the default). OpenClaw will automatically restart after a reboot.

nacre.sh

Run OpenClaw without the server headaches

Dedicated instance, automatic TLS, nightly backups, and 290+ LLM integrations. Live in under 90 seconds from $12/month.

Deploy your agent →

Related posts