Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
System control (launchd/systemd) lives on the Gateway host. See Gateway.
Android node app ⇄ (mDNS/NSD + WebSocket) ⇄ Gateway
Android connects directly to the Gateway WebSocket and uses device pairing (
role: nodeFor Tailscale or public hosts, Android requires a secure endpoint:
https://<magicdns>wss://<magicdns>wss://ws://.locallocalhost127.0.0.110.0.2.2ws://wss://openclawbashopenclaw gateway --port 18789 --verbose
Confirm in logs you see something like:
listening on ws://0.0.0.0:18789For remote Android access over Tailscale, prefer Serve/Funnel instead of a raw tailnet bind:
bashopenclaw gateway --tailscale serve
This gives Android a secure
wss://https://gateway.bind: "tailnet"From the gateway machine:
bashdns-sd -B _openclaw-gw._tcp local.
More debugging notes: Bonjour.
If you also configured a wide-area discovery domain, compare against:
bashopenclaw gateway discover --json
That shows
local.Android NSD/mDNS discovery won’t cross networks. If your Android node and the gateway are on different networks but connected via Tailscale, use Wide-Area Bonjour / unicast DNS-SD instead.
Discovery alone is not sufficient for tailnet/public Android pairing. The discovered route still needs a secure endpoint (
wss://openclaw.internal._openclaw-gw._tcpDetails and example CoreDNS config: Bonjour.
In the Android app:
ws://wss://After the first successful pairing, Android auto-reconnects on launch:
After the authenticated node session connects, and when the app moves to the background while the foreground service is still connected, Android calls
node.eventevent: "node.presence.alive"lastSeenAtMslastSeenReasonThe app counts the beacon as successfully recorded only when the gateway response includes
handled: truenode.event{ "ok": true }On the gateway machine:
bashopenclaw devices list openclaw devices approve <requestId> openclaw devices reject <requestId>
Pairing details: Pairing.
Optional: if the Android node always connects from a tightly controlled subnet, you can opt in to first-time node auto-approval with explicit CIDRs or exact IPs:
json5{ gateway: { nodes: { pairing: { autoApproveCidrs: ["192.168.1.0/24"], }, }, }, }
This is disabled by default. It applies only to fresh
role: nodeVia nodes status:
bashopenclaw nodes status
Via Gateway:
bashopenclaw gateway call node.list --params "{}"
The Android Chat tab supports session selection (default
mainchat.history<tool_call>...</tool_call><function_call>...</function_call><tool_calls>...</tool_calls><function_calls>...</function_calls>NO_REPLYno_replychat.sendchat.subscribeevent:"chat"If you want the node to show real HTML/CSS/JS that the agent can edit on disk, point the node at the Gateway canvas host.
Create
~/.openclaw/workspace/canvas/index.htmlNavigate the node to it (LAN):
bashopenclaw nodes invoke --node "<Android Node>" --command canvas.navigate --params '{"url":"http://<gateway-hostname>.local:18789/__openclaw__/canvas/"}'
Tailnet (optional): if both devices are on Tailscale, use a MagicDNS name or tailnet IP instead of
.localhttp://<gateway-magicdns>:18789/__openclaw__/canvas/This server injects a live-reload client into HTML and reloads on file changes. The A2UI host lives at
http://<gateway-host>:18789/__openclaw__/a2ui/Canvas commands (foreground only):
canvas.evalcanvas.snapshotcanvas.navigate{"url":""}{"url":"/"}canvas.snapshot{ format, base64 }format="jpeg"canvas.a2ui.pushcanvas.a2ui.resetcanvas.a2ui.pushJSONLCamera commands (foreground only; permission-gated):
camera.snapcamera.clipSee Camera node for parameters and CLI helpers.
dataSyncdataSync|microphoneFOREGROUND_SERVICE_MICROPHONERECORD_AUDIOtalk.speaktalk.speakdevice.statusdevice.infodevice.permissionsdevice.healthnotifications.listnotifications.actionsphotos.latestcontacts.searchcontacts.addcalendar.eventscalendar.addcallLog.searchsms.searchmotion.activitymotion.pedometerAndroid supports launching OpenClaw from the system assistant trigger (Google Assistant). When configured, holding the home button or saying "Hey Google, ask OpenClaw..." opens the app and hands the prompt into the chat composer.
This uses Android App Actions metadata declared in the app manifest. No extra configuration is needed on the gateway side -- the assistant intent is handled entirely by the Android app and forwarded as a normal chat message.
Android can forward device notifications to the gateway as events. Several controls let you scope which notifications are forwarded and when.
| Key | Type | Description |
|---|---|---|
text notifications.allowPackages | string[] | Only forward notifications from these package names. If set, all other packages are ignored. |
text notifications.denyPackages | string[] | Never forward notifications from these package names. Applied after text allowPackages |
text notifications.quietHours.start | string (HH:mm) | Start of quiet hours window (local device time). Notifications are suppressed during this window. |
text notifications.quietHours.end | string (HH:mm) | End of quiet hours window. |
text notifications.rateLimit | number | Maximum forwarded notifications per package per minute. Excess notifications are dropped. |
The notification picker also uses safer behavior for forwarded notification events, preventing accidental forwarding of sensitive system notifications.
Example configuration:
json5{ notifications: { allowPackages: ["com.slack", "com.whatsapp"], denyPackages: ["com.android.systemui"], quietHours: { start: "22:00", end: "07:00", }, rateLimit: 5, }, }
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine