Description
After upgrading from the tini-based Docker image (v14.x) to the latest s6-overlay image, the gateway no longer starts automatically on container boot. The dashboard and other s6 services start fine, but the gateway remains stopped.
Root Cause
The new s6 reconciler (02-reconcile-profiles) reads gateway_state.json to decide whether to auto-start the gateway. When upgrading from the old tini image:
- The old image had no
gateway_state.json — gateway was started directly via CMD (gateway run)
- The new image's reconciler sees no valid state file (or state ≠
running) and skips gateway startup
- Users who relied on
command: gateway run in docker-compose find their gateway silently not running after the upgrade
Steps to Reproduce
- Run hermes-agent with the tini-based image using
command: gateway run in docker-compose
- Pull
nousresearch/hermes-agent:latest (s6-overlay version)
- Restart the container
- Gateway does not start;
hermes gateway status shows stopped
Expected Behavior
On first boot after upgrade, if no gateway_state.json exists and the container CMD is gateway run, the gateway should start automatically (and persist state as running for future restarts).
Workaround
Manually start the gateway after upgrade:
docker exec <container> hermes gateway start
Or manually create the state file on the host:
echo '{"state": "running"}' > ~/.hermes/gateway_state.json
Suggested Fix
In 02-reconcile-profiles (or container_boot.py), add a migration check: if gateway_state.json does not exist AND the container CMD contains gateway run, seed the state as running so the reconciler brings it up. This preserves the behavior users had with the tini image.
Environment
Docker on UGOS (UGREEN NAS)
Upgraded from tini-based image (v14.x) to latest s6-overlay image
docker-compose with command: gateway run
Description
After upgrading from the tini-based Docker image (v14.x) to the latest s6-overlay image, the gateway no longer starts automatically on container boot. The dashboard and other s6 services start fine, but the gateway remains stopped.
Root Cause
The new s6 reconciler (
02-reconcile-profiles) readsgateway_state.jsonto decide whether to auto-start the gateway. When upgrading from the old tini image:gateway_state.json— gateway was started directly via CMD (gateway run)running) and skips gateway startupcommand: gateway runin docker-compose find their gateway silently not running after the upgradeSteps to Reproduce
command: gateway runin docker-composenousresearch/hermes-agent:latest(s6-overlay version)hermes gateway statusshows stoppedExpected Behavior
On first boot after upgrade, if no
gateway_state.jsonexists and the container CMD isgateway run, the gateway should start automatically (and persist state asrunningfor future restarts).Workaround
Manually start the gateway after upgrade: