On first boot the gateway token doesn't exist yet when nginx/landing are
first rendered, so the 'Open Gateway Web UI' button opens the Control UI
without a token and the user sees Unauthorized.
Fix: extract render logic into render_landing(), call it once at startup
(as before) and spawn a background poller that re-renders and HUPs nginx
as soon as the token appears in openclaw.json — no add-on restart needed.
Bumps add-on to 0.5.66.
- Added `gateway_remote_url` and `gateway_additional_allowed_origins` options for improved remote gateway support.
- Updated startup guidance for `gateway_auth_mode=trusted-proxy`.
- Adjusted token retrieval instructions in the landing page.
- Updated translations for new configuration options.
- Fixed various issues related to gateway settings and TLS certificate generation.
- Set default `force_ipv4_dns` to true to prevent web_fetch timeouts in HAOS VMs.
- Introduced `nginx_log_level` option to control access log verbosity.
- Updated translations for new configuration options.
- Introduced a new script `render_nginx.py` to generate nginx configuration and landing page HTML from templates based on environment variables.
- Updated `run.sh` to handle new access modes and configure HTTPS proxy settings for the gateway.
- Implemented TLS certificate generation for the built-in HTTPS proxy in `lan_https` mode.
- Enhanced disk usage reporting in the landing page.
- Updated translations for various languages to include new configuration options for access modes and authentication modes.
Environment variables are fully handled by run.sh:
- run.sh reads gateway_env_vars from options.json
- run.sh validates variable names (alphanumeric + underscore)
- run.sh enforces max 50 variables and 255 char name limit
- run.sh exports to process environment
oc_config_helper.py now only manages gateway config (mode, port, bind).
Removes:
- env_vars parameter from apply_gateway_settings()
- All env var parsing and validation from Python helper
- MAX_ENV_VARS constants
- env_vars CLI argument
Benefits:
- More idiomatic configuration format for Home Assistant add-ons
- config.yaml: Change default from empty string to empty YAML map
- config.yaml: Update schema type from str? to map(str)?
- config.yaml: Improve documentation to explain YAML map usage
- run.sh: Parse JSON object from jq using to_entries instead of semicolon splitting
- oc_config_helper.py: Accept JSON string and parse as dict instead of semicolon-separated values
- Better error handling for invalid JSON
- Cleaner and more maintainable parsing logic
This allows users to configure environment variables more naturally:
gateway_env_vars:
OPENAI_API_KEY: sk-abc123
SERVICE_URL: https://api.example.com
- Add max limits (50 vars, 255 char names, 10000 char values)
- Validate variable names with regex
- Warn about duplicate variables
- Show var names in logs (not just count)
- Improve bash parsing with process substitution
- Better config documentation with examples
- Add 'gateway_env_vars' configuration option to addon config
- Parse semicolon-separated KEY=VALUE pairs from add-on options
- Export environment variables to gateway process at startup
- Store parsed env vars in openclaw.json (gateway.env)
Allows users to pass custom environment variables to the gateway via
Home Assistant add-on configuration, e.g.:
gateway_env_vars: 'SERVICE_API_KEY=123;SERVICE2_API=1231'
These variables are exported to the gateway process and can be used
for API authentication, feature flags, or other configuration needs.
- Added rsync to Dockerfile for improved file synchronization.
- Bumped version to 0.5.41 in config.yaml.
- Implemented skill synchronization and persistent storage management in run.sh.
- Introduced `enable_openai_api` option in config.yaml to enable OpenAI-compatible Chat Completions endpoint.
- Updated `apply_gateway_settings` function to handle OpenAI API settings.
- Enhanced documentation in DOCS.md for integrating OpenClaw with Home Assistant Assist pipeline.
- Added translations for `enable_openai_api` in English, Bulgarian, German, Spanish, and Polish.
- Bumped version to 0.5.37 in config.yaml.
- Updated nginx configuration to use a placeholder for terminal port.
- Modified run.sh to read terminal port from options file and start ttyd on the specified port.
- Added terminal port configuration option in English, Bulgarian, German, and Spanish translations.
- Added vim and nano to the Dockerfile for improved editing capabilities.
- Bumped version to 0.5.33 in config.yaml.
- Set OpenClaw directories in run.sh to ensure persistence across updates.