hermes - 💡(How to fix) Fix Gateway not auto-starting after upgrade from tini-based to s6-overlay image — missing migration for gateway_state.json

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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:

  1. The old image had no gateway_state.json — gateway was started directly via CMD (gateway run)
  2. The new image's reconciler sees no valid state file (or state ≠ running) and skips gateway startup
  3. Users who relied on command: gateway run in docker-compose find their gateway silently not running after the upgrade

Fix Action

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
RAW_BUFFERClick to expand / collapse

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:

  1. The old image had no gateway_state.json — gateway was started directly via CMD (gateway run)
  2. The new image's reconciler sees no valid state file (or state ≠ running) and skips gateway startup
  3. Users who relied on command: gateway run in docker-compose find their gateway silently not running after the upgrade

Steps to Reproduce

  1. Run hermes-agent with the tini-based image using command: gateway run in docker-compose
  2. Pull nousresearch/hermes-agent:latest (s6-overlay version)
  3. Restart the container
  4. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Gateway not auto-starting after upgrade from tini-based to s6-overlay image — missing migration for gateway_state.json