From bfb51fec81afcc533332a402773c832d62f3700f Mon Sep 17 00:00:00 2001 From: embwl0x Date: Thu, 16 Jul 2026 02:46:19 -0500 Subject: [PATCH] docs(gateway): document external restart contract --- website/docs/reference/cli-commands.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/docs/reference/cli-commands.md b/website/docs/reference/cli-commands.md index 55ca8a1cd9cb..e54264b8fdfa 100644 --- a/website/docs/reference/cli-commands.md +++ b/website/docs/reference/cli-commands.md @@ -241,6 +241,14 @@ Options: | `--no-supervise` | On `run`: inside the s6-overlay Docker image, opt out of auto-supervision and use pre-s6 foreground semantics — gateway runs as the container's main process with no auto-restart. No-op outside the s6 image. Equivalent to setting `HERMES_GATEWAY_NO_SUPERVISE=1`. | | `--external-supervisor` | On `run`: declare that a wrapper-provided process manager owns the foreground gateway. Use this when `sudo`, `env -i`, or another wrapper strips launchd/systemd's native environment marker. In-chat restarts and updates exit back to that manager instead of spawning a detached replacement. | +`--external-supervisor` is a restart-policy contract: an in-chat restart or +service-restart update exits with status `75`, so the wrapper's supervisor must +relaunch the gateway after that nonzero exit. For systemd, use +`Restart=on-failure` or `Restart=always` and do not include `75` in +`RestartPreventExitStatus`; for launchd, configure `KeepAlive` to relaunch after +unsuccessful exits. Without that policy, a requested restart leaves the gateway +stopped. + `hermes gateway enroll` accepts `--token`, `--connector-url`, `--gateway-id`, and `--wake-url`. It exchanges the enrollment token with the connector and writes the resulting `GATEWAY_RELAY_ID`, `GATEWAY_RELAY_SECRET`, `GATEWAY_RELAY_DELIVERY_KEY`, optional `GATEWAY_RELAY_URL`, and (when `--wake-url` is given) `GATEWAY_RELAY_WAKE_URL` values to the active profile's `.env`. :::tip WSL users