Two network modes
Setup mode (AP) — when unconfigured (or when it can’t join a known network), the box hosts its own Wi-Fi:
If an Ethernet uplink is connected while in AP mode, the box shares that internet connection to hotspot clients (IP forwarding + NAT).
Steady state (LAN) — after setup, the box joins your network and is reachable at:
http://<LAN-IP>— always works; the canonical fallback.http://clawbox.local— mDNS via avahi (hostname configurable in Settings).
Why clawbox.local sometimes fails — and what to do
mDNS (multicast DNS) is what resolves .local names, and it’s the least reliable part of consumer networks:
- Windows historically resolves mDNS poorly (better in 11, still flaky).
- Routers/APs often drop multicast between Wi-Fi and wired segments — a wired ClawBox may be invisible by name to Wi-Fi laptops (and vice versa) while being perfectly reachable by IP.
- Guest networks and VPNs isolate clients from mDNS entirely.
- Your router’s connected-devices list (look for
clawbox). - Over SSH (if
ssh [email protected]still works in a terminal):hostname -I— first entry. - The device screen/desktop if a display is attached (System Tray → network).
Port map
Firewall
The box ships a default-deny inbound firewall (ufw): deny incoming, allow outgoing,
allow routed. It is an allowlist, so a port nobody opened is closed — including one that
some future package decides to bind on 0.0.0.0.
- The service ports are scoped to private sources. 22, 80, 443, 18789 and 8090 are open
only from
10/8,172.16/12,192.168/16,169.254/16and100.64/10(CGNAT, which is what Tailscale uses). IPv6 is deliberately NOT source-scoped: there is no RFC1918 on v6, a dual-stack LAN hands the box a global address, and that is the address avahi publishes forclawbox.local— scoping to link-local/ULA would drop SSH and the web UI over the very address the box advertises. A ClawBox is an appliance on a home or office LAN; a non-private source address means it has ended up somewhere it was never designed to be. - Also open:
5353/udpmDNS from anywhere (otherwiseclawbox.localstops resolving),67/udpDHCP on the AP interface, and53/tcp+udpfrom10.42.0.0/24and10.43.0.0/24for the hotspot’s DNS. - Now closed from the LAN: 631 (CUPS), 111 (rpcbind), 8384 (Syncthing if present), and the terminal PTY on 3006 — that last one matters most, because reached directly it is unauthenticated. rpcbind is also disabled and masked, unless an NFS/NIS package is installed. CUPS is left running: on the shipped image it is a snap, so closing 631 at the firewall removes the LAN exposure without breaking local desktop printing.
- Routing is unchanged. The FORWARD policy is deliberately pinned to
ACCEPTso the hotspot’s internet sharing keeps working, and the firewall never flushes or resets — NetworkManager’s shared-AP chains are built once on connection activation and survive untouched. - Applied on update, not just on fresh installs, so a box already in the field gets it on its next in-app update.
sudo ufw status verbose.
Remote access
- Named Cloudflare tunnel (since 4.0) — once the portal has provisioned the box, its heartbeat answer carries
boxTunnel: { hostname, token }: a stable<box-handle>.clawbox.techaddress and acloudflared tunnel runtoken for it. Both lines are written todata/cloudflared/named-tunnel(mode 0600,hostname=…/token=…), whichscripts/run-tunnel.shparses line by line. The address does not change across reboots or tunnel restarts, which is what makes it worth bookmarking. The token is a credential — whoever holds it can serve anything under that hostname — so it is never returned by a route, never logged, and never written totunnel.url. A tokencloudflaredrefuses is deleted and its sha256 recorded indata/cloudflared/named-refused, so the next heartbeat does not store the same dead token and bounce the tunnel every five minutes. - Cloudflare Quick Tunnel (the fallback) — with no named credential on the box,
clawbox-tunnel.serviceexposes port 80 through a temporary*.trycloudflare.comURL written todata/cloudflared/tunnel.url. No port-forwarding required. It is opt-in and off by default. The firewall doesn’t affect it:cloudflaredruns on the box and delivers tohttp://localhost:80, so the request arrives overlo.data/cloudflared/tunnel.moderecords which of the two actually started,namedorquick, and is written by the script only. - The named hostname is on the Host allow-list, as that one name and never the whole zone: another box’s handle is still a foreign name here. See Authentication.
- Settings → Remote Control drives it through
GET /setup-api/portal/status,POST /setup-api/portal/startandPOST /setup-api/portal/stop. (/setup-api/tunnel/*also exists but nothing in the UI calls it — it is a separate legacy surface. It used to reportrunning:falsewhile a tunnel was in fact up, because it only recognised acloudflaredit had spawned itself; since TASK-453 it readsclawbox-tunnel.serviceand reports the URL the unit published, plusserviceandmanagedByfields. It still cannot stop the unit, and says so rather than reporting success.) - Start also regenerates.
startis asystemctl restart, so pressing it on a running tunnel publishes a new URL. Stopping is a cleanSIGTERM, which the unit currently records as exit status 143 — systemd scores that asfailed, which the panel renders as a red error box even though the stop worked. - SSH — standard Ubuntu OpenSSH on port 22, user
clawbox, same password as the browser login. Reachable from the private source ranges listed under Firewall — which includes a Tailscale address, since the tailnet lives in100.64.0.0/10. - On the OpenClaw/dual editions, the gateway’s allowed origins are managed automatically (localhost,
<hostname>.local, the AP addresses, and the box’s live LAN IPs) — refreshed on every gateway start.
Portal heartbeat
clawbox-heartbeat.timer fires clawbox-heartbeat.service every 5 minutes (30 s after
boot). That oneshot only curls http://127.0.0.1/setup-api/portal/heartbeat-tick on
loopback; the outbound request happens inside the web app.
The device ID is derived from
/etc/machine-id, which a factory reset does not touch —
so a reset box reappears in the portal as the same device. The cached copy under
data/cloudflared/ is deleted by the reset and simply re-derived.DNS & hostname
- Hostname defaults to
clawbox; changing it (Settings → System) updateshostnamectl, avahi (<name>.local), and is persisted indata/hostname.env. - In AP mode,
clawbox.localis additionally answered by dnsmasq (mDNS doesn’t traverse the hotspot reliably).

