OpenClaw is an open-source AI agent that runs on your own hardware. You install it on a Mac Mini, Linux box, VPS, or Windows machine (via WSL). You talk to it through Telegram, WhatsApp, or Discord. It browses the web, writes code, reads your emails, manages files, spins up sub-agents, and works on your business 24/7. Even while you sleep.
I run 13 agents on a single Mac Mini M4. They handle my podcast, social media, newsletter, sponsorship outreach, analytics, and research. All through OpenClaw. This guide covers every step to get your first agent running, no matter what hardware you have.
- Prerequisites: What You Need Before Installing
- Install OpenClaw on macOS (Step by Step)
- Install OpenClaw on Linux (Ubuntu/Debian)
- Install OpenClaw on Windows (WSL)
- Setting Up API Keys (Anthropic, OpenAI, Google)
- Connect Your First Messaging Channel
- How to Verify OpenClaw Is Working
- Option A: Mac Mini Setup (Best for Power Users)
- Option B: VPS Cloud Server (Cheapest Always-On)
- Option C: One-Click Install (Easiest)
- OpenClaw for Different Use Cases
- Essential Safety Rules
- Rate Limits and Model Selection
- Troubleshooting Common Installation Issues
- What to Build After Installing
The official website: openclaw.ai
The fastest interactive installer: installopenclawnow.com
New to AI agents entirely? Start with our OpenClaw beginner guide first.
Prerequisites: What You Need Before Installing OpenClaw
OpenClaw requires three things. The install itself takes about 5 minutes once these are ready.
1. Node.js (Version 18 or Higher)
OpenClaw is built on Node.js. You need v18 or later. Check if you already have it:
node --version
If you see v18.x.x or higher, you're good. If not, install it:
- macOS:
brew install node(requires Homebrew) - Ubuntu/Debian:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install -y nodejs - Windows: Download from nodejs.org or install in WSL
2. An LLM API Key
OpenClaw connects to AI models through your own API key. You need at least one:
- Anthropic (Claude): Best results. This is what I use for all 13 agents. Get a key at console.anthropic.com
- OpenAI (GPT): Works well as a fallback or for specific tasks. Get a key at platform.openai.com
- Google (Gemini): Good for vision tasks and as a budget option. Get a key at aistudio.google.com
- OpenRouter: Access 100+ models through one API key. Good for experimenting. Get a key at openrouter.ai
For a detailed walkthrough on getting your Anthropic API key configured, read our OpenClaw API key setup guide.
Cost reality: Most solo founders spend $20-80/month on API credits. Heavy multi-agent setups (like mine) run $100-200/month. That's still cheaper than any VA or SaaS stack doing the same work.
3. A Machine That Stays On
OpenClaw runs as a background daemon. It needs a machine that stays powered on:
- Mac Mini M4 (recommended): $500 one-time. 15W idle. Silent. Read the Mac Mini setup guide.
- VPS: $6-20/month on Hetzner or DigitalOcean. Read the VPS setup guide.
- Any old laptop or desktop: Works fine. Disable sleep mode.
- Raspberry Pi 5: Works for light workloads. 8GB RAM minimum.
System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 4GB | 16GB+ |
| Storage | 10GB free | 50GB+ (for memory files, transcripts, media) |
| CPU | Any modern CPU | Apple Silicon or recent x86 |
| OS | macOS 13+, Ubuntu 20+, Windows 10+ (WSL2) | macOS 14+ or Ubuntu 22+ |
| Network | Stable internet connection | Wired ethernet for always-on setups |
Install OpenClaw on macOS (Step by Step)
macOS is the most popular platform for OpenClaw. Most of the community runs on Mac Minis. Here's the complete process.
Step 1: Install Homebrew (If You Don't Have It)
Homebrew is the package manager for macOS. Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the prompts. After installation, close and reopen Terminal.
Step 2: Install Node.js
brew install node
Verify it installed correctly:
node --version
npm --version
Both should return version numbers. Node should be 18+.
Step 3: Install OpenClaw
npm install -g openclaw@latest
This installs OpenClaw globally on your machine. The -g flag makes the openclaw command available everywhere.
Step 4: Run the Onboarding Wizard
openclaw onboard --install-daemon
This interactive wizard walks you through:
- Adding your LLM API key
- Choosing a default model (Claude Opus recommended)
- Connecting a messaging channel (Telegram, WhatsApp, Discord, etc.)
- Setting up the daemon so OpenClaw runs in the background and starts on boot
The --install-daemon flag is important. It registers OpenClaw as a macOS LaunchAgent, which means it auto-starts when your machine boots. No manual intervention needed.
Step 5: Send Your First Message
Open Telegram (or whatever channel you connected). Send a message to your bot. If it responds, you're live.
Pro tip: Your first message should be simple. "What can you do?" or "What tools do you have access to?" This confirms the connection works and shows you what capabilities are active.
Install OpenClaw on Linux (Ubuntu/Debian)
Linux is the go-to for VPS setups. Works great on Ubuntu, Debian, and most distributions.
Step 1: Update Your System
sudo apt update && sudo apt upgrade -y
Step 2: Install Node.js
# Install Node.js 22.x (LTS)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
# Verify
node --version
npm --version
Step 3: Install Build Essentials
Some OpenClaw skills and dependencies need compilation tools:
sudo apt install -y build-essential git curl
Step 4: Install OpenClaw
npm install -g openclaw@latest
Step 5: Run Onboarding
openclaw onboard --install-daemon
On Linux, the daemon installs as a systemd service. It auto-starts on boot and auto-restarts if it crashes.
Step 6: Check the Service Status
systemctl --user status openclaw
You should see "active (running)." If not, check the logs:
journalctl --user -u openclaw -f
For the full VPS-specific walkthrough (server provisioning, SSH keys, security hardening, firewall), read our VPS installation guide.
Install OpenClaw on Windows (Using WSL)
OpenClaw doesn't run natively on Windows. You need WSL (Windows Subsystem for Linux), which gives you a real Linux environment inside Windows.
Step 1: Install WSL2
Open PowerShell as Administrator and run:
wsl --install
This installs WSL2 with Ubuntu by default. Restart your computer when prompted.
Step 2: Open Your Ubuntu Terminal
Search for "Ubuntu" in the Start menu. Open it. Set up your username and password when prompted.
Step 3: Follow the Linux Steps
From here, follow the exact same steps as the Linux installation above. Update, install Node.js, install OpenClaw, run onboarding.
sudo apt update && sudo apt upgrade -y
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs build-essential git curl
npm install -g openclaw@latest
openclaw onboard --install-daemon
WSL tip: Make sure WSL2 is set to start automatically with Windows. Run wsl --set-default-version 2 in PowerShell. For always-on operation, consider a dedicated Linux machine or VPS instead.
Setting Up API Keys: Anthropic, OpenAI, and Google
The onboarding wizard asks for your API key. Here's how to get one from each provider.
Anthropic (Claude) - Recommended
Claude Opus gives the best results for agent work. Period. It's what I use for everything.
- Go to console.anthropic.com
- Create an account or sign in
- Navigate to API Keys
- Click "Create Key"
- Copy the key (starts with
sk-ant-) - Add credits ($20 minimum to start)
Full walkthrough: OpenClaw API key setup for Anthropic
OpenAI (GPT)
- Go to platform.openai.com/api-keys
- Create an account or sign in
- Click "Create new secret key"
- Copy the key (starts with
sk-) - Add credits under Billing
Google (Gemini)
- Go to aistudio.google.com/apikey
- Click "Create API key"
- Select or create a Google Cloud project
- Copy the key
My setup: Claude Opus as the primary model for all agents. I add OpenAI as a fallback for when Anthropic rate limits hit. Google Gemini for specific vision tasks. You can configure multiple providers and the agent switches automatically.
Adding API Keys After Installation
If you need to add or change API keys later:
# Open the configuration
openclaw config edit
# Or set directly
openclaw config set anthropic.apiKey sk-ant-your-key-here
openclaw config set openai.apiKey sk-your-key-here
Connect Your First Messaging Channel
Telegram is the most popular choice. Here's the full setup.
Create a Telegram Bot
- Open Telegram and search for @BotFather
- Send
/newbot - Choose a name for your bot (e.g., "Marc AI")
- Choose a username (must end in "bot", e.g., "marc_agent_bot")
- BotFather gives you a token. Copy it.
- Paste it into the OpenClaw onboarding wizard or config
Send a message to your new bot. The agent responds. You're live.
For WhatsApp, Discord, and other channels: Telegram setup guide | WhatsApp setup guide | Discord setup guide
How to Verify OpenClaw Is Working Correctly
After installation, run these checks to make sure everything is healthy.
Check 1: OpenClaw Doctor
openclaw doctor
This command scans your entire setup and reports issues. It checks:
- Node.js version compatibility
- API key validity
- Gateway configuration
- Channel connections
- Security settings (exposed ports, permissions)
- Disk space and memory
Fix any warnings or errors it reports. Green across the board means you're healthy.
Check 2: Gateway Status
openclaw gateway status
Should show "running." If it says "stopped," start it:
openclaw gateway start
Check 3: Send a Test Message
Open your connected messaging channel and send: "What time is it?" or "List your available tools."
If the agent responds with the correct time and a tool list, everything is working. API key is valid, the gateway is running, and the channel is connected.
Check 4: Verify the Daemon
# macOS
launchctl list | grep openclaw
# Linux
systemctl --user status openclaw
This confirms OpenClaw will survive reboots and run 24/7.
Option A: Mac Mini Setup (Best for Power Users)
A dedicated machine sitting on your desk, running 24/7. This is how Matthew Berman and most advanced OpenClaw users run their setup. You own the hardware, you own the data. Nothing leaves your network.
You'll set up a Mac Mini M4 (16GB RAM minimum), install OpenClaw, connect it to Telegram, and configure your agent's personality and first automations. The whole process takes about 30 minutes.
Cost: ~$500-800 one-time for the Mac Mini + Claude API credits (~$20-150/mo depending on usage)
What the Mac Mini Setup Covers
- macOS hardening (FileVault, Firewall)
- Creating a separate user account for your agent
- Preventing sleep mode so the agent runs 24/7
- Installing OpenClaw via installopenclawnow.com
- Connecting Telegram
- Writing your first prompt (SOUL.md, AGENTS.md)
- Security audit with
openclaw doctor - Remote access via Tailscale
Best for: people who want full control, care about privacy, or plan to run heavy workloads with multiple agents. Once it's set up, it just sits there and works. No monthly server bill.
Read the full guide: OpenClaw Mac Mini Setup: Build a 24/7 AI Agent Server
Option B: VPS Cloud Server (Cheapest Always-On Option)
Same OpenClaw, same power, but running on a cloud server instead of hardware in your house. Spin up a $6/mo Ubuntu server on Hetzner or DigitalOcean, SSH in, install OpenClaw, and connect via Telegram. Always on by default. No sleep settings to worry about.
Cost: ~$6-20/mo for the server + Claude API credits
What the VPS Setup Covers
- Creating a VPS and SSH key setup
- Installing Node.js and OpenClaw
- Keeping it running with systemd
- Connecting Telegram
- Security hardening (firewall, fail2ban, SSH keys only)
- Tailscale for secure remote access
Best for: people who don't want to buy hardware, want to start cheap, or need their agent accessible from anywhere without configuring their home network.
Trade-off: you're renting someone else's computer, so your data lives on their servers.
Read the full guide: How to Install OpenClaw on a VPS: Complete Cloud Setup Guide
Option C: One-Click Install (Easiest Way to Get Started)
Platforms like DigitalOcean and Railway offer one-click OpenClaw installs. Zero technical knowledge needed. Click a button, it spins up on their server, you connect via Telegram. Done.
Cost: ~$6-20/mo for the server + Claude API credits
You can also use SimpleClaw for a managed experience.
Important: Migrating servers means losing your agent's context. Pick something you can scale from the start.
OpenClaw for Different Use Cases
How you configure OpenClaw depends on what you're trying to do. Here are the three most common setups.
Personal Assistant
The simplest use case. One agent, one messaging channel, basic tasks.
- Email triage and drafting
- Calendar management
- Web research on demand
- Reminders and to-do management
- File organization
Setup time: 15 minutes. Monthly cost: $20-40 in API credits.
Start with a basic SOUL.md ("You are my personal assistant. Be concise, proactive, and organized.") and expand from there. The agent learns your preferences through its memory files over time.
Developer Tool
Code review, CI/CD monitoring, issue management, documentation, testing.
- Install the GitHub skill for PR and issue management
- Set up cron jobs to monitor CI pipelines
- Use the coding-agent skill for delegated development tasks
- Configure webhook automation for deployment notifications
Setup time: 30-60 minutes. Monthly cost: $40-100 in API credits.
Read more: OpenClaw webhook automation guide
Business Automation (What I Run)
Multiple agents, each handling a different function. This is the full setup.
- 13 specialized agents on one Mac Mini
- Content pipeline: podcast to social media to newsletter
- Sponsorship research and outreach
- Analytics and reporting dashboards
- Guest prospecting for my podcast
- SEO article research and publishing
Setup time: A few days to get everything dialed in. Monthly cost: $100-200 in API credits.
Read the full breakdown: How I run 13 AI agents on one Mac Mini and the content machine pipeline.
OpenClaw Security: Essential Safety Rules Before You Start
These matter. Don't skip them because you're excited.
- Never install on your personal computer. Use a separate machine, server, or VM.
- Create a dedicated Gmail account for your agent. It'll use this to sign up for tools without touching your personal stuff.
- Treat it like a new hire. Read-only access first. Increase permissions as you build trust.
- Code access: Start read-only. Then allow branch PRs. Never let it push to main directly.
- Email access: Read-only API keys first. No send permissions until you trust it.
- Run
openclaw doctorregularly. It flags security issues and tells you exactly how to fix them.
VPS and Cloud Provider Safety Checklist
Before handing any cloud provider your API keys, verify:
- Gateway is not publicly exposed
- Pairing is required for connections
- Filesystem is scoped (no access to
/) - Access is via Tailscale or SSH tunnel only
If a provider can't show you "nmap clean" + no root mounts in 5 minutes, don't hand them your API keys.
Deep dive on security: OpenClaw troubleshooting and security guide
How to Handle OpenClaw Rate Limits and Model Selection
Rate limits are the #1 frustration for new OpenClaw users. Here's how to handle them.
Why Rate Limits Happen
Every LLM provider caps how many requests you can make per minute. Anthropic's limits depend on your usage tier. New accounts start with lower limits. As you spend more, limits increase automatically.
How to Minimize Rate Limit Issues
- Use Claude Opus as your primary model. Best results, period.
- Add fallback models in your config. When the primary hits a limit, the agent auto-switches.
- Configure multiple providers: Anthropic primary, OpenAI fallback, Google for vision tasks.
- Combine a Claude Pro subscription ($20/month) with API credits for flexibility.
- Avoid running too many concurrent sub-agents during peak hours.
- Use local models via Ollama for simple tasks that don't need a frontier model.
Model Recommendations by Use Case
| Task | Recommended Model | Why |
|---|---|---|
| Main agent (daily use) | Claude Opus | Best reasoning, tool use, and instruction following |
| Sub-agent tasks | Claude Opus or Sonnet | Opus for complex work, Sonnet for simpler tasks |
| Code generation | Claude Opus | Most accurate code output |
| Quick lookups | Claude Sonnet or local Ollama | Cheaper, faster for simple queries |
| Image analysis | Gemini Pro or Claude Opus | Both excellent at vision tasks |
Troubleshooting Common OpenClaw Installation Issues
These are the most common problems people hit during installation and how to fix them.
"command not found: openclaw"
The npm global bin directory isn't in your PATH.
# Find where npm puts global packages
npm config get prefix
# Add to your shell profile (~/.zshrc on macOS, ~/.bashrc on Linux)
export PATH="$(npm config get prefix)/bin:$PATH"
# Reload
source ~/.zshrc # or ~/.bashrc
"EACCES: permission denied" During npm Install
Never use sudo npm install -g. Fix npm permissions instead:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
npm install -g openclaw@latest
API Key Not Working
- Make sure you copied the full key (no extra spaces)
- Verify you have credits on the account
- Check the key hasn't expired or been revoked
- Run
openclaw doctorto validate the connection
Telegram Bot Not Responding
- Make sure you messaged the correct bot (check the username)
- Verify the gateway is running:
openclaw gateway status - Check if the bot token is correct:
openclaw config edit - Look at logs for errors:
openclaw gateway logs - Make sure no other instance is using the same bot token
Gateway Won't Start
# Check for port conflicts
lsof -i :3000
# Check the logs
openclaw gateway logs
# Try restarting
openclaw gateway restart
"Node version too old"
# Check your version
node --version
# Update on macOS
brew upgrade node
# Update on Linux
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
Agent Responding Slowly
Slow responses usually mean one of three things:
- Network latency: Check your internet connection. Wired is better than Wi-Fi for always-on setups.
- Rate limiting: The provider is throttling you. Add fallback models.
- Large context: Your agent's memory files are too big. Clean up old daily memory files.
For more issues, check the complete troubleshooting guide.
What to Build After Installing OpenClaw
Your agent is running. Now what?
Week 1: Personal Assistant Basics
- Write your SOUL.md (agent personality) and USER.md (info about you)
- Set up email checking via cron jobs
- Install 3-5 skills from ClawHub (weather, reminders, GitHub)
- Experiment with different requests to learn what the agent can do
Week 2: Automation
- Add cron jobs for repetitive tasks (morning brief, inbox check, social monitoring)
- Set up your memory system properly
- Connect a second messaging channel (WhatsApp or Discord)
Week 3+: Multi-Agent
- Spin up specialized sub-agents for different business functions
- Build your content pipeline
- Set up the templates and SOPs that keep agents consistent
Inside OpenClaw Lab, we share the exact agent configurations, SOUL.md templates, cron schedules, and multi-agent architectures that run a real business 24/7. Weekly lives, expert AMAs, and a community of 260+ founders building systems that actually work.
Frequently Asked Questions
How do I install OpenClaw on a Mac Mini?
Install Node.js (v18+) on your Mac Mini, then run 'npm install -g openclaw@latest' in the terminal. After that, run 'openclaw onboard --install-daemon' to complete the setup wizard. The whole process takes about 5 minutes.
Can I install OpenClaw on a VPS or cloud server?
Yes, OpenClaw runs on any Linux VPS. You need Node.js v18+, an LLM API key, and SSH access. A $5/month VPS is enough for most setups. The installation steps are the same as local: install Node.js, then install OpenClaw via npm.
Is there a one-click installer for OpenClaw?
Yes, installopenclawnow.com offers a one-click cloud installer that handles the entire OpenClaw setup for you. It provisions a server, installs dependencies, and configures your agent without requiring terminal knowledge.
What are the system requirements for OpenClaw?
OpenClaw requires Node.js v18 or higher and an API key from an LLM provider like Anthropic or OpenAI. It runs on macOS, Linux, and Windows. For always-on operation, a Mac Mini, Raspberry Pi, or VPS is recommended.
How do I connect OpenClaw to Telegram?
Create a Telegram bot through BotFather, copy the bot token, and add it during the OpenClaw onboarding wizard. You can also configure it manually in the OpenClaw gateway config file. Messages you send to your bot will be processed by your OpenClaw agent.
I share the exact playbooks, skill files, and workflows behind this system inside OpenClaw Lab. Weekly lives and AMAs with experts.
Join OpenClaw Lab →