NousResearch/hermes-agent

Docker venv ownership fix for non-root users

Cluster 21536. Data as of

Nothing open on GitHub. Fix merged in #24841 on 13 May 2026. Check it covers your case.

The short answer

0open issues
0open PRs
4items grouped
Known?
Yes. 4 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #24841. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #24841. That is separate from the fix event.
Still open
Nothing open on GitHub.

These issues and pull requests address a bug where the Python virtual environment has incorrect ownership, preventing non-root container users from using or modifying it. The proposed fixes involve changing the venv directory ownership to the appropriate non-root user.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #24841 fix(docker): chown .venv to hermes so lazy_deps can install platform packages

    merged to main

    files: Dockerfile, docker/entrypoint.sh

    Show the diff
    • Dockerfile
      @@ -94,9 +94,13 @@ RUN cd web && npm run build && \
       # hermes_cli/main.py succeeds (see #18800). /opt/hermes/web is build-time
       # only (HERMES_WEB_DIST points at hermes_cli/web_dist) and is intentionally
       # not chowned here.
      +# The .venv MUST be hermes-writable so lazy_deps.py can install platform
      +# packages (discord.py, telegram, slack, etc.) at first gateway boot.
      +# Without this, `uv pip install` fails with EACCES and all messaging
      +# adapters silently fail to load.  See tools/lazy_deps.py.
       USER root
       RUN chmod -R a+rX /opt/hermes && \
      -    chown -R hermes:hermes /opt/hermes/ui-tui /opt/hermes/node_modules
      +    chown -R hermes:hermes /opt/hermes/.venv /opt/hermes/ui-tui /opt/hermes/node_modules
       # Start as root so the entrypoint can usermod/groupmod + gosu.
       # If HERMES_UID is unset, the entrypoint drops to the default hermes user (10000).
       
    • docker/entrypoint.sh
      @@ -39,6 +39,10 @@ if [ "$(id -u)" = "0" ]; then
               # by the mapped user on the host side.
               chown -R hermes:hermes "$HERMES_HOME" 2>/dev/null || \
                   echo "Warning: chown failed (rootless container?) — continuing anyway"
      +        # The .venv must also be re-chowned when UID is remapped, otherwise
      +        # lazy_deps.py cannot install platform packages (discord.py, etc.).
      +        chown -R hermes:hermes "$INSTALL_DIR/.venv" 2>/dev/null || \
      +            echo "Warning: chown .venv failed (rootless container?) — continuing anyway"
           fi
       
           # Ensure config.yaml is readable by the hermes runtime user even if it was

2 PRs closed without merging

From the close comments: done elsewhere 1 · duplicate 1

  • #21543 fix(docker): chown venv to hermes user for non-root container support · done elsewhere
  • #21755 fix(docker): chown virtualenv for non-root runtime · duplicate → #17674, #21543
Closed issues · 1
  • Closed#21536[Bug]: Python venv ownership prevents non-root container usage, breaking security best practices
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.50: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Merged PRs
#24841
Closed issues
1
Attempts
2 PRs closed without merging
Fix link checked
13 May 2026

For your agent

The same facts, typed.