Welcome to RDK X5 MagicBox repository
4. OpenClaw WebChat Interaction
WebChat
Status: macOS/iOS SwiftUI chat UI directly communicates with Gateway WebSocket.
What It Is
Native chat UI for Gateway (no embedded browser, no local static server).
Uses the same session and routing rules as other channels.
Deterministic routing: replies always return to WebChat.
Quick Start
Enter the root environment (if the application was installed in the root directory using root privileges).
xxxxxxxxxxsudo su
Start the Gateway. (Typically, the Gateway starts automatically, so running this command is not necessary.)
xxxxxxxxxxopenclaw gateway
Open the WebChat UI (macOS/iOS app) or the Chat tab within the Control UI.
xxxxxxxxxxopenclaw dashboard

Or directly enter web dialogue from the first deployment interface

Ensure Gateway authentication is configured (required by default, even on loopback).

How It Works (Behavior)
UI connects to Gateway WebSocket and uses
chat.history,chat.send, andchat.inject.chat.injectdirectly appends assistant messages to the transcript and broadcasts to UI (no agent run).History is always fetched from Gateway (no local file watching).
If Gateway is unreachable, WebChat is read-only.
Remote Usage
Remote mode tunnels Gateway WebSocket via SSH/Tailscale.
You don't need to run a separate WebChat server.
Configuration Reference (WebChat)
Full configuration: Configuration Channel options:
There is no dedicated
webchat.*block. WebChat uses the Gateway endpoints + authentication settings below.
Related global options:
gateway.port,gateway.bind: WebSocket host/port.gateway.auth.mode,gateway.auth.token,gateway.auth.password: WebSocket authentication.gateway.remote.url,gateway.remote.token,gateway.remote.password: Remote Gateway target.session.*: Session storage and primary key defaults.
For more information about WEB interface, refer to: WebChat - OpenClaw