Skip to main content
xbot
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Web Channel

Browser-based chat interface. Supports user registration/login, invite-only mode, and persona isolation.

Requires Server mode.

Configuration

{
  "web": {
    "enable": true,
    "host": "",
    "port": 8082,
    "static_dir": "",
    "upload_dir": "",
    "persona_isolation": false,
    "invite_only": true
  },
  "admin": {
    "token": "your-secret-token"
  }
}
FieldRequiredDefaultDescription
enablefalseEnable the Web channel
host""Listen address (empty = all interfaces)
port0Listen port
static_dirauto-detectedPath to the frontend static files directory
upload_dir""Custom directory for uploaded files
persona_isolationfalseIsolate each web user’s persona from others
invite_onlytrueDisable self-registration. Defaults to true (secure default) — the first account can still register (first-user bootstrap); after that only an admin can create accounts. Set explicitly to false to re-open public registration.
Warning
The JSON key is enable (not enabled), unlike other channels.

Web UI installation

In Server mode, the installer automatically downloads the Web UI to ~/.xbot/web/dist/.

For manual installation, download the web release archive and extract it to ~/.xbot/web/dist/.

Access

After starting the server, open http://your-server:8082 in a browser.

Message Composer

Rich-text (WYSIWYG) editor with Markdown shortcuts (**bold**, - lists, etc.) and links:

FeatureDescription
LinksTyping https://… followed by a space auto-links; pasted links and Markdown link syntax ([text](URL)) render live; links are highlighted in the theme accent color
Link editingSelect text to reveal a floating toolbar (bold/italic/strikethrough/inline code/link); Ctrl/Cmd+K adds or edits a link, one-click unlink
File uploadAny file type is accepted (no type whitelist). Click 📎, paste (screenshots upload automatically), or drag-and-drop files onto the composer to attach them
Upload limit10MB per file (size only — no type restrictions)

Authentication

MethodDescription
Username / passwordRegister and login; session cookies valid for 30 days
CLI tokenWebSocket connection using the admin token
Feishu loginOne-click login / link via Feishu account

Invite-only mode

When invite_only is true:

  • New users cannot self-register (receives 403)
  • The admin can create accounts via Feishu admin commands or direct database operations
  • Suitable for internal team use

First-user bootstrap

A brand-new deployment has no accounts yet, so the first registration is allowed — that account becomes the operator. The registration page says so explicitly (“First-time setup · one-time only”) and states that registration closes automatically afterwards, so a visitor never has to guess whether the endpoint is open to everyone. Once the account exists, /register shows an invite-only notice and the login page hides the register entry entirely.

UI mode (Auto / Desktop / Mobile)

The web UI ships two shells — desktop and mobile — and picks one automatically from the viewport width (≤767px → mobile shell). Narrow tablets, landscape phones and small desktop windows sit right on that boundary, so you can pin the shell manually under Settings → Appearance → UI mode:

ModeBehavior
Auto (default)Follows the viewport breakpoint (≤767px = mobile shell)
DesktopAlways use the desktop shell (multi-panel / Dockview layout)
MobileAlways use the mobile shell (drawer sessions + bottom nav)

The preference is stored locally (localStorage) and takes effect immediately; it also syncs to the server (web:ui:ui-mode) so other browsers/devices keep the same choice. It only switches the shell — CSS breakpoints are unchanged, so forcing the desktop shell on a narrow screen yields a compressed desktop layout.

Persona isolation

When persona_isolation is true:

  • Each web user’s system persona is isolated from others
  • User A’s agent behavior settings do not affect User B
  • Suitable for multi-tenant scenarios

See also