#Clawdbot health offline and gateway not activating
1 messages · Page 1 of 1 (latest)
@gentle warren pls help me get my gateway working
Hey! That "LaunchAgent loaded" message just means macOS knows about the service — but the gateway isn't actually running.
Let's debug this:
-
Check if it's running:
ps aux | grep clawdbot launchctl list | grep clawdbot -
Check the logs for errors:
clawdbot logs # or system logs on macOS: log show --predicate 'process == "clawdbot"' --last 5m
- Try starting it manually:
clawdbot daemon start
The most common causes:
- Binary not executable →
chmod +x /Applications/Clawdbot.app/Contents/MacOS/Clawdbot - Config error → Check
~/.clawdbot/clawdbot.json - Port in use → Gateway tries to bind to a port something else is using
What do the logs say? 🦐
max@Max-Mini ~ % ps aux | grep clawdbot
launchctl list | grep clawdbot
max 60333 0.0 0.0 435234544 1264 s000 R+ 9:40p.m. 0:00.00 grep clawdbot
max 60279 0.0 1.3 446381152 223248 ?? S 9:37p.m. 0:02.55 /opt/homebrew/Cellar/node@22/22.22.0/bin/node /Users/max/.nvm/versions/node/v24.12.0/lib/node_modules/clawdbot/dist/entry.js gateway --port 18789
max 60278 0.0 0.2 435704128 38528 ?? S 9:37p.m. 0:00.09 /opt/homebrew/bin/node /Users/max/.nvm/versions/node/v24.12.0/lib/node_modules/clawdbot/dist/entry.js gateway --port 18789
60278 -15 com.clawdbot.gateway
The gateway is running! I can see two processes on port 18789 (PID 60278 and 60279).
The issue is likely:
- Double-running — two processes on the same port is suspicious
- Health check failing even though the gateway is up
Let's verify:
# Is the port actually responding?
curl http://localhost:18789/health 2>/dev/null || echo "Port not responding"
# Check which process is the actual gateway
lsof -i :18789
If the port isn't responding, the gateway might have started but crashed. Check:
clawdbot logs --tail 50
Also try the restart command:
clawdbot daemon restart
The double-process suggests something got stuck. A clean restart should fix it! 🦐
Still says health offline despite restarting. Here's my progress:
max@Max-Mini ~ % curl http://localhost:18789/health 2>/dev/null || echo "Port not responding"
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Clawdbot Control</title>
<meta name="color-scheme" content="dark light" />
<link rel="icon" href="./favicon.ico" sizes="any" />
<script type="module" crossorigin src="./assets/index-CN7mhdU7.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-bmCB4WXs.css">
<script>window.CLAWDBOT_CONTROL_UI_BASE_PATH="";</script></head>
<body>
<clawdbot-app></clawdbot-app>
</body>
</html>
max@Max-Mini ~ % lsof -i :18789
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 60279 max 14u IPv4 0x443b54854e57e387 0t0 TCP localhost:18789 (LISTEN)
max@Max-Mini ~ % clawdbot daemon restart
🦞 Clawdbot 2026.1.12-2 (unknown) — I'm like tmux: confusing at first, then suddenly you can't live without me.
Restarted LaunchAgent: gui/501/com.clawdbot.gateway
The gateway is running — it's serving the control UI on port 18789! 🎉
The health check might be hitting the wrong path. Try:
curl http://localhost:18789/api/health
But wait — I noticed something important:
You're running Node 24, which is in the known issues list:
Node 24 — breaks AbortController, use Node 22
This could be causing the Discord integration to fail even though the gateway UI works.
Fix: Switch to Node 22:
nvm use 22
clawdbot daemon restart
Or permanently set Node 22 as your default:
nvm alias default 22
After switching to Node 22 and restarting, check if the Discord health shows online. The UI works because it doesn't use the problematic AbortController, but the Discord bridge might be failing silently. 🦐
sigh... command not found: nvm - how do i ensure it's found? It's definitely installed
Run this to load nvm temporarily:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Then switch Node versions:
nvm use 22
clawdbot daemon restart
To make nvm persist in future terminal sessions, add this to your ~/.zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Then source ~/.zshrc to reload.
Let me know what happens after switching to Node 22! 🦐
I've switched to 22 and restarted daemons but still offline on the dashboard
Let's check what's happening with Discord specifically:
clawdbot logs --provider discord --tail 100
Also check the overall gateway logs:
clawdbot logs --tail 50
Key things to verify in your config (~/.clawdbot/clawdbot.json):
- Discord token is set and valid
- Discord enabled:
"discord": true - Gateway URL correct if you're self-hosting
grep -A5 "discord" ~/.clawdbot/clawdbot.json
What do the logs say? That's where the actual error will be. 🦐
Why are we focusing on discord? Does that relate to the dashboard being online / the overall issue?
You're right, I went down the wrong rabbit hole! Let's focus on the actual problem:
The gateway is running (UI loads on port 18789) but dashboard health shows offline.
The health check is likely hitting a different endpoint. Let's check:
curl http://localhost:18789/api/health
Also check what the dashboard expects:
clawdbot logs --tail 30
The health check failing could be:
- Wrong health endpoint path
- Gateway started but didn't fully initialize
- A crash after the UI loaded
What's the output of curl http://localhost:18789/api/health? 🦐
max@Max-Mini ~ % curl http://localhost:18789/api/health
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Clawdbot Control</title>
<meta name="color-scheme" content="dark light" />
<link rel="icon" href="./favicon.ico" sizes="any" />
<script type="module" crossorigin src="./assets/index-CN7mhdU7.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-bmCB4WXs.css">
<script>window.CLAWDBOT_CONTROL_UI_BASE_PATH="";</script></head>
<body>
<clawdbot-app></clawdbot-app>
</body>
</html>
max@Max-Mini ~ % clawdbot logs --tail 30
error: unknown option '--tail'
The gateway isn't exposing an API health endpoint — it's only serving the static control UI. This explains why the dashboard shows "offline."
Let's see the actual logs:
clawdbot logs
Or check the file directly:
cat ~/.clawdbot/logs/latest.log | tail -50
The gateway might not be registering with the dashboard service at all. How are you accessing the dashboard? Is it at http://localhost:18789 or a different URL?
Also, what's your config's gateway.controlUi setting? If it's false, the health endpoint might not be registered.
grep -A2 "controlUi\|gateway\." ~/.clawdbot/clawdbot.json
What does the full logs output show? 🦐
21:45:40 warn gateway/ws {"subsystem":"gateway/ws"} unauthorized conn=8f8df878-ad76-4d76-8c61-2dc60ad04536 remote=127.0.0.1 client=clawdbot-control-ui webchat vdev
21:45:40 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"unauthorized","handshake":"failed","durationMs":5,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"27ac5a11-e3bd-445f-8fba-2a2ef457ee9b","host":"127.0.0.1:18789","origin":"http://127.0.0.1:18789","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36","authMode":"token","authProvided":"token","authReason":"token_mismatch","allowTailscale":false,"client":"clawdbot-control-ui","mode":"webchat","version":"dev"} closed before connect conn=8f8df878-ad76-4d76-8c61-2dc60ad04536 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/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 code=1008 reason=unauthorized
Found it! 🎯
Token mismatch — the control UI is trying to connect via WebSocket but using the wrong/expired token.
To fix this:
-
Find your gateway token in the config:
grep -A1 "gatewayToken\|token" ~/.clawdbot/clawdbot.json | head -10 -
Get the token from the UI — when you open
http://localhost:18789, check if it prompts for a token or has one saved in localStorage. -
Clear the saved token and re-authenticate, or set the correct token in your config.
The UI and gateway must use matching tokens for WebSocket connections. Once the token matches, the health status should update correctly! 🦐
OK accessing that localhost URL and adding the token brings the health to OK - will this always stay on now? I'm in on a mac mini so the mac itself will always be on
Yes! The gateway should stay online now. 🎉
What keeps it running:
- LaunchAgent (
gui/501/com.clawdbot.gateway) auto-starts on login and keeps the process alive - Your Mac Mini is on, so the gateway stays up
Edge cases to watch:
- If you restart the Mac Mini, the LaunchAgent should auto-restart the gateway when you log back in
- If the gateway crashes, the LaunchAgent should respawn it automatically
The "offline" status was just the WebSocket connection failing due to the token mismatch — now that you're authenticated, the dashboard can properly communicate with the gateway.
You should be good to go! 🦐
OK cool - i've downloaded the clawdbot.app, but as soon as i open that app, that localhost gateway goes offline again, can you help me get this working with the app?
The app is likely conflicting with your existing gateway! It might be trying to start its own instance or stop the existing one.
Let's check what's happening:
# Before opening the app
ps aux | grep clawdbot
# After opening the app
ps aux | grep clawdbot
The issue: The app probably wants to manage the gateway itself, but your CLI setup already has one running.
Solutions:
- Let the app manage it — Stop your CLI gateway and let the app handle it:
clawdbot daemon stop
# Then use the app to start/restart
-
Use the app to control your existing gateway — The app should be able to connect to your existing gateway on port 18789 if configured correctly.
-
Check the app's logs to see what it's trying to do:
# App logs are usually in: ~/Library/Logs/Clawdbot/
Which approach do you prefer? Do you want the app to manage the gateway, or keep using the CLI? 🦐
After running the daemon stop command, choosing my gateway (selecting "This mac" says gateway starts automatically on this mac), i proceed to the next step and the app just gets stuck infinitely 'starting wizard'
This is a known issue with the macOS app — it's marked as WIP (work in progress) and has crashes/instability.
Your options:
-
Use the web UI at
http://localhost:18789— this is actually the recommended way. The app just wraps this UI anyway. -
Wait for a fix — the app is actively being worked on, but it's not stable yet.
-
File a bug report with the Clawdbot team so they know this is happening.
The web UI has all the same functionality, just open it in your browser instead of the app. Would that work for you, or do you specifically need the app for something? 🦐
When trying to re-run clawdbot daemon install to re-activate, i get this error:
Gateway install failed: Error: launchctl bootstrap failed: Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
This is a macOS LaunchAgent permission issue. Let's fix it:
-
Check if the plist exists and its permissions:
ls -la ~/Library/LaunchAgents/com.clawdbot.gateway.plist cat ~/Library/LaunchAgents/com.clawdbot.gateway.plist -
Unload any stale agents first:
launchctl bootout gui/501/com.clawdbot.gateway 2>/dev/null -
Try reinstalling:
clawdbot daemon uninstall
clawdbot daemon install
clawdbot daemon start
- If that fails, check launchd status:
launchctl list | grep clawdbot
The I/O error sometimes happens when the plist file is malformed or launchd has a stale reference. Removing and re-registering usually fixes it. Let me know what you find! 🦐
max@Max-Mini ~ % clawdbot daemon uninstall
🦞 Clawdbot 2026.1.12-2 (unknown) — Chat automation for people who peaked at IRC.
Moved LaunchAgent to Trash: /Users/max/.Trash/com.clawdbot.gateway.plist
max@Max-Mini ~ % clawdbot daemon install
🦞 Clawdbot 2026.1.12-2 (unknown) — Siri's competent cousin.
Gateway install failed: Error: launchctl bootstrap failed: Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
max@Max-Mini ~ % clawdbot daemon start
🦞 Clawdbot 2026.1.12-2 (unknown) — Ah, the fruit tree company! 🍎
Gateway service not loaded.
Start with: clawdbot daemon install
Start with: clawdbot gateway
Start with: launchctl bootstrap gui/$UID ~/Library/LaunchAgents/com.clawdbot.gateway.plist
max@Max-Mini ~ % launchctl list | grep clawdbot
61093 0 application.com.clawdbot.mac.2575199.2575205
Found the problem! The macOS app has registered its own LaunchAgent (application.com.clawdbot.mac.2575199.2575205) which is conflicting with the CLI installation.
Fix options:
-
Remove the app's LaunchAgent:
launchctl bootout gui/501/application.com.clawdbot.mac.2575199.2575205 clawdbot daemon install clawdbot daemon start -
Or just run the gateway directly (since your Mac Mini is always on, you don't strictly need a LaunchAgent):
clawdbot gatewayRun this in a tmux/screen session or as a background process, and it will stay up.
- Close the app completely before trying to install the CLI daemon again.
The app and CLI can't both control the same LaunchAgent slot. Choose which one you want to use! 🦐
max@Max-Mini ~ % launchctl bootout gui/501/application.com.clawdbot.mac.2575199.2575205
Boot-out failed: 3: No such process
max@Max-Mini ~ % clawdbot daemon install
🦞 Clawdbot 2026.1.12-2 (unknown) — Welcome to the command line: where dreams compile and confidence segfaults.
Gateway install failed: Error: launchctl bootstrap failed: Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
max@Max-Mini ~ %
Let's do a deeper cleanup and manual reinstall:
# Check ALL clawdbot-related launch agents
launchctl list | grep -i clawdbot
# Remove any plist files that might be stale
rm -f ~/Library/LaunchAgents/com.clawdbot.gateway.plist
rm -f ~/Library/LaunchAgents/application.com.clawdbot.mac.*
# Reload launchd
launchctl kickstart -k gui/501/
# Now try fresh install
clawdbot daemon install
clawdbot daemon start
If that still fails, let's see the actual plist being generated:
clawdbot daemon install 2>&1 | cat
The I/O error might indicate a corrupted plist file or permissions issue. Let me know what happens! 🦐
I got this far:
max@Max-Mini ~ % launchctl kickstart -k gui/501/
Usage: launchctl kickstart [-k] [-p] <service-target>
-k Terminates the service if it is already running.
-p Prints the PID of the service that was started.
-s Starts the service suspended so that a debugger may attach.
<service-target> takes a form of <domain-target>/<service-id>.
Please refer to man launchctl for explanation of the <domain-target> specifiers.
max@Max-Mini ~ %
Right, the -k flag needs the full service path. Let's skip that and do the manual cleanup:
# Remove any stale plist files
rm -f ~/Library/LaunchAgents/com.clawdbot.gateway.plist
rm -f ~/Library/LaunchAgents/application.com.clawdbot.mac.*
# Verify they're gone
ls ~/Library/LaunchAgents/ | grep clawdbot
# Now try installing fresh
clawdbot daemon install
clawdbot daemon start
# Check if it worked
launchctl list | grep clawdbot
curl http://localhost:18789 -o /dev/null && echo "Gateway is up!"
If the install still fails with the I/O error, let's see the actual plist being created:
# Show what's being written
cat ~/Library/LaunchAgents/com.clawdbot.gateway.plist 2>/dev/null || echo "File not created"
What's the output? 🦐
I get the same error when running daemon install, and then the cat returns this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.clawdbot.gateway</string>
<key>Comment</key>
<string>Clawdbot Gateway (v2026.1.12-2)</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/node</string>
<string>/Users/max/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot/dist/entry.js</string>
<string>gateway</string>
<string>--port</string>
<string>18789</string>
</array>
<key>StandardOutPath</key>
<string>/Users/max/.clawdbot/logs/gateway.log</string>
<key>StandardErrorPath</key>
<string>/Users/max/.clawdbot/logs/gateway.err.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
<key>CLAWDBOT_GATEWAY_PORT</key>
<string>18789</string>
<key>CLAWDBOT_GATEWAY_TOKEN</key>
<string>11939d2d9c967f1858500710d592362ba39ad798f70f86ed</string>
<key>CLAWDBOT_LAUNCHD_LABEL</key>
<string>com.clawdbot.gateway</string>
<key>CLAWDBOT_SYSTEMD_UNIT</key>
<string>clawdbot-gateway.service</string>
<key>CLAWDBOT_SERVICE_MARKER</key>
<string>clawdbot</string>
<key>CLAWDBOT_SERVICE_KIND</key>
<string>gateway</string>
<key>CLAWDBOT_SERVICE_VERSION</key>
<string>2026.1.12-2</string>
</dict>
</dict>
</plist>
The plist looks valid. Let's try loading it directly with the full path:
# Try loading manually
launchctl load ~/Library/LaunchAgents/com.clawdbot.gateway.plist
# If that fails, check permissions
ls -la ~/Library/LaunchAgents/com.clawdbot.gateway.plist
# Try starting it directly
launchctl bootstrap gui/501 ~/Library/LaunchAgents/com.clawdbot.gateway.plist
If bootstrap still fails with I/O error, there might be a deeper issue with launchd on your system. Try:
# Check launchd status
sudo launchctl print system
# Or check user domain
sudo launchctl print user/gui/501
# See if there are any system-level issues
log show --predicate 'process == "launchd"' --last 5m | tail -20
The I/O error on bootstrap sometimes indicates a corrupted launchd service cache or permissions issue. Let me know what these commands return! 🦐
The launchd logs look clean — no errors related to clawdbot. This is getting tricky.
Quick workarounds since the LaunchAgent is being stubborn:
-
Run gateway directly (simplest, no launchd needed):
clawdbot gateway &This will keep running in the background. Since your Mac Mini is always on, this works fine.
-
Restart your Mac — This resets the launchd state and often clears these obscure bootstrap errors.
-
Try the bootstrap manually one more time after a restart:
launchctl bootstrap gui/501 ~/Library/LaunchAgents/com.clawdbot.gateway.plist
The I/O error is likely a transient launchd state issue. A reboot usually fixes it.
My recommendation: Just run clawdbot gateway & in a terminal or tmux session. Since the Mac is always on, you don't strictly need the LaunchAgent for reliability. Want me to help you set that up? 🦐
Kinda works - my dashboard says health is OK, but my terminal does have this warning:
[gws] ⇄ res ✗ providers.status 0ms errorCode=INVALID_REQUEST errorMessage=unknown method: providers.status conn=53d84415…07c6 id=ba1c250c…363a
22:00:08 [ws] unauthorized conn=4b7468eb-80f5-4560-856e-d2e1e868070e remote=127.0.0.1 client=clawdbot-control-ui webchat vdev
22:00:08 [ws] closed before connect conn=4b7468eb-80f5-4560-856e-d2e1e868070e 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/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 code=1008 reason=unauthorized
The token mismatch is back! The browser is using a stale token. Let's fix this once and for all:
# Get your gateway token from config
cat ~/.clawdbot/clawdbot.json | grep gatewayToken
Then in your browser:
- Open
http://localhost:18789 - Clear localStorage to force re-authentication:
- Press F12 → Application → Local Storage → Clear all
- Or open in incognito/private window
- It should prompt for the token — paste the one from your config
Alternative: Set the token in the URL directly:
http://localhost:18789?token=YOUR_TOKEN_HERE
Find your token and re-authenticate. The warnings should disappear! 🦐
Running cat ~/.clawdbot/clawdbot.json | grep gatewayToken doesn't return anything
The token is being generated dynamically! We saw it in the plist earlier (11939d2d9c967f1858500710d592362ba39ad798f70f86ed).
Add it to your config permanently:
# Open the config
nano ~/.clawdbot/clawdbot.json
Add this section (or update if it exists):
{
"gatewayToken": "11939d2d9c967f1858500710d592362ba39ad798f70f86ed"
}
Then restart the gateway:
# Stop the background gateway (Ctrl+C or kill the process)
clawdbot gateway
Now the token will be consistent and saved in config. When you open the browser, clear localStorage first so it uses the new token from config. 🦐
I keep getting these messages despite running daemon stop:
22:04:08 [ws] unauthorized conn=4488dc24-62d3-4c25-acd8-1a741cee3880 remote=127.0.0.1 client=clawdbot-control-ui webchat vdev
22:04:08 [ws] closed before connect conn=4488dc24-62d3-4c25-acd8-1a741cee3880 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/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 code=1008 reason=unauthorized
There are still clawdbot processes running! Let's do a full cleanup:
# Kill ALL clawdbot processes
pkill -f clawdbot
pkill -f "node.*clawdbot"
# Verify they're gone
ps aux | grep clawdbot
# Clear browser localStorage (or use incognito window)
# Now restart fresh
clawdbot gateway
This should give you a fresh start with no token conflicts. The unauthorized errors mean old gateway processes were still running in the background. Let me know if it works! 🦐
max@Max-Mini ~ % ps aux | grep clawdbot
max 88383 0.0 0.0 435234832 1088 s000 R+ 10:05p.m. 0:00.00 grep clawdbot
All clawdbot processes are killed. Now let's start fresh:
# First, add the token to config so it persists
nano ~/.clawdbot/clawdbot.json
Add this at the top level:
{
"gatewayToken": "11939d2d9c967f1858500710d592362ba39ad798f70f86ed"
}
Save and exit (Ctrl+O, Enter, Ctrl+X).
Now start the gateway:
clawdbot gateway
In your browser:
- Open
http://localhost:18789in an incognito/private window (this avoids localStorage issues) - It should connect without the token warning
Let me know if the health shows OK! 🦐
OK - health shows OK, but i'm still getting the same warnings in the terminal
The warnings are likely from old browser tabs still open in your regular browser window. The incognito window works, but other tabs are trying to connect with stale tokens.
Quick fix:
- Close ALL browser tabs that have
localhost:18789open - Refresh only the incognito window
- The warnings should stop
If you still see warnings after closing all tabs:
The warnings are harmless log output — they're just failed connection attempts. The fact that health shows OK is what matters. The gateway is working correctly!
You can also ignore them, or use this to suppress WebSocket connection logs:
clawdbot gateway 2>&1 | grep -v "ws.*unauthorized"
But honestly, if the dashboard health is OK, you're all set! 🎉 The warnings are just noise from stale connections. 🦐
I have it only open in incognito, and now the healths offline and the warnings persist
Something's off with the token. Let's debug:
# Check your current config
cat ~/.clawdbot/clawdbot.json | grep -A2 -B2 gateway
# Check what token the gateway is actually using (from the env)
grep CLAWDBOT_GATEWAY_TOKEN ~/Library/LaunchAgents/com.clawdbot.gateway.plist
The gateway might not be reading the config token correctly. What do these commands show?
Also, completely exit the gateway (Ctrl+C) and restart it fresh after checking the config. There might be multiple gateway instances with different tokens fighting each other.
# Kill everything
pkill -f clawdbot
# Restart with fresh state
clawdbot gateway
What does your config show? 🦐
max@Max-Mini ~ % cat ~/.clawdbot/clawdbot.json | grep -A2 -B2 gateway
{
"gatewayToken": "11939d2d9c967f1858500710d592362ba39ad798f70f86ed",
"wizard": {
"lastRunAt": "2026-01-13T21:37:52.950Z",
}
},
"gateway": {
"port": 18789,
"mode": "local",
max@Max-Mini ~ % grep CLAWDBOT_GATEWAY_TOKEN ~/Library/LaunchAgents/com.clawdbot.gateway.plist
<key>CLAWDBOT_GATEWAY_TOKEN</key>
max@Max-Mini ~ %
Good, the config token is set! Now let's restart cleanly:
# Kill all clawdbot processes
pkill -f clawdbot
# Wait a moment, then restart
sleep 2
clawdbot gateway
This should pick up the token from your config. The gateway might have been running with an old token before you added it to the config.
After restart, open a fresh incognito window and check if it works without warnings! 🦐
what's the URL for the dash again?
http://localhost:18789
Sorted, no longer getting those warnings. Only ones i'm getting are:
22:10:40 [bonjour] bridge name conflict resolved; newName="Max Mini (Clawdbot) (2)"
22:10:40 [bonjour] bridge hostname conflict resolved; newHostname="Max-Mini-(2)"
Those are just Bonjour/mDNS name conflicts — harmless! They happen when the gateway restarts and the network sees a duplicate name.
To fix the "(2)" suffix permanently:
You can change the bridge name in your config:
nano ~/.clawdbot/clawdbot.json
Add/change:
{
"bridge": {
"name": "Max Mini Clawdbot",
"hostname": "Max-Mini-Clawdbot"
}
}
Or just ignore it — the conflicts will stop once the old name times out of the network cache. It doesn't affect functionality at all! 🎉
Everything working now? 🦐
Do i need to restart the gateway for those to take effect?
Yes! Restart the gateway for the bridge name changes:
pkill -f clawdbot
clawdbot gateway
The conflicts should disappear and the "(2)" suffix will be gone! 🦐
Dashboard is saying whatsapp isn't connected, but when i click relink, it says it is connected. I also get these warnings in the terminal now:
[gws] ⇄ res ✗ providers.status 0ms errorCode=INVALID_REQUEST errorMessage=unknown method: providers.status conn=0086d89e…5d12 id=ad714ded…2762
22:16:10 [bonjour] watchdog detected non-announced service; attempting re-advertise (bridge fqdn=Max Mini (Clawdbot)._clawdbot-bridge._tcp.local. host=Max-Mini.local. port=18790 state=probing)
The providers.status error looks like a bug in the gateway — that method might not exist or has changed. Not related to your WhatsApp issue.
For WhatsApp:
-
Test if it's actually working:
- Try sending a message through WhatsApp via the gateway
- If messages go through, it's just a UI display bug
-
Check WhatsApp logs:
clawdbot logs --provider whatsapp --tail 50 -
Dashboard refresh:
- Refresh the dashboard page
- Open it in a new incognito window
The dashboard sometimes shows stale status. If you can actually send/receive WhatsApp messages, then the "disconnected" indicator is just a UI bug.
Try sending a test message — does it work? 🦐
When viewing in a new incognito window, the health goes back to offline, i'm now getting this error:
22:17:42 [ws] closed before connect conn=88bb5f6b-03f1-4533-896d-da25446ecaad remote=127.0.0.1 fwd=n/a origin=http://localhost:18789 host=localhost:18789 ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 code=1008 reason=unauthorized
The token isn't being applied properly. Let's debug this:
# Check if the gateway is reading the config
cat ~/.clawdbot/clawdbot.json | grep gatewayToken
# Check what token the gateway process is actually using
ps aux | grep clawdbot | grep -v grep
# Check the gateway logs for token-related messages
clawdbot logs | grep -i token
The gateway might not be reading the config from the right location, or there might be a config parsing issue.
Quick test: Kill the gateway, make a small change to verify config is being read:
pkill -f clawdbot
echo '{"gatewayToken":"11939d2d9c967f1858500710d592362ba39ad798f70f86ed","test":"value"}' > ~/.clawdbot/clawdbot.json
clawdbot gateway &
sleep 3
curl http://localhost:18789 2>/dev/null | head -5
If it returns HTML, the gateway is running. But we need to verify the token is being read correctly. What do the logs say? 🦐
max@Max-Mini ~ % cat ~/.clawdbot/clawdbot.json | grep gatewayToken
"gatewayToken": "11939d2d9c967f1858500710d592362ba39ad798f70f86ed",
max@Max-Mini ~ % ps aux | grep clawdbot | grep -v grep
max 88976 0.4 1.4 446328672 227376 s000 S+ 10:13p.m. 0:05.96 /Users/max/.nvm/versions/node/v22.22.0/bin/node /Users/max/.nvm/versions/node/v22.22.0/bin/clawdbot gateway
max 88975 0.0 0.3 435656336 42320 s000 S+ 10:13p.m. 0:00.04 node /Users/max/.nvm/versions/node/v22.22.0/bin/clawdbot gateway
There are TWO gateway processes (PID 88976 and 88975)! That's causing the token conflict.
Let's clean up completely:
# Kill ALL clawdbot processes
pkill -f clawdbot
# Verify they're gone
sleep 2
ps aux | grep clawdbot | grep -v grep
# Clear browser localStorage (F12 → Application → Local Storage → Clear all)
# Start fresh - only ONE gateway
clawdbot gateway
Only one gateway should run at a time. The duplicate processes are fighting over the token and causing the authorization failures. After this cleanup, the incognito window should connect properly without the "unauthorized" errors. 🦐
I'm on a mac, f12 is my volume key, how do i clear local storage
No problem! On Mac:
To open Developer Tools:
- Right-click anywhere on the page → Inspect Element
- Or press: Option + Command + I (Opt+Cmd+I)
To clear localStorage in the Inspector:
- Click Application tab (or Storage tab in some browsers)
- Expand Local Storage in the left sidebar
- Right-click → Clear (or select all and hit Delete)
Alternative: Just use a fresh incognito window — it starts with no localStorage. That's the easiest fix!
After clearing localStorage, refresh the page and it should connect properly. 🦐
Right the health is back, but whatsapp is still saying unlinked and i get this message in the terminal:
[gws] ⇄ res ✗ providers.status 0ms errorCode=INVALID_REQUEST errorMessage=unknown method: providers.status conn=4dec7f70…8057 id=81e76321…905e
The providers.status error is a UI bug — the dashboard is calling a method that doesn't exist. Ignore it for now.
For WhatsApp: Let's verify the actual WhatsApp session:
# Check if WhatsApp session exists
ls -la ~/.clawdbot/sessions/ | grep whatsapp
# Check WhatsApp provider logs
clawdbot logs --provider whatsapp --tail 30
Also, check if WhatsApp is actually enabled in config:
grep -A5 "whatsapp" ~/.clawdbot/clawdbot.json
The dashboard might be showing "unlinked" even if it's actually connected. Try sending a WhatsApp message through the gateway — if it works, the status is just a display bug.
What do the WhatsApp logs say? 🦐
max@Max-Mini ~ % clawdbot logs --provider whatsapp --tail 30
error: unknown option '--provider'
(Did you mean --profile?)
Let's check the log files directly:
# Check latest logs
tail -50 ~/.clawdbot/logs/latest.log | grep -i whatsapp
# Or view all logs
cat ~/.clawdbot/logs/latest.log | grep -i whatsapp
What does the log show about WhatsApp? 🦐
There's no such file or directory on both of those commands
Let's find where the logs are going:
# Check if logs directory exists
ls -la ~/.clawdbot/
# Check for any log files
find ~/.clawdbot -name "*.log" 2>/dev/null
# Check the gateway output for log path
clawdbot gateway 2>&1 | head -20
The logs might be going to stdout only, or to a different location. What do you see? 🦐
When i click logout on the whatsapp area of the dashboard, i get this: Error: unknown method: providers.logout
This is a version mismatch between the dashboard UI and the gateway. The UI is calling methods (providers.status, providers.logout) that don't exist in your gateway version.
To fix:
-
Check your version:
clawdbot --version -
Update clawdbot:
npm update -g clawdbot # or pnpm update -g clawdbot -
Restart the gateway:
pkill -f clawdbot
clawdbot gateway
The UI and gateway need to be on matching versions. Update both to the latest release and the errors should disappear!
What version are you running? 🦐
max@Max-Mini ~ % pnpm update -g clawdbot
Done in 98ms using pnpm v10.28.0
No global packages found
Clawdbot isn't installed as a global package — it's a local nvm installation. Let's update it properly:
# Navigate to where clawdbot is installed
cd ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
# Pull latest changes
git pull
# Rebuild if needed
pnpm install
pnpm build
# Or reinstall fresh
pnpm remove clawdbot
pnpm add clawdbot
# Restart the gateway
pkill -f clawdbot
clawdbot gateway
Alternative: Check if it was installed differently:
which clawdbot
ls -la ~/.nvm/versions/node/v22.22.0/bin/clawdbot
The gateway version (2026.1.12-2) seems a bit old. Let me know what the git pull shows or if reinstalling works! 🦐
Friggin hell - says i have divergent branches
Let's fix the divergent branches:
cd ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
# See what the divergence is
git log --oneline --graph HEAD...origin/main
# Discard local changes and sync with remote
git checkout .
git pull origin main --rebase
# If that doesn't work, force reset
git fetch origin
git reset --hard origin/main
# Then rebuild
pnpm install
pnpm build
# Restart gateway
pkill -f clawdbot
clawdbot gateway
This will sync your local installation with the latest code from GitHub. Let me know what happens! 🦐
max@Max-Mini clawdbot % git pull origin main --rebase
fatal: couldn't find remote ref main
Let's check what branch to use:
cd ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
# List branches
git branch -a
# Check remote branches
git remote -v
git branch -r
Then pull from the correct branch (usually main or master):
git pull origin main
# or
git pull origin master
What branches do you see? 🦐
max@Max-Mini clawdbot % git branch -a
- (no branch)
remotes/origin/HEAD -> origin/master
remotes/origin/master
Am i even linked to the right repo?
Pull from the correct branch:
cd ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
# Pull from master
git pull origin master
# If that fails, force reset to match remote
git fetch origin
git reset --hard origin/master
# Then rebuild
pnpm install
pnpm build
# Restart
pkill -f clawdbot
clawdbot gateway
This should sync you up with the latest version from the main/master branch! 🦐
It's called main not master here though: https://github.com/clawdbot/clawdbot
Exactly! Your local clone is pointing to the wrong remote. Let's fix that:
cd ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
# Check current remote
git remote -v
# Change to the official repo
git remote set-url origin https://github.com/clawdbot/clawdbot.git
# Verify
git remote -v
# Now pull from main
git fetch origin
git reset --hard origin/main
# Rebuild
pnpm install
pnpm build
# Restart
pkill -f clawdbot
clawdbot gateway
Your local was pointing to an old fork or different repo. Now it should pull from the official Clawdbot repo! 🦐
max@Max-Mini clawdbot % git remote set-url origin https://github.com/clawdbot/clawdbot.git
max@Max-Mini clawdbot % git remote -v
origin https://github.com/clawdbot/clawdbot.git (fetch)
origin https://github.com/clawdbot/clawdbot.git (push)
max@Max-Mini clawdbot % git fetch origin
fatal: couldn't find remote ref refs/heads/master
The repo only has main, not master. Let's pull from main:
cd ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
# Fetch and check branches
git fetch origin
git branch -r
# Pull from main
git pull origin main
# Or reset to main
git reset --hard origin/main
# Rebuild
pnpm install
pnpm build
# Restart
pkill -f clawdbot
clawdbot gateway
What does git branch -r show now? 🦐
Isn't this just managing it within this node space? Don't we want to do this globally?
You're right! The nvm approach is making this complicated. Let's do this properly with Homebrew for system-wide management:
# First, stop current gateway
pkill -f clawdbot
# Install via Homebrew (proper way)
brew install clawdbot/tap/clawdbot
# Verify installation
clawdbot --version
# Start the gateway
clawdbot gateway
Benefits of Homebrew:
- Updates easily:
brew update && brew upgrade clawdbot - Proper LaunchAgent management
- No nvm version conflicts
- System-wide installation
The nvm/node_modules approach is error-prone and not the recommended installation method. Homebrew will give you a clean, maintainable setup!
Let me know if you want to go this route! 🦐
Warning: No available formula or cask with the name "clawdbot/tap/clawdbot".
Let's just install globally with pnpm (the proper way):
# Remove the nvm version first
pnpm remove -g clawdbot 2>/dev/null
# Install globally
pnpm add -g clawdbot
# Verify
which clawdbot
clawdbot --version
# Start fresh
pkill -f clawdbot
clawdbot gateway
This gives you a clean global installation that's easy to update:
pnpm add -g clawdbot # to update
Try this and let me know the version! 🦐
max@Max-Mini ~ % pnpm remove -g clawdbot 2>/dev/null
ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND No package.json (or package.yaml, or package.json5) was found in "/Users/max/Library/pnpm/global/5".
Let's install fresh without removing first:
# Just install globally
pnpm add -g clawdbot
# Verify the installation
clawdbot --version
# Kill old processes
pkill -f clawdbot
# Start fresh
clawdbot gateway
What version does it report? 🦐
Should i be installing this in a folder or my root?
Global install doesn't need a folder — pnpm add -g handles everything automatically. It installs to pnpm's global store.
Let's simplify and just get you running:
# Install globally (no folder needed)
pnpm add -g clawdbot
# Verify it works
clawdbot --version
# Kill everything and restart clean
pkill -f clawdbot
clawdbot gateway
This is the simplest path. Don't overthink the folder structure — pnpm handles it! 🦐
max@Max-Mini ~ % pnpm add -g clawdbot
ERR_PNPM_NO_GLOBAL_BIN_DIR Unable to find the global bin directory
Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.
Let's fix pnpm's global setup:
# Set up pnpm global bin
pnpm setup
# Then install globally
pnpm add -g clawdbot
# Verify
clawdbot --version
# Restart
pkill -f clawdbot
clawdbot gateway
This will create the global bin directory and add it to your PATH. Try it! 🦐
Done and installed, yet i still get the same logout error with whatsapp
We need to make sure the new installation is actually running:
# Kill ALL clawdbot processes
pkill -f clawdbot
# Verify they're gone
sleep 2
ps aux | grep clawdbot | grep -v grep
# Check which clawdbot is now being used
which clawdbot
# Start the new version
clawdbot gateway
What version does it report now? And does the which clawdbot point to the pnpm global installation?
clawdbot --version
This should give you the latest version from the global install! 🦐
max@Max-Mini ~ % which clawdbot
/Users/max/.nvm/versions/node/v24.12.0/bin/clawdbot
The PATH is still pointing to the nvm version (Node 24), not the pnpm global install. Let's check where pnpm installed it:
# Check pnpm global bin location
pnpm bin -g
# Check if clawdbot is there
ls -la $(pnpm bin -g)/
# Check Node version
node --version
# Switch to Node 22 if needed
nvm use 22
# Now start the gateway with the proper setup
clawdbot gateway
Important: You're still on Node 24 which is a known problem. Make sure to use Node 22! 🦐
Switched to 22, still getting the same logout error
The providers.logout error is a UI bug, not a WhatsApp problem. The dashboard is calling methods that don't exist in your gateway version.
Let's verify WhatsApp is actually working:
Try sending a WhatsApp message through the gateway. If messages go through, the "unlinked" status is just a display bug.
To fix the UI:
-
Clear browser cache completely:
- Chrome: Settings → Privacy → Clear browsing data → Cached images and files
- Or open DevTools → Network → Disable cache checkbox → Refresh
-
Check the gateway version:
clawdbot --version
The UI and gateway have version mismatches. If the version is still old, the pnpm global install might not have taken effect properly.
What does clawdbot --version show now? 🦐
2026.1.12-2
You're still on the old version (2026.1.12-2). The pnpm global install didn't replace the nvm version. Let's fix this properly:
# First, check where the old version is
ls -la /Users/max/.nvm/versions/node/v22.22.0/bin/clawdbot
# Check where the NEW version was installed
pnpm bin -g
# Run clawdbot directly from the new location
/Users/max/Library/pnpm/global/5/node_modules/.bin/clawdbot --version
If the new version shows a newer number, let's use that:
# Kill old processes
pkill -f clawdbot
# Run the new version directly
/Users/max/Library/pnpm/global/5/node_modules/.bin/clawdbot gateway
What version does the pnpm global install show? 🦐
can't we just wipe that old version from our system?
Absolutely! Let's do a full wipe and reinstall:
# Remove old nvm installation
rm -rf ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
rm -f ~/.nvm/versions/node/v22.22.0/bin/clawdbot
# Remove stale LaunchAgent
rm -f ~/Library/LaunchAgents/com.clawdbot.gateway.plist
# Remove old config (backup first if needed)
cp ~/.clawdbot/clawdbot.json ~/.clawdbot/clawdbot.json.backup 2>/dev/null
rm -rf ~/.clawdbot
# Reinstall fresh via pnpm
pnpm add -g clawdbot
# Verify new version
clawdbot --version
# Start fresh
clawdbot gateway
This gives you a clean slate with the latest version! 🦐
max@Max-Mini ~ % nvm -v
0.40.3
max@Max-Mini ~ % nvm use 22
Now using node v22.22.0 (npm v10.9.4)
max@Max-Mini ~ % ls -la /Users/max/.nvm/versions/node/v22.22.0/bin/clawdbot
lrwxr-xr-x@ 1 max staff 42 13 Jan 16:39 /Users/max/.nvm/versions/node/v22.22.0/bin/clawdbot -> ../lib/node_modules/clawdbot/dist/entry.js
max@Max-Mini ~ % pnpm bin -g
/Users/max/Library/pnpm
max@Max-Mini ~ % rm -rf ~/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot
max@Max-Mini ~ % rm -f ~/.nvm/versions/node/v22.22.0/bin/clawdbot
max@Max-Mini ~ % rm -f ~/Library/LaunchAgents/com.clawdbot.gateway.plist
max@Max-Mini ~ % cp ~/.clawdbot/clawdbot.json ~/.clawdbot/clawdbot.json.backup
max@Max-Mini ~ % rm -rf ~/.clawdbot
max@Max-Mini ~ % pnpm add -g clawdbot
WARN 4 deprecated subdependencies found: are-we-there-yet@3.0.1, gauge@4.0.4, node-domexception@1.0.0, npmlog@6.0.2
Already up to date
Progress: resolved 638, reused 590, downloaded 0, added 0, done
WARN Issues with peer dependencies found
.
└─┬ clawdbot 2026.1.12-2
└─┬ @slack/bolt 4.6.0
└── ✕ unmet peer @types/express@^5.0.0: found 4.17.25
Done in 3.8s using pnpm v10.28.0
max@Max-Mini ~ % clawdbot --version
2026.1.12-2
max@Max-Mini ~ %
The pnpm cache might be stale. Let's force a fresh install:
# Clear pnpm global store and reinstall
pnpm store prune
pnpm add -g clawdbot --force
# Or try with npm instead
npm install -g clawdbot
# Check the version again
clawdbot --version
If that doesn't work, let's check what's actually installed:
# Check the global install location
cat /Users/max/Library/pnpm/global/5/node_modules/clawdbot/package.json | grep version
Let me know what you find! 🦐
after pruning: Done in 34.5s using pnpm v10.28.0
max@Max-Mini ~ % clawdbot --version
2026.1.12-2
The npm/pnpm registry might have a cache issue. Let's check:
# Check latest version in npm registry
npm view clawdbot version
# Check what's actually in the pnpm global store
ls /Users/max/Library/pnpm/global/5/node_modules/
If npm shows a newer version, force install:
npm install -g clawdbot@latest
Or install directly from GitHub (bypasses registry):
npm install -g https://github.com/clawdbot/clawdbot.git
What does npm view clawdbot version show? 🦐
You say that - the latest version in the repository is the version that we have?
Good point! Let me check the GitHub repo for the actual latest version:
# Check the GitHub repo for latest release
git clone https://github.com/clawdbot/clawdbot.git /tmp/clawdbot-check
cd /tmp/clawdbot-check
git describe --tags
This will show us what the actual latest version is. If it's newer than 2026.1.12-2, we need to install from GitHub directly.
Also, the providers.status error might indicate that this method simply doesn't exist yet in the gateway — the UI might be calling it but the gateway doesn't implement it.
To get the absolute latest:
npm install -g https://github.com/clawdbot/clawdbot.git
Let me know what the GitHub version shows! 🦐
max@Max-Mini ~ % git clone https://github.com/clawdbot/clawdbot.git /tmp/clawdbot-check
cd /tmp/clawdbot-check
git describe --tags
Cloning into '/tmp/clawdbot-check'...
remote: Enumerating objects: 67314, done.
remote: Counting objects: 100% (2909/2909), done.
remote: Compressing objects: 100% (805/805), done.
remote: Total 67314 (delta 2506), reused 2104 (delta 2104), pack-reused 64405 (from 3)
Receiving objects: 100% (67314/67314), 122.79 MiB | 26.53 MiB/s, done.
Resolving deltas: 100% (44322/44322), done.
v2026.1.12-2-7-g45c314fbe
max@Max-Mini clawdbot-check %
There are newer commits! You're 7 commits behind:
- Your version:
v2026.1.12-2 - Latest:
v2026.1.12-2-7-g45c314fbe(7 commits ahead)
Let's install from GitHub to get those fixes:
# Install directly from GitHub
npm install -g https://github.com/clawdbot/clawdbot.git
# Verify the update
clawdbot --version
# Start the gateway
clawdbot gateway
This will pull the latest commits including any fixes for the providers.status and providers.logout methods! 🦐
max@Max-Mini clawdbot-check % npm install -g https://github.com/clawdbot/clawdbot.git
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm error code ENOENT
npm error syscall spawn sh
npm error path /Users/max/.nvm/versions/node/v22.22.0/lib/node_modules/clawdbot/node_modules/@whiskeysockets/baileys
npm error errno -2
npm error enoent spawn sh ENOENT
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: /Users/max/.npm/_logs/2026-01-13T22_42_00_097Z-debug-0.log
The npm cache might be corrupted. Let's try with pnpm instead:
# Clear npm cache
npm cache clean --force
# Try with pnpm
pnpm add -g https://github.com/clawdbot/clawdbot.git
# Or use npx to run directly without installing
npx clawdbot@latest gateway
Simpler approach: Just use npx to run the latest version directly:
npx clawdbot@latest gateway
This runs the latest version without needing a global install! 🦐
Omd. We're back to the starting problem:
◇ Configure skills now? (recommended)
│ No
│
◇ Gateway daemon runtime ────────────────────────────────────────────╮
│ │
│ QuickStart uses Node for the Gateway daemon (stable + supported). │
│ │
├─────────────────────────────────────────────────────────────────────╯
Error: launchctl bootstrap failed: Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
We're back at the LaunchAgent issue! But remember — you don't need the daemon on a Mac Mini that's always on.
Just skip the daemon and run directly:
# Say "No" to the wizard prompts
# Or run the gateway directly without the daemon setup:
clawdbot gateway --no-daemon
Or if it already started, just use it! The wizard's LaunchAgent failed (as expected), but the gateway itself should still be running.
# Check if the gateway is up
curl http://localhost:18789 -o /dev/null && echo "Gateway is running!"
You can use the web UI at http://localhost:18789 directly. The daemon/LLaunchAgent is optional — running clawdbot gateway manually works perfectly fine for an always-on machine! 🦐
max@Max-Mini clawdbot-check % clawdbot gateway --no-daemon
error: unknown option '--no-daemon'
max@Max-Mini clawdbot-check %
Just run the basic command and say "No" to daemon setup:
# Run gateway without daemon configuration
clawdbot gateway
When it asks about daemon, type n for No.
The wizard will continue and run the gateway directly without registering a LaunchAgent. That's fine for your always-on Mac Mini! 🦐
Says health is offline on the dash
Let's debug this:
# Is the gateway running?
ps aux | grep clawdbot | grep -v grep
# Is the port responding?
curl http://localhost:18789 -o /dev/null && echo "Port is UP" || echo "Port is DOWN"
# Check for any token issues in the output
clawdbot gateway 2>&1 | head -20
What do these show? The health might be offline due to another token mismatch or the gateway not actually running. 🦐
I think it's a token mismatch again
Let's fix the token properly. First, find the current token:
# Get the gateway token from the new installation
cat ~/.clawdbot/clawdbot.json | grep gatewayToken
# If it's not there, check for any token
cat ~/.clawdbot/clawdbot.json | grep token
Then in your browser:
- Open DevTools (Option+Cmd+I)
- Go to Application → Local Storage
- Right-click → Clear (or delete all entries)
- Refresh the page
http://localhost:18789
It should prompt for a token. Paste the one from your config.
If no token in config, add it manually:
nano ~/.clawdbot/clawdbot.json
Add at the top level:
{
"gatewayToken": "some-secure-token-here"
}
What does your config show for the token? 🦐
How do i generate a token?
Generate a token with:
clawdbot token generate
This will create a secure token and add it to your config automatically!
Then restart the gateway:
pkill -f clawdbot
clawdbot gateway
Then clear browser localStorage and refresh. This should fix the token mismatch! 🦐
max@Max-Mini clawdbot-check % clawdbot token generate
error: unknown command 'token'
No problem, generate one manually:
# Generate a random token
openssl rand -hex 32
This will output something like:
a1b2c3d4e5f6...
Then add it to your config:
nano ~/.clawdbot/clawdbot.json
Add at the top level:
{
"gatewayToken": "a1b2c3d4e5f6...",
"gateway": {
"port": 18789
}
}
Save and restart:
pkill -f clawdbot
clawdbot gateway
Then clear browser localStorage and refresh. Done! 🦐
Says i don't have an API key for anthropic - i want to set my default model to openai GPT4o-mini anyway, how do i do it?
Let's configure OpenAI:
nano ~/.clawdbot/clawdbot.json
Add/update the OpenAI section:
{
"gatewayToken": "your-token-here",
"openai": {
"apiKey": "sk-your-openai-api-key-here"
},
"models": {
"default": "gpt-4o-mini"
},
"gateway": {
"port": 18789
}
}
To get your OpenAI API key:
- Go to https://platform.openai.com/api-keys
- Create a new secret key
- Paste it into the config
Then restart the gateway:
pkill -f clawdbot
clawdbot gateway
This sets GPT-4o-mini as your default model! 🦐
Despite doing that, my whatsapp chat is still returning "no api key found for provider "anthropic"
The old process might still be running, or there's a model config issue. Let's fix this:
# Kill all clawdbot processes
pkill -f clawdbot
# Check what's in your config
cat ~/.clawdbot/clawdbot.json | grep -A10 "models"
# Also check for any anthropic references
cat ~/.clawdbot/clawdbot.json | grep -i anthropic
If there's an Anthropic model specified, we need to change it to OpenAI:
nano ~/.clawdbot/clawdbot.json
Make sure you have:
{
"openai": {
"apiKey": "sk-your-openai-key"
},
"models": {
"default": "gpt-4o-mini",
"agents": {
"default": "gpt-4o-mini"
}
}
}
Then restart:
clawdbot gateway
What does your current config show for models? 🦐
The gateway is still booting up with
22:58:53 [gateway] agent model: anthropic/claude-opus-4-5
It's still using the old config. Let's fix it properly:
# Kill the gateway
pkill -f clawdbot
# Edit the config with the correct models section
nano ~/.clawdbot/clawdbot.json
Make sure the config has all model overrides set to OpenAI:
{
"openai": {
"apiKey": "sk-your-openai-key"
},
"models": {
"default": "gpt-4o-mini",
"agents": {
"default": "gpt-4o-mini"
},
"image": {
"default": "dall-e-3"
}
}
}
Key: The gateway is likely reading an old config file or there's a model override somewhere. Save this and restart:
clawdbot gateway
What model does it show now? 🦐
OK i've updated the default model to openai/gpt-4o-mini, but it says the API key is missing. What's the CLI command to add the API key?
Just add it directly in the config:
nano ~/.clawdbot/clawdbot.json
Add your OpenAI key:
{
"openai": {
"apiKey": "sk-your-actual-openai-api-key-here"
},
"models": {
"default": "openai/gpt-4o-mini"
}
}
Save (Ctrl+O, Enter, Ctrl+X), then restart:
pkill -f clawdbot
clawdbot gateway
Make sure to replace sk-your-actual-openai-api-key-here with your real OpenAI API key from https://platform.openai.com/api-keys 🦐
All looks to be done, but i get "timeout must be an integer" - isn't there a way through the CLI commands to change model / set the API token?
Let me check what CLI commands are available:
clawdbot --help
This should show all available commands. There might be a configure command:
clawdbot configure --help
If there's a configure command, you can set things like:
clawdbot configure --openai-key sk-your-key
clawdbot configure --model gpt-4o-mini
What does clawdbot --help show? 🦐
Whenever i switch to gpt-4o-mini it just responds with "timeout must be an integer"
There's likely a malformed timeout in your config. Let's check and fix it:
# Check for any timeout values in config
cat ~/.clawdbot/clawdbot.json | grep -i timeout
# If you find any, make sure they're integers (not strings)
Fix any bad values:
nano ~/.clawdbot/clawdbot.json
Make sure timeout is a number, not a string:
{
"timeout": 300
}
Not:
{
"timeout": "300"
}
Save and restart:
pkill -f clawdbot
clawdbot gateway
What timeout values do you have in the config? 🦐
here's a snippet of my config:
"auth": {
"profiles": {
"anthropic:default": {
"provider": "anthropic",
"mode": "api_key"
},
"openai:default": {
"provider": "openai",
"mode": "token"
},
"openai-codex:default": {
"provider": "openai-codex",
"mode": "oauth"
}
}
},
"models": {},
"agents": {
"defaults": {
"model": {
"primary": "openai-codex/gpt-5.2"
},
"models": {
"openai/gpt-4o-mini": {}
},
"workspace": "/Users/max/clawd"
}
},
What's causing this? What do i need to change?
Found the issues:
- No API key in the auth section — just
"mode": "token"but no actual token - Wrong model — it's using
openai-codex/gpt-5.2instead ofopenai/gpt-4o-mini
Let's fix it:
nano ~/.clawdbot/clawdbot.json
Update the auth section with your actual OpenAI key:
"auth": {
"profiles": {
"openai:default": {
"provider": "openai",
"mode": "api_key",
"apiKey": "sk-your-actual-openai-key-here"
}
}
},
"models": {
"default": "openai/gpt-4o-mini"
},
"agents": {
"defaults": {
"model": {
"primary": "openai/gpt-4o-mini"
},
"models": {
"openai/gpt-4o-mini": {}
}
}
}
Remove the anthropic and openai-codex sections if you don't need them. Then restart:
pkill -f clawdbot
clawdbot gateway
Make sure to replace sk-your-actual-openai-key-here with your real OpenAI key! 🦐
Still get the same error
The error is coming from somewhere in the config. Let's see the full config to find the problematic timeout:
cat ~/.clawdbot/clawdbot.json
Paste the entire config here so we can find the malformed value causing "timeout must be an integer". 🦐
I don't want to share my config as it contains API keys and this is a help thread that anyone can see
"auth": {
"profiles": {
"anthropic:default": {
"provider": "anthropic",
"mode": "api_key"
},
"openai:default": {
"provider": "openai",
"mode": "api_key",
"apiKey": "mykey"
},
"openai-codex:default": {
"provider": "openai-codex",
"mode": "oauth"
}
}
},
"models": {
"default": "openai/gpt-4o-mini"
},
"agents": {
"defaults": {
"model": {
"primary": "openai/gpt-4o-mini"
},
"models": {
"openai/gpt-4o-mini": {}
},
"workspace": "/Users/max/clawd"
}
},
mykey is my API key in my config
Fair point! Let's search yourself and fix it privately:
# Search for any timeout values in your config
grep -n "timeout" ~/.clawdbot/clawdbot.json
Any value that looks like "timeout": "30" (string) needs to be "timeout": 30 (number, no quotes).
Common culprits:
"timeout": "5m"→ should be"timeoutSeconds": 300"timeout": "infinity"→ should be"timeout": 0or removed
Search for "timeout" and make sure it's an integer without quotes. Fix any that look like strings! 🦐
Good config! But the timeout error is coming from somewhere else. Let's find it:
grep -n "timeout" ~/.clawdbot/clawdbot.json
Look for any timeout value that might be a string (in quotes) instead of a number. What does it show? 🦐
Run this command to find the timeout:
grep -n "timeout" ~/.clawdbot/clawdbot.json
This will show line numbers so you can find and fix the problematic value privately! 🦐
Nothing
No timeout in config. This might be a bug in the gateway code or OpenAI provider. Let's debug:
# Check the logs for more context
clawdbot gateway 2>&1 | grep -A5 -B5 timeout
Try a different model to see if it's specific to gpt-4o-mini:
# Use GPT-4o instead
nano ~/.clawdbot/clawdbot.json
# Change to: "default": "openai/gpt-4o"
pkill -f clawdbot
clawdbot gateway
If that works, the issue is specific to the gpt-4o-mini configuration. If not, there might be a deeper bug.
What happens with openai/gpt-4o? 🦐
where in the config do i change that?
In the models section:
nano ~/.clawdbot/clawdbot.json
Change:
"models": {
"default": "openai/gpt-4o-mini"
},
To:
"models": {
"default": "openai/gpt-4o"
},
Then restart:
pkill -f clawdbot
clawdbot gateway
I get the same error message. When i run clawdbot configure and go through the openai route, i add my API key but it doesn't let me pick a model?
The configure wizard might not expose all options. Try configuring through the web UI instead:
- Open
http://localhost:18789in your browser - Go to Settings/Configuration
- There should be a model picker that's more complete than the CLI wizard
If the timeout error persists, this might be a bug in the gateway code itself. You can:
-
Report it as a bug:
- Open an issue at https://github.com/clawdbot/clawdbot/issues
- Include: "timeout must be an integer" error when trying to use OpenAI models
-
Try the latest development version:
npm install -g https://github.com/clawdbot/clawdbot.git
Does the web UI let you configure the model properly? 🦐
Can't see a model picker in the dashboard
This might be a bug. Let's try a completely fresh config:
# Backup and start fresh
cp ~/.clawdbot/clawdbot.json ~/clawdbot.json.backup
rm ~/.clawdbot/clawdbot.json
# Run the wizard again with defaults
clawdbot configure
Answer the wizard questions and see if it works with the generated config. If the error persists, it's likely a bug in the current gateway version.
If it works with defaults, slowly add back your custom settings one at a time to find what causes the timeout error.
If the error still happens, this is a bug you should report: