How to Set Up OpenClaw on a Raspberry Pi in 10 Minutes
Running a powerful AI agent doesn’t require a massive workstation. In fact, one of the best places to run OpenClaw is on a Raspberry Pi. It’s low-power, always-on, and perfectly positioned to manage your home network or local files.
In this guide, I’ll show you how to go from a fresh Raspberry Pi OS install to a fully functioning OpenClaw agent in about 10 minutes.
Why Raspberry Pi?
- Always On: Your AI assistant is ready 24/7 without needing to keep your main PC running.
- Low Power: It costs pennies a month to run.
- Central Hub: A Pi is often the center of a smart home or media server setup-perfect for an agent to manage.
Prerequisites
- Hardware: Raspberry Pi 4 (4GB+ RAM recommended) or Pi 5. Ideally running Raspberry Pi OS (64-bit).
- Network: Internet connection (Wi-Fi or Ethernet).
- Terminal Access: SSH into your Pi or use a monitor/keyboard.
Step 1: Update and Install Node.js
OpenClaw is built on Node.js, so you’ll need a recent version (v18 or newer).
First, update your package lists:
sudo apt update && sudo apt upgrade -y
The easiest way to install Node.js is via NVM (Node Version Manager). Run this command to install NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Close and reopen your terminal (or run source ~/.bashrc), then install Node.js LTS:
nvm install --lts
node -v # Should print v20.x.x or newer
Step 2: Install OpenClaw CLI
Now, install the OpenClaw command-line interface globally using npm:
npm install -g openclaw
Verify the installation:
openclaw --version
Step 3: Initialize OpenClaw
Create a directory for your OpenClaw workspace. This is where the agent will store its “brain” (configuration) and “memories” (logs/files).
mkdir ~/openclaw-agent
cd ~/openclaw-agent
openclaw init
The initialization wizard will ask you a few questions:
- Workspace Location: Press Enter to use the current directory.
- LLM Provider: Choose your preferred AI backend. You can use:
- OpenAI (GPT-4o/GPT-4-turbo): Best for reasoning and complex tasks.
- Anthropic (Claude 3.5 Sonnet): Excellent for coding and creative writing.
- Ollama (Llama 3 / Mistral): Run completely locally on your Pi (requires decent RAM/CPU) or connect to another machine running Ollama.
- API Key: Paste your API key if you chose a cloud provider.
Step 4: Configure Your Agent
Once initialized, you’ll find a config.yaml (or .env depending on version) in your directory. You can tweak settings here, such as:
- System Prompt: Give your agent a personality (e.g., “You are a helpful coding assistant”).
- Tools: Enable/disable specific capabilities like file system access or web browsing.
Step 5: Start the Gateway
The “Gateway” is the main process that manages the agent’s brain and connections.
openclaw gateway start
You should see logs indicating the gateway is running. By default, it might open a web interface or just listen for CLI commands.
To interact with your agent from the terminal, simply run:
openclaw chat "Hello! Who are you?"
If everything is working, OpenClaw will respond using the configured LLM!
Step 6: Automate Startup (Optional)
To ensure OpenClaw starts automatically when your Pi reboots, you can use PM2 (a process manager for Node.js).
npm install -g pm2
pm2 start openclaw -- gateway start
pm2 save
pm2 startup
(Follow the instructions output by pm2 startup to enable the systemd service).
What’s Next?
Congratulations! You now have a personal AI agent running on your Raspberry Pi.
You can now:
- Ask it to check system stats:
"Check disk usage on /" - Have it write a daily journal entry.
- Connect it to Home Assistant to control lights.
In the next post, we’ll explore 25 Things You Can Automate with OpenClaw to give you some inspiration for your new digital assistant.
Want the complete setup kit? Get the Agent Ops Toolkit → /products/openclaw-agent-ops-toolkit - includes security hardening + deployment configs.
Want to build this yourself? The Agent Ops Toolkit ($19) has everything you need.
More from the build log
Suggested
Want the full MarketMai stack?
Get all 7 digital products in one premium bundle for $49.
View Bundle