#change port 18789 from the curl|bash rootless
1 messages · Page 1 of 1 (latest)
Port changes usually “don’t stick” for one of two reasons:
- you edited the wrong key, or
- 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)vsConfig (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: