Bug Description
Authorship disclosure: This bug report was drafted with the assistance of Hermes Agent (NousResearch/hermes-agent, v2026.5.16, model GLM-5.1 via Z.ai). The technical analysis, logs, and recovery steps were verified by the human operator. The core findings (s6-overlay vs entrypoint.sh/gosu UID remap breakdown) are factual and reproducible.
When updating from tagged release v2026.5.16 to the main branch image on Unraid (UID 99), the container fails to start with PermissionError: [Errno 13] on gateway_state.json. The main branch replaced the entrypoint.sh/gosu privilege management with s6-overlay, which does not correctly handle UID remapping for HERMES_UID=99 (the Unraid default).
This is a regression — v2026.5.16 (which includes commit 14c9f72 removing USER hermes from Dockerfile) works correctly on Unraid.
Steps to Reproduce
- Run Hermes Agent on Unraid 7.2.4 with volume mount
/mnt/user/appdata/hermes-agent/ → /opt/data (owned by UID 99 / GID 100)
- Set
HERMES_UID=99, HERMES_GID=100 in Docker template
- Pull
nousresearch/hermes-agent:main (post-v2026.5.16, 1082+ commits ahead)
- Start container
- Observe: container enters boot loop with
PermissionError: [Errno 13] on gateway_state.json
- Attempt
--user 0:0 workaround → container boots but .env is not read ("No messaging platforms enabled")
Expected Behavior
Container starts normally with HERMES_UID=99, same as v2026.5.16:
entrypoint.sh runs as root → usermod -u 99 → chown -R → gosu hermes → gateway runs
- All config,
.env, and state files are accessible
Actual Behavior
With main image:
- s6-overlay's stage2-hook handles UID remap, but fails for UID 99
PermissionError: [Errno 13] on gateway_state.json
- With
--user 0:0: container starts but .env not read (platforms not detected)
- With
chown -R 10000:10000: same permission issues persist
Affected Component
Setup / Installation, Configuration (config.yaml, .env, hermes setup)
Messaging Platform (if gateway-related)
No response
Debug Report
# Container boot attempts show gateway exit (non-zero) repeatedly
# gateway-exit-diag.log shows success=false pattern
# gateway_state.json: PermissionError [Errno 13]
# After rolling back to v2026.5.16:
# Container starts normally with same config/volume
Operating System
Unraid 7.2.4 (Slackware-based NAS OS)
Python Version
No response
Hermes Version
nousresearch/hermes-agent:main (post-v2026.5.16, ~1082 commits ahead)
Additional Logs / Traceback (optional)
**Key finding from Dockerfile comparison:**
v2026.5.16 (working):
COPY --chmod=0755 --from=gosu_source /gosu /usr/local/bin/
USER root
# entrypoint.sh runs as root, does usermod/chown, then gosu drop
Root Cause Analysis (optional)
The main branch replaced the init system between v2026.5.16 and now:
| Mechanism |
v2026.5.16 (works) |
main (broken) |
| Init system |
tini + entrypoint.sh |
s6-overlay |
| Privilege drop |
gosu |
s6-setuidgid |
| UID remap |
entrypoint.sh (usermod + chown) |
stage2-hook |
| Unraid UID 99 |
✅ Works |
❌ Fails |
The s6-overlay stage2-hook does not correctly handle the case where HERMES_UID=99 (or any non-10000 UID) combined with NAS volume mounts where the host directory is owned by UID 99.
Related issues (same root cause):
Proposed Fix (optional)
- Short-term: Document
--user 0:0 workaround for Unraid/NAS users in Docker docs
- Medium-term: Add early detection in s6-overlay stage2-hook if
$HERMES_HOME is not writable, with clear error message pointing to documentation
- Long-term: Ensure s6-overlay stage2-hook handles arbitrary
HERMES_UID values the same way entrypoint.sh/gosu did in v2026.5.16
- Testing: Add CI matrix with UID 99 (Unraid), UID 1000 (Synology), UID 10000 (default)
Recovery Steps (for affected users)
- Stop the container
- Revert Repository to
nousresearch/hermes-agent:v2026.5.16
- Fix permissions on host:
chown -R 99:100 /mnt/user/appdata/hermes-agent/
- CRITICAL: Do NOT
chmod 644 recursively — destroys execute permissions on binaries
- Start container
- Verify:
docker logs Hermes-Agent | grep -E "(Changing|Dropping)"
Are you willing to submit a PR for this?
I can help test PRs or release candidates on Unraid before shipping, using a dedicated standby instance (Hermes Guardião).
Are you willing to submit a PR for this?
Bug Description
Authorship disclosure: This bug report was drafted with the assistance of Hermes Agent (NousResearch/hermes-agent, v2026.5.16, model GLM-5.1 via Z.ai). The technical analysis, logs, and recovery steps were verified by the human operator. The core findings (s6-overlay vs entrypoint.sh/gosu UID remap breakdown) are factual and reproducible.
When updating from tagged release
v2026.5.16to themainbranch image on Unraid (UID 99), the container fails to start withPermissionError: [Errno 13]ongateway_state.json. Themainbranch replaced theentrypoint.sh/gosuprivilege management withs6-overlay, which does not correctly handle UID remapping forHERMES_UID=99(the Unraid default).This is a regression — v2026.5.16 (which includes commit
14c9f72removingUSER hermesfrom Dockerfile) works correctly on Unraid.Steps to Reproduce
/mnt/user/appdata/hermes-agent/→/opt/data(owned by UID 99 / GID 100)HERMES_UID=99,HERMES_GID=100in Docker templatenousresearch/hermes-agent:main(post-v2026.5.16, 1082+ commits ahead)PermissionError: [Errno 13]ongateway_state.json--user 0:0workaround → container boots but.envis not read ("No messaging platforms enabled")Expected Behavior
Container starts normally with
HERMES_UID=99, same as v2026.5.16:entrypoint.shruns as root →usermod -u 99→chown -R→gosu hermes→ gateway runs.env, and state files are accessibleActual Behavior
With
mainimage:PermissionError: [Errno 13]ongateway_state.json--user 0:0: container starts but.envnot read (platforms not detected)chown -R 10000:10000: same permission issues persistAffected Component
Setup / Installation, Configuration (config.yaml, .env, hermes setup)
Messaging Platform (if gateway-related)
No response
Debug Report
Operating System
Unraid 7.2.4 (Slackware-based NAS OS)
Python Version
No response
Hermes Version
nousresearch/hermes-agent:main (post-v2026.5.16, ~1082 commits ahead)
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
The
mainbranch replaced the init system between v2026.5.16 and now:The s6-overlay stage2-hook does not correctly handle the case where
HERMES_UID=99(or any non-10000 UID) combined with NAS volume mounts where the host directory is owned by UID 99.Related issues (same root cause):
[Errno 13] Permission deniedon/opt/data/config.yamlduring/after setup on NAS Docker (UGOS Pro) #15290 — UGreen NAS UGOS ProUSER hermesbreaks entrypoint UID remap, contradicts docs #15832 — DockerfileUSER hermesbypass-uflagdocker execProposed Fix (optional)
--user 0:0workaround for Unraid/NAS users in Docker docs$HERMES_HOMEis not writable, with clear error message pointing to documentationHERMES_UIDvalues the same wayentrypoint.sh/gosudid in v2026.5.16Recovery Steps (for affected users)
nousresearch/hermes-agent:v2026.5.16chown -R 99:100 /mnt/user/appdata/hermes-agent/chmod 644recursively — destroys execute permissions on binariesdocker logs Hermes-Agent | grep -E "(Changing|Dropping)"Are you willing to submit a PR for this?
I can help test PRs or release candidates on Unraid before shipping, using a dedicated standby instance (Hermes Guardião).
Are you willing to submit a PR for this?