Raspberry Pi

Always-on personal agent on a Raspberry Pi for ~$35-80 one-time cost. Supports Pi 4 and Pi 5 with 2GB+ RAM.

The Raspberry Pi deployment turns a $35-80 single-board computer into an always-on AI assistant that runs 24/7 on your home network for pennies in electricity. Since OpenClaw is just a gateway — the heavy AI computation happens in the cloud via API calls to Anthropic, OpenAI, or other providers — even a modest Pi 4 with 2GB RAM handles the workload comfortably. The Pi acts as a persistent message broker between you and the AI models. Setup starts with flashing Raspberry Pi OS Lite (64-bit) — the headless, no-desktop version that maximizes available resources. Use the Raspberry Pi Imager to pre-configure SSH access, WiFi, and a hostname so you can go headless from the start. After SSH-ing in, install Node.js 24 from NodeSource, add a 2GB swap file (critical for 2GB RAM models), and run the OpenClaw installer. The onboarding wizard sets up your model provider, messaging channel (Telegram is recommended for Pi deployments), and systemd service. The Pi 5 (4GB or 8GB) is the ideal choice — it has enough RAM to run the gateway, agent sandboxing, and even local tools without swap pressure. The Pi 4 (2GB) works but benefits significantly from a swap file and a USB SSD instead of a microSD card for better I/O performance. 32-bit Raspberry Pi OS is not supported — you must use the 64-bit version for Node.js compatibility. Community members have pushed the Pi deployment further than basic chat: one user runs OpenClaw on a Pi as a hardware ops station, connecting ESP32 devices via USB for firmware flashing and Meshtastic mesh network management — all controlled from Discord on their phone. The Pi's GPIO and USB capabilities make it uniquely suited as a physical-world bridge that cloud deployments can't replicate. Access the Control UI from your laptop by SSH-tunneling to the Pi's port 18789, or use Tailscale for secure remote access from anywhere. For always-on reliability, use a quality power supply (the official Pi PSU is recommended) and consider a UPS hat for power outage protection.

Tags: arm, low-power, always-on, home, budget

Use Cases

  • Always-on personal AI assistant at home for near-zero monthly cost
  • Home automation hub combining AI with GPIO and USB hardware control
  • IoT device management station — flash firmware, monitor mesh networks, manage hardware from your phone
  • Privacy-focused deployment where the gateway stays on your local network, never touching a cloud server
  • Budget-friendly 24/7 AI agent for solo founders and makers who want Jarvis without the cloud bill

Tips

  • Use a USB SSD instead of a microSD card — significantly better I/O performance and longevity for an always-on device
  • Add a 2GB swap file on 2GB models: sudo fallocate -l 2G /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
  • Set vm.swappiness=10 to minimize swap usage on low-RAM devices — only use swap when actually needed
  • Use Telegram as your first channel — it's the easiest to set up on headless devices (just a bot token, no QR code)
  • Access the Control UI via SSH tunnel: ssh -N -L 18789:127.0.0.1:18789 user@gateway-host
  • Install Tailscale for secure remote access from anywhere without port forwarding: curl -fsSL https://tailscale.com/install.sh | sh
  • Monitor temperature with vcgencmd measure_temp — throttling kicks in at 80°C and affects performance
  • Consider a UPS hat (battery backup) for power outage protection on critical always-on deployments

Known Issues & Gotchas

  • You MUST use 64-bit Raspberry Pi OS — 32-bit is not supported by Node.js 22+ and will fail silently
  • Pi 4 with 2GB RAM needs a swap file (2GB recommended) or npm install will OOM during the sharp build
  • microSD cards wear out under constant I/O — use a USB SSD for better performance and longevity
  • The official Pi power supply is important — underpowered supplies cause random crashes and SD card corruption
  • Building from source on a Pi is very slow (30+ minutes) — use npm install -g for pre-built binaries
  • Pi 3 and older models are not recommended — they lack the RAM and CPU for a stable gateway experience
  • Set your timezone with timedatectl before configuring cron jobs and reminders — the default may be UTC

Alternatives

  • Oracle Cloud (Always Free)
  • macOS (Local)
  • Old Laptop/Desktop
  • Hetzner VPS

Community Feedback

I run OpenClaw on a dedicated Raspberry Pi as an always-on AI ops/device station. I physically plug devices into the Pi (USB/serial), then have my OpenClaw agent handle setup, coding, flashing, and troubleshooting from Discord.

— Reddit r/openclaw

I run mine on a Pi in Docker as a good first step. Secondly you need to separate the agent from you 100%. Never give the agent access to any of your stuff.

— Reddit r/selfhosted

If you have an old laptop, bring it back to life, and connect it to Claude or OpenAI. Treat it like a startup — pay for the hardware and compute when you need it. Migration is super easy.

— Reddit r/vibecoding

The Pi doesn't run the AI model — it's just the gateway. All the heavy lifting happens in the cloud. Even a Pi 4 with 2GB handles it fine for personal use.

— Reddit r/LocalLLM

Frequently Asked Questions

Which Raspberry Pi model should I get?

Pi 5 (4GB) is ideal — fast enough for comfortable operation with room to spare. Pi 4 (4GB) works well too. Pi 4 (2GB) works with a swap file but you'll notice slower performance. Pi 3 and below are not recommended.

Can the Pi run AI models locally?

The Pi is just the gateway — AI models run in the cloud via API calls. You don't need GPU power on the Pi. For local model inference, you'd need a more powerful machine with a GPU, though some users run small quantized models on Pi 5 (8GB) with Ollama.

How much does it cost to run a Pi 24/7?

A Pi 4 draws about 3-5 watts, costing roughly $3-5 per year in electricity. A Pi 5 draws 5-8 watts. The real cost is the API usage — set spending caps at your model provider to avoid surprises.

Should I use microSD or USB SSD?

USB SSD is strongly recommended for always-on use. microSD cards have limited write cycles and can corrupt under constant I/O. A 128GB USB SSD costs ~$15 and dramatically improves both performance and reliability.

How do I access the Control UI from my laptop?

Use SSH tunneling: ssh -N -L 18789:127.0.0.1:18789 user@gateway-host, then open http://127.0.0.1:18789/ in your browser. Or install Tailscale on both devices for seamless remote access.

Can I use WhatsApp on a headless Pi?

Yes, but the initial QR code scan requires a screen. Use SSH tunneling to access the Control UI for the QR flow, or use openclaw channels login with a terminal-rendered QR code. After initial linking, WhatsApp runs headlessly.

What if the Pi crashes or loses power?

The systemd service automatically restarts the gateway after a crash. For power loss protection, consider a UPS hat (battery backup). The gateway's state is persisted to disk, so it picks up where it left off after a restart.