OpenClawHomeAssistant icon indicating copy to clipboard operation
OpenClawHomeAssistant copied to clipboard

Tailscale https

Open back-2-95 opened this issue 9 months ago • 13 comments

I have uses tailscale add-on for a long time. I have Tailscale's domain name for my HA host and it has https. So I can access my HA with https://homeassistant.tailREDACTED.ts.net/

Now I have a hard time to figure out how I can setup OpenClaw addon with https.

Currently I can access http://homeassistant.tailREDACTED.ts.net:18789/chat?session=main but there I have error message:

Disconnected from gateway.
disconnected (1008): control ui requires HTTPS or localhost (secure context)

back-2-95 avatar Feb 21 '26 15:02 back-2-95

Hey @back-2-95 ! I'm just testing the next update, that will fix the tailscale issues. It's introducing new tailscale network mode that enables it to work, take a look here: https://github.com/techartdev/OpenClawHomeAssistant-dev/pull/14

I will be merging with official repo in a few minutes.

For the http vs https case there is Allow Insecure HTTP Auth option in the Add-On Configuration, try to enable it.

techartdev avatar Feb 21 '26 16:02 techartdev

Nice! How do I force update on add-on tho?

back-2-95 avatar Feb 21 '26 18:02 back-2-95

@back-2-95 If update didn't appeared already go to Apps/AddOns, Install App, top right click the three dots and choose Check for updates.

techartdev avatar Feb 21 '26 22:02 techartdev

The update does not appear to be showing up in HAOS because the build number has not been refreshed. I have confirmed that this feature works by performing a reinstallation. but https isn't working.

ImBada avatar Feb 22 '26 14:02 ImBada

Guys new version was pushed and you should be able to update to it. It will bring up the latest OpenClaw which contains stability improvements.

Allow Insecure HTTP Auth only relaxes security checks for HTTP — it does not enable HTTPS by itself.

Misunderstanding is: https://homeassistant..ts.net being HTTPS for HA does not automatically make :18789 HTTPS. That port is plain HTTP unless separately TLS-terminated.

techartdev avatar Feb 22 '26 16:02 techartdev

Ways to make this https could be:

A reverse proxy that terminates TLS for the OpenClaw port, not just HA’s main UI.

  1. Tailscale Serve HTTPS (best for tailnet-only) • expose OpenClaw through Tailscale Serve as HTTPS • forward HTTPS endpoint -> http://127.0.0.1:18789 (or HA LAN IP) • then open the served https://... URL (no insecure auth toggle needed)

  2. Nginx Proxy Manager / Caddy / Traefik in front • create HTTPS host (cert via Let’s Encrypt or internal cert) • proxy to http://:18789 • use that HTTPS URL for OpenClaw

techartdev avatar Feb 22 '26 16:02 techartdev

I believe the more significant issue lies in the limitations of the HAOS Tailscale add-on (hassio-addons/app-tailscale). I am uncertain how to forward the endpoints. According to their documentation, "Only ports 443, 8443, and 10000 are allowed by Tailscale."

ImBada avatar Feb 22 '26 16:02 ImBada

Yeah, option 1 is not possible via the official tailscale addon, maybe a 3rd party one would work but unclear.

Reverse proxy option is much easier. In my case I have 3 addons, Tailscale, Node Proxy Manaer, and OpenClaw. Finally got them all working together.

  • Set openclaw config with the following bind tailnet, auth.allowTailscale: true (allows reverse proxy), and tailscale.mode: off (serve doesn't work with this addon). I also added "trustedProxies": ["172.x.x.x/32"] which is the ip address of my node proxy manager container. Not sure if the last one is required or not.
  • In NPM, add a proxy rule http::18789 enable websockets support, and setup an SSL cert.
  • Make sure tailscale addon is NOT running in userspace networking mode, otherwise other containers won't be able to accesss it.

nathang21 avatar Feb 23 '26 02:02 nathang21

I have created a slightly modified version of thh HAOS add-on. It proxies port 127.0.0.1:18789 to Tailscale's port 8443.

Repository: https://github.com/ImBada/app-tailscale

Image

At this point, this appears to be the most viable approach.

Settings: tailscale.mode: off auth.allowTailscale: true

Bind Mode tailnet Allow Insecure HTTP Auth -> disable

ImBada avatar Feb 23 '26 06:02 ImBada

Hi @techartdev I am testing the new tailnet_https access mode, but I do not fully understand it. Is this based on a direct tailscale installation rather than using hassio-addons/app-tailscale?

ImBada avatar Feb 23 '26 18:02 ImBada

Hi @ImBada

OpenClaw is running its own Tailscale daemon. tailnet_https in this add-on is a bind/auth preset for environments where tailnet interface is already available to the container, not a built-in replacement for installing/configuring Tailscale in HAOS. You should stick with your approach.

You can take a look here: https://github.com/techartdev/OpenClawHomeAssistant-dev/blob/main/DOCS.md#method-d--tailnet-flow-tested-with-ha-tailscale-add-on--npm

techartdev avatar Feb 24 '26 14:02 techartdev

I had this working briefly, not sure what changed or if it broke with a recent update, but I filed a separate issue for my specific problem, in case anyone else experiences this: https://github.com/techartdev/OpenClawHomeAssistant/issues/90

Edit: Fixed with latest version

nathang21 avatar Mar 10 '26 17:03 nathang21

The Tailscale/HTTPS behavior and available deployment approaches were covered in the discussion and have since received add-on updates. Closing this older thread as resolved. If the current release still has a reproducible Tailscale HTTPS problem, please open a new issue with the add-on version, Tailscale setup, configuration, and relevant logs.

techartdev avatar Aug 25 '26 15:08 techartdev