You ran the install script, the openclaw binary is on your PATH, and the next line of every guide tells you to type openclaw onboard. Then the wizard takes over and starts asking questions — about gateway tokens, auth choice, secret input mode, workspace path, daemon installation — and you do not know which answers are reversible, which write secrets to disk, and which silently lock in a path you will have to migrate later. This article walks through the wizard end-to-end so you can answer each prompt deliberately instead of guessing.
Outcome and prerequisites
By the end of this walkthrough you will have:
- A populated
~/.openclaw/openclaw.jsonconfig with a working LLM provider - A managed Gateway daemon running on port 18789 as a launchd or systemd user service
- A workspace directory at
~/.openclaw/workspacewith the bootstrap files in place - A green
openclaw doctorreport and a Control UI you can open in your browser
You need:
- Node.js 24 (or 22.16+ as the supported floor) installed via the official distribution (Node.js downloads)
- An API key for at least one provider — Anthropic, OpenAI, Google, MiniMax — or a reachable Ollama endpoint
- 10 minutes of uninterrupted time, because re-running the wizard on a partially configured host has rough edges
If you have not yet installed the CLI itself, follow Installing OpenClaw and walking through the first run first; this guide picks up the moment openclaw --version prints a number.
Time
10 to 15 minutes end to end, of which roughly two minutes is the wizard, two minutes is the daemon installation, and the rest is doctor checks and the first chat turn.
Steps
1. Pick your onboarding flow before you type anything
The openclaw onboard command supports three top-level flows, and the right one depends on whether this is a brand-new install, a migration from another agent, or a full custom config (OpenClaw docs — onboard CLI):
quickstartis the default. The wizard auto-generates a Gateway token, picks sensible defaults for port and bind, and asks only the questions that have no safe default — primarily the provider auth choice. This is what you want for a personal install.manual(also calledadvanced) gives you a prompt for every config key the wizard touches: port, bind address, auth strategy, workspace path, log directory. Choose this when you are deploying on a multi-tenant host or behind a corporate proxy.importmigrates settings from a compatible source — currently Hermes — into a fresh OpenClaw config. Use this only when you have an existing config to bring forward and the target machine has no prior OpenClaw state.
For a first install, run the bare command:
openclaw onboard --install-daemon
The --install-daemon flag tells the wizard to register the Gateway as a launchd LaunchAgent on macOS or a systemd user service on Linux, so the daemon survives reboots without you running openclaw gateway manually (OpenClaw docs — gateway background process).
2. Choose your provider at the auth-choice prompt
The first substantive prompt is the auth choice. The wizard offers a curated list of providers — Anthropic, OpenAI, Google, Ollama, LM Studio, MiniMax, custom OpenAI-compatible endpoint — and your selection drives every subsequent prompt.
For Anthropic Claude, you pick anthropic-api-key and paste an API key created at the Anthropic console (Anthropic API docs).
For OpenAI, the wizard distinguishes between the OAuth subscription flow (openai-codex) and the classic API key (openai-api-key). Both are documented at the official platform reference (OpenAI platform docs).
For a local Ollama backend, you pick ollama and provide the base URL — http://127.0.0.1:11434 for a local install, or the LAN address of a remote Ollama host. The Ollama API documentation (Ollama docs) covers the underlying server.
For MiniMax, the wizard supports both an API-key path (minimax) and an OAuth path (minimax-portal), with separate endpoints for the international api.minimax.io and the China-region api.minimaxi.com (OpenClaw docs — MiniMax provider).
3. Decide how the secret will land on disk
The next prompt is the secret-input mode, which controls where the API key actually lives:
plaintextwrites the key into~/.openclaw/openclaw.jsonas a literal string. Fast, but the config file now contains a production secret.refwrites a reference like"${ANTHROPIC_API_KEY}"into the config and reads the value from an environment file at runtime. This is what you want on any host you would consider lightly multi-tenant.envconfigures the daemon to read the secret directly from the parent environment at startup.
For a personal workstation, plaintext is acceptable if your home directory is encrypted and you do not sync ~/.openclaw/ to cloud storage. For anything that resembles a production install, choose ref and write the secret to ~/.openclaw/.env with chmod 600 (OpenClaw docs — secrets).
4. Confirm or change the workspace path
The wizard then proposes the default workspace at ~/.openclaw/workspace. The workspace is the directory where the agent reads and writes files when it runs the file-system tools, where session transcripts live, where custom skills get loaded from, and where the editable persona files — AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, BOOTSTRAP.md — get injected on the first turn (OpenClaw docs — agent runtime).
Take the default unless you have a specific reason to relocate. If you do change it — for example, to put the workspace on a backed-up volume — set the path before any session runs, because moving it after the agent has begun writing transcripts is a manual data move.
5. Set the Gateway port, bind, and auth
In quickstart mode this happens silently with safe defaults. In manual mode the wizard prompts:
gateway.portdefaults to18789. Leave it alone unless another process owns it.gateway.binddefaults to127.0.0.1(loopback). The official guidance is unambiguous: keep it loopback-only unless you specifically need a network bind, and configure remote access through SSH or Tailscale instead (OpenClaw docs — remote gateway).gateway.authdefaults to a randomly generated token in quickstart. In manual mode you can choosetoken,password, ornone. Never picknoneon a non-loopback bind.
If you want to run OpenClaw on a server and connect from a laptop, leave the bind at loopback now and read Running OpenClaw across multiple machines before exposing anything.
6. Install the daemon
With --install-daemon set, the wizard registers the Gateway as a managed background service at the end of the flow:
- On macOS, a
~/Library/LaunchAgents/ai.openclaw.gateway.plistLaunchAgent. - On Linux, a
~/.config/systemd/user/openclaw-gateway.serviceunit started withsystemctl --user enable --now. - On Windows, a registered scheduled task.
The wizard also performs an initial start, so by the time the prompt returns to you the daemon is already listening on 127.0.0.1:18789.
7. Run the doctor
After the wizard finishes, run:
openclaw doctor
The doctor verifies Node.js version, config-file syntax, secret resolution, provider reachability, Gateway port binding, and daemon health (OpenClaw docs — doctor). A green doctor report is the gate for moving on to a real channel. If any check fails, run openclaw doctor --fix to auto-resolve the trivial cases — missing directories, wrong file permissions, malformed env file — and re-read the output before retrying.
8. Send a test message
With the daemon healthy, send a single agent turn from the CLI to confirm the LLM round trip works end to end:
openclaw agent --message "Print one sentence confirming you are running."
A successful response means the model provider is reachable, the agent runtime is wired, and the workspace is writable. Move on to channels — Telegram, Slack, Signal — only after this step succeeds.
Verification
Three concrete checks tell you onboarding is genuinely complete:
openclaw statusreports the Gateway asrunningwith a recent heartbeat timestamp.curl http://127.0.0.1:18789/healthreturns200 OK(the path may require your gateway token in anAuthorization: Bearer …header, depending on auth mode).- The Control UI at
http://127.0.0.1:18789/loads in a browser and the session list shows your test message.
If all three pass, the install is real.
Rollback
If onboarding goes sideways and you want to start clean:
openclaw uninstall --keep-config # remove the daemon but preserve ~/.openclaw
# inspect ~/.openclaw/openclaw.json, fix or delete it, then:
openclaw onboard --install-daemon
The --keep-config flag prevents the uninstaller from deleting your workspace and any session transcripts. Drop it only when you genuinely want a from-scratch reset.
Troubleshooting
Wizard exits with “config already initialized.” The import flow refuses to overwrite an existing config. Either choose quickstart instead, or mv ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak before re-running.
Daemon installation fails on Linux. The wizard expects a user systemd instance. If systemctl --user status errors out, your distro is not running user-mode systemd; install via openclaw onboard without --install-daemon and run openclaw gateway under your preferred process supervisor.
Doctor flags “provider unreachable.” The most common cause is a missing env var when the secret is set to ref mode. Confirm the env file is loaded by the daemon — restart with openclaw gateway --verbose and watch the startup log for “env loaded from ~/.openclaw/.env.”
Workspace permissions denied. If you changed the workspace path during onboarding to a directory you do not own, the agent runtime cannot write transcripts. Either chown the directory to your user or rerun the wizard with the default path.
Production-readiness
Onboarding completes a working install. It does not complete a production install. Before you point this Gateway at a real inbox, do all of these:
- Move secrets to
~/.openclaw/.envif you let the wizard write them as plaintext (OpenClaw docs — secrets). - Set up backups of
~/.openclaw/— workspace, transcripts, cron job definitions, and the editable persona files all live there. - Decide on a model failover policy in the
modelsblock, especially if you are billing through a paid provider that has the occasional outage. - Choose explicit
dmPolicyvalues per channel before you enable any of them; the defaultpairingkeeps strangers out, but you should know that, not stumble into it.
Related
- Installing OpenClaw and walking through the first run
- Your first real conversation with OpenClaw
- OpenClaw config file reference
Sources
- OpenClaw docs — onboard CLI
- OpenClaw docs — getting started
- OpenClaw docs — gateway background process
- OpenClaw docs — doctor
- OpenClaw docs — remote gateway
- OpenClaw docs — secrets
- OpenClaw docs — MiniMax provider
- GitHub: openclaw/openclaw
- Node.js downloads
- Anthropic API docs
- OpenAI platform docs
- Ollama API docs
Last verified on OpenClaw current. The onboarding wizard is one of the faster-moving parts of the CLI; re-check openclaw onboard --help and the docs before automating it.