Skip to main content
This hook runs on every container start, including restarts, host reboots, and updates. Use it for runtime state that should be restored every time the container starts.

File path

Create this file:

When to use it

This hook is useful when you want to:
  • start background services
  • restart a local app or worker
  • recreate temporary directories
  • restore runtime-only state

Timeout

If the hook fails or times out, startup continues. The default scaffold is comments only. The post-restart hook is skipped until the file contains at least one non-comment command.

Example

Tips

  • Put long-running processes in the background when needed
  • Keep the script short and predictable
  • Test the commands manually in Terminal before relying on the hook