This guide walks you through everything you need to get OpenClaw running — from installing the prerequisites to launching your first automated agent task. By the end you'll have a fully functional personal AI agent system running on your machine.
Table of Contents
What is OpenClaw?
OpenClaw is an agent management layer built on top of Claude Code, Anthropic's official AI CLI. While Claude Code gives you a powerful AI assistant in your terminal, OpenClaw adds the infrastructure layer that turns it into a fully autonomous agent system:
- Scheduled cron jobs — run agent tasks on any schedule (daily, hourly, weekly)
- Mission Control — a web dashboard to manage agents, view logs, and monitor costs
- Skills marketplace — install pre-built agent behaviors (ClawHub)
- Persistent memory — agents remember context across sessions
- Multi-agent orchestration — coordinate multiple Claude instances in parallel
- Gateway service — background process that keeps agents running 24/7
The result is a personal AI operating system: one that monitors your email, publishes your blog posts, checks your sales numbers, audits competitors, and responds to alerts — all automatically, while you sleep.
Anyone who wants to run Claude as a persistent background agent — not just a chatbot. Developers, solopreneurs, content creators, researchers, and business operators who want to automate real workflows.
Prerequisites
Before installing OpenClaw, you need the following:
1. Node.js 18 or Higher
OpenClaw runs on Node.js. Check your version:
If you don't have Node.js or need a newer version, install it from nodejs.org or use a version manager like nvm:
2. An Anthropic Account
OpenClaw uses Claude Code under the hood, which requires an Anthropic account. You need either:
- Claude Pro subscription ($20/month) — includes Claude Code access with usage limits
- Anthropic API key — pay-per-token, more flexible for heavy automation
Sign up or log in at claude.ai.
3. Git (Optional but Recommended)
OpenClaw works best when your workspace is a Git repository. Most automation tasks benefit from version control.
On Windows, you'll get the best experience using WSL2 (Windows Subsystem for Linux). Native Windows works but some shell features may behave differently. If you're on Windows and hitting issues, WSL2 resolves 90% of them.
Installation Steps
Install Claude Code CLI
Claude Code is the foundation. Install it globally via npm:
Verify the installation:
Authenticate with Anthropic
Run Claude Code once to authenticate. It will open a browser window to authorize your account:
Once authenticated, Claude Code stores your credentials locally. You won't need to log in again.
Install OpenClaw
With Claude Code working, install OpenClaw:
Verify:
Start the Gateway Service
The OpenClaw gateway is the background process that handles agent scheduling, messaging, and orchestration. Start it as a system service so it runs automatically:
Check it's running:
Configuration & Workspace Setup
OpenClaw operates from a workspace directory — a folder where your agents live, store memory, run scripts, and write files. Think of it as your agent's home base.
Create Your Workspace
Configure openclaw.json
OpenClaw reads from ~/.openclaw/openclaw.json. You can set this up with:
Key settings to configure:
- workspace — absolute path to your workspace directory
- gateway.port — default 18789, change if there's a conflict
- agentName — what you want to call your agent (fun but functional)
Environment Variables
Create a .env file in your workspace for API keys and credentials that your agents will use:
Add .env to your .gitignore. Never commit API keys to version control.
Running Your First Agent
The simplest way to test your setup is to run a one-shot agent task from the terminal:
This fires a Claude agent, executes the task, and returns the result. If this works, your entire stack is functional.
Agent Context Files
Agents read context from files in your workspace. Create a file called AGENTS.md in your workspace root — this is the agent's startup instructions. Tell it who it is, what it manages, and what behaviors to follow:
Mission Control Dashboard
Mission Control is OpenClaw's web dashboard. It shows your active agents, cron job history, token costs, session logs, and lets you trigger tasks manually. Launch it:
Key panels in Mission Control:
- Dashboard — overview of recent agent activity and costs
- Cron — manage scheduled jobs (create, edit, enable/disable, view run history)
- Sessions — browse past agent conversations and their outputs
- Skills — browse and install skills from ClawHub
- Costs — token usage and spend tracking by model and job
Scheduling Automated Tasks
The real power of OpenClaw is cron — scheduling agents to run automatically. Create a job:
This runs every morning at 8am, has Claude check your calendar and send a Telegram message with your daily briefing. No manual effort required.
Set --timeout-seconds 600 for tasks that do significant work (web scraping, writing articles, processing files). The default timeout is too short for complex tasks.
Troubleshooting Common Errors
Gateway Won't Start
Run openclaw doctor to diagnose. Common cause: Node.js version mismatch or port conflict. Check openclaw gateway status for details.
Authentication Errors
Run claude to re-authenticate. If using API keys, verify your ANTHROPIC_API_KEY environment variable is set.
Cron Jobs Timing Out
Complex tasks often exceed the default 120-second timeout. Increase it: openclaw cron edit [id] --timeout-seconds 600
Blocked Cross-Origin Requests (Dev Environments)
If accessing Mission Control or a Next.js app from a different device on your LAN, add your IP to allowedDevOrigins in next.config.ts.
Permission Errors Writing Files
Agent tasks running in isolated sessions sometimes can't write to /tmp/. Direct file writes to your workspace directory instead.
Frequently Asked Questions
What is OpenClaw?
OpenClaw is a free, open-source agent management layer for Claude Code. It adds cron scheduling, a web dashboard, persistent memory, and a skills marketplace on top of Anthropic's Claude Code CLI.
Do I need to pay for OpenClaw?
OpenClaw itself is free. You need an Anthropic subscription or API key to power the underlying Claude AI. Claude Pro ($20/month) works for moderate use; heavy automation usually requires direct API access for better rate limits.
What's the difference between Claude Code and OpenClaw?
Claude Code is Anthropic's official AI terminal tool — it lets you run Claude in your terminal to write code, answer questions, and execute tasks. OpenClaw is a scheduling and management layer on top of it: it handles cron jobs, multi-agent coordination, a web dashboard, and persistent memory. Claude Code is the engine; OpenClaw is the car around it.
Does OpenClaw work on Windows?
Yes, with best results on WSL2. Native Windows works for most features. If you encounter shell-related issues on Windows, switching to WSL2 typically resolves them.
Can OpenClaw send messages via Telegram or SMS?
Yes. OpenClaw has native Telegram delivery for cron job results. SMS can be added via Twilio integration in your workspace. Agents can also send emails via SendGrid or SMTP.
Want the Complete Setup Walkthrough?
The OpenClaw Playbook covers every step in exhaustive detail — 25,000+ words, 12 chapters, every error message explained, and the Claude Bootstrap Method that gets you running in under an hour even if you've never touched a terminal before.
Get the OpenClaw Playbook — $79 →