#change port 18789 from the curl|bash rootless

1 messages · Page 1 of 1 (latest)

silk scroll
#

Hi it seems changing the port within the openclaw.json and restarting th gateway even reboot the host didn‘t change ist, its still on 18789 any ideas?

wet echoBOT
#

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

sturdy lynxBOT
#

Port changes usually “don’t stick” for one of two reasons:

  1. you edited the wrong key, or
  2. the daemon/service is running off a different config / override than the one you edited.

1) Make sure you changed the right setting

The gateway port is:

  • gateway.port (single multiplexed port for HTTP + WebSocket)

Docs: https://docs.openclaw.ai/help/faq#what-port-does-the-gateway-use

Also note the precedence (so config can be ignored):

--port > OPENCLAW_GATEWAY_PORT > gateway.port > default 18789

So if your service was installed with --port 18789 or you have OPENCLAW_GATEWAY_PORT=18789 in the service env, it will always stay on 18789.

#

2) Check if your service is even using the config you edited

Run this and paste the output here (it’s safe; redact token if shown):

openclaw --version
openclaw gateway status

In particular, look for lines like:

  • Config (cli) vs Config (service) (if these differ, you’re editing one file but the daemon is using another)
  • Listening: (what it’s actually bound to)

If Config (cli) and Config (service) are different, the fix is typically: