Install & First Message
Install OpenClaw, run the setup wizard, and send your first message.
By the end of this page, you'll have a running Gateway and will have sent your first message through the built-in web interface.
Time: ~15 minutes
Step 1 — Install
Open a terminal and run the installer for your platform:
Review installer scripts before running
Piping a remote script directly to bash executes code with your full user permissions. You can inspect the script at https://openclaw.ai/install.sh before running — good practice for any installer from the internet.
macOS / Linux / WSL2:
curl -fsSL https://openclaw.ai/install.sh | bashWindows (PowerShell):
iwr -useb https://openclaw.ai/install.ps1 | iexThe installer will attempt to set up Node.js if it isn't present, and adds openclaw to your PATH. OpenClaw requires Node.js 22.14 or later (Node 24 recommended). If the installer fails with a Node version error, install it manually first:
# macOS/Linux — using nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/HEAD/install.sh | bash
nvm install 24Then re-run the installer. When it finishes, verify it worked:
openclaw --versionPrefer npm? You can also install globally:
npm install -g openclaw@latestStep 2 — Run the setup wizard
openclaw onboard --install-daemonThe wizard walks you through four things:
-
Your AI provider — Choose Anthropic (Claude), OpenAI (GPT), or Google (Gemini) and enter your API key. If you don't have one yet: get it from Anthropic, OpenAI, or Google Gemini — create an account, go to API Keys, and copy it. This is required to continue.
-
Your workspace — Where files the agent creates will live. The default (
~/.openclaw/workspace) is fine. -
Channel setup — You can skip this for now. You'll connect a real channel in a later step.
-
Daemon install — This installs OpenClaw as a background service so it starts automatically. Say yes.
When the wizard finishes, your config lives at ~/.openclaw/openclaw.json.
Step 3 — Start the Gateway
If the wizard completed successfully and you said yes to the daemon, the Gateway is already running — skip to the check below.
If you're not sure, or the wizard didn't finish cleanly, start it manually:
openclaw gatewayCheck that it's running:
openclaw gateway statusYou should see output like:
Gateway: running (pid 12847, uptime 0h 0m)
Channels:
✓ webchat ready
Automations: 0 activeThe key line is Gateway: running. If you see it, the Gateway is up.
Step 4 — Send your first message
Open the WebChat interface in your browser:
openclaw dashboardThis opens http://localhost:18789 — the built-in chat interface. You'll see a chat window. Type something and press Enter. Your agent will respond.
WebChat is always available as long as the Gateway is running. No setup required — it's built in.
What just happened
When you sent that message, here's what OpenClaw did:
- Received your message via the Gateway (port 18789)
- Loaded your configuration from
~/.openclaw/ - Sent the message to your AI provider's API
- Streamed the response back to your browser
The files created during setup:
~/.openclaw/
├── openclaw.json ← Your main config
├── SOUL.md ← Your agent's personality (you'll edit this next)
├── USER.md ← Information about you
├── MESSAGING.md ← Channel routing rules
└── workspace/
├── MEMORY.md ← Grows over sessions; agent writes notes here
└── HEARTBEAT.md ← Standing context; things always in scopeTroubleshooting
| Problem | Fix |
|---|---|
openclaw: command not found | Restart your terminal or add npm's global bin to $PATH |
| Wizard fails on Node version | Run node --version — need 22.14+ (Node 24 recommended). Install via nvm install 24 |
| Gateway won't start | Check logs: openclaw logs — usually a port conflict (change gateway.port in config) |
| No response in WebChat | Make sure your API key is valid and has credit |