Day 2

Install OpenClaw: Step-by-Step Setup Guide (Mac, Windows, Linux)

Install OpenClaw with one command, configure your first channel, and have your first conversation. Covers Node.js 22+, the official installer, and gateway setup.

"If you can make instant noodles, you can install OpenClaw. About the same amount of time."

Today's Goal

LearnUnderstand where OpenClaw should run and what the installer configures for you.
DoPick an environment, gather the prerequisites, run onboarding, and send your first Telegram message.
Done whenopenclaw status shows the service running, Telegram replies, and the service comes back after a reboot.

Step 0: Choose Where Your Assistant Lives

First decision: where does your assistant run?

OptionBest ForTradeoff
Cloud VPS (recommended)24/7 availability, automation while you sleep~$5/month (Hetzner, AWS Lightsail)
Mac Mini / spare machineZero extra software on your laptop, data stays at homeOnly works while that machine is powered on
Your current laptopJust trying it outStops when the laptop sleeps or closes

Recommended specs for VPS: Ubuntu 22.04, 2 CPU cores, 4GB RAM, 40GB SSD.

Which environment should I choose?

  • Just trying it out → Laptop (easiest, but only works when your laptop is on)
  • Want 24/7 uptime → VPS ($5-10/month, runs while you sleep)
  • Want 24/7 but no cloud → Mac Mini or old PC

OpenClaw's working files will usually live in ~/.openclaw/workspace/, no matter which environment you pick, and installed skills commonly live in ~/.openclaw/skills/.

You'll know this step is done when you can answer: "What exact machine will stay online for my assistant?"

Step 1: Get Your Prerequisites

Before running the installer, have these ready:

Node 22.16 or newer (Node 24 is the default recommended runtime)

  • Why you need it: the openclaw CLI runs on Node.js.
  • Check with node -v. If you see Node 22.16 or newer, you're ready.

AI model access (pick one)

  • Claude subscription (Pro/Max/Team)
    • Why you need it: the assistant still needs a model provider for every response and tool plan.
    • Use OAuth in the wizard, so there is no API key to paste.
  • Anthropic API key
    • Why you need it: this is the credential OpenClaw uses to call Anthropic directly.
    • Get it from console.anthropic.com.
  • Also supported: OpenAI, Gemini, OpenRouter, Qwen, Mistral, and others.
    • Why you need it: any supported provider can power the assistant if Claude is not what you want.

Telegram Bot Token

  1. Open Telegram and search for @BotFather.
  2. Send /newbot, choose a name and username.
  3. Copy the token BotFather returns.

Why you need it: this token lets OpenClaw receive and send Telegram messages through your bot.

Your Telegram User ID

  • Search for @userinfobot in Telegram and copy your numeric ID.
  • Why you need it: onboarding uses this to mark you as the admin so random people cannot control your assistant.

You'll know this step is done when you have four things in hand: a machine, Node 22.16 or newer, one model credential path, and both Telegram values.

Step 2: Install

Run:

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

This is the official one-liner. It installs OpenClaw and auto-installs Node if needed.

Alternative manual install:

npm install -g openclaw@latest && openclaw onboard

This manual path installs the CLI directly, then launches the onboarding wizard that writes your initial configuration under ~/.openclaw/workspace/.

Platform guide: macOS → Platform guide: Windows → Platform guide: Linux / VPS →

You'll know it worked when the wizard opens instead of returning command not found, and after onboarding openclaw status shows a running service.

Step 3: What the Wizard Asks

The setup wizard walks through five prompts:

  1. Mode — Choose QuickStart if this is your first install.
  2. AI Model — Pick your provider and authenticate.
  3. Chat Channel — Choose Telegram and paste your Bot Token.
  4. Admin Setup — Enter your Telegram user ID.
  5. Daemon Install — Say yes so the assistant runs in the background and survives reboots.

On Linux this is usually a systemd user unit. On macOS it is usually a LaunchAgent. Either way, the goal is the same: OpenClaw should start automatically after the machine restarts.

You'll know this step worked when the daemon install finishes without errors and openclaw status reports healthy instead of stopped.

Step 4: Send Your First Message

After the wizard finishes, open Telegram, find your bot, and send:

Hello — who are you?

You should get a reply within a few seconds. It will sound generic right now because you have not customized files like ~/.openclaw/workspace/SOUL.md yet. That comes on Day 3.

Try a few more:

  • "Write a Python quicksort"
  • "What's the square root of 1024?"
  • "Can you check my email?" (It should say no for now.)

You'll know this step worked when Telegram shows an actual bot reply and openclaw logs --follow shows no repeating error for that message.

Minimum Success Criteria

After today, you should be able to:

  • Run openclaw status and see it running
  • Send a message in Telegram and get a response
  • Turn your computer off and on again — service auto-restarts

Verification check: do the reboot test now, not later. If the service does not come back automatically, fix that before moving on.

Day-to-Day Management Commands

You'll use these regularly:

openclaw status           # Overall health
openclaw doctor           # Full diagnostic check
openclaw gateway restart  # Restart background service
openclaw logs --follow    # View runtime logs
openclaw configure        # Change model, channel, or any setting

You'll know these are enough for basic operations when you can answer two questions quickly: "Is it running?" and "What do the logs say?"

Common Issues

Port already in use — Another process is already bound to the port OpenClaw wants. Check the error in openclaw logs --follow, free the conflicting process, then run openclaw daemon restart. You'll know it's fixed when the logs stop repeating the bind error and openclaw status returns healthy.

Telegram bot not responding — Usually the bot token is wrong, your Telegram user ID is missing, or the daemon never started. Re-run openclaw configure or openclaw onboard, then send a fresh test message. You'll know it worked when the bot replies and the logs show the incoming message instead of an auth failure.

Service not starting after reboot — The daemon install step likely failed or was skipped. Run openclaw doctor, reinstall the daemon if prompted, then reboot once more. You'll know it's fixed when openclaw status shows running immediately after login or server boot.

Full troubleshooting guide →

What's Next

Your assistant can chat, but it still has no personality or instructions. Tomorrow you will shape that by editing core files in ~/.openclaw/workspace/, including ~/.openclaw/workspace/SOUL.md, ~/.openclaw/workspace/USER.md, ~/.openclaw/workspace/AGENTS.md, and ~/.openclaw/workspace/IDENTITY.md.

Day 2 Agent

Need help with this step?

Ask about anything on this page.

OpenClaw Expert

From Official Docs

I can help you with Day 2. What would you like to know?

Common questions:

Install OpenClaw: Step-by-Step Setup Guide (Mac, Windows, Linux)