OpenClaw runs a Gateway on your own device and connects it to messaging channels and model services. This guide follows the official CLI workflow: check the environment, choose an installation method, run onboarding, and verify the result.
Check the environment first
The official requirements list Node.js 22.22.3+, 24.15+, or 25.9+, with Node 26 recommended. Windows options include the native Windows Hub, PowerShell CLI, and WSL2; this article focuses on the CLI.
Record your actual versions before choosing a command:
| |
Model authentication depends on the provider. Complete it locally through the onboarding flow and keep credentials out of screenshots, shared links, and issue reports. Installation, onboarding, and daemon setup change the local environment.
Option 1: a package manager
For npm 12 or npm 11.16+, the current official command explicitly permits OpenClaw’s own lifecycle scripts:
| |
npm 11.15 and earlier do not support that option:
| |
For pnpm, the current global installation command is:
| |
pnpm approve-builds -g is not the supported global installation flow. Because latest changes, use a reviewed explicit release number when reproducibility matters, and record Node.js, package-manager, and operating-system versions.
Option 2: the official installer
The installer may install or select Node.js, install OpenClaw, and start onboarding. Download and inspect it before execution; verify any publisher-provided checksums or signatures as well.
macOS / Linux / WSL2
| |
Windows PowerShell
| |
This guide uses the official OpenClaw distribution. Third-party forks and mirrors can differ in package names, configuration, and versions; follow their own installation documentation. For source builds, follow the matching pnpm requirements on the official installation page.
Onboarding and verification
If the installer has not already completed onboarding:
| |
This configures model access, the Gateway, and background startup. Check the CLI and service separately:
| |
doctor is a diagnostic entry point; some releases may offer configuration migrations or repairs. Read the output before accepting changes. A version number does not prove that the Gateway is running, and opening the Dashboard does not prove a successful model request.
Common failures and next steps
openclawis not found: reopen the terminal, inspectnpm prefix -gand command resolution, and confirm that you are using the Node environment that installed it.- Lifecycle scripts are blocked: check the package-manager version and the matching approval option above instead of approving unrelated packages.
- The Gateway is unavailable: inspect service and connection details in
openclaw gateway statusbefore following the official troubleshooting guidance.
The next article explains the three browser connection modes. Use the JSON tool for ordinary JSON examples; full JSON5 configurations still require OpenClaw’s own diagnostics.