Managing Your Gateway with the Control UI
Managing a backend service often feels like flying blind. You spend time setting up the core logic, but then you realize you need a way to actually see what is happening or trigger actions without digging through CLI logs every time. It is frustrating to have a powerful tool but no easy way to interact with it from your browser.
I find that having a dedicated interface makes a huge difference. The Gateway includes a built-in browser Control UI (built with Vite and Lit) that runs on the same port as your WebSocket. It gives you a direct way to manage your setup without extra complexity.
What You’ll Need
Section titled “What You’ll Need”Before you get the interface running, make sure you have these pieces ready:
- Static assets located in
dist/control-ui. - The
pnpmpackage manager to build the UI. - The
openclawbinary. - Tailscale (if you want remote access).
Quick Start
Section titled “Quick Start”You can get the Control UI running in about five minutes. The UI is enabled by default as long as the build assets exist.
-
Build the UI assets: Run this command to install dependencies and build the static files.
Terminal window pnpm ui:build -
Verify your config: By default, the UI is enabled. You can customize the path if you want.
{gateway: {controlUi: { enabled: true, basePath: "/openclaw" },},} -
Start the Gateway: Use the CLI to bring the service up.
Terminal window openclaw gateway -
Access the Dashboard: Open your browser to
http://<host>:18789/or your custombasePath.
Tailscale and Security
Section titled “Tailscale and Security”If you want to access your UI outside of your local machine, I recommend using Tailscale. It handles the encryption and identity for you.
Recommended: Integrated Serve
Section titled “Recommended: Integrated Serve”Keep your Gateway on loopback and let Tailscale Serve handle the proxying. This is the cleanest way to manage access.
{ gateway: { bind: "loopback", tailscale: { mode: "serve" }, },}You can then access it via https://<magicdns>/.
Public Access (Funnel)
Section titled “Public Access (Funnel)”If you need the UI to be available on the public internet, use the Funnel mode. Note that this requires a password.
{ gateway: { bind: "loopback", tailscale: { mode: "funnel" }, auth: { mode: "password" }, }}Auth Requirements
Section titled “Auth Requirements”Security is active by default. Here are two things to remember:
- Non-loopback binds always require a shared token or password.
- The UI uses anti-clickjacking headers and restricts WebSocket connections to the same-origin unless you specify
gateway.controlUi.allowedOrigins.
Webhooks
Section titled “Webhooks”If you need to trigger actions from external services, you can enable webhooks. When hooks.enabled=true is set in your config, the Gateway exposes a webhook endpoint on the same HTTP server.
Troubleshooting
Section titled “Troubleshooting”If things aren’t working, check these common issues:
- UI not loading: Ensure you have run
pnpm ui:build. The Gateway cannot serve the UI if thedist/control-uifolder is missing. - Connection refused on Tailnet: If you are binding to
tailnetinstead of usingserve, remember that a token is strictly required for non-loopback binds. Check yourgateway.authsettings.
If you have questions about specific configuration parameters, check out the AI Setup Assistant.
What’s Next
Section titled “What’s Next”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.