#gateway never works

1 messages · Page 1 of 1 (latest)

upbeat dune
#

â—‡
Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-04-19.log
Command: C:\Program Files\nodejs\node.exe C:\Users\Clawdbot\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18790
Service file: ~.openclaw\gateway.cmd
Service env: OPENCLAW_GATEWAY_PORT=18790

Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18790 (service args)
Probe target: ws://127.0.0.1:18790
Dashboard: http://127.0.0.1:18790/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid 2880, Startup-folder login item installed; listener detected on port 18790.)
Warm-up: launch agents can take a few seconds. Try again shortly.
RPC probe: failed
RPC target: ws://127.0.0.1:18790
timeout

Port 18790 is already in use.

  • pid 2880: "C:\Program Files\nodejs\node.exe" C:\Users\Clawdbot\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18790 (127.0.0.1:18790)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18790
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    PS C:\Users\Clawdbot> openclaw gateway restart

Restarted Windows login item: OpenClaw Gateway
Gateway restart failed after 28s: service stayed stopped and port 18790 stayed free.
Service runtime: status=stopped
Gateway port 18790 status: free.
Gateway restart failed after 28s: service stayed stopped and health checks never came up.
PS C:\Users\Clawdbot> openclaw gateway stop
Stopped Windows login item: OpenClaw Gateway
PS C:\Users\Clawdbot> openclaw gateway restart
Restarted Windows login item: OpenClaw Gateway
Gateway restart failed after 28s: service stayed stopped and port 18790 stayed free.
Service runtime: status=stopped
Gateway port 18790 status: free.
Gateway restart failed after 28s: service stayed stopped and health checks never came up.

regal iglooBOT
knotty martenBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

regal iglooBOT
raven carbonBOT
#

I’m checking the current docs and repo before I answer, because this smells like one of those Windows service edge cases.

#

Found the current docs repo, one sec, I’m pulling the exact Windows gateway bits instead of guessing.

#

This looks like more than a simple port conflict.

The interesting bit is:

  • first, something is listening on 127.0.0.1:18790, but the RPC probe times out
  • after restart, the service does not stay up at all

On native Windows, that usually means either the gateway is crashing during boot, or the Windows service wrapper is stale/confused.

First, please paste:

openclaw --version

Then run these in this exact order and paste the output:

#
openclaw status --all
openclaw gateway status --deep
openclaw doctor
openclaw gateway install --force
openclaw gateway restart

If it still fails, do this next, because it will usually show the real error instead of hiding behind the service wrapper:

openclaw gateway stop
openclaw gateway --verbose --port 18790

A couple of clues from your output:

#
  • RPC probe: failed ... timeout means the process existed, but the gateway was not actually healthy
  • seeing both a Scheduled Task and Startup-folder login item installed makes me suspicious of stale Windows service state, so openclaw gateway install --force is worth doing here

Relevant docs:

Also, if this is a fresh setup and you are not tied to native Windows, WSL2 is still the more stable path right now.

upbeat dune
#

OpenClaw 2026.4.15 (041266a

raven carbonBOT
#

Nice, 2026.4.15 is recent enough, so this probably is not just an old fixed bug.

The highest-signal next step is to bypass the Windows service wrapper and see the real startup error:

openclaw gateway stop
openclaw gateway --verbose --port 18790

Then paste the first error it prints.

Two possibilities:

  1. It crashes immediately

    • great, then we finally get the actual cause
  2. It stays up fine

#
  • then the gateway itself is okay, and the broken part is the Windows Scheduled Task / login-item wrapper
    • in that case run:
openclaw gateway install --force
openclaw gateway restart
openclaw gateway status --deep

Your earlier output mentioning both Scheduled Task (registered) and Startup-folder login item installed is a bit suspicious, so I’m leaning toward stale Windows service state unless the foreground run shows a config/runtime error.

upbeat dune
#

23:16:33 [canvas] host mounted at http://127.0.0.1:18790/__openclaw__/canvas/ (root C:\Users\Clawdbot.openclaw\canvas)
23:16:34 bonjour: starting (hostname=openclaw, instance="DESKTOP-PUNQCB1 (OpenClaw)", gatewayPort=18790, minimal=true)
23:16:34 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
23:16:35 [gateway] agent model: minimax-portal/MiniMax-M2.7
23:16:35 [gateway] ready (6 plugins: acpx, browser, device-pair, phone-control, talk-voice, telegram; 56.2s)
23:16:35 [gateway] log file: \tmp\openclaw\openclaw-2026-04-20.log
23:16:36 [gateway] security warning: dangerous config flags enabled: gateway.controlUi.allowInsecureAuth=true. Run openclaw security audit.
23:16:36 [gateway] starting channels and sidecars...
23:16:37 [telegram] autoSelectFamily=true (default-node22)
23:16:37 [telegram] dnsResultOrder=ipv4first (default-node22)
23:16:38 [hooks:loader] Registered hook: boot-md -> gateway:startup
23:16:38 [hooks:loader] Registered hook: bootstrap-extra-files -> agent:bootstrap
23:16:38 [hooks:loader] Registered hook: command-logger -> command
23:16:38 [hooks:loader] Registered hook: session-memory -> command:new, command:reset
23:16:38 [hooks] loaded 4 internal hook handlers
23:16:39 [bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=DESKTOP-PUNQCB1 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18790 state=probing)
23:16:39 [telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,ENETUNREACH)

raven carbonBOT
#

That helps a lot, nice catch.

Your gateway is actually coming up, it is just slow. The smoking gun is:

  • restart command gives up after about 28s
  • foreground run says [gateway] ready ... (56.2s)

So this looks like a Windows service restart health timeout, not a real gateway crash.

#

Ah, this is actually really useful.

Your gateway does start. The key line is:

[gateway] ready ... (56.2s)

So the problem is likely this:

  • the Windows service/login-item wrapper decides startup failed after about 28s
  • but your actual gateway needs about 56s to become ready

So this looks like a false failure during slow startup, not a dead gateway.

I’d try a clean Windows service reinstall first, because the mix of:

#
  • Scheduled Task (registered)
  • Startup-folder login item installed

looks stale/weird.

Run this exact sequence:

openclaw gateway stop
openclaw gateway uninstall
openclaw gateway install --force
openclaw gateway start
Start-Sleep -Seconds 70
openclaw gateway status --deep

A couple notes:

#
  • if gateway start still complains early, still wait the full 70s and then check openclaw gateway status --deep
  • the security warning: gateway.controlUi.allowInsecureAuth=true is separate, not the reason startup is failing
  • the foreground log strongly suggests the gateway itself is okay

If after that status --deep still looks wrong, paste it here.
If the clean reinstall fixes it, please mark the solution so Answer Overflow can index it 🎉

upbeat dune
#

00:27:22 [telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,ENETUNREACH)
00:31:02 [model-pricing] pricing bootstrap failed: TimeoutError: The operation was aborted due to timeout
00:31:02 [bonjour] restarting advertiser (service stuck in announcing for 221959ms (gateway fqdn=DESKTOP-PUNQCB1 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))
00:31:21 [bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=DESKTOP-PUNQCB1 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=unannounced)
00:32:00 [bonjour] restarting advertiser (service stuck in probing for 38411ms (gateway fqdn=DESKTOP-PUNQCB1 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing))
00:32:09 [bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=DESKTOP-PUNQCB1 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=unannounced)
00:32:09 [plugins] embedded acpx runtime backend registered (cwd: C:\Users\Clawdbot.openclaw\workspace)
00:32:09 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
00:32:15 [heartbeat] started
00:32:15 [telegram] [default] starting provider
00:32:20 [telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,ENETUNREACH)
00:32:20 [plugins] embedded acpx runtime backend ready
00:32:21 [bonjour] restarting advertiser (service stuck in announcing for 11601ms (gateway fqdn=DESKTOP-PUNQCB1 (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))

raven carbonBOT
#

Yep, this pretty much confirms it.

Those logs show the gateway is actually alive:

  • browser/server ... listening
  • [heartbeat] started
  • embedded acpx runtime backend ready
  • telegram [default] starting provider

So the real issue is:

  • native Windows startup wrapper says “failed” too early
  • meanwhile the gateway keeps booting and eventually comes up in the background

Also, these are not the blocker:

  • telegram ... ENETUNREACH = network fallback/noisy, but not fatal
#
  • model-pricing ... timeout = annoying, not fatal
  • bonjour ... re-advertise = discovery noise, not fatal

What I’d do next

After a restart, wait 60 to 90 seconds, then run:

openclaw gateway status --deep
openclaw health --verbose

If those succeed, your gateway is fine and this is basically a false-negative Windows service health check.

Practical workaround

For now on native Windows:

#
  • start/restart the gateway
  • ignore the early “failed” message
  • wait about a minute
  • then use it

If you want the most stable path right now, either:

And honestly, if status --deep/health --verbose work after the wait, I’d file this as a bug here: https://github.com/openclaw/openclaw/issues

If you paste the status --deep output after the wait, I can sanity check it quickly.

upbeat dune
#

Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-04-21.log
Command: C:\Program Files\nodejs\node.exe C:\Users\Clawdbot\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789
Service file: ~.openclaw\gateway.cmd
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 70664, Startup-folder login item installed; listener detected on port 18789.)
RPC probe: ok

Listening: 127.0.0.1:18789
Troubles: run openclaw status

raven carbonBOT
#

Nice, that’s healthy now 🎉

The important bits are:

  • Runtime: running
  • RPC probe: ok
  • Listening: 127.0.0.1:18789

So the gateway is up and responding correctly.

A couple notes:

  • 18789 is the normal default port, so I’d just leave it there unless you specifically need 18790
  • the earlier behavior really does look like stale/odd Windows service state plus slow startup

If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it for the next person.

upbeat dune
#

no, its not running properly, my telegram is not working with it

raven carbonBOT
#

Ah, got it, thanks for correcting me. Then the gateway is up, but the Telegram channel is not healthy. Let me pull the Telegram-specific checks so I don’t hand-wave this.

#

Yep, fair, then we’re debugging Telegram, not just the gateway.

Please run these and paste the output:

openclaw status
openclaw gateway status
openclaw channels status --probe
openclaw pairing list telegram

Then keep this running:

openclaw logs --follow
#

While the logs are open, test one of these:

  • DM test: message the bot /start
  • Group test: send a message that @mentions the bot

Then paste the Telegram-related log lines that appear right after.

Most likely buckets:

  • DM /start but no reply → pairing / dmPolicy
  • Bot works in DM but not group → mention requirement or Telegram privacy mode
  • send/network errors → DNS/IPv6/proxy path to api.telegram.org

And since you already had:

upbeat dune
#

🦞 OpenClaw 2026.4.15 (041266a) — I run on caffeine, JSON5, and the audacity of "it worked on my machine."

Restarted Windows login item: OpenClaw Gateway
Gateway restart failed after 28s: service stayed stopped and port 18789 stayed free.
Service runtime: status=stopped
Gateway port 18789 status: free.
Gateway restart failed after 28s: service stayed stopped and health checks never came up.
Tip: openclaw gateway status --deep
Tip: openclaw doctor
PS C:\Users\Clawdbot>

raven carbonBOT
#

That’s just the same gateway restart failure again, it doesn’t tell us anything new about Telegram.

Don’t restart it again for the moment.
Please run this exact command and paste the result:

openclaw channels status --probe

That’s the one that will tell us whether Telegram is:

  • connected
  • auth-broken
  • network-broken
  • or just blocked by pairing / group policy

If you want the fastest next step after that, do:

#
openclaw logs --follow

Then send /start to the bot in Telegram and paste the new Telegram log lines.

Right now we’re missing the one output that actually diagnoses the Telegram side.

upbeat dune
#

i'm trying to uninstall openclaw, but everytime i reinstall openclaw it automatically has all the info from previous install. how can i get rid of all of it.

raven carbonBOT
#

Yep, that’s because the state/config directory survives reinstalls. Uninstalling the package alone does not remove ~/.openclaw. Let me pull the exact Windows cleanup bits so I don’t miss a leftover.

#

Yep, that’s expected if the state dir is still there. Reinstalling the package does not wipe C:\Users\Clawdbot\.openclaw.

Fastest full wipe

If openclaw still works, run:

openclaw uninstall --all --yes --non-interactive

If you want to do it manually on Windows

openclaw gateway stop
openclaw gateway uninstall
npm rm -g openclaw
#
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw"

If you installed with pnpm or bun, use that instead of npm rm -g:

pnpm remove -g openclaw
# or
bun remove -g openclaw

Important leftovers to check

If you ever used profiles, also delete those state dirs too, for example:

  • C:\Users\Clawdbot\.openclaw-dev
#
  • C:\Users\Clawdbot\.openclaw-work
  • any other C:\Users\Clawdbot\.openclaw-<profile>

If you set custom env/config paths, wipe those too:

  • OPENCLAW_STATE_DIR
  • OPENCLAW_CONFIG_PATH

If the CLI is already gone but the service still survives

schtasks /Delete /F /TN "OpenClaw Gateway"
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd"

The key thing is: delete the state directory, not just the installed package.

upbeat dune
#

yes

raven carbonBOT
#

Alright, here’s the PowerShell nuke-it-all version.

Warning: this deletes OpenClaw config, credentials, sessions, pairings, workspace, and profile state dirs.

$ErrorActionPreference = "SilentlyContinue"

if (Get-Command openclaw -ErrorAction SilentlyContinue) {
  openclaw gateway stop
  openclaw gateway uninstall
}

schtasks /Delete /F /TN "OpenClaw Gateway" | Out-Null

Get-ChildItem "$env:USERPROFILE" -Force -Directory |
  Where-Object { $_.Name -eq ".openclaw" -or $_.Name -like ".openclaw-*" } |
#
  ForEach-Object {
    Write-Host "Deleting $($_.FullName)"
    Remove-Item $_.FullName -Recurse -Force
  }

if (Get-Command npm -ErrorAction SilentlyContinue)  { npm rm -g openclaw }
if (Get-Command pnpm -ErrorAction SilentlyContinue) { pnpm remove -g openclaw }
if (Get-Command bun -ErrorAction SilentlyContinue)  { bun remove -g openclaw }

Then verify it’s really gone:

Get-ChildItem "$env:USERPROFILE" -Force -Directory |
  Where-Object { $_.Name -eq ".openclaw" -or $_.Name -like ".openclaw-*" }
#

schtasks /Query /TN "OpenClaw Gateway"
where.exe openclaw

If you ever set a custom OPENCLAW_STATE_DIR or OPENCLAW_CONFIG_PATH, delete those paths too, because they survive reinstalls as well.

Docs: https://docs.openclaw.ai/install/uninstall

If you want, after you run it, paste the verify output and I’ll sanity check that it’s actually clean.

upbeat dune
#

Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:

  • C:\Users\Clawdbot\AppData\Roaming\npm\node_modules\openclaw\dist\extensions\feishu\client-yWGpoGkZ.js
raven carbonBOT
#

Oof, okay, that’s finally a concrete root cause.

Your install is broken, it’s trying to load the Feishu extension but the package dependency is missing. Let me verify whether that dependency is supposed to be bundled or installed separately.

#

Yep, that error is a broken global package install, not just leftover user data.

This part gives it away:

C:\Users\Clawdbot\AppData\Roaming\npm\node_modules\openclaw\...
Cannot find module '@larksuiteoapi/node-sdk'

So wiping only C:\Users\Clawdbot\.openclaw will not fix it. You also need to remove the broken npm global install itself.

Do this on Windows

$ErrorActionPreference = "SilentlyContinue"
#
openclaw gateway stop
openclaw gateway uninstall

npm rm -g openclaw

Remove-Item -Recurse -Force "$env:APPDATA\npm\node_modules\openclaw"
Remove-Item -Force "$env:APPDATA\npm\openclaw.cmd"
Remove-Item -Force "$env:APPDATA\npm\openclaw.ps1"

Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw"

Get-ChildItem "$env:USERPROFILE" -Force -Directory |
  Where-Object { $_.Name -like ".openclaw-*" } |
  Remove-Item -Recurse -Force
#

Then reinstall cleanly:

npm install -g openclaw@latest

Why this matters

You had two separate leftovers:

  1. ~\.openclaw → config, sessions, credentials, workspace
  2. %APPDATA%\npm\node_modules\openclaw → the actual broken program files

This Feishu error is from #2.

If you reinstall after that and still get the same missing-module error, I’d call that a real packaging bug and file it here: https://github.com/openclaw/openclaw/issues

#

If you want, paste the output after the cleanup + reinstall and I’ll sanity check it.

upbeat dune
#

ok, whats the best command to reinstall now on windows

raven carbonBOT
#

Yep. For native Windows, the cleanest reinstall is the official PowerShell installer. I’m grabbing the exact command from the docs so I don’t misquote it.

#

For native Windows, the best reinstall command is the official PowerShell installer:

iwr -useb https://openclaw.ai/install.ps1 | iex

If you want to install first, onboard later, use:

& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard

Then run:

openclaw onboard --install-daemon
upbeat dune
#

ok, lets do that

raven carbonBOT
#

Nice. I’d do it in this order:

1) Finish nuking the native Windows install

Run the cleanup block from above first so the old Scheduled Task / npm install is gone.

2) Install WSL2 from PowerShell as Admin

wsl --install -d Ubuntu-24.04

Reboot if Windows asks.

3) Enable systemd inside WSL

Open Ubuntu, then run:

#
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOF

Then back in PowerShell:

wsl --shutdown

4) Re-open Ubuntu and install OpenClaw inside WSL

I’d use the repo checkout path here:

#
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm build
pnpm ui:build
pnpm openclaw onboard --install-daemon

5) Verify

openclaw gateway status

If you want, after you get WSL installed, paste where you’re at and I’ll walk you through the next command. Docs: https://docs.openclaw.ai/platforms/windows

upbeat dune
#

create a nuke uninstall with those 2 separate leftovers covered

raven carbonBOT
#

Yep, here’s a Windows nuke uninstall that covers both leftovers:

  1. user state/config/workspace under C:\Users\Clawdbot\.openclaw*
  2. broken global npm install under %APPDATA%\npm\...

Warning: this is destructive.

$ErrorActionPreference = "SilentlyContinue"

# Stop/remove service if the CLI still exists
if (Get-Command openclaw -ErrorAction SilentlyContinue) {
  openclaw gateway stop
  openclaw gateway uninstall
}
#
# Remove lingering Windows task
schtasks /Delete /F /TN "OpenClaw Gateway" | Out-Null

# Leftover #1: state/config/workspace/profile dirs
Get-ChildItem "$env:USERPROFILE" -Force -Directory |
  Where-Object { $_.Name -eq ".openclaw" -or $_.Name -like ".openclaw-*" } |
  ForEach-Object {
    Write-Host "Removing state dir $($_.FullName)"
    Remove-Item $_.FullName -Recurse -Force
  }

# Leftover #2: broken global npm install + wrappers
npm rm -g openclaw | Out-Null
Remove-Item -Recurse -Force "$env:APPDATA\npm\node_modules\openclaw"
Remove-Item -Force "$env:APPDATA\npm\openclaw.cmd"
#
Remove-Item -Force "$env:APPDATA\npm\openclaw.ps1"
Remove-Item -Force "$env:APPDATA\npm\openclaw"

# Optional: custom env-based locations if you used them
if ($env:OPENCLAW_STATE_DIR) {
  Write-Host "Removing custom state dir $env:OPENCLAW_STATE_DIR"
  Remove-Item $env:OPENCLAW_STATE_DIR -Recurse -Force
}
if ($env:OPENCLAW_CONFIG_PATH) {
  Write-Host "Removing custom config file $env:OPENCLAW_CONFIG_PATH"
  Remove-Item $env:OPENCLAW_CONFIG_PATH -Force
}

Write-Host "OpenClaw nuke uninstall complete. Open a new PowerShell before reinstalling."
#

Quick verify

Get-ChildItem "$env:USERPROFILE" -Force -Directory |
  Where-Object { $_.Name -eq ".openclaw" -or $_.Name -like ".openclaw-*" }

Test-Path "$env:APPDATA\npm\node_modules\openclaw"
where.exe openclaw

If you want, I can give you the next WSL2 install command immediately after this so you can go straight from wipe to clean setup.

upbeat dune
#

yes

raven carbonBOT
#

Perfect. After the nuke uninstall, start here in PowerShell as Administrator:

wsl --install -d Ubuntu-24.04

If Windows asks, reboot.

Then in the new Ubuntu window run:

sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOF
#

Back in PowerShell:

wsl --shutdown

Re-open Ubuntu, then install OpenClaw inside WSL:

git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm build
pnpm ui:build
pnpm openclaw onboard --install-daemon