2026-01-06 19:56:22 +00:00
---
2026-01-13 06:16:43 +00:00
summary: "Beginner guide: from zero to first message (wizard, auth, channels, pairing)"
2026-01-06 19:56:22 +00:00
read_when:
- First time setup from zero
2026-01-08 09:59:10 +01:00
- You want the fastest path from install → onboarding → first message
2026-01-06 19:56:22 +00:00
---
# Getting Started
Goal: go from **zero** → **first working chat** (with sane defaults) as quickly as possible.
2026-01-30 03:15:10 +01:00
Fastest chat: open the Control UI (no channel setup needed). Run `openclaw dashboard`
2026-01-26 19:58:54 +00:00
and chat in the browser, or open `http://127.0.0.1:18789/` on the gateway host.
Docs: [Dashboard ](/web/dashboard ) and [Control UI ](/web/control-ui ).
2026-01-30 03:15:10 +01:00
Recommended path: use the **CLI onboarding wizard** (`openclaw onboard` ). It sets up:
2026-01-06 19:56:22 +00:00
- model/auth (OAuth recommended)
- gateway settings
2026-01-23 00:19:23 +00:00
- channels (WhatsApp/Telegram/Discord/Mattermost (plugin)/...)
2026-01-06 19:56:22 +00:00
- pairing defaults (secure DMs)
- workspace bootstrap + skills
2026-01-21 17:45:12 +00:00
- optional background service
2026-01-06 19:56:22 +00:00
2026-01-07 02:04:02 +01:00
If you want the deeper reference pages, jump to: [Wizard ](/start/wizard ), [Setup ](/start/setup ), [Pairing ](/start/pairing ), [Security ](/gateway/security ).
2026-01-06 19:56:22 +00:00
2026-01-09 12:44:23 +00:00
Sandboxing note: `agents.defaults.sandbox.mode: "non-main"` uses `session.mainKey` (default `"main"` ),
2026-01-09 03:23:36 +01:00
so group/channel sessions are sandboxed. If you want the main agent to always
run on host, set an explicit per-agent override:
```json
{
"routing": {
"agents": {
"main": {
2026-01-30 03:15:10 +01:00
"workspace": "~/.openclaw/workspace",
2026-01-09 03:23:36 +01:00
"sandbox": { "mode": "off" }
}
}
}
}
```
2026-01-06 19:56:22 +00:00
## 0) Prereqs
- Node `>=22`
2026-01-08 09:59:10 +01:00
- `pnpm` (optional; recommended if you build from source)
2026-01-15 05:08:51 +00:00
- **Recommended:** Brave Search API key for web search. Easiest path:
2026-01-30 03:15:10 +01:00
`openclaw configure --section web` (stores `tools.web.search.apiKey` ).
2026-01-15 05:08:51 +00:00
See [Web tools ](/tools/web ).
2026-01-06 19:56:22 +00:00
macOS: if you plan to build the apps, install Xcode / CLT. For the CLI + gateway only, Node is enough.
2026-01-25 02:30:09 +00:00
Windows: use **WSL2** (Ubuntu recommended). WSL2 is strongly recommended; native Windows is untested, more problematic, and has poorer tool compatibility. Install WSL2 first, then run the Linux steps inside WSL. See [Windows (WSL2) ](/platforms/windows ).
2026-01-06 19:56:22 +00:00
2026-01-08 09:59:10 +01:00
## 1) Install the CLI (recommended)
2026-01-06 19:56:22 +00:00
```bash
2026-01-30 03:15:10 +01:00
curl -fsSL https://openclaw.bot/install.sh | bash
2026-01-11 10:23:52 +00:00
```
2026-01-12 01:08:00 +00:00
Installer options (install method, non-interactive, from GitHub): [Install ](/install ).
2026-01-11 10:23:52 +00:00
Windows (PowerShell):
```powershell
2026-01-30 03:15:10 +01:00
iwr -useb https://openclaw.ai/install.ps1 | iex
2026-01-09 20:00:50 +01:00
```
2026-01-11 10:23:52 +00:00
Alternative (global install):
```bash
2026-01-30 03:15:10 +01:00
npm install -g openclaw@latest
2026-01-11 10:23:52 +00:00
```
2026-01-09 20:00:50 +01:00
```bash
2026-01-30 03:15:10 +01:00
pnpm add -g openclaw@latest
2026-01-06 19:56:22 +00:00
```
2026-01-21 17:45:12 +00:00
## 2) Run the onboarding wizard (and install the service)
2026-01-06 19:56:22 +00:00
```bash
2026-01-30 03:15:10 +01:00
openclaw onboard --install-daemon
2026-01-06 19:56:22 +00:00
```
What you’ ll choose:
- **Local vs Remote** gateway
2026-01-10 17:36:50 +01:00
- **Auth**: OpenAI Code (Codex) subscription (OAuth) or API keys. For Anthropic we recommend an API key; `claude setup-token` is also supported.
2026-01-23 00:19:23 +00:00
- **Providers**: WhatsApp QR login, Telegram/Discord bot tokens, Mattermost plugin tokens, etc.
2026-01-08 09:59:10 +01:00
- **Daemon**: background install (launchd/systemd; WSL2 uses systemd)
2026-01-13 07:58:47 +00:00
- **Runtime**: Node (recommended; required for WhatsApp/Telegram). Bun is **not recommended** .
2026-01-11 01:51:07 +01:00
- **Gateway token**: the wizard generates one by default (even on loopback) and stores it in `gateway.auth.token` .
2026-01-06 19:56:22 +00:00
2026-01-07 02:04:02 +01:00
Wizard doc: [Wizard ](/start/wizard )
2026-01-06 19:56:22 +00:00
### Auth: where it lives (important)
2026-01-21 17:45:12 +00:00
- **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.
2026-01-09 15:27:49 +01:00
2026-01-30 03:15:10 +01:00
- OAuth credentials (legacy import): `~/.openclaw/credentials/oauth.json`
- Auth profiles (OAuth + API keys): `~/.openclaw/agents/<agentId>/agent/auth-profiles.json`
2026-01-06 19:56:22 +00:00
Headless/server tip: do OAuth on a normal machine first, then copy `oauth.json` to the gateway host.
2026-01-08 09:59:10 +01:00
## 3) Start the Gateway
2026-01-21 17:45:12 +00:00
If you installed the service during onboarding, the Gateway should already be running:
2026-01-08 09:59:10 +01:00
```bash
2026-01-30 03:15:10 +01:00
openclaw gateway status
2026-01-08 09:59:10 +01:00
```
2026-01-06 19:56:22 +00:00
2026-01-08 09:59:10 +01:00
Manual run (foreground):
2026-01-06 19:56:22 +00:00
```bash
2026-01-30 03:15:10 +01:00
openclaw gateway --port 18789 --verbose
2026-01-06 19:56:22 +00:00
```
Dashboard (local loopback): `http://127.0.0.1:18789/`
2026-01-11 01:51:07 +01:00
If a token is configured, paste it into the Control UI settings (stored as `connect.params.auth.token` ).
2026-01-06 19:56:22 +00:00
2026-01-13 07:58:47 +00:00
⚠️ **Bun warning (WhatsApp + Telegram):** Bun has known issues with these
2026-01-13 08:25:22 +00:00
channels. If you use WhatsApp or Telegram, run the Gateway with **Node** .
2026-01-08 09:59:10 +01:00
2026-01-20 07:42:21 +00:00
## 3.5) Quick verify (2 min)
```bash
2026-01-30 03:15:10 +01:00
openclaw status
openclaw health
openclaw security audit --deep
2026-01-20 07:42:21 +00:00
```
2026-01-08 09:59:10 +01:00
## 4) Pair + connect your first chat surface
2026-01-06 19:56:22 +00:00
### WhatsApp (QR login)
```bash
2026-01-30 03:15:10 +01:00
openclaw channels login
2026-01-06 19:56:22 +00:00
```
Scan via WhatsApp → Settings → Linked Devices.
2026-01-13 06:16:43 +00:00
WhatsApp doc: [WhatsApp ](/channels/whatsapp )
2026-01-06 19:56:22 +00:00
### Telegram / Discord / others
The wizard can write tokens/config for you. If you prefer manual config, start with:
2026-01-13 06:16:43 +00:00
- Telegram: [Telegram ](/channels/telegram )
- Discord: [Discord ](/channels/discord )
2026-01-23 00:19:23 +00:00
- Mattermost (plugin): [Mattermost ](/channels/mattermost )
2026-01-06 19:56:22 +00:00
2026-01-08 00:13:10 +00:00
**Telegram DM tip:** your first DM returns a pairing code. Approve it (see next step) or the bot won’ t respond.
2026-01-08 09:59:10 +01:00
## 5) DM safety (pairing approvals)
2026-01-06 19:56:22 +00:00
Default posture: unknown DMs get a short code and messages are not processed until approved.
2026-01-08 00:13:10 +00:00
If your first DM gets no reply, approve the pairing:
2026-01-06 19:56:22 +00:00
```bash
2026-01-30 03:15:10 +01:00
openclaw pairing list whatsapp
openclaw pairing approve whatsapp < code >
2026-01-06 19:56:22 +00:00
```
2026-01-07 02:04:02 +01:00
Pairing doc: [Pairing ](/start/pairing )
2026-01-06 19:56:22 +00:00
2026-01-08 09:59:10 +01:00
## From source (development)
2026-01-30 03:15:10 +01:00
If you’ re hacking on OpenClaw itself, run from source:
2026-01-08 09:59:10 +01:00
```bash
2026-01-30 03:15:10 +01:00
git clone https://github.com/openclaw/openclaw.git
cd openclaw
2026-01-08 09:59:10 +01:00
pnpm install
2026-01-09 07:02:42 +00:00
pnpm ui:build # auto-installs UI deps on first run
2026-01-08 09:59:10 +01:00
pnpm build
2026-01-30 03:15:10 +01:00
openclaw onboard --install-daemon
2026-01-08 09:59:10 +01:00
```
2026-01-30 03:15:10 +01:00
If you don’ t have a global install yet, run the onboarding step via `pnpm openclaw ...` from the repo.
2026-01-26 22:59:02 -05:00
`pnpm build` also bundles A2UI assets; if you need to run just that step, use `pnpm canvas:a2ui:bundle` .
2026-01-20 07:42:21 +00:00
2026-01-08 09:59:10 +01:00
Gateway (from this repo):
```bash
2026-01-30 03:15:10 +01:00
node openclaw.mjs gateway --port 18789 --verbose
2026-01-08 09:59:10 +01:00
```
2026-01-06 19:56:22 +00:00
## 7) Verify end-to-end
2026-01-20 07:42:21 +00:00
In a new terminal, send a test message:
2026-01-06 19:56:22 +00:00
```bash
2026-01-30 03:15:10 +01:00
openclaw message send --target +15555550123 --message "Hello from OpenClaw"
2026-01-06 19:56:22 +00:00
```
2026-01-30 03:15:10 +01:00
If `openclaw health` shows “no auth configured”, go back to the wizard and set OAuth/key auth — the agent won’ t be able to respond without it.
2026-01-06 19:56:22 +00:00
2026-01-30 03:15:10 +01:00
Tip: `openclaw status --all` is the best pasteable, read-only debug report.
Health probes: `openclaw health` (or `openclaw status --deep` ) asks the running gateway for a health snapshot.
2026-01-08 05:20:11 +01:00
2026-01-06 19:56:22 +00:00
## Next steps (optional, but great)
2026-01-07 02:04:02 +01:00
- macOS menu bar app + voice wake: [macOS app ](/platforms/macos )
2026-01-06 23:32:12 +00:00
- iOS/Android nodes (Canvas/camera/voice): [Nodes ](/nodes )
2026-01-07 02:04:02 +01:00
- Remote access (SSH tunnel / Tailscale Serve): [Remote access ](/gateway/remote ) and [Tailscale ](/gateway/tailscale )
2026-01-17 02:19:12 +00:00
- Always-on / VPN setups: [Remote access ](/gateway/remote ), [exe.dev ](/platforms/exe-dev ), [Hetzner ](/platforms/hetzner ), [macOS remote ](/platforms/mac/remote )