Installing OpenClaw takes about five minutes. You need Node.js 22+ and a terminal. The installer script handles everything else — it detects your Node version, installs the CLI, and launches the onboarding wizard.
Requirements
- Node.js 22 or newer. Check with
node --version. If you need to install Node, the installer script will offer to do it for you. - macOS, Linux, or Windows (WSL2). Native Windows works, but Microsoft's WSL2 gives the most reliable experience on Windows machines.
- An API key from at least one AI provider: Anthropic, OpenAI, or Google. If you want to run local models, you can use Ollama instead — no key needed.
Step 1: Run the installer
On macOS or Linux, open Terminal and run:
curl -fsSL https://openclaw.ai/install.sh | bashOn Windows, open PowerShell and run:
iwr -useb https://openclaw.ai/install.ps1 | iexThe script downloads and installs the OpenClaw CLI globally. If Node 22+ is not detected, it will offer to install it. You do not need to install anything manually first.
Step 2: Run the onboarding wizard
After the installer finishes, launch the wizard to configure your API keys, gateway settings, and optionally connect a channel:
openclaw onboard --install-daemonThe --install-daemon flag registers the gateway as a background service so it starts automatically when your machine boots. This is the recommended setup for anything beyond a quick test.
The wizard will ask for:
- An AI provider API key (Anthropic, OpenAI, or Google Gemini)
- A default model
- Whether to install the gateway daemon
- Optionally, a messaging channel (Telegram, Discord, etc.)
Step 3: Check the gateway is running
openclaw gateway statusYou should see the gateway reported as running. If it shows stopped, start it manually:
openclaw gateway startStep 4: Open the Control UI
openclaw dashboardThis opens the browser-based Control UI at http://127.0.0.1:18789. If it loads, your gateway is fully operational. You can chat directly from the dashboard without setting up any messaging channel — useful for testing your setup.
Step 5: Add your API key (if you skipped it in the wizard)
To set a Claude (Anthropic) key:
openclaw config set auth.providers.anthropic.apiKey "sk-ant-..."For OpenAI:
openclaw config set auth.providers.openai.apiKey "sk-..."For Google Gemini:
openclaw config set auth.providers.google.apiKey "AIza..."Restart the gateway after any config change:
openclaw gateway restartCommon errors and fixes
node: command not foundor Node version too old- Re-run the installer — it will detect the missing or outdated Node version and offer to install the correct one. Alternatively, install Node 22+ manually from nodejs.org.
- Gateway fails to start — port in use
- The default gateway port is 18789. If another process is using it, set a different port:
openclaw config set gateway.port 18790, then restart. - API key not working after config set
- Make sure you restarted the gateway after setting the key. The gateway reads config at startup — changes don't apply to a running instance.
- Windows: permission errors with WSL2
- Run WSL2 as administrator for the initial install. After installation completes, you can use a normal terminal for everything else.