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.

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:

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.

Who this is for

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:

node --version # Should output v18.x.x or higher

If you don't have Node.js or need a newer version, install it from nodejs.org or use a version manager like nvm:

# Using nvm (recommended) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash nvm install 22 nvm use 22

2. An Anthropic Account

OpenClaw uses Claude Code under the hood, which requires an Anthropic account. You need either:

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.

Windows Note

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

Step 1

Install Claude Code CLI

Claude Code is the foundation. Install it globally via npm:

npm install -g @anthropic-ai/claude-code

Verify the installation:

claude --version
Step 2

Authenticate with Anthropic

Run Claude Code once to authenticate. It will open a browser window to authorize your account:

claude # Follow the browser prompt to log in with your Anthropic account

Once authenticated, Claude Code stores your credentials locally. You won't need to log in again.

Step 3

Install OpenClaw

With Claude Code working, install OpenClaw:

npm install -g openclaw

Verify:

openclaw --version
Step 4

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:

openclaw gateway install openclaw gateway start

Check it's running:

openclaw gateway status # Should show: Runtime: 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

mkdir ~/my-agent-workspace cd ~/my-agent-workspace git init # Optional but recommended — version-controls your agent's work

Configure openclaw.json

OpenClaw reads from ~/.openclaw/openclaw.json. You can set this up with:

openclaw init

Key settings to configure:

Environment Variables

Create a .env file in your workspace for API keys and credentials that your agents will use:

# .env — your workspace root ANTHROPIC_API_KEY=sk-ant-... TWILIO_ACCOUNT_SID=AC... SENDGRID_API_KEY=SG... # Add whatever keys your automations need
Security

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:

openclaw run "What is today's date and what's the weather in Denver?"

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:

# AGENTS.md You are [name], my personal AI operator. Read USER.md to understand who you're helping. Your workspace is [path]. Before each task, check memory/ for recent context.

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:

openclaw mc # Opens the dashboard at http://localhost:3333

Key panels in Mission Control:

Scheduling Automated Tasks

The real power of OpenClaw is cron — scheduling agents to run automatically. Create a job:

openclaw cron add \ --name "daily-summary" \ --cron "0 8 * * *" \ --tz "America/Denver" \ --message "Check my calendar, summarize today's priorities, and send me a morning briefing." \ --announce \ --channel telegram

This runs every morning at 8am, has Claude check your calendar and send a Telegram message with your daily briefing. No manual effort required.

Tip

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 →