Skip to content

502 Bad Gateway when accessing OpenClaw UI on Brev #45

@kegetaneh

Description

@kegetaneh

Environment:

  • OpenClaw version: 2026.3.11 (29dc654)
  • Brev instance: openclaw0-q57d5sznt.brevlab.com
  • OS: Ubuntu (ubuntu@brev-q57d5sznt)

Steps to reproduce:

  1. SSH into Brev instance
  2. Run: CHAT_UI_URL=https://OpenClaw0-q57d5sznt.brevlab.com bash /home/ubuntu/OpenShell-Community/sandboxes/openclaw-nvidia/openclaw-nvidia-start.sh
  3. Gateway starts successfully (pids confirmed, ports 18788/18789 active)
  4. Open the UI URL in browser

Expected behavior:
OpenClaw UI loads at the brevlab.com URL
Actual behavior:
502 Bad Gateway — Cloudflare reports Host Error. The public URL never becomes reachable.
Root cause from logs (/tmp/gateway.log):
A config change (gateway.auth.token) is detected immediately after startup, triggering a gateway restart. The restart fails because the original process is still holding port 18788, causing a lock timeout after 5000ms. The gateway ends up in a broken state.

Tried:

  • Multiple restarts
  • openclaw gateway stop then restarting
  • Running inside tmux
  • All attempts result in the same 502 error

Screenshots of the 502 error and gateway log attached.

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions