On a fresh machine, what do OpenClaw's installer script and the `openclaw onboard` wizard it launches actually set up?
answer
- runtime first, then the package
- inference before anything else
- a live completion gates the save
- one folder under the home directory
- Quick start leaves a foreground Gateway
basics
~20 sThe installer provisions a supported Node if it is missing, installs the OpenClaw package and starts onboarding. Onboarding verifies one model route with a real completion, then writes ~/.openclaw/openclaw.json, seeds the ~/.openclaw/workspace folder and starts a local Gateway.
solid answer
~40 s`curl -fsSL https://openclaw.ai/install.sh | bash` detects the OS, installs Node when it is missing, installs OpenClaw through npm by default and, on an unconfigured install with a terminal, starts `openclaw onboard`. Onboarding establishes inference first: it detects AI access you already have, waits for your choice, and saves the model route and its credential only after a live completion through it succeeds. It then writes the JSON5 config `~/.openclaw/openclaw.json` with local Gateway settings, seeds the workspace `~/.openclaw/workspace` with bootstrap files such as `AGENTS.md` and `SOUL.md`, and in Quick start opens the dashboard with the Gateway running in that terminal. Channels, skills and the background service come afterwards, through `openclaw onboard --classic`, `openclaw configure` or `openclaw gateway install`.
go deeper
Recall the two stages: the installer gets Node and the package, onboarding gets a verified model route, ~/.openclaw/openclaw.json, the ~/.openclaw/workspace folder and a running Gateway.
Explain the inference-first order: detection only presents choices, one live completion gates the save, and Quick start leaves a foreground Gateway that needs a service install to persist.
Show you know what onboarding does not do, such as channels, skills and the service, and how --classic, --install-daemon, --no-onboard and the state-path variables change the result for scripted hosts.
Frame the install route as an ownership choice: the installer script manages Node and upgrades for you, while npm or a configuration tool keeps the runtime under your control and your audit trail.
## Two stages: get a runtime, then get a working assistant OpenClaw is a self-hosted assistant whose long-running process, the **Gateway**, connects chat apps to agents. Installing it is two separate jobs that people often blur together: 1. **The installer** puts a runtime and the OpenClaw package on the machine. 2. **Onboarding** (`openclaw onboard`) turns that package into an assistant that can actually answer: a model route, a config file, a workspace and a running Gateway. The installer script chains the two for you; the npm route leaves the second step to you. ## What the installer script does The recommended one-liner on macOS, Linux and WSL2 is `curl -fsSL https://openclaw.ai/install.sh | bash` (Windows uses `install.ps1` from PowerShell). It: - **detects the OS** and checks for a supported Node runtime, installing one when it is missing (Homebrew on macOS, NodeSource on Linux apt/dnf/yum); - **installs OpenClaw through npm by default**, or as a git checkout with `--install-method git`; - **starts onboarding** on an unconfigured install that has a terminal; with `--no-onboard`, or with no TTY, it prints the command to finish setup later; - on an **upgrade** of an existing install, runs `openclaw doctor --fix` and only prints its success banner once repair and final verification pass. If you already manage Node yourself, the npm route is `npm install -g openclaw@latest --allow-scripts=openclaw` (npm 12 and 11.16+ need that flag so OpenClaw's lifecycle scripts run), followed by `openclaw onboard --install-daemon`. On that route you start onboarding yourself. ## What onboarding sets up, in order Onboarding in this release **establishes inference first**. It reads which AI access already exists (configured models, API-key environment variables, supported local AI command-line tools, local model servers), shows the choices, and waits for you to pick one. Only that route is tested with a **real completion**. If it fails, nothing is saved and the picker waits for another choice; a failed candidate never replaces a working model or stores the credential you tried. Once inference passes, onboarding applies the standard local setup: | What | Where | Notes | |---|---|---| | Config | `~/.openclaw/openclaw.json` | JSON5; local Gateway mode, loopback bind, a generated Gateway secret | | Workspace | `~/.openclaw/workspace` | seeded with bootstrap files such as `AGENTS.md`, `SOUL.md`, `IDENTITY.md`, `USER.md` | | First agent | config | named `main` in Quick start; Custom setup asks for a name | | Gateway | this terminal (Quick start) | the dashboard opens; **Ctrl+C** stops it, config stays | `OPENCLAW_STATE_DIR` and `OPENCLAW_CONFIG_PATH` move the state directory and config file when you run it under a service account or want custom paths. ## Quick start, Custom setup and the classic wizard A fresh guided run offers two lanes: - **Quick start** reuses detected access, verifies it, saves config and opens the web dashboard with a **foreground Gateway**. It skips memory import and app recommendations. - **Custom setup** keeps the full guided prompts, and when no detected route works Quick start falls through to the same manual provider setup. - **`openclaw onboard --classic`** is the step-by-step wizard for workspace, model and auth, Gateway port, bind and auth, channels, web search, skills and the **daemon** (background service). Adding `--install-daemon` selects the classic flow and installs the service in one step. ## What it deliberately leaves for later Chat channels, skills, plugins and the background service are not part of the inference-first guided flow. You add them afterwards: - `openclaw gateway install` to keep the Gateway running in the background; - `openclaw configure` for targeted non-inference changes, `openclaw channels add` for a channel; - `openclaw onboard` again to change the model provider or its authentication. Re-running onboarding does **not** wipe anything. Only the explicit `--reset` flag moves state to Trash, with `--reset-scope` choosing `config`, `config+creds+sessions` (the default) or `full`. ## Checking the result `openclaw --version` confirms the CLI, `openclaw doctor` checks config and health, and `openclaw gateway status` shows whether a Gateway is running and listening on its default port 18789. `openclaw dashboard` reopens the Control UI. If setup still misbehaves, `openclaw triage` runs read-only health checks and writes a sanitized diagnosis.
- Why does OpenClaw onboarding insist on a live completion before it saves a provider?Because a saved but broken route produces an assistant that looks installed and silently cannot answer. Onboarding persists only a route that just returned a real completion, so a typo in a key or an unavailable model fails at setup time, in front of you, instead of on the first message from a phone. A failed attempt leaves the previous working model and credential untouched.
- When would you install OpenClaw with npm instead of the installer script?When you already manage Node yourself, for example through a version manager or a configuration-management tool, and want the package install to be explicit. You then run `npm install -g openclaw@latest --allow-scripts=openclaw` on npm 12 or 11.16+ and start `openclaw onboard --install-daemon` yourself, which also installs the background service in the same step.
- The installer script works only if Node is already installed
- Onboarding saves the API key first and tests it on the first chat message
- Re-running openclaw onboard wipes the existing config and workspace
- The config lives in the folder you ran the installer from
- Quick start leaves the Gateway running after the terminal closes