OpenClawHomeAssistant icon indicating copy to clipboard operation
OpenClawHomeAssistant copied to clipboard

question: Fine tuning the settings and configuration for a stand-alone openclaw container

Open jata1 opened this issue 9 months ago • 7 comments

Topic

Other

Add-on version

0.5.54

Access mode (if relevant)

lan_https

Your question

@techartdev - me again and this is not urgent so please chip in when you have some time. :-)

Here are the settings that I am building the image/container with.

{ "timezone": "Australia/Sydney", "gateway_mode": "local", "gateway_bind_mode": "lan", "gateway_auth_mode": "token", "access_mode": "lan_https", "gateway_trusted_proxies": "127.0.0.1", "force_ipv4_dns": "true", "enable_openai_api": "true" }

With this configuration, the container starts fine and I can:

  • access the OC CLI webpage on http://[host_ip]:48099
  • access the OC dashboard GUI on https://[host_ip]:18789
  • good security and connectivity to gateway from OC CLI

So I think this is quite close but I do have a few things that I'd like to resolve/work on

  • OC CLI reports that Gateway is unreachable but is fine using openclaw gateway status etc
  • button for gateway web uses docker container ip (172.2.0.x) and this does not work from lan clients
  • Can I use the certificate to get rid of the not secure warning
  • Can I build the image so that the Gateway web UI is set to https://[host_ip]:18789 (rather than docker ip)
  • This setting is getting thrown up as a warning gateway.controlUi.dangerouslyDisableDeviceAuth=true
Image

What have you already tried?

No response

Relevant logs / errors (optional)


Extra context (optional)

No response

jata1 avatar Feb 26 '26 02:02 jata1

Hi @jata1 — thanks for the detailed report! I'm preparing to test an update to cover some points.

Yes, there is a small bug in lan_https fallback behavior. When gateway_public_url is empty, in next update the Open Gateway Web UI button will use https://:<gateway_port> instead of container-detected IPs (so no more 172.x target in standalone Docker). I will test and release that fix.

Still if you set gateway_public_url in the AddOn configuration to the correct expected path it will work. This is required to be done by the user, because you may use tailscale or a domain with reverse proxy, so you always have to put the base url of the gateway.

In next update Landing page status will avoid false “Gateway unreachable” in this fallback case and show guidance until the HTTPS cert is trusted.

About your other points:

  • dangerouslyDisableDeviceAuth warning is expected in lan_https and safe in this setup (token auth still applies).
  • “Not secure” on http://:48099 is expected (that page is HTTP ingress). The actual Control UI must be opened over HTTPS (https://:18789) to be secure.
  • Yes, you need to install the certificate as Root CA, restart the browser and it should trust the page without warnings.

techartdev avatar Feb 26 '26 06:02 techartdev

Thanks - I have just seen this post but have made progress with a few changes to the options.json. Here is what I am currently using. This seems to have solved a few of the issues I reported - but not sure if this is the right way!

I have also got my reverse proxy to handle the ssl connection on my LAN. I am now able to connect on opnclaw.blar.com and my reverse proxy redirects to https://host_ip:port. (Note that I do not have the proxy configured for external for security etc).

{ "timezone": "Australia/Sydney", "gateway_mode": "local", "gateway_bind_mode": "lan", "gateway_auth_mode": "token", "gateway_public_url": "https://192.168.1.3:18789", "gateway_additional_allowed_origins": "https://192.168.1.3:18789,https://openclaw.[reverse proxyfqdn]", "access_mode": "lan_https", "gateway_trusted_proxies": "127.0.0.1", "force_ipv4_dns": "true", "enable_openai_api": "true"

jata1 avatar Feb 26 '26 06:02 jata1

That's nice!

Well it is one of the proper ways to configure it, one of the many variations. I will document this as example in DOCS.md .

My only recommendation, use your final proxy hostname in gateway_public_url (if that’s what you want to open), and keep IP origin only as an additional fallback origin.

techartdev avatar Feb 26 '26 07:02 techartdev

Got it. Good suggestions. I will try the suggested updates now.

Looking forward to the next release!

It is quite impressive how I can use openclaw to build and improve HA automations.

Image

jata1 avatar Feb 26 '26 08:02 jata1

@techartdev - changed my config as you suggested and works but there is a small issue.

When I up the container I need to first connect to https://host_ip:18789 - and go through the security warning about the site being insecure. So something is not quite right with the certificate even though I have installed it correctly and I can see it is being used.

After going through this process once, then i can connect using openclaw.example.com.

Working well overall - just a little glitch to work through.

jata1 avatar Feb 26 '26 10:02 jata1

@jata1 Might be due to the certificate being self signed. So it is actually running trough HTTPS and data is secure but browser do not trust the cert completely because is not issued by a trusted CA. That's not really a problem while it actually goes over https protocol. In order to really get green sign in browser the certificate must be issued by an authority, not self created.

You can use CloudFlare proxy if you use real sub domain, if you manage your domain DNS in CF. CF proxy will elevate to trusted certificate and you will get rid of the warning. OC -> CF runs on self signed CF -> Open World over CF trusted certificate.

Another way is to use Let's Encrypt but in HA is not easy to make it run. The main issue is Let's Encrypt requires validation, so it will need to put special file on your side and request it via http. Once ownership confirmed certificate will be issued and needs to be installed in our addon nginx, but we do not provide such option at this point. So it's much more complicated than everything else.

techartdev avatar Feb 27 '26 10:02 techartdev

thanks. I will keep tinkering and let you know if I find a way to resolve this.

jata1 avatar Feb 27 '26 20:02 jata1