How systemd socket activation works with webhook
masterOn systemd-based platforms, webhook supports socket activation. In this mode, systemd manages the listening socket and launches webhook only when the first request arrives.
Advantages:
- Privilege Escalation Avoidance:
webhookcan run as a normal user while binding to privileged ports (like 80 or 443) because systemd handles the initial bind. - Connection Resilience: If the
webhookprocess restarts, pending connections are not dropped; they wait in the systemd socket until the process is ready.
Behavior:
webhook automatically detects socket activation via environment variables. When detected, it ignores the -port and -socket CLI options and uses the socket provided by systemd.