Docs / start / getting started

Getting Started

Getting Started

  • model/auth (OAuth recommended)
  • gateway settings
  • channels (WhatsApp/Telegram/Discord/Mattermost (plugin)/…)
  • pairing defaults (secure DMs)
  • workspace bootstrap + skills
  • optional background service
text
{
  "routing": {
    "agents": {
      "main": {
        "workspace": "~/.openclaw/workspace",
        "sandbox": { "mode": "off" }
      }
    }
  }
}

0) Prereqs

  • Node >=22
  • pnpm (optional; recommended if you build from source)
  • Recommended: Brave Search API key for web search. Easiest path: openclaw configure --section web (stores tools.web.search.apiKey). See Web tools.
text
curl -fsSL https://openclaw.ai/install.sh | bash
text
iwr -useb https://openclaw.ai/install.ps1 | iex
text
npm install -g openclaw@latest
text
pnpm add -g openclaw@latest

2) Run the onboarding wizard (and install the service)

text
openclaw onboard --install-daemon
  • Local vs Remote gateway
  • Auth: OpenAI Code (Codex) subscription (OAuth) or API keys. For Anthropic we recommend an API key; claude setup-token is also supported.
  • Providers: WhatsApp QR login, Telegram/Discord bot tokens, Mattermost plugin tokens, etc.
  • Daemon: background install (launchd/systemd; WSL2 uses systemd)
    • Runtime: Node (recommended; required for WhatsApp/Telegram). Bun is not recommended.
  • Runtime: Node (recommended; required for WhatsApp/Telegram). Bun is not recommended.
  • Gateway token: the wizard generates one by default (even on loopback) and stores it in gateway.auth.token.
  • Runtime: Node (recommended; required for WhatsApp/Telegram). Bun is not recommended.

Auth: where it lives (important)

  • Recommended Anthropic path: set an API key (wizard can store it for service use). claude setup-token is also supported if you want to reuse Claude Code credentials.
  • OAuth credentials (legacy import): ~/.openclaw/credentials/oauth.json
  • Auth profiles (OAuth + API keys): ~/.openclaw/agents/<agentId>/agent/auth-profiles.json

3) Start the Gateway

text
openclaw gateway status
text
openclaw gateway --port 18789 --verbose

3.5) Quick verify (2 min)

text
openclaw status
openclaw health
openclaw security audit --deep

4) Pair + connect your first chat surface

WhatsApp (QR login)

text
openclaw channels login

Telegram / Discord / others

5) DM safety (pairing approvals)

text
openclaw pairing list whatsapp
openclaw pairing approve whatsapp <code>

From source (development)

text
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm ui:build # auto-installs UI deps on first run
pnpm build
openclaw onboard --install-daemon
text
node openclaw.mjs gateway --port 18789 --verbose

7) Verify end-to-end

text
openclaw message send --target +15555550123 --message "Hello from OpenClaw"

Next steps (optional, but great)