Search the documentation
3 pages for --hooks-dir.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Customize sessions in self-hosted environments
Claude Code CLI · in the page
self-hosted-environments-configuration
…with your own scripts. Point the runner at a directory of hooks with `--hooks-dir <path>`, or `SELF_HOSTED_RUNNER_HOOKS_DIR`. The runner looks for executable files with well-known names; any hook that…
Deploy self-hosted environments to production
Claude Code CLI · in the page
self-hosted-environments-deploy
…directory that no other process on the host can read or write. Make `--hooks-dir`, the wrapper script, and the host's `~/.claude/` read-only to the session, either built into the image or mounted rea…
Self-hosted environments reference
Claude Code CLI · in the page
self-hosted-environments-reference
…| | `--hooks-dir <path>` | `SELF_HOSTED_RUNNER_HOOKS_DIR` | unset | Dir…