#Wizard error
1 messages ยท Page 1 of 1 (latest)
That โcanโt start the wizardโ message is usually just hiding the real error (permissions, missing Node, bad PATH, or the gateway service failing). To debug it, I need the exact version + the first bit of logs.
Can you paste all of this (copy/paste from Terminal), plus a screenshot of the wizard error?
- Versions
openclaw --version
node -v
- Status + report (safe to share; it redacts tokens)
openclaw status --all
openclaw gateway status
- Logs (run this, then try starting the wizard again, and paste what appears)
openclaw logs --follow
Also tell me:
- macOS version (e.g. Sonoma 14.x / Sequoia 15.x)
- Are you installing via the DMG app, or via the installer script?
- Does
openclawwork in Terminal at all, or is it โcommand not foundโ?
Docs reference for this exact workflow: https://docs.openclaw.ai/help/faq#first-60-seconds-if-somethings-broken and installer verbose mode: https://docs.openclaw.ai/help/faq#installer-stuck-how-do-i-get-more-feedback
Are you installing via the DMG app, this
Yep โ thatโs the DMG macOS app.
When the app says it โcanโt start the wizardโ, the most common cause is: the app tries to call the openclaw CLI (and Node), but itโs not installed / not on PATH / wrong Node version.
Quick checks (Terminal)
Please paste the output of:
node -v
openclaw --version
which openclaw
openclaw status --all
Fast fix to try (inside the macOS app)
- Open OpenClaw app โ Settings โ General
- Click โInstall CLIโ
- Quit + re-open the app
- Try the wizard again
If the app wizard still fails
Run the wizard directly from Terminal (this is the same onboarding flow, just without the app UI):
openclaw onboard
If you can also share a screenshot of the exact error popup, I can tell you which branch weโre in (missing CLI vs gateway not starting vs permissions).
Docs:
- Wizard command: https://docs.openclaw.ai/start/wizard
- Debug checklist: https://docs.openclaw.ai/help/faq#first-60-seconds-if-somethings-broken
โ Node service โ LaunchAgent not installed โ
โ Agents โ 1 total ยท 1 bootstrapping ยท 0 active ยท 0 sessions โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Channel โ Enabled โ State โ Detail โ
โโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Agents
โโโโโโโโโโโโโโฌโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Agent โ Bootstrap โ Sessions โ Active โ Store โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ main โ PENDING โ 0 โ unknown โ ~/.openclaw/agents/main/ โ
โ โ โ โ โ sessions/sessions.json โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /Users/pieman/.openclaw/openclaw.json
Bind: loopback
โ Config: /Users/pieman/.openclaw/openclaw.json
โ Restart sentinel: none
Gateway last log line:
Set gateway.auth.token (or OPENCLAW_GATEWAY_TOKEN), or pass --token.
โ Port 18789
! Tailscale: off ยท unknown
error: Error: spawn tailscale ENOENT
โ Skills: 22 eligible ยท 0 missing ยท /Users/pieman/.openclaw/workspace
Gateway logs (tail, summarized): /Users/pieman/.openclaw/logs
stderr: /Users/pieman/.openclaw/logs/gateway.err.log
Config was last written by a newer OpenClaw (2026.2.26); current version is 2026.1.29.
2026-02-27T05:29:38.460Z Config was last written by a newer OpenClaw (auth is set to token, but no token is configured.
Set gateway.auth.token (or OPENCLAW_GATEWAY_TOKEN), or pass --token.
stdout: /Users/pieman/.openclaw/logs/gateway.log
! Channel issues skipped (gateway unreachable)
Gateway health:
conne
Your status --all output actually shows the core problem:
- Gateway wonโt start because auth mode is token, but no token is configured:
Set gateway.auth.token (or OPENCLAW_GATEWAY_TOKEN), or pass --token. - Also thereโs a version mismatch:
Config was last written by a newer OpenClaw (2026.2.26); current version is 2026.1.29.
Do this on the Mac in Terminal:
1) Update OpenClaw CLI to match (recommended)
Either use the macOS app Settings โ General โ โInstall CLIโ (best), or run:
openclaw update --channel stable
openclaw --version
2) Generate the missing gateway token + restart
openclaw doctor --generate-gateway-token
openclaw gateway restart
openclaw gateway status
If for some reason Doctor doesnโt set it, set one manually (donโt paste the token into Discord):
openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
openclaw gateway restart
3) Try the wizard again
After the gateway is running, the DMG app wizard should start normally.
Notes:
- The
spawn tailscale ENOENTline is not fatal (it just means Tailscale isnโt installed).
- If it still fails after this, paste the output of:
openclaw gateway status tail -n 50 /Users/pieman/.openclaw/logs/gateway.err.log
openclaw update --channel stable
openclaw --version this woked upating it to hte enw veriosn
Nice โ that version mismatch was one of the blockers.
Next step is the missing gateway token (the log line auth is set to token, but no token is configured).
Run these:
openclaw doctor --generate-gateway-token
openclaw gateway restart
openclaw gateway status
If gateway status still says it canโt start / no token, set one manually:
openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
openclaw gateway restart
Then try the DMG wizard again.
If it still errors, paste the last ~30 lines of:
tail -n 30 ~/.openclaw/logs/gateway.err.log
Tighten permissions on ~/.openclaw to 700?
โ โ Yes / โ No
Pick Yes.
That prompt is openclaw doctor trying to fix a common macOS issue where the state dir (~/.openclaw) has overly-loose permissions. Setting it to 700 just means โonly your user can read/write itโ (good for tokens/credentials) and it usually unblocks wizard/gateway startup.
After you select Yes and Doctor finishes, run:
openclaw gateway restart
openclaw gateway status
If gateway status still complains about a missing token, paste the error text (not the token).
Doctor changes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ - Tightened permissions on ~/.openclaw to 700 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Gateway service config โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ - Gateway service PATH missing required dirs: /Users/pieman/.nvm โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Update gateway service config to the recommended defaults now?
โ โ Yes / โ No
โ
Choose Yes.
Thatโs a super common macOS + nvm issue: the LaunchAgent/service runs in a non-interactive shell, so it doesnโt see your nvm Node, and then the gateway canโt start (which makes the wizard fail).
After you select Yes, do:
openclaw gateway restart
openclaw gateway status
If RPC probe is still failing after that, paste openclaw gateway status output and the last ~30 lines of:
tail -n 30 ~/.openclaw/logs/gateway.err.log
ogs: /Users/pieman/.openclaw/logs/gateway.log
โ
โ Security โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ - No channel security warnings detected. โ
โ - Run: openclaw security audit --deep โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Skills status โโโโโโโโโโโโโฎ
โ โ
โ Eligible: 22 โ
โ Missing requirements: 29 โ
โ Blocked by allowlist: 0 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Plugins โโโโโโโฎ
โ โ
โ Loaded: 4 โ
โ Disabled: 33 โ
โ Errors: 0 โ
โ โ
โโโโโโโโโโโโโโโโโโฏ
โ
โ Enable zsh shell completion for openclaw?
โ โ Yes / โ No
โ
That prompt is just optional CLI sugar.
- If your default shell is zsh (most macOS installs): pick Yes.
- If you donโt care / want to minimize changes: pick No.
Either way it wonโt affect the wizard.
After Doctor finishes, run:
openclaw gateway restart
openclaw gateway status
If gateway status shows RPC probe: ok, go back to the DMG app and start the wizard again. If itโs still not ok, paste the openclaw gateway status output (you can omit anything that looks like a token).
Memory search is enabled but no embedding provider is configured. โ
โ Semantic recall will not work without an embedding provider. โ
โ Gateway memory probe for default agent is not ready: No API key found โ
โ for provider "openai". Auth store: โ
โ
โ โ
โ
โ โ
โ
โ โ
โ No API key found for provider
โ โ
โ Fix (pick one): โ
โ - Set OPENAI_API_KEY, GEMINI_API_KEY, VOYAGE_API_KEY, or โ
โ MISTRAL_API_KEY in your environment โ
โ - Configure credentials: openclaw configure --section model โ
โ - For local embeddings: configure โ
โ agents.defaults.memorySearch.provider and local model path โ
โ - To disable: openclaw config set agents.defaults.memorySearch.enabled โ
โ false โ
โ โ
โ Verify: openclaw memory status --deep โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Run "openclaw doctor --fix" to apply changes.
โ
โ Doctor complete.
Perfect โ Doctor completed. That message is not the wizard-start failure anymore; itโs just warning you that semantic memory search wonโt work until you configure an embeddings provider (OpenAI/Voyage/Gemini/Mistral, or local embeddings).
You have 2 options:
Option A (recommended): ignore for now and continue onboarding
This does not block the Gateway/wizard. Go back to the macOS app and try starting the wizard again.
Also run:
openclaw gateway status
You want RPC probe: ok.
Option B: disable memory search for now (quick + clean)
If you donโt have an API key yet:
openclaw config set agents.defaults.memorySearch.enabled false
openclaw gateway restart
Option C: enable it properly
Run:
openclaw configure --section model
โฆand add an API key (for embeddings), then:
openclaw memory status --deep
If you paste openclaw gateway status output, I can confirm the gateway is healthy and the app wizard should work.
Service: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-02-26.log
Command: /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 34692, state active)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
pieman@PIEMANs-MacBook-Pro ~ %
Thatโs the good output โ your Gateway is up and healthy:
- LaunchAgent loaded
- Runtime: running
- RPC probe: ok
- Listening on 127.0.0.1:18789
So the original โcanโt start wizardโ should be resolved now.
Next steps:
- Open the DMG app again and try the wizard.
- If it still complains, bypass the app UI and run the wizard directly (same flow):
openclaw onboard
Optional (doesnโt block anything): the memory warning you saw earlier just means you havenโt set an embeddings API key yet.
If the DMG app still errors, paste the exact text of the popup (or screenshot) โ at this point itโs likely an app-side issue (not the gateway).
Agent failed before reply: No API key found for provider "anthropic". Auth store: /Users/pieman/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /Users/pieman/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir. Logs: openclaw logs --follow
That means the wizard/gateway is running now, but your agentโs default model/provider is set to Anthropic and you havenโt added Anthropic credentials yet.
You can fix it one of these ways (donโt paste any keys/tokens into Discord):
Option 1 (easiest): run the model/auth config wizard
openclaw configure --section model
Pick Anthropic, then enter either an Anthropic API key or an Anthropic setup-token (subscription path).
Option 2: paste an Anthropic token directly (CLI)
openclaw models auth paste-token --provider anthropic
It will prompt you to paste the secret locally.
If youโre using a Claude subscription (setup-token)
Generate a setup-token with Claude Code:
claude setup-token
Then paste it into OpenClaw using the paste-token command above.
Verify
After setting it up:
openclaw models status
If you tell me whether youโre using Anthropic API key or Claude subscription, I can point you to the cleanest path for that.
โ Where will the Gateway run?
โ โ Local (this machine) (Gateway reachable (ws://127.0.0.1:18789))
โ โ Remote (info-only)
โ
Pick Local (this machine).
Your Gateway is already healthy on ws://127.0.0.1:18789, so local mode is the right choice.
After that, when it asks about models/auth, make sure you either:
- enter an Anthropic API key, or
- use the Anthropic setup-token flow (Claude subscription)
That will fix the โNo API key found for provider anthropicโ error you hit earlier.
teway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (state active)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /Users/pieman/.openclaw/openclaw.json
Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-02-26.log
Launchd stdout (if installed): /Users/pieman/.openclaw/logs/gateway.log
Launchd stderr (if installed): /Users/pieman/.openclaw/logs/gateway.err.log
Other gateway-like services detected (best effort):
- ai.openclaw.mac (user, plist: /Users/pieman/Library/LaunchAgents/ai.openclaw.mac.plist)
Cleanup hint: launchctl bootout gui/$UID/ai.openclaw.gateway
Cleanup hint: rm ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).
If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
pieman@PIEMANs-MacBook-Pro ~ %
That output means the LaunchAgent is installed, but the gateway process exits immediately (so the wizard canโt talk to it).
The next thing we need is the crash reason from stderr, and (on macOS) itโs very often a bad Node path like /usr/local/bin/node not existing anymore.
Run these and paste the outputs (donโt paste any tokens if you see them):
1) Show the actual error
tail -n 80 ~/.openclaw/logs/gateway.err.log
tail -n 40 ~/.openclaw/logs/gateway.log
2) Verify the Node path the service is using exists
Your service command says it runs:
/usr/local/bin/node ...
So check:
ls -l /usr/local/bin/node
/usr/local/bin/node -v
which node
node -v
3) Try a restart once (in case it was mid-restart)
openclaw gateway restart
openclaw gateway status
Common outcomes:
- If
ls -l /usr/local/bin/nodesays No such file (or points to a dead symlink), the LaunchAgent will always exit instantly โ we fix the gateway service to use the correct Node. - If logs show something like EADDRINUSE / port in use / multiple gateways โ weโll stop the extra service (you have
ai.openclaw.macdetected too), but letโs confirm from logs first.
ail -n 40 ~/.openclaw/logs/gateway.log
2026-02-27T05:49:12.331Z [skills-remote] remote bin probe timed out (PIEMANโs MacBook Pro (c6e7f293ed49a426333b1295a8da670340747d4fb9031cbb9cebacffd940dbab)); check node connectivity for PIEMANโs MacBook Pro (c6e7f293ed49a426333b1295a8da670340747d4fb9031cbb9cebacffd940dbab)
2026-02-27T05:49:34.021Z [diagnostic] lane task error: lane=main durationMs=5
That gateway.log snippet isnโt the crash โ itโs just a warning from a running process earlier. The reason itโs exiting immediately will almost always be in stderr (gateway.err.log) or the /tmp/openclaw/...log file.
Can you paste these:
tail -n 120 ~/.openclaw/logs/gateway.err.log
and also:
ls -t /tmp/openclaw/openclaw-*.log | head -3
tail -n 120 /tmp/openclaw/openclaw-2026-02-26.log
Also quick check (this is a very common cause on Apple Silicon / Homebrew):
uname -m
ls -l /usr/local/bin/node
ls -l /opt/homebrew/bin/node
If /usr/local/bin/node is missing (or a broken symlink), the LaunchAgent command you showed will fail instantly, and weโll fix it by reinstalling the gateway service to point at the correct Node path.
pieman@PIEMANs-MacBook-Pro ~ % uname -m
ls -l /usr/local/bin/node
ls -l /opt/homebrew/bin/node
arm64
-rwxr-xr-x 1 root wheel 220243216 Feb 10 2025 /usr/local/bin/node
ls: /opt/homebrew/bin/node: No such file or directory
pieman@PIEMANs-MacBook-Pro ~ %
Cool โ /usr/local/bin/node exists and is executable, so this isnโt the usual โservice points at missing Nodeโ problem.
Next we need the actual crash reason (itโll be in gateway.err.log). Please do this:
- Restart the gateway, then immediately grab the error tail:
openclaw gateway restart
sleep 2
openclaw gateway status
tail -n 120 ~/.openclaw/logs/gateway.err.log
- Also check if something else is already holding the port (would cause the service to exit with
EADDRINUSE):
lsof -nP -iTCP:18789 -sTCP:LISTEN
Paste the outputs (especially the gateway.err.log tail). That will tell us whether itโs a port conflict, a config/auth issue, or something else causing the LaunchAgent to exit immediately.
onn=20573807-58a2-4da8-bd8d-18a22708d561 remote=127.0.0.1 fwd=n/a origin=http://127.0.0.1:18789 host=127.0.0.1:18789 ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15 code=1008 reason=unauthorized: gateway token missing (open the dashboard URL and paste the token in Control UI settings)
2026-02-27T05:55:46.482Z [ws] unauthorized conn=cacdb44c-04c3-4517-85dd-67481d5bd8ab remote=127.0.0.1 client=openclaw-control-ui webchat vdev reason=token_missing
2026-02-27T05:55:46.487Z [ws] closed before connect conn=cacdb44c-04c3-4517-85dd-67481d5bd8ab remote=127.0.0.1 fwd=n/a origin=http://127.0.0.1:18789 host=127.0.0.1:18789 ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15 code=1008 reason=unauthorized: gateway token missing (open the dashboard URL and paste the token in Control UI settings)
2026-02-27T05:55:57.869Z [ws] unauthorized conn=e337b37e-3f6f-4798-b419-e661
Those log lines are actually good news: the Gateway is up โ your browser/app is just trying to connect without the token, so it gets rejected:
reason=unauthorized: gateway token missing
Fix: paste the Gateway token into Control UI (donโt paste it into Discord)
- On the Mac, get the token (locally):
openclaw config get gateway.auth.token
- Open the dashboard:
- Go to: http://127.0.0.1:18789/ (or run
openclaw dashboard)
- In the Control UI, open Gateway Access and paste the token:
- Control โ Overview โ Gateway Access
- Paste into Gateway Token
- Click Connect
Then retry the macOS app wizard.
If openclaw config get gateway.auth.token prints nothing/null, generate one and restart:
openclaw doctor --generate-gateway-token
openclaw gateway restart
โ Start gateway service now?
โ Yes
Error: launchctl kickstart failed: Could not find service "ai.openclaw.gateway" in domain for user gui: 501
๐ฆ OpenClaw 2026.2.26 (bc50708)
I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.
Gateway restart failed: Error: launchctl kickstart failed: Could not find service "ai.openclaw.gateway" in domain f
That error means macOS launchd doesnโt have a job named ai.openclaw.gateway loaded, so launchctl kickstart canโt restart it.
This usually happens when:
- the gateway service was never installed, or
- you have the other service label (
ai.openclaw.mac) loaded instead (your earlier status hinted at that).
Run these in Terminal and paste the output:
ls -l ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl list | grep -i openclaw || true
Then fix it by reinstalling the gateway LaunchAgent:
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
If launchctl list shows ai.openclaw.mac but still no ai.openclaw.gateway, tell me and Iโll give you the clean โkeep one gateway per machineโ cleanup steps (I donโt want to suggest bootout/removals blindly).
Gateway start failed: Error: launchctl kickstart failed: Could not find service "ai.openclaw.gateway" in domain for user gui: 501
bash-3.2$ openclaw gateway status
Service config looks out of date or non-standard.
Service config issue: Gateway service PATH missing required dirs: /Users/pieman/.nvm
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
That kickstart failed: Could not find service "ai.openclaw.gateway" means launchd doesnโt have the Gateway LaunchAgent loaded (so thereโs nothing to start/restart yet).
On macOS the fix is to (re)install the LaunchAgent, then start it (no data loss; it just reinstalls the service wrapper).
Run this in Terminal (no sudo):
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
If it still says it canโt find the service, paste the output of:
ls -l ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl list | grep -i openclaw || true
openclaw gateway status
(You previously had another job detected: ai.openclaw.mac. The launchctl list output will tell us if youโve got 2 competing OpenClaw services, or if the gateway one simply isnโt bootstrapped.)
That message is basically: your LaunchAgent/service environment is missing your nvm dirs, so the service config is considered โnon-standard/out of dateโ.
On macOS the clean fix is:
- Re-run Doctor in repair mode and accept the service update prompts:
openclaw doctor --repair
When it asks to update the gateway service config to recommended defaults โ Yes.
- (Re)install + start the LaunchAgent
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
If you still get the โCould not find service ai.openclaw.gatewayโ error after gateway install, paste:
ls -l ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl list | grep -i openclaw || true
(And yeah: donโt paste any gateway token into Discord.)
OpenClaw doctor
โ
โ State integrity โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Recommendation: run a single gateway per machine for most setups. โ
โ One gateway supports multiple agents. โ
โ If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + โ
โ config/state (see docs: /gateway#multiple-gateways-same-host). โ
โ
โ Gateway service config โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ - Gateway service PATH missing
Youโre super close โ what you ran there is openclaw doctor in readโonly mode. Itโs detecting:
- multiple gateway-ish services on the machine (it wants only one), and
- your LaunchAgent/service PATH is missing your nvm dirs (common on macOS because services donโt load your shell env)
Do this next (this is the โapply the fixesโ step):
1) Apply Doctorโs fixes
openclaw doctor --fix
When it asks about updating the gateway service config / PATH โ choose Yes.
2) Reinstall + start the gateway LaunchAgent
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
3) If it still says โcould not find service ai.openclaw.gatewayโ
Paste these two outputs (theyโre safe):
launchctl list | grep -i openclaw || true
openclaw gateway status --deep
That will tell us whether your machine is running the gateway under a different label (like ai.openclaw.mac) so we can cleanly end up with one running gateway.
(And separate thing: youโll still need to add a model key later โ but first we need the service reliably running.)
can i not fully unsitall it ?? makes it esaser ?
Memory search is enabled but no embedding provider is configured. โ
โ Semantic recall will not work without an embedding provider. โ
โ โ
โ โ
โ Fix (pick one): โ
โ - Set OPENAI_API_KEY, GEMINI_API_KEY, VOYAGE_API_KEY, or MISTRAL_API_KEY in your โ
โ environment โ
โ - Configure credentials: openclaw configure --section model โ
โ - For local embeddings: configure agents.defaults.memorySearch.provider and local โ
โ model path โ
โ - To disable: openclaw config set agents.defaults.memorySearch.enabled false โ
โ โ
โ Verify: openclaw memory status --deep โ
โ
Yeah โ if you want the โclean slateโ route, you can absolutely uninstall and start fresh.
Youโve got LaunchAgent/service drift + maybe multiple OpenClaw services, so a reset/uninstall can be the fastest way out.
Option A (usually enough): reset (keeps CLI installed)
This wipes local config/creds/sessions, but doesnโt uninstall the app/CLI:
openclaw reset
(You can preview with openclaw reset --dry-run.)
Docs: https://docs.openclaw.ai/cli/reset
Option B (full uninstall): remove everything
Close the OpenClaw mac app first, then run:
openclaw uninstall
If you want it fully non-interactive:
openclaw uninstall --all --yes --non-interactive
Docs: https://docs.openclaw.ai/install/uninstall
After that, reinstall and run the wizard/onboarding again (openclaw onboard).
Tell me which one you prefer (reset vs full uninstall) and Iโll tell you the exact โnext 2 commandsโ after it finishes.
That warning is safe to ignore for now โ itโs only about semantic memory search (embeddings). It wonโt stop the gateway or wizard from working.
If you want to silence it until later, run:
openclaw config set agents.defaults.memorySearch.enabled false
openclaw gateway restart
Or, if you do want it enabled, youโll need to add an embeddings API key via:
openclaw configure --section model
Either way: this isnโt the thing thatโs breaking your install.
After that, reinstall and run the wizard/onboarding again (openclaw onboard).
hwo to reisntall
If you did a full uninstall, reinstalling on macOS is basically:
Option 1 (recommended): reinstall via the installer script (sets up CLI cleanly)
- In Terminal run:
curl -fsSL https://openclaw.ai/install.sh | bash
- Then run the onboarding wizard (and install the LaunchAgent):
openclaw onboard --install-daemon
That should recreate ~/.openclaw/โฆ, reinstall the gateway service, etc.
Option 2: reinstall the DMG app
- Download the latest OpenClaw.dmg again (same place you got it before)
- Drag OpenClaw.app โ Applications
- Open the app โ Settings โ General โ Install CLI
- Then run in Terminal:
openclaw onboard --install-daemon
If you tell me which uninstall you ran (openclaw reset vs openclaw uninstall --all), I can tell you the exact โnext commandโ to confirm everything is clean before reinstall.
how unsitall the cli
To uninstall the OpenClaw CLI on macOS:
1) (Recommended) stop + remove the Gateway service first
If you installed the LaunchAgent:
openclaw gateway stop
openclaw gateway uninstall
2) Uninstall the CLI package (pick the tool you used)
Most installs are via npm:
npm rm -g openclaw
If you installed via pnpm instead:
pnpm remove -g openclaw
3) Verify itโs gone
which openclaw
openclaw --version
If which openclaw still prints a path, paste that line here and Iโll tell you whatโs left.
zsh: command not found: openclaw
pieman@PIEMANs-MacBook-Pro ~ % openclaw onboard --install-daemon
zsh: command not found: openclaw means the CLI isnโt installed (or not on your PATH) right now โ so openclaw onboard ... canโt run yet.
Reinstall the OpenClaw CLI (fastest)
In Terminal:
curl -fsSL https://openclaw.ai/install.sh | bash
Then close Terminal and open it again, and verify:
openclaw --version
Then run onboarding:
openclaw onboard --install-daemon
Alternative (if youโre using the DMG app)
Open the OpenClaw app โ Settings โ General โ โInstall CLIโ, then reopen Terminal and run the same two commands.
If openclaw is still โnot foundโ after install
Paste the output of:
node -v
npm -v
npm config get prefix
echo $PATH
ls -l "$(npm config get prefix)/bin/openclaw" || true
Docs: https://docs.openclaw.ai/install and uninstall reference: https://docs.openclaw.ai/install/uninstall
Refreshing loaded gateway service
โ Gateway service metadata refreshed
โ Restarting gateway service failed โ re-run with --verbose for details
Gateway restart failed: Error: launchctl kickstart failed: Could not find service "ai.openclaw.gateway" in domain for user gui: 501
! Gateway service restart failed; continuing
๐ฆ OpenClaw installed successfully (2026.2.26)!
Home sweet home. Don't worry, I won't rearrange the furniture.
ยท Config already present; running doctor
ยท Running doctor to migrate settings
โ Doctor complete
ยท Config already present; skipping onboarding
ยท Starting setup
That error means the macOS LaunchAgent named ai.openclaw.gateway isnโt loaded/installed, so when OpenClaw tries to kickstart (restart) it, launchd says โservice not foundโ.
Do this (and quit the OpenClaw mac app while doing it, just to avoid competing services):
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
If it still says it canโt find ai.openclaw.gateway, paste the output of:
ls -l ~/Library/LaunchAgents/ai.openclaw.gateway.plist
launchctl list | grep -i openclaw || true
openclaw gateway status --deep
(That will show whether you only have ai.openclaw.mac loaded, or something else is going on.)
Gateway start failed: Error: launchctl kickstart failed: Could not find service "ai.openclaw.gateway" in domain for user gui: 501
That error is very specific: launchd does not currently have a loaded job with the label ai.openclaw.gateway, so kickstart canโt restart it.
Letโs confirm whatโs actually installed/loaded on your Mac.
Run these exact commands and paste the output:
ls -la ~/Library/LaunchAgents | grep -i openclaw || true
launchctl list | grep -i openclaw || true
openclaw gateway status --deep
Then try reinstalling the LaunchAgent with verbose logging (this should create + load the ai.openclaw.gateway job):
openclaw gateway install --force --verbose
Two common outcomes:
- Youโll see that the plist doesnโt exist (so thereโs nothing for launchd to load) โ
gateway installwill fix it. - Or youโll see you actually have a different label loaded (earlier I saw hints of
ai.openclaw.mac) โ weโll pick one service label and cleanly standardize on it.
(Also: make sure the OpenClaw macOS app is quit while doing this, so it doesnโt install/manage a second service.)
Other gateway-like services detected (best effort):
- ai.openclaw.mac (user, plist: /Users/pieman/Library/LaunchAgents/ai.openclaw.mac.plist)
Cleanup hint: launchctl bootout gui/$UID/ai.openclaw.gateway
Cleanup hint: rm ~/Library/LaunchAgents/ai.openclaw.gateway.plist
That explains the weirdness: you donโt have a launchd job called ai.openclaw.gateway โ you have one called ai.openclaw.mac.
OpenClawโs macOS services are named like:
- default profile โ
ai.openclaw.gateway - named profile
<profile>โai.openclaw.<profile>(soai.openclaw.mac== profile namemac)
So right now your commands (without a profile) are trying to restart ai.openclaw.gateway, but your installed service is ai.openclaw.mac.
Option A (easiest): manage the existing mac profile service
Run:
openclaw --profile mac gateway status
openclaw --profile mac gateway restart
If that works: keep using --profile mac for gateway commands.
Option B: switch back to the default service name (ai.openclaw.gateway)
This removes the mac profileโs gateway service and installs the default one:
openclaw --profile mac gateway stop
openclaw --profile mac gateway uninstall
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
If you paste the output of this, we can confirm you end up with one gateway service running (recommended).
Docs note (profiles/service labels): https://docs.openclaw.ai/platforms/macos and multiple-gateways/profiles: https://docs.openclaw.ai/gateway/multiple-gateways
Installed LaunchAgent: /Users/pieman/Library/LaunchAgents/ai.openclaw.gateway.plist
Logs: /Users/pieman/.openclaw/logs/gateway.log
Nice โ that means the correct LaunchAgent (ai.openclaw.gateway) is now installed.
Next run:
openclaw gateway start
openclaw gateway status
Youโre aiming for Runtime: running and RPC probe: ok.
If itโs running but the dashboard/control UI says unauthorized / token missing, generate/set a token and restart:
openclaw doctor --generate-gateway-token
openclaw gateway restart
Then open http://127.0.0.1:18789/ and paste the token into Control โ Overview โ Gateway Access โ Gateway Token โ Connect.
After the gateway is solid, the next blocker youโll hit is model auth (โNo API key found for provider anthropicโ) โ fix with:
openclaw configure --section model
Paste openclaw gateway status output if itโs still not RPC probe: ok.
Runtime: stopped (state active)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /Users/pieman/.openclaw/openclaw.json
Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-02-27.log
Launchd stdout (if installed): /Users/pieman/.openclaw/logs/gateway.log
Launchd stderr (if installed): /Users/pieman/.openclaw/logs/gateway.err.log
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
pieman@PIEMANs-MacBook-Pro ~ %
Got it โ now the LaunchAgent exists, but the gateway process is crashing on startup (โloaded but not running / exited immediatelyโ).
On macOS thatโs almost always one of these:
- Node version too old (OpenClaw needs Node >= 22), or
- Gateway auth is set to
tokenbut the token is missing, so the gateway refuses to start.
Run these and paste the output (donโt paste any actual token value):
1) Check Node + OpenClaw versions
node -v
openclaw --version
2) Check whether a gateway token is configured
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.token
If gateway.auth.token is empty/null โ generate one:
openclaw doctor --generate-gateway-token
3) Paste the crash reason (this is the key part)
tail -n 120 ~/.openclaw/logs/gateway.err.log
tail -n 120 /tmp/openclaw/openclaw-2026-02-27.log
4) Try starting again
openclaw gateway start
openclaw gateway status
Once you paste the gateway.err.log tail, I can tell you the exact fix in one step.
OPENCLAW_REDACTED
Looks like you pasted a secret (probably your gateway token / key) and it got redacted as __OPENCLAW_REDACTED__. Donโt paste that stuff in Discord.
To figure out why the LaunchAgent starts then exits immediately, we need the non-secret error logs.
Please run these and paste the output:
node -v
openclaw --version
openclaw gateway start
openclaw gateway status
tail -n 120 ~/.openclaw/logs/gateway.err.log
tail -n 120 "$(ls -t /tmp/openclaw/openclaw-*.log | head -1)"
Also paste these (safe; no secrets):
openclaw config get gateway.mode
openclaw config get gateway.auth.mode
Most common causes at this point:
- Node < 22 (gateway will exit)
- token auth enabled but token missing (gateway refuses to start)
- config schema error (gateway refuses to start; details in
gateway.err.log)
Once you paste gateway.err.log, we can usually fix it with one command.
Runtime: stopped (state active)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /Users/pieman/.openclaw/openclaw.json
Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-02-27.log
Launchd stdout (if installed): /Users/pieman/.openclaw/logs/gateway.log
Launchd stderr (if installed): /Users/pieman/.openclaw/logs/gateway.err.log
Service config looks out of date or non-standard.
Service config issue: Gateway service PATH missing required dirs: /Users/pieman/.nvm
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
That status output only tells us โit exited immediatelyโ โ the reason will be in stderr or the /tmp/openclaw log.
Please paste the output of these (they should not include secrets):
node -v
openclaw --version
tail -n 200 ~/.openclaw/logs/gateway.err.log
tail -n 200 /tmp/openclaw/openclaw-2026-02-27.log
And check for a port conflict (common if another OpenClaw service is still around):
lsof -nP -iTCP:18789 -sTCP:LISTEN || true
If you want the fastest โshow me the real errorโ path, you can also run the gateway in the foreground (then copy/paste the error it prints):
openclaw gateway --port 18789 --verbose
(Stop it with Ctrl+C after youโve copied the error.)
That โPATH missing required dirs: /Users/pieman/.nvmโ warning is about the LaunchAgent environment (services donโt load your shell/nvm). It can definitely cause โexited immediatelyโ if the service canโt find the right Node/npm bits.
Do this (this is the โapply the fixโ version of doctor):
openclaw doctor --repair
When it asks to update the gateway service config to recommended defaults โ Yes.
Then:
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
If it still exits immediately after that, we must look at stderr:
tail -n 200 ~/.openclaw/logs/gateway.err.log
tail -n 200 "$(ls -t /tmp/openclaw/openclaw-*.log | head -1)"
Paste those tails and weโll know exactly why itโs dying.
{"runtime":"node","runtimeVersion":"22.14.0","hostname":"unknown","name":"openclaw","date":"2026-02-27T06:30:05.138Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///usr/local/lib/node_modules/openclaw/dist/entry.js:2206:46","fileName":"entry.js","fileNameWithLine":"entry.js:2206","fileColumn":"46","fileLine":"2206","filePath":"usr/local/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":"usr/local/lib/node_modules/openclaw/dist/entry.js:2206","method":"console.log"}},"time":"2026-02-27T06:30:05.140Z"}
{"0":"2026.2.26","_meta":
Good โ that confirms the basics are fine:
- Node 22.14.0 โ (new enough)
- OpenClaw 2026.2.26 โ
Now we need the actual reason the Gateway service exits immediately โ it will be in gateway.err.log or the /tmp/openclaw log. Please run this exact block and paste the output:
tail -n 200 ~/.openclaw/logs/gateway.err.log
echo "-----"
tail -n 200 /tmp/openclaw/openclaw-2026-02-27.log
echo "-----"
openclaw config get gateway.mode
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.token
Notes:
- If
gateway.auth.tokenprints a token, do not paste it hereโjust tell me if itโs empty/null or set. - The error weโre looking for is usually something like โtoken missingโ, โconfig invalidโ, or โport already in useโ.
If you want the fastest โprint the crash to the screenโ method, run the gateway in the foreground once:
openclaw gateway --port 18789 --verbose
Copy/paste the first error it prints.
[skills-remote] remote bin probe timed out (PIEMANโs MacBook Pro (c6e7f293ed49a426333b1295a8da670340747d4fb9031cbb9cebacffd940dbab)); check node connectivity for PIEMANโs MacBook Pro (c6e7f293ed49a426333b1295a8da670340747d4fb9031cbb9cebacffd940dbab)
That line:
[skills-remote] remote bin probe timed out ...
is not the gateway crash reason โ itโs just a warning from the skills-remote plugin and can be ignored for now.
Your Gateway is still โexited immediatelyโ, and the real reason will be in stderr or a port conflict (often because ai.openclaw.mac is still around).
Run these and paste the output:
openclaw gateway start
openclaw gateway status --deep
echo "---- gateway.err ----"
tail -n 200 ~/.openclaw/logs/gateway.err.log
echo "---- /tmp log ----"
tail -n 200 /tmp/openclaw/openclaw-2026-02-27.log
echo "---- listeners ----"
lsof -nP -iTCP:18789 -sTCP:LISTEN || true
echo "---- launchd jobs ----"
launchctl list | grep -i openclaw || true
If you see anything like EADDRINUSE in the logs or something listening on :18789, thatโs the smoking gun (two services fighting). If you see โtoken missing / config invalidโ, weโll fix that next.
Also: donโt paste any tokens/keysโjust logs/errors.
my mac had pop of node js connecting
That popup is almost certainly the macOS Firewall prompt like:
โDo you want the application โnodeโ to accept incoming network connections?โ
Thatโs normal โ OpenClawโs Gateway is a Node process, so macOS shows it as node.
What to click: choose Allow.
If you clicked Deny earlier, fix it here:
- System Settings โ Network โ Firewall โ Optionsโฆ
- Find node (or โOpenClawโ) and set it to Allow incoming connections
- Then restart the gateway:
openclaw gateway start
openclaw gateway status
If it still says Runtime: stopped, paste the error log (it usually contains the real reason it exited). This is safe to share as-is; if you see a long token-looking string, replace it with <redacted>:
tail -n 120 ~/.openclaw/logs/gateway.err.log
unauthorized conn=506c3716-94cc-422f-8640-e36511db89df remote=127.0.0.1 client=openclaw-control-ui webchat vdev reason=token_missing
06:42:18 [ws] closed before connect conn=506c3716-94cc-422f-8640-e36511db89df remote=127.0.0.1 fwd=n/a origin=http://127.0.0.1:18789 host=127.0.0.1:18789 ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15 code=1008 reason=unauthorized: gateway token missing (open the dashboard URL and paste the token in Control UI settings)
06:42:18 [ws] โ close code=1008
Those lines mean the Gateway is running fine โ your browser/Control UI is trying to connect without auth, so it gets rejected:
reason=token_missing / gateway token missing
Fix (donโt paste the token into Discord)
- Get the token on your Mac:
openclaw config get gateway.auth.token
- Open the dashboard:
- http://127.0.0.1:18789/ (or run
openclaw dashboard)
- In the Control UI go to:
Control โ Overview โ Gateway Access
There are two boxes (Token + Password). Paste into Gateway Token, then click Connect.
If the token command prints nothing / null
Generate one and restart:
openclaw doctor --generate-gateway-token
openclaw gateway restart
After you paste the token in the UI once, the โunauthorized / token_missingโ spam should stop.
i get open calw readcted in termainl
OPENCLAW_REDACTED is expected when a token/key would otherwise show up in something you paste/share (OpenClaw tries hard to stop you from leaking secrets into Discord).
You do not need to paste the token into Discord โ you only need to paste it into the Control UI on your Mac.
Do this on your Mac:
- Get the token locally (Terminal):
openclaw config get gateway.auth.token
Copy that value but donโt post it here.
- Open the dashboard:
- In the dashboard go to:
Control โ Overview โ Gateway Access โ paste into Gateway Token โ Connect
If openclaw config get gateway.auth.token shows redacted even in your Terminal, open this file locally and copy it from there:
~/.openclaw/openclaw.json (look for gateway.auth.token)
Tell me: do you see the token normally in Terminal and it only gets redacted when pasting into Discord, or is it literally redacted in Terminal output too?
unauthorized: too many failed authentication attempts (retry later)
That means the Control UI (or the macOS app) has been auto-retrying with the wrong/empty token so many times that the gateway temporarily rate-limited auth.
Do this to โunstickโ it:
-
Close every OpenClaw dashboard tab/window (important โ otherwise it keeps failing in the background)
-
Restart the gateway
openclaw gateway restart
-
Wait ~60 seconds
-
Open the dashboard in a Private/Incognito window (so it doesnโt reuse the bad saved token):
- In the UI go to Control โ Overview โ Gateway Access and paste the token into Gateway Token, then Connect.
If youโre not sure the gateway is in token mode, run this and paste the output (safe):
openclaw config get gateway.auth.mode
If you still get locked out after restarting + private window, tell me which browser youโre using (Safari/Chrome), and Iโll give you the exact โclear site data for 127.0.0.1โ steps for that browser.
๐ฆ OpenClaw 2026.2.26 (bc50708)
Less clicking, more shipping, fewer "where did that file go" moments.
Restarted LaunchAgent: gui/501/ai.openclaw.gateway
pieman@PIEMANs-MacBook-Pro ~ %
Nice โ gateway service restarted cleanly.
Now do exactly this to avoid getting rate-limited again:
- Close all dashboard tabs (anything open at
127.0.0.1:18789). - Wait 60 seconds (auth lockout cool-down).
- Open a Private/Incognito window and go to:
http://127.0.0.1:18789/ - Paste the token into Control โ Overview โ Gateway Access โ Gateway Token, then Connect.
Get the token locally with (donโt paste it here):
openclaw config get gateway.auth.token
If it still says โtoo many failed authentication attemptsโ, tell me which browser youโre using (Safari/Chrome/Firefox) and Iโll give you the exact โclear site data for 127.0.0.1โ steps.
Restarted LaunchAgent: gui/501/ai.openclaw.gateway
Yep โ that line just confirms the service restart worked.
Now the important part is stopping the UI from hammering the gateway with a bad/empty token (thatโs what caused the โtoo many failed authentication attemptsโ lockout):
- Quit the OpenClaw mac app (for a minute) and close all tabs at
http://127.0.0.1:18789/. - Wait 1โ5 minutes (let the lockout cool down).
- Open the dashboard in a Private/Incognito window:
http://127.0.0.1:18789/ - Get the token locally (donโt paste it here):
openclaw config get gateway.auth.token
- Paste it into Control โ Overview โ Gateway Access โ Gateway Token โ Connect.
If Safari keeps auto-using the wrong token, clear the saved site data:
- Safari โ Settings โ Privacy โ Manage Website Dataโฆ โ search
127.0.0.1/localhostโ Remove
If youโre still stuck after that, paste:
openclaw gateway status
and tell me which browser youโre using (Safari/Chrome).
but im trying install thru dmg
Totally fine to install via the DMG โ the macOS app just isnโt โstandaloneโ. Under the hood it still talks to the local Gateway (Node process) and that Gateway is currently requiring a token, so the app/UI keeps getting token_missing and then rate-limits you.
Do this flow while staying on the DMG app install path:
- Quit OpenClaw.app completely (so it stops auto-retrying with a bad/empty token)
- Restart the gateway:
openclaw gateway restart
- Wait 1โ2 minutes (cooldown for โtoo many failed auth attemptsโ)
- Open the dashboard in a Private/Incognito window:
- Get your gateway token locally (copy it, donโt paste it here):
openclaw config get gateway.auth.token
- In the dashboard: Control โ Overview โ Gateway Access โ paste into Gateway Token โ Connect
- Now reopen OpenClaw.app and continue the wizard.
If youโre using Safari, you may also need to clear the saved bad token:
- Safari โ Settings โ Privacy โ Manage Website Dataโฆ โ remove
127.0.0.1/localhost
After this, the next wizard blocker is usually model credentials (e.g. Anthropic API key/setup-token), but first we need the app/dashboard successfully connected to the Gateway.
how to telergam apiriring cod eing dmg
Telegram has two different โcodesโ, and itโs easy to mix them up:
- Bot token (from @BotFather) โ used to connect OpenClaw to Telegram
- Pairing code (8 chars) โ used to approve you to DM the bot (owner approval)
A) Connect Telegram (BotFather token)
- In Telegram, talk to @BotFather โ
/newbotโ copy the bot token (keep it private). - On your Mac (where the Gateway runs), set it in config (donโt paste the token here):
openclaw config set channels.telegram.enabled true
openclaw config set channels.telegram.botToken "PASTE_BOTFATHER_TOKEN_HERE"
openclaw config set channels.telegram.dmPolicy "pairing"
openclaw gateway restart
B) Get the Telegram pairing code
- In Telegram, DM your new bot and send:
/start
- The bot should reply with a pairing code (8 characters).
C) Approve the pairing code (in Terminal on the Mac)
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
After approval, your DMs to the bot will work.
Docs:
- Telegram setup: https://docs.openclaw.ai/channels/telegram
- Pairing: https://docs.openclaw.ai/channels/pairing
If your bot doesnโt reply when you /start, paste openclaw logs --follow output (just the error lines; no tokens) and Iโll tell you whatโs missing.
why in my oepn claw cli there main and my macbook to select from
Thatโs normal โ OpenClaw has two kinds of โthingsโ and they often both show up in menus:
-
Agent = โmainโ
This is the brain/chat worker (your default assistant). Most setups have one agent namedmain. -
Node = โyour MacBook Proโ
This is a device connected to the Gateway that provides hardware/tools (screen/camera/canvas/system.run). The DMG macOS app makes your Mac show up as a node.
So when you see a prompt that looks like โselect from main and PIEMANโs MacBook Proโ:
- If itโs asking which agent โ pick
main - If itโs asking which node/device to run things on (camera/screen/exec) โ pick your MacBook Pro
If you tell me the exact command/screen where it asks you to choose (or paste 1 screenshot), I can tell you which one itโs asking for.
Useful checks:
openclaw agents list
openclaw nodes status
gents:
- main (default)
Identity: ๐ผ _(pending โ user asked for a name that can't be used; need a safe alternative) (IDENTITY.md)
Workspace: ~/.openclaw/workspace
Agent dir: ~/.openclaw/agents/main/agent
Model: openai-codex/gpt-5.3-codex
Routing rules: 0
Routing: default (no explicit rules)
Routing rules map channel/account/peer to an agent. Use --bindings for full rules.
Channel status reflects local config/creds. For live health: openclaw channels status --probe.
main and your MacBook Pro are two different things in OpenClaw:
main(default) = your agent (the โbrainโ: model + memory + workspace). You chat as this.- โPIEMANโs MacBook Proโ = a node/device (hardware surface for tools like screen/camera/canvas/
system.run). The DMG macOS app makes your Mac show up as a node.
So when something asks you to โselectโ:
- for chat / assistant / onboarding โ pick
main - for where to run device stuff (screenshots, camera, exec on the Mac) โ pick your MacBook Pro
Also in your agents output:
Identity: โฆ (pending โ user asked for a name that can't be used; need a safe alternative)
That just means the bootstrap โname your assistantโ step got an invalid name. Easiest fix: open and edit this file and choose a simple safe name (letters/numbers, no weird symbols):
~/.openclaw/workspace/IDENTITY.md
Then restart the gateway:
openclaw gateway restart
Docs: Nodes (devices) vs agents: https://docs.openclaw.ai/nodes and bootstrapping: https://docs.openclaw.ai/start/bootstrapping
set gateway.remote.token to match gateway.auth.token
That message is basically saying: โyour client config (remote token) doesnโt match what the gateway server expects (auth token).โ
A few key points:
gateway.auth.token= the token the Gateway requires (server-side).gateway.remote.token= only used when your CLI/app is in remote mode (connecting to a gateway somewhere else).
If youโre running everything locally on the Mac (DMG app)
You usually do not need gateway.remote.* at all.
Check:
openclaw config get gateway.mode
openclaw config get gateway.remote.url
If gateway.mode is local โ ignore gateway.remote.token and just paste the token into the Control UI:
Control โ Overview โ Gateway Access โ Gateway Token โ Connect.
If you accidentally ended up in remote mode
Switch back to local:
openclaw config set gateway.mode "local"
openclaw config unset gateway.remote.url
openclaw config unset gateway.remote.token
openclaw gateway restart
If you do intend to use remote mode
Then yes: set gateway.remote.token to the same value as the remote gatewayโs gateway.auth.token (copy it locally; donโt post it here).
Tell me what openclaw config get gateway.mode prints (local or remote) and Iโll tell you the exact next step.
gateway.token: gateway.token is ignored; use gateway.auth.token โ
โ instead (auto-migrated on load). โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Doctor changes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Moved gateway.token โ gateway.auth.token. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Doctor โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Run "openclaw doctor --fix" to apply compatibility migrations. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Config invalid
File: ~/.openclaw/openclaw.json
Problem:
- gateway.token: gateway.token is ignored; use gateway.auth.token instead (auto-migrated on load).
Legacy config keys detected: - gateway.token: gateway.token is ignored; use gateway.auth.token instead (auto-migrated on load).
Run: openclaw doctor --fix
Config uses "gateway.token". This key is ignored; use "gateway.auth.token" instead.
Yep โ thatโs the blocker right now: your ~/.openclaw/openclaw.json still contains the legacy key gateway.token, and newer OpenClaw treats that as config invalid (even though it can โauto-migrateโ at runtime).
Fix (recommended)
Run:
openclaw doctor --fix
openclaw gateway restart
That should rewrite the config to use gateway.auth.token and remove/replace the legacy key.
Verify (safe to paste)
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.token
(If gateway.auth.token is empty/null, generate one:)
openclaw doctor --generate-gateway-token
openclaw gateway restart
Donโt paste the token into Discord โ only paste it into the dashboard โGateway Tokenโ field.
everytime i restart my mac i need to start server ?? or token
You shouldnโt have to manually start it every reboot if the Gateway LaunchAgent is installed.
After a Mac restart, do I need to start the server?
- Normally no: the gateway runs as a macOS LaunchAgent and should auto-start when you log in.
- Quick check:
openclaw gateway status
If it says Runtime: stopped, start it:
openclaw gateway start
If it never auto-starts, reinstall the service once:
openclaw gateway install --force
Do I need a new token every time?
- No. The gateway token is stored in your config (
~/.openclaw/openclaw.jsonundergateway.auth.token) and stays the same across restarts. - You only need to paste it into the Control UI again if:
- you opened the dashboard in a Private/Incognito window, or
- your browser/site data got cleared, or
- you regenerated/changed the token.
If you did regenerate the token, the UI will keep trying the old one and youโll see โunauthorized / too many failed attemptsโ until you paste the new token in.
If you tell me what openclaw gateway status shows right after reboot (running vs stopped), I can tell you which bucket youโre in.
โโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ - ai.openclaw.mac (user, plist: โ
โ /Users/pieman/Library/LaunchAgents/ai.openclaw.mac.plist) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Cleanup hints โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ - launchctl bootout gui/$UID/ai.openclaw.gateway โ
โ - rm ~/Library/LaunchAgents/ai.openclaw.gateway.plist โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Gateway recommendation โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Recommendation: run a single gateway per machine for most setups. โ
โ One gateway supports multiple agents. โ
โ If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + โ
โ config/state (see docs: /gateway#multiple-gateways-same-host). โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ - Gateway service OPENCLAW_GATEWAY_TOKEN does not match gateway.auth.token in โ
โ openclaw.json (service token is stale) โ
โ - Gateway service PATH missing required dirs: /Users/pieman/.nvm โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
That doctor output is saying you currently have two different OpenClaw LaunchAgents on your Mac:
ai.openclaw.gateway(the normal/default gateway service)ai.openclaw.mac(a profile-named gateway service that got installed earlier)
And itโs also warning that the service is starting with a stale token (OPENCLAW_GATEWAY_TOKEN in the LaunchAgent env) that doesnโt match whatโs in your config (gateway.auth.token). That mismatch is what causes the repeated unauthorized / lockouts.
Fix = keep ONE gateway service + make its token match config
1) Remove the extra ai.openclaw.mac service (recommended)
Run:
openclaw --profile mac gateway stop
openclaw --profile mac gateway uninstall
(Thatโs safer than manually rm-ing plists.)
2) Repair the default gateway service config (PATH + token)
Run:
openclaw doctor --repair
When it asks to update the gateway service config โ Yes.
3) Re-install the default LaunchAgent using the token from your config
This forces launchdโs OPENCLAW_GATEWAY_TOKEN to match gateway.auth.token:
openclaw gateway install --force --token "$(openclaw config get gateway.auth.token)"
openclaw gateway restart
openclaw gateway status
After that, you should see only one gateway service, and the โtoken staleโ warning should be gone.
If you paste the output of:
launchctl list | grep -i openclaw || true
openclaw gateway status
I can confirm itโs cleaned up.
Config overwrite: /Users/pieman/.openclaw/openclaw.json (sha256 30ccf9eea3ee2eb1ce013d65640a99650137e47cd81099be8e810887e128cda9 -> be42d2a89fb96700415034ed5e8eb0c2747f100cc2bf30a32c4ef17df689a312, backup=/Users/pieman/.openclaw/openclaw.json.bak)
Updated ~/.openclaw/openclaw.json
Backup: ~/.openclaw/openclaw.json.bak
โ
Good โ that means OpenClaw rewrote your config and made a backup:
- New config:
~/.openclaw/openclaw.json - Backup:
~/.openclaw/openclaw.json.bak
Now do:
openclaw gateway restart
openclaw gateway status
You want Runtime: running and RPC probe: ok.
If you still see โtoken stale / does not matchโ warnings
Run the repair once more so the LaunchAgent env gets updated to match the new config:
openclaw doctor --repair
openclaw gateway restart
If you still have the extra ai.openclaw.mac service
Remove it (so you only have ONE gateway on the machine):
openclaw --profile mac gateway stop
openclaw --profile mac gateway uninstall
Then check what launchd still has:
launchctl list | grep -i openclaw || true
Once gateway status is healthy, open http://127.0.0.1:18789/ and paste the gateway token into Control โ Overview โ Gateway Access (donโt paste the token into Discord).
ou want Runtime: running and RPC probe: ok. got this
Nice โ if youโve got Runtime: running and RPC probe: ok, the Gateway side is healthy now.
Next steps (DMG path):
- Open the dashboard: http://127.0.0.1:18789/
- Paste your token in Control โ Overview โ Gateway Access โ Gateway Token โ Connect (donโt share it here).
- Finish onboarding:
- configure a model key (Anthropic/OpenAI/etc)
- then set up Telegram if you want it.
If you want to confirm thereโs only one gateway service left (so restarts are stable), run:
launchctl list | grep -i openclaw || true
Glad thatโs unstuck. If this fixed it, please mark the solution (rightโclick the solution message โ Apps โ โ Mark Solution) so Answer Overflow can index it for the next person.
openclaw --profile mac gateway stop
openclaw --profile mac gateway uninstall i did this since the dash boaed dindt open
Thatโs fine โ those two commands just removed the extra โmac profileโ gateway service (ai.openclaw.mac). It shouldnโt be needed, and removing it reduces conflicts.
Now the dashboard comes purely from the default gateway (ai.openclaw.gateway). Letโs make sure that one is up, then open it manually:
1) Check the gateway is running
openclaw gateway status
If it says stopped:
openclaw gateway start
2) Open the dashboard (donโt rely on auto-open)
Run:
openclaw dashboard
It will print the URL. You can also just open:
http://127.0.0.1:18789/
3) If it opens but says โunauthorized / token missingโ
Copy the token locally (donโt paste it here):
openclaw config get gateway.auth.token
Then in the dashboard: Control โ Overview โ Gateway Access โ Gateway Token โ Connect.
If you tell me what happens when you open http://127.0.0.1:18789/ (blank page / canโt connect / unauthorized), Iโll tell you the exact next step.
ervice: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-02-27.log
Command: /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 56809, state active)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
pieman@PIEMANs-MacBook-Pro ~ %
Perfect โ gateway is 100% healthy (Runtime: running, RPC probe: ok, listening on 127.0.0.1:18789). So if the dashboard โdidnโt openโ, itโs just a browser/UI issue, not the server.
Do this:
1) Open it manually
In your browser, go to:
http://127.0.0.1:18789/
(or run openclaw dashboard to print/open the URL)
2) If it loads but says unauthorized / token missing
Copy the token locally (donโt paste it here):
openclaw config get gateway.auth.token
Then in the UI: Control โ Overview โ Gateway Access โ Gateway Token โ Connect
3) If the page is blank / wonโt load
Tell me which browser youโre using (Safari vs Chrome). Quick things to try:
- Try a different browser
- Try a Private/Incognito window (to clear any bad saved token)
At this point youโre past the hard part โ the gateway is running correctly.
i see the toekn there automaticllly there how do i one for chrome extension
You donโt need a separate token for the Chrome extension โ it uses the same Gateway token as your dashboard:
- Extension โGateway tokenโ =
gateway.auth.token(same one you pasted into the Control UI)
Set up the Chrome extension (browser relay)
- Install the extension files to a stable folder:
openclaw browser extension install
openclaw browser extension path
- In Chrome:
- go to
chrome://extensions - enable Developer mode
- Load unpacked
- select the folder printed by
openclaw browser extension path - Pin the extension
- Open the extension Options and set:
- Port:
18792(this is default when gateway is on18789) - Gateway token: paste your Gateway token (get it with
openclaw config get gateway.auth.tokenโ donโt paste it into Discord)
- Attach to a tab:
- open the tab you want controlled
- click the extension icon โ badge should show ON
Quick test
openclaw browser --browser-profile chrome tabs
Docs: https://docs.openclaw.ai/tools/chrome-extension
If the extension shows ! or keeps failing auth, itโs almost always the wrong token/port in the extension Options.
where to get the token
On your Mac (the gateway machine), run this in Terminal:
openclaw config get gateway.auth.token
Thatโs the token you paste into:
- the Dashboard: Control โ Overview โ Gateway Access โ Gateway Token
- the Chrome extension Options: Gateway token
If that prints nothing / null, generate one:
openclaw doctor --generate-gateway-token
openclaw gateway restart
openclaw config get gateway.auth.token
Donโt paste the token into Discord (treat it like a password).
ervice: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-02-27.log
Command: /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 56809, state active)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
pieman@PIEMANs-MacBook-Pro ~ % get gateway.auth.token
You typed just get gateway.auth.token โ thatโs missing the openclaw config part.
Run this in Terminal:
openclaw config get gateway.auth.token
That prints the Gateway token (copy it, but donโt paste it into Discord). Use that same token for:
- the dashboard โGateway Tokenโ field
- the Chrome extension โGateway tokenโ field
If it prints nothing / null, generate one:
openclaw doctor --generate-gateway-token
openclaw gateway restart
openclaw config get gateway.auth.token
โOpenClaw crashes sometimesโ can mean a few different things on macOS, and the fix depends on which part is dying:
1) Gateway service exits (most common)
This is the background server (LaunchAgent). Usual causes:
- config invalid after an update (old keys, bad JSON5)
- two gateways running / port conflict on
18789 - service env drift (PATH/nvm issues, stale
OPENCLAW_GATEWAY_TOKEN) - macOS firewall/permissions prompts that got denied
Check if the gateway actually restarted or died:
openclaw gateway status
If it says โstopped / exited immediatelyโ, the reason will be in stderr:
tail -n 120 ~/.openclaw/logs/gateway.err.log
2) Control UI โdisconnectsโ but gateway is fine
This often shows up as websocket closes / unauthorized spam (not a crash). Usually itโs just wrong/missing token in the browser/extension, or too many failed attempts (rate limit).
3) Agent โfailed before replyโ
Thatโs usually missing model credentials (Anthropic/OpenAI), not a crash of the server.
If you paste these 3 outputs, I can tell you exactly which case youโre in:
openclaw --version
openclaw gateway status
tail -n 80 ~/.openclaw/logs/gateway.err.log
(Those are safe to pasteโjust donโt include any tokens/keys if you see them.)
You usually donโt have to restart it โ but there are a few cases where restarting the Gateway (โthe serverโ) is normal:
When you DO need to restart
- After config changes (token/model/channel settings): the running gateway wonโt always pick up edits.
- After updates (
openclaw update/ new DMG): the old process is still running the old code. - After fixing service env drift (PATH/nvm, stale token in LaunchAgent): restart is needed so launchd starts it with the new env.
- If you got rate-limited auth (โtoo many failed authentication attemptsโ) and the UI is stuck retrying with a bad token โ restarting + clearing the browser token is the quickest reset.
When you should NOT have to restart
- After a Mac reboot: the LaunchAgent should auto-start the gateway when you log in.
Check:openclaw gateway status
The goal state
You want:
openclaw gateway statusโRuntime: running+RPC probe: ok- Dashboard works without constantly losing auth
If you feel like youโre restarting all the time, paste:
openclaw gateway status
tail -n 80 ~/.openclaw/logs/gateway.err.log
and Iโll tell you whatโs causing the restarts (most often: token mismatch between LaunchAgent env vs config, or multiple services/port conflicts).
why does does my gate way crash after feew talks in tg
If it โcrashes after a few talks in Telegramโ, first we need to confirm whether the Gateway process actually stops, or whether Telegram just stops getting replies (pairing/auth/model issues can look like a crash).
1) Right after it โcrashesโ, check gateway status
Run on your Mac:
openclaw gateway status
- If it says Runtime: running / RPC probe: ok โ the gateway did not crash. Itโs a Telegram/model/policy issue.
- If it says Runtime: stopped โ it really crashed, and we need the error log.
2) Paste the crash reason (most important)
tail -n 120 ~/.openclaw/logs/gateway.err.log
tail -n 120 "$(ls -t /tmp/openclaw/openclaw-*.log | head -1)"
(Please redact/omit any tokens if you see them.)
3) Check Telegram channel health
openclaw channels status --probe
Common causes Iโve seen for โTelegram works a few messages then diesโ
- Gateway didnโt crash: your bot is in
dmPolicy: pairingand you didnโt approve, or sender isnโt allowlisted. - Model auth missing / rate limit: youโll see
Agent failed before reply: No API key foundโฆor429in logs (gateway stays running). - Uncaught exception: will show clearly in
gateway.err.log(stack trace).
Paste the outputs from steps 1โ3 and Iโll tell you exactly which one it is and the fix.
remeber im using dmg not cli
Using the DMG app is totally fine โ but the DMG app and the CLI both talk to the same Gateway service. So debugging still comes down to: did the Gateway actually stop, or did Telegram just stop getting replies?
First: what do you mean by โcrashโ?
When it happens, do you see:
- the OpenClaw menubar app showing Gateway Stopped / Disconnected, or
- the Gateway looks Running, but Telegram just stops replying?
Those are different problems.
If the Gateway actually stops (real crash)
The DMG app usually wonโt show the real stack trace. You need the log file:
- Open Finder โ press Cmd+Shift+G โ paste:
~/.openclaw/logs/
- Open
gateway.err.log(this is the important one) and copy/paste the last error chunk here (remove anything that looks like a token/secret).
Also check:
/tmp/openclaw/(there areopenclaw-YYYY-MM-DD.logfiles)
If the Gateway stays running (not a crash)
Then itโs usually:
- missing/expired model API key (agent โfails before replyโ),
- Telegram pairing/allowlist blocking you,
- or rate limits.
In that case, open the Dashboard (Control UI) and check the Models/Errors section.
If you paste the last ~30โ50 lines from ~/.openclaw/logs/gateway.err.log, I can tell you immediately whether itโs a real crash or just auth/policy/model.
Error: launchctl kickstart failed: Could not find service "ai.openclaw.gateway" in domain for user gui: 501
pieman@PIEMANs-MacBook-Pro ~ %
That error doesnโt mean the Gateway โcrashedโ โ it means macOS canโt find a launchd service with the label ai.openclaw.gateway, so thereโs nothing to kickstart/restart.
Fix is to (re)install the LaunchAgent, then start it:
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
If it still says โCould not find serviceโ, then youโre probably running under a profile (service label becomes ai.openclaw.<profile>). Check:
echo $OPENCLAW_PROFILE
launchctl list | grep -i openclaw || true
ls -la ~/Library/LaunchAgents | grep -i openclaw || true
- If
OPENCLAW_PROFILEshowsmac, then the service label would beai.openclaw.macand youโd use:openclaw --profile mac gateway status
Even though youโre using the DMG app: the DMG app still relies on this same LaunchAgent for โLocal gatewayโ, so getting ai.openclaw.gateway installed + running is the right path.
โ
โ Gateway target: ws://127.0.0.1:18789 โ
โ Source: local loopback โ
โ Config: /Users/pieman/.openclaw/openclaw.json โ
โ Bind: loopback
- Gateway service PATH missing required dirs: /Users/pieman/.nvm
That snippet just means your CLI/app is targeting the local loopback gateway (ws://127.0.0.1:18789). ๐
But it doesnโt say whether the LaunchAgent service is actually installed + running.
To fix the โCould not find service ai.openclaw.gatewayโ / random โgateway disappearsโ issue, run these on your Mac and paste the output:
openclaw gateway status
launchctl list | grep -i openclaw || true
ls -la ~/Library/LaunchAgents | grep -i openclaw || true
If launchctl list does NOT show ai.openclaw.gateway
Reinstall + start the service:
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
Once openclaw gateway status shows Runtime: running + RPC probe: ok, your DMG app should stop โlosingโ the gateway.
(And separate from โcrashโ: if Telegram stops replying but gateway status still says running, thatโs not a gateway crash โ itโs usually model auth / pairing / rate limit. But first letโs confirm the service exists and is loaded.)
That warning means your Gateway LaunchAgent (background service) is starting with a PATH that doesnโt include your nvm directory (/Users/pieman/.nvm). On macOS this is super common because LaunchAgents donโt load your shell setup.
Fix it by letting Doctor rewrite the service config:
openclaw doctor --repair
When it asks to update the gateway service config to recommended defaults โ Yes.
Then restart the gateway:
openclaw gateway restart
openclaw gateway status
If you still see the warning after that, paste the output of:
launchctl list | grep -i openclaw || true
Service config looks out of date or non-standard.
Service config issue: Gateway service PATH missing required dirs: /Users/pieman/.nvm
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (state active)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /Users/pieman/.openclaw/openclaw.json
Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-02-27.log
Launchd stdout (if installed): /Users/pieman/.openclaw/logs/gateway.log
Launchd stderr (if installed): /Users/pieman/.openclaw/logs/gateway.err.log
Other gateway-like services detected (best effort):
- ai.openclaw.mac (user, plist: /Users/pieman/Library/LaunchAgents/ai.openclaw.mac.plist)
Cleanup hint: launchctl bootout gui/$UID/ai.openclaw.gateway
Cleanup hint: rm ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).
If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
7823 0 ai.openclaw.mac
- -15 ai.openclaw.gateway
1108 0 application.ai.openclaw.mac.debug.1234984390.1234984396
-rw-r--r--@ 1 pieman staff 2072 Feb 27 02:22 ai.openclaw.gateway.plist
-rw-r--r--@ 1 pieman staff 875 Feb 27 02:11 ai.openclaw.mac.plist
pieman@PIEMANs-MacBook-Pro ~ %
That output shows the Gateway service is actually stopped right now:
Runtime: stopped- plus: service PATH missing
/Users/pieman/.nvm - and you still have another LaunchAgent
ai.openclaw.maclisted
Letโs get you back to a stable โalways runningโ state.
1) Repair the service config (this fixes the PATH drift)
Run:
openclaw doctor --repair
When it asks to update the gateway service config โ Yes.
2) Start the gateway again
openclaw gateway start
openclaw gateway status
3) If it starts and immediately stops again โ we need the real crash reason
Paste:
tail -n 120 ~/.openclaw/logs/gateway.err.log
(that file is the key; it will say things like EADDRINUSE / config invalid / etc.)
4) Quick sanity check: is the Node that the service uses new enough?
Your LaunchAgent runs /usr/local/bin/node, so check:
/usr/local/bin/node -v