Raspberry Pi AI Agent
A personal AI agent running 24/7 on a Raspberry Pi — web dev, fantasy football tools, and more.
I built a self-hosted personal AI assistant using OpenClaw, Claude, and a Raspberry Pi 5. It's helping me with web development, creating tools for Fantasy Football, growing my Instagram account, and more! Here's the honest story.
What Is OpenClaw? 🦞
OpenClaw is a free, MIT-licensed AI agent framework you run on your own hardware. It connects to AI providers like Anthropic's Claude API and lets you chat with your agent through Telegram, Discord, or other messaging apps. Your data stays on your machine. You pay only for API calls.
The Hardware 💻
| Item | Cost |
|---|---|
| Raspberry Pi 5 8GB | ~$195 |
| M.2 HAT+ Compact + Official Pi 5 Case | ~$35 |
| Raspberry Pi SSD Kit - 512GB (only used the SSD) | ~$85 |
| Official 27W USB-C Power Supply | ~$15 |
| Ethernet Cable | ~$5 |
| SD Card (for initial setup) | ~$15 |
| Total | ~$350 |
The Setup Journey
Phase 1 — Mac First, Pi Later
Started on my MacBook to learn the system before committing to hardware. Installed OpenClaw via the official install script, chose QuickStart mode, connected Claude Haiku via the Anthropic API, and had a working agent in about 15 minutes.
Phase 2 — Telegram + Security
Created a bot via @BotFather and connected it to OpenClaw. Locked the bot to my Telegram user ID only using dmPolicy: allowlist.
Phase 3 — Git Backup
Version-controlled my workspace files (SOUL.md, AGENTS.md, MEMORY.md, etc.) to a private GitHub repo. The openclaw.json config stays out of git since it contains tokens — only the portable workspace markdown files get committed. Set up a nightly cron job to auto-commit changes.
Phase 4 — Pi Setup (Headless)
Flashed Raspberry Pi OS Lite 64-bit using Raspberry Pi Imager with SSH pre-configured. No keyboard, mouse, or monitor needed. The whole setup was done over SSH from my Mac.
Phase 5 — Tailscale for Remote Access
Installed Tailscale on the Pi, Mac, and iPhone. This creates a private encrypted tunnel between my devices — I can SSH into the Pi and access the OpenClaw dashboard from anywhere without exposing anything to the public internet.
Phase 6 — Migration
Cloned my workspace from GitHub onto the Pi, copied the config file over, set up environment variables in ~/.bashrc, and reconnected Telegram. The git-based migration took about 20 minutes.
The Gotchas (Issues Faced) 😮 🔧
Mac paths baked into openclaw.json. When I copied the config file from Mac to Pi, it still had /Users/bradleyhall/... paths everywhere. Linux uses /home/bkhbot/. OpenClaw threw EACCES: permission denied, mkdir '/Users' on every Telegram message until fixed.
Tailscale Serve needs HTTPS certs first. The OpenClaw dashboard is loopback-only for security. Getting it accessible via Tailscale requires enabling HTTPS certificates in the Tailscale admin console before Tailscale Serve works. Takes 2 minutes once you know — confusing if you don't.
Broke the PCIe latch during assembly. Snapped one side of the ZIF connector on the M.2 HAT+ while attaching the ribbon cable. The latch is just a retention mechanism, not an electrical contact. The SSD seated fine and the Pi detected it normally. Lesson: boot it up before assuming the worst.
rpi-clone failed. Couldn't clone the SD card to NVMe cleanly. Switched to a raw dd block copy instead, which worked fine.
WiFi drops Tailscale overnight. The Pi's WiFi chip goes into low power mode and kills the connection. Fixed with sudo iwconfig wlan0 power off. Long-term fix: Ethernet.
Current Stack
| Component | Choice |
|---|---|
| AI Model | Claude Haiku 4.5 (Anthropic API) |
| Messaging | Telegram |
| Search | Brave Search (free tier, 2k/month) |
| Hardware | Raspberry Pi 5 8GB |
| Remote Access | Tailscale Serve + Termius on iPhone |
| Backup | Private GitHub repo, nightly cron |
What's Next
- Google Workspace integration (Gmail, Calendar, Sheets)
- Multiple specialized agents: sports, finance, coding, video editing
- MCP server or Claude Skill for fantasy football tools