2026-01-15 06:12:54 +00:00
---
2026-01-30 03:15:10 +01:00
summary: "CLI reference for `openclaw onboard` (interactive onboarding wizard)"
2026-01-15 06:12:54 +00:00
read_when:
- You want guided setup for gateway, workspace, auth, channels, and skills
2026-01-31 16:04:03 -05:00
title: "onboard"
2026-01-15 06:12:54 +00:00
---
2026-01-30 03:15:10 +01:00
# `openclaw onboard`
2026-01-15 06:12:54 +00:00
Interactive onboarding wizard (local or remote Gateway setup).
2026-02-05 13:46:11 -05:00
## Related guides
2026-01-31 21:13:13 +09:00
2026-02-05 13:46:11 -05:00
- CLI onboarding hub: [Onboarding Wizard (CLI) ](/start/wizard )
2026-02-10 20:31:02 +08:00
- Onboarding overview: [Onboarding Overview ](/start/onboarding-overview )
2026-02-05 13:46:11 -05:00
- CLI onboarding reference: [CLI Onboarding Reference ](/start/wizard-cli-reference )
- CLI automation: [CLI Automation ](/start/wizard-cli-automation )
- macOS onboarding: [Onboarding (macOS App) ](/start/onboarding )
2026-01-15 06:12:54 +00:00
## Examples
```bash
2026-01-30 03:15:10 +01:00
openclaw onboard
openclaw onboard --flow quickstart
openclaw onboard --flow manual
2026-03-01 23:49:45 -05:00
openclaw onboard --mode remote --remote-url wss://gateway-host:18789
2026-01-15 06:12:54 +00:00
```
2026-03-01 23:49:45 -05:00
For plaintext private-network `ws://` targets (trusted networks only), set
`OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1` in the onboarding process environment.
2026-02-12 03:48:45 +08:00
Non-interactive custom provider:
```bash
openclaw onboard --non-interactive \
--auth-choice custom-api-key \
--custom-base-url "https://llm.example.com/v1" \
--custom-model-id "foo-large" \
--custom-api-key "$CUSTOM_API_KEY" \
2026-02-24 16:26:51 -06:00
--secret-input-mode plaintext \
2026-02-12 03:48:45 +08:00
--custom-compatibility openai
```
`--custom-api-key` is optional in non-interactive mode. If omitted, onboarding checks `CUSTOM_API_KEY` .
2026-02-24 16:26:51 -06:00
Store provider keys as refs instead of plaintext:
```bash
openclaw onboard --non-interactive \
--auth-choice openai-api-key \
--secret-input-mode ref \
--accept-risk
```
2026-02-24 22:26:33 -06:00
With `--secret-input-mode ref` , onboarding writes env-backed refs instead of plaintext key values.
2026-02-25 17:58:10 -06:00
For auth-profile backed providers this writes `keyRef` entries; for custom providers this writes `models.providers.<id>.apiKey` as an env ref (for example `{ source: "env", provider: "default", id: "CUSTOM_API_KEY" }` ).
2026-02-24 22:26:33 -06:00
Non-interactive `ref` mode contract:
- Set the provider env var in the onboarding process environment (for example `OPENAI_API_KEY` ).
- Do not pass inline key flags (for example `--openai-api-key` ) unless that env var is also set.
- If an inline key flag is passed without the required env var, onboarding fails fast with guidance.
2026-03-05 12:53:56 -06:00
Gateway token options in non-interactive mode:
- `--gateway-auth token --gateway-token <token>` stores a plaintext token.
- `--gateway-auth token --gateway-token-ref-env <name>` stores `gateway.auth.token` as an env SecretRef.
- `--gateway-token` and `--gateway-token-ref-env` are mutually exclusive.
- `--gateway-token-ref-env` requires a non-empty env var in the onboarding process environment.
- With `--install-daemon` , when token auth requires a token, SecretRef-managed gateway tokens are validated but not persisted as resolved plaintext in supervisor service environment metadata.
- With `--install-daemon` , if token mode requires a token and the configured token SecretRef is unresolved, onboarding fails closed with remediation guidance.
- With `--install-daemon` , if both `gateway.auth.token` and `gateway.auth.password` are configured and `gateway.auth.mode` is unset, onboarding blocks install until mode is set explicitly.
Example:
```bash
export OPENCLAW_GATEWAY_TOKEN="your-token"
openclaw onboard --non-interactive \
--mode local \
--auth-choice skip \
--gateway-auth token \
--gateway-token-ref-env OPENCLAW_GATEWAY_TOKEN \
--accept-risk
```
2026-02-24 22:26:33 -06:00
Interactive onboarding behavior with reference mode:
- Choose **Use secret reference** when prompted.
- Then choose either:
- Environment variable
2026-02-25 17:58:10 -06:00
- Configured secret provider (`file` or `exec` )
2026-02-24 22:26:33 -06:00
- Onboarding performs a fast preflight validation before saving the ref.
- If validation fails, onboarding shows the error and lets you retry.
2026-02-24 16:26:51 -06:00
2026-02-12 21:01:48 +08:00
Non-interactive Z.AI endpoint choices:
2026-02-12 19:16:04 +01:00
Note: `--auth-choice zai-api-key` now auto-detects the best Z.AI endpoint for your key (prefers the general API with `zai/glm-5` ).
If you specifically want the GLM Coding Plan endpoints, pick `zai-coding-global` or `zai-coding-cn` .
2026-02-12 21:01:48 +08:00
```bash
# Promptless endpoint selection
openclaw onboard --non-interactive \
--auth-choice zai-coding-global \
--zai-api-key "$ZAI_API_KEY"
# Other Z.AI endpoint choices:
# --auth-choice zai-coding-cn
# --auth-choice zai-global
# --auth-choice zai-cn
```
2026-02-22 19:03:56 -05:00
Non-interactive Mistral example:
```bash
openclaw onboard --non-interactive \
--auth-choice mistral-api-key \
--mistral-api-key "$MISTRAL_API_KEY"
```
2026-01-22 23:07:40 +00:00
Flow notes:
2026-01-31 21:13:13 +09:00
2026-01-22 23:07:40 +00:00
- `quickstart` : minimal prompts, auto-generates a gateway token.
- `manual` : full prompts for port/bind/auth (alias of `advanced` ).
2026-02-22 12:45:59 +01:00
- Local onboarding DM scope behavior: [CLI Onboarding Reference ](/start/wizard-cli-reference#outputs-and-internals ).
2026-01-30 03:15:10 +01:00
- Fastest first chat: `openclaw dashboard` (Control UI, no channel setup).
2026-02-10 07:36:04 -05:00
- Custom Provider: connect any OpenAI or Anthropic compatible endpoint,
2026-02-10 20:31:02 +08:00
including hosted providers not listed. Use Unknown to auto-detect.
2026-02-05 13:46:11 -05:00
## Common follow-up commands
```bash
openclaw configure
openclaw agents add < name >
```
< Note >
`--json` does not imply non-interactive mode. Use `--non-interactive` for scripts.
< / Note >