3.5 KiB
OpenClaw Assistant (Home Assistant Add-on)
This add-on runs OpenClaw inside Home Assistant OS (HAOS).
The project deliberately keeps the add-on thin:
- Home Assistant provides the container lifecycle + Ingress
- OpenClaw provides onboarding/configuration and all assistant features
UI / Ingress behavior
Ingress page (inside Home Assistant)
The add-on’s Ingress UI is intentionally simple and reliable:
- A landing page
- An embedded web terminal (ttyd)
- A button that opens the Gateway Web UI in a separate tab
Gateway Web UI (separate tab)
The Gateway Web UI requires WebSockets. Rather than tunneling it through HA Ingress,
we open it directly using a user-provided base URL (gateway_public_url).
OpenClaw configuration philosophy
We do NOT overwrite OpenClaw config
OpenClaw’s config/state lives under:
/config/.openclaw/(inside the container)
The add-on does not rewrite OpenClaw’s configuration on each start. You should use OpenClaw’s own interactive tooling:
openclaw setupopenclaw onboardopenclaw configure
Minimal bootstrap (first boot only)
If /config/.openclaw/openclaw.json is missing, the add-on bootstraps a minimal strict-JSON config so that
openclaw gateway run can start:
gateway.mode = localgateway.auth.mode = tokengateway.auth.tokengenerated
After that, onboarding/configure can expand the config normally.
Installation
- Home Assistant → Settings → Add-ons → Add-on store
- Add repository URL:
- Add-on store → ⋮ → Repositories → paste:
https://github.com/techartdev/OpenClawHomeAssistant
- Install OpenClaw Assistant
First-time setup checklist
- Open the add-on page (Ingress)
- Use the terminal and run:
openclaw onboard- or
openclaw configure
- Optional (recommended): set
gateway_public_urlin add-on options.- Example (LAN):
http://192.168.1.10:18789 - Example (public):
https://example.duckdns.org:12345
- Example (LAN):
Once gateway_public_url is set and OpenClaw has a gateway token, the landing page will show an “Open Gateway Web UI” button.
Add-on options (custom / HA-specific)
Terminal (Ingress)
enable_terminal(defaulttrue)
Security note: the terminal gives shell access inside the add-on container. Enable it only if you trust your HA admins.
Gateway UI link
gateway_public_url(optional)
This does not expose anything by itself; it just controls what URL the Ingress button opens.
Home Assistant token
homeassistant_token(optional)
If set, it is written to:
/config/secrets/homeassistant.token
Router SSH (generic)
These options are for custom automations that need SSH access to a router/firewall or other LAN device:
router_ssh_hostrouter_ssh_userrouter_ssh_key_path(default/data/keys/router_ssh)
How to provide the key:
- Put the private key file under the add-on config directory so it appears in-container at
/data/keys/... - Recommended permissions:
chmod 600
Troubleshooting
Ingress loads but Gateway button is missing
- Set
gateway_public_urlin add-on options. - If
gateway_public_urlis set but the button is still hidden, OpenClaw likely has not produced a gateway token yet. Use the terminal and runopenclaw onboard/openclaw configure.
Gateway UI opens but doesn’t connect
- Confirm the browser can reach
gateway_public_url(LAN routing / DNS / NAT). - WebSockets must be allowed end-to-end.
Terminal isn’t visible
- Ensure
enable_terminal=true - Check logs for
Starting web terminal (ttyd)