OpenClaw Setup Guide 2026: From Zero to Working AI Agent in 2 Hours

The complete, no-fluff guide. Install OpenClaw, connect it to your messaging apps, set up cron jobs, and build an AI agent that actually works while you sleep.

Most people give up on OpenClaw within 30 minutes. Not because it's bad — because the setup has a dozen places where you can get stuck if you don't know the right sequence.

I've been running OpenClaw 24/7 for two weeks straight. Not as a toy — as a real business operator. Here's exactly how to set it up, based on what actually works.

Want to skip the technical setup? Our Setup-in-a-Box kit ($47) includes pre-built config files, identity templates, cron job configs, and a troubleshooting guide. Or get it in the Everything Bundle ($149) with all our products.

What You Need Before Starting

  • A computer that stays on — Windows, Mac, or Linux. If it sleeps, your agent sleeps.
  • Node.js v18+ — Check with node --version. Install from nodejs.org if needed.
  • An AI provider API key — Anthropic (Claude) or OpenAI. Budget ~$20-50/month for real usage.
  • A messaging app — Telegram is easiest. Discord and WhatsApp also work.
  • 30-120 minutes — depending on how many channels you want to connect.

Step 1: Install OpenClaw (5 minutes)

Open your terminal (PowerShell on Windows, Terminal on Mac) and run:

npm install -g openclaw

Verify it installed:

openclaw --version

Then run the setup wizard:

openclaw setup

The wizard walks you through:

  1. Creating your workspace directory
  2. Setting up authentication with your AI provider
  3. Configuring the local gateway
  4. Starting the background daemon
Common mistake: Running openclaw setup without billing enabled on your AI provider. Anthropic and OpenAI both require a payment method on file before API calls work. Set this up first.

Step 2: Connect Your AI Provider (5 minutes)

OpenClaw supports multiple AI providers. Here's how to connect the two most popular:

Anthropic (Claude) — Recommended

  1. Go to console.anthropic.com
  2. Create an account and add a payment method
  3. Navigate to API Keys → Create Key
  4. Copy the key and add it to OpenClaw's config

Claude Sonnet is the best balance of cost and capability for most tasks. Claude Opus is more powerful but costs ~5x more.

OpenAI (GPT)

  1. Go to platform.openai.com
  2. Create an account and add a payment method
  3. Navigate to API Keys → Create new secret key
  4. Copy the key and add it to OpenClaw's config

Step 3: Connect Telegram (10 minutes)

Telegram is the easiest messaging channel to set up with OpenClaw.

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts to create your bot
  3. Copy the bot token BotFather gives you
  4. Add the token to your OpenClaw config
  5. Start a conversation with your bot — send any message to test

Your agent should respond within seconds. If it doesn't, check that the OpenClaw gateway is running: openclaw gateway status

Step 4: Set Up Your Agent's Identity (15 minutes)

This is where most people skip ahead and regret it later. A well-configured identity stack is the difference between a chatbot and a useful agent.

Navigate to your workspace directory and create these files:

SOUL.md — Who your agent is

# SOUL.md
I am [your agent's name]. [One sentence about what I do.]
## How I Work
- [Key behavior 1]
- [Key behavior 2]
## What I Don't Do
- [Boundary 1]
- [Boundary 2]

USER.md — Who you are

# USER.md
Name: [Your name]
Timezone: [Your timezone]
What I care about: [Brief context]

MEMORY.md — What your agent remembers

Start empty. Your agent will populate this over time with important context that needs to persist across sessions.

ACTIVE-TASKS.md — What your agent is working on

This is your agent's working memory. Update it with current priorities and it'll pick up where it left off each session.

Pro tip: The identity stack is what makes OpenClaw agents genuinely useful. Without it, you have a generic chatbot. With it, you have a specialized operator that understands context. Our AI Agent Launch Kit includes battle-tested templates for all these files.

Step 5: Set Up Cron Jobs (20 minutes)

Cron jobs are what give your agent initiative. Without them, it only acts when you message it. With them, it can:

  • Send you a morning briefing at 6 AM
  • Check your email and summarize it
  • Monitor websites for changes
  • Post scheduled content
  • Run nightly maintenance on its own memory

OpenClaw uses a JSON-based cron system. Here's a simple morning briefing example:

{
  "name": "morning-brief",
  "enabled": true,
  "schedule": {
    "kind": "cron",
    "expr": "0 6 * * *",
    "tz": "America/New_York"
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Send me a morning briefing with weather, top news, and my calendar for today."
  }
}

Step 6: Install Skills (10 minutes)

Skills extend what your agent can do. Think of them as plugins.

openclaw skills install weather
openclaw skills install daily-brief

Browse available skills at clawhub.com.

Step 7: Security Hardening (15 minutes)

If your agent has access to your computer, security matters. At minimum:

  • Restrict authorized senders — only allow your phone number or user ID
  • Set approval requirements — for elevated commands, spending, or external posts
  • Use environment variables for API keys — never hardcode them in workspace files
  • Review exec permissions — understand what your agent can run on your machine
Don't skip this. An AI agent with unrestricted access to your computer and messaging accounts is a security risk. The 15 minutes you spend on hardening could prevent serious problems.

Common Issues and Fixes

Agent not responding

  • Check gateway: openclaw gateway status
  • Check your AI provider has billing enabled
  • Check your bot token is correct

Sessions don't persist

  • Make sure your agent writes to files, not "mental notes"
  • Use ACTIVE-TASKS.md as working memory
  • Set up nightly consolidation cron to update MEMORY.md

Agent drifts off-topic

  • Your SOUL.md needs clearer boundaries
  • Add a HEARTBEAT.md to keep it on track between messages
  • Define explicit "red lines" for things it should never do

Computer sleeps and agent stops

  • Disable sleep in power settings
  • Or deploy to a VPS ($5-10/month) for true 24/7 uptime

What to Build Next

Once your agent is running, here are the highest-value things to set up:

  1. Morning brief cron — wake up to a summary instead of doom-scrolling
  2. Task management — use ACTIVE-TASKS.md as a living to-do list your agent maintains
  3. Content scheduling — draft and schedule social media posts through your agent
  4. Monitoring — track competitors, prices, news, or anything you check manually today
  5. Revenue operations — if you sell digital products, your agent can handle customer support and track sales

Resources

Want the Fast Track?

Our Setup-in-a-Box ($47) includes pre-built config files, identity templates, 6 cron job configs, a security checklist, and a troubleshooting guide. Everything in this article, pre-configured and ready to deploy.

Or get the Everything Bundle ($149) — all 8 of our products including the Setup Kit, Revenue Playbook, and Agent Economy Playbook.

Browse All Products →