← Back

🔧 How to Set Up OpenClaw (The Right Way)

Stop paying $800/month in API fees. Stop giving up after 20 minutes. A complete 10-step guide.


I've been running OpenClaw as my daily operating system for weeks now. 6 AI agents. Automated rental management. Content creation. Research. All running 24/7 from my MacBook.

Most people fail at setup because every guide skips the hard parts. This one doesn't.

Here's what 90% of people get wrong: They go straight for the Anthropic API key. That means usage-based billing. Every prompt, every tool call, every memory check — billed per token. People report $800-1500/month running OpenClaw 24/7 this way.

There's a better method. It uses your existing Claude subscription instead of pay-per-token API access.

Claude Pro is $20/month. Max is $100 or $200/month depending on your usage. I personally run the $200/month Max plan because I use Opus 4.6 for everything — heavy coding, multi-agent orchestration, complex reasoning. But if you're just getting started, Pro with the new Sonnet 4.6 (released Feb 17, 2026) gets you very far. It's faster, cheaper, and surprisingly capable.

Pick the plan that fits your usage. Either way, it's a fraction of raw API costs.

The method is called the setup-token method.


1 Install Claude Code

Claude Code is Anthropic's official CLI tool. We need it to generate the authentication token.

Open your terminal and run:

curl -fsSL https://claude.ai/install.sh | bash

That's it. One command. It handles everything.

(Windows users: use WSL2. Seriously. Don't fight it.)


2 Authenticate Claude Code

Run:

claude

This opens a browser window. Log in with your Claude account (Pro, Max, or Enterprise subscription).

Once authenticated, you now have Claude Code connected to your subscription. No API key needed.


3 Generate Your Setup Token

This is the magic step most guides skip entirely.

Run:

claude setup-token

It generates a token that lets OpenClaw use your Claude subscription instead of expensive API billing.

Copy this token. You'll paste it during OpenClaw setup.


4 Install OpenClaw

Now for the main event:

curl -fsSL https://openclaw.ai/install.sh | bash

Requirements: Node.js 22 or newer. The installer script will handle Node installation if you don't have it.


5 Run the Onboarding Wizard

openclaw onboard --install-daemon

The wizard walks you through everything:

⚠️ Security note: By default, the gateway binds to localhost only (127.0.0.1) — this is safe. Do NOT expose it to the internet without proper authentication. CrowdStrike found 135,000 exposed OpenClaw instances, with 63% vulnerable due to misconfigured auth. Keep it local or use Tailscale/SSH tunneling for remote access.

The --install-daemon flag sets up OpenClaw as a background service so it runs automatically on startup.


6 Verify It's Running

openclaw gateway status
openclaw dashboard

The dashboard opens your Control UI in the browser — you can chat with your agent right here, no channel setup needed.

If both commands work, congratulations. Your AI agent is alive.


7 Connect Telegram (Optional but Recommended)

The Control UI works fine, but Telegram turns OpenClaw into a mobile AI assistant you can message from anywhere.

  1. Open Telegram → search @BotFather
  2. Send /newbot → follow the prompts → save the bot token
  3. Run: openclaw configure --section channels
  4. Choose Telegram → paste your bot token
  5. Message your new bot → approve the pairing request

Now you have a personal AI agent in your pocket.


8 Prepare Your Agent's Identity

During onboarding, OpenClaw automatically creates workspace files for your agent. But here's what separates a toy setup from a useful one: you need to fill them with real context.

Before you start chatting, think about two things:

1. Who are you? (USER.md)
Your agent needs context about you — your name, timezone, what you do, what you're working on, how you communicate. The more specific you are, the more useful the agent becomes. Don't just write "I'm a developer." Write what you actually care about, your projects, your preferences.

2. Who is your agent? (SOUL.md + IDENTITY.md)
What personality do you want? What tone? What should it be good at? What should it never do? Think of this like onboarding a new employee — the clearer the brief, the better the output.

The other workspace files matter too:

AGENTS.md Workflow instructions. What to check on startup, how to handle tasks.
MEMORY.md Curated long-term memory. Keep under 5KB — loads every single message.
TOOLS.md Reference data. Account details, CLI configs. Loaded on-demand.
memory/YYYY-MM-DD.md Daily logs your agent writes automatically.

The key insight: MEMORY.md must stay small. This single decision saves hundreds of dollars in token costs over time.


9 Model Tiering (Save Even More)

Even with a subscription, smart model usage matters. Set up tiering:

Power users report cutting costs from $800-1500/month down to $5-10/day with proper tiering.


10 Start Small, Then Teach It Skills

Don't try to build a 6-agent AI team on day one. I did that — but only after weeks of learning what works.

Start with one workflow:

Then here's the part nobody talks about: you can create custom skills just by talking to your agent.

"Hey, every Monday morning I want you to check my inbox, summarize unread emails, and send me a digest on Telegram."

Your agent can turn that into a skill — a reusable, automated workflow that runs without you asking. Skills are how you go from "cool chatbot" to "this thing actually runs parts of my life."

Master one workflow. Create a skill for it. Then add the next one.


Quick Recap

  1. Install Claude Code
  2. Authenticate with your Claude subscription
  3. Generate setup-token (claude setup-token)
  4. Install OpenClaw
  5. Onboard with setup-token (not API key — that's the expensive path)
  6. Verify gateway is running
  7. Connect Telegram for mobile access
  8. Fill in your identity + agent personality (the real work)
  9. Set up model tiering
  10. Start simple, then teach it skills through conversation

Total cost: Your Claude subscription ($20-200/month) + $0 in API fees.

The difference between people who give up on OpenClaw and people who run their lives with it comes down to two things: proper setup and proper context.

You now have both.

Want help setting this up for your business? agentbuilderstudio.com