feat: auto-update on startup and doctor fix for post-upgrade config errors#111
feat: auto-update on startup and doctor fix for post-upgrade config errors#111ImBada wants to merge 3 commits intotechartdev:mainfrom
Conversation
|
Good initiative! Though, I would suggest that this becomes an optional setting in the config, not a default. |
Add auto_update boolean option to config.yaml, run.sh, and all 6 translation files so users can toggle OpenClaw auto-update from the Home Assistant add-on settings UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Hi @Nosdave I fully agree with your suggestion. I have added the corresponding option feature. It is disabled by default. On a separate note, the --doctor flag at startup was required when moving from 4.2 to 4.5, and it might be needed in the future, so it seems best to keep it unconditionally (this is rather a safety check). |
|
Hi @techartdev, thank you again for this add-on, and I totally understand that you are not able and should not spend all free time in maintenance of it. We are already 5 version behind main. Maybe switching to DEV. And having auto approved pull request with version bump. And I believe it's up to you to decide what approach better suites you. |
|
By the way, I was unable to access the gateway web UI after updating to the latest version this time. However, since the discord bot was still functional, I instructed openclaw to fix the issue, and it resolved it automatically. Even with automatic updates enabled, most problems are handled by --docter, and if an issue persists there, openclaw should be able to fix it independently. (when --docter can help it wake up!) Nonetheless, please be aware that enabling automatic updates can still be risky. |
|
@NewFolk , |
|
Hi @ImBada, Thanks for sharing, I didn't update yet, to be honest a little bit tired to jump back and forth to personal fork. But noted, thx :) Regarding the reason I totally understand why, and I'm not saying that it's not necessary, or wasting a time. It definitely makes sense, but looks like Author doesn't have enough time to check every release and keep it updated. Which is totally fine, but we need to find some golden mean. |
…OTEMPTY npm install fails with ENOTEMPTY when a previous update attempt left behind a .openclaw-* temp directory under node_modules. Remove stale temp dirs before attempting the install. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Background
Previously, updating OpenClaw required manually updating the add-on image. With this change, simply restarting the add-on triggers an automatic update via npm — no rebuild needed.
After a version upgrade, certain config keys may become invalid or renamed. The openclaw doctor --fix step detects and corrects these legacy config issues before the runtime starts, preventing startup failures.
Testing
Verified stability across two consecutive automatic upgrades:
Both upgrades completed successfully on restart with no manual intervention. The doctor fix step correctly handled config key migrations in each case.