Runtime hooks let your OpenClaw instance run small setup scripts automatically during startup. Use them when you want to:Documentation Index
Fetch the complete documentation index at: https://agent37.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
- reinstall packages after a runtime update
- restart background services
- recreate temporary runtime state
- restore tools or files your app depends on
Available hooks
Post-image-update hook
Run setup after the runtime image changes.
Post-restart hook
Run setup every time the container starts.
Which hook should you use
- Use
post-image-update.shfor things that should run only after a runtime update - Use
post-restart.shfor things that should run on every start
Tips
- Keep each hook focused on one job
- Test the commands manually in Terminal first
- Keep the script short enough to finish within its timeout