> ## Documentation Index
> Fetch the complete documentation index at: https://www.agent37.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Post-image-update hook

> Use the post-image-update hook to restore setup after an OpenClaw runtime image update.

This hook runs only when the runtime image reference changes. Use it for setup that is lost when the container image changes, such as packages installed into non-persisted system paths.

## File path

Create this file:

```text theme={null}
/home/node/.agent37/hooks/post-image-update.sh
```

## When to use it

This hook is useful when you want to:

* reinstall system packages
* restore tools that are not part of your persisted home directory
* rerun one-time setup after a runtime update

## Timeout

```text theme={null}
15 minutes
```

If the hook fails or times out, startup continues. The image ref is not marked as completed, so the hook retries on the next container start.

## Example

```bash theme={null}
#!/usr/bin/env bash
set -euo pipefail

sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
```
