How to Install OpenClaw AI Assistant on Raspberry Pi
Set up OpenClaw — the open-source personal AI assistant — on a Raspberry Pi 4 and chat with it on Telegram 24/7 from anywhere in the world.
Imagine a personal AI assistant that lives on a small device in your home, runs 24/7, costs almost nothing to operate, and you can message it on Telegram any time you want. That is exactly what you get when you install OpenClaw on a Raspberry Pi.
In this guide, you will set up OpenClaw on a Raspberry Pi 4 or 5 from scratch.
What Is OpenClaw?
OpenClaw is an open-source personal AI assistant that runs entirely on your own hardware. It connects to Telegram, WhatsApp, Discord, and Slack so you can interact with it from your phone — and the data never leaves your home.
- Chat via Telegram, WhatsApp, Discord, Slack, or iMessage
- Persistent memory that learns your preferences over time
- Browser control, file access, and shell command execution
- Integrations with Gmail, GitHub, Spotify, and 50+ more
- Works with Claude, GPT-4, or local LLMs via Ollama
- Extensible skill marketplace (ClawHub)
Why Run It on a Raspberry Pi?
- Always on — Pi runs 24/7 without leaving a laptop open
- Private by default — data stays on your local network
- Cheap — a Pi 4 costs under 0 and uses only 5 watts
- Dedicated hardware — no other workloads competing
What You Need
- Raspberry Pi 4 or 5 (4GB RAM recommended)
- MicroSD card 32GB+ or USB SSD
- Official Raspberry Pi power supply
- Raspberry Pi OS Lite 64-bit (headless)
- SSH access from another computer
- Claude or OpenAI API key
Step 1: Flash Raspberry Pi OS
Download the Raspberry Pi Imager and flash Raspberry Pi OS Lite 64-bit to your card. Before writing, configure: hostname=openclaw, enable SSH, enter your WiFi credentials, and set your timezone. Boot the Pi and connect:
ssh [email protected]Step 2: Update and Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y git curl build-essentialStep 3: Install Node.js 24
OpenClaw requires Node.js 24. Install it via NodeSource:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
node -v # should show v24.xStep 4: Add Swap for 2GB Pi Models
If your Pi has 2GB RAM, add swap to avoid out-of-memory errors during compilation:
sudo dphys-swapfile swapoff
sudo sed -i 's/CONF_SWAPSIZE=100/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile
sudo dphys-swapfile setup && sudo dphys-swapfile swaponStep 5: Install OpenClaw
Run the official install script. It downloads OpenClaw, installs it as a systemd service, and launches the onboarding wizard:
curl -fsSL https://openclaw.ai/install.sh | bashFollow the prompts to connect your AI provider. Use your Claude or OpenAI API key — API keys are recommended over OAuth for headless devices.
Step 6: Connect Telegram
Telegram is the easiest channel for a headless Pi. During onboarding, choose Telegram and follow the instructions to link your bot. Once done, message the bot and OpenClaw responds. Check the service status:
sudo systemctl status openclaw
journalctl -u openclaw -fStep 7: Access the Dashboard
OpenClaw has a web dashboard on port 18789. Access it via SSH tunnel from your main machine:
ssh -L 18789:localhost:18789 [email protected]Then open http://localhost:18789 in your browser to manage skills, memory, and integrations.
Performance Tips
- Use a USB SSD instead of microSD for better reliability on a 24/7 device
- Add gpu_mem=16 to /boot/config.txt to free up RAM
- Add dtoverlay=disable-bt to /boot/config.txt if not using Bluetooth
- Enable Node compile cache for faster startup times
Final Thoughts
Running OpenClaw on a Raspberry Pi gives you a personal AI assistant that is always on, fully private, and costs almost nothing to operate. Once set up, you can message it from anywhere in the world via Telegram — ask it to check emails, run scripts, browse the web, or set reminders.
This used to require expensive cloud infrastructure. Now it fits in the palm of your hand.
Got questions about your setup? Drop them in the comments.