hermes - ✅(Solved) Fix [Bug]: Hopefully, the Docker deployment method can allow changing permissions. Currently, Hermes running in Docker cannot install plugins or its own skill packages. [1 pull requests, 1 participants]

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…
GitHub stats
NousResearch/hermes-agent#17636Fetched 2026-04-30 06:46:18
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1renamed ×1

Error Message

I'm currently running Hermes in a Docker container. When I try to install the Hindsight memory plugin, I get the following error: error: Failed to install: hindsight_client-0.5.4-py3-none-any.whl (hindsight-client==0.5.4) The cause of this error is that the hermes user inside the Docker container does not have root permissions, while the .venv directory is owned by root. As a result, Hermes cannot install plugins. This is just one example — currently, Hermes deployed via Docker cannot use any features that require installing packages, including (but not limited to) memory plugins, knowledge bases, and skills. I hope the official team can provide a fix for this.

Root Cause

Installing dependencies: hindsight-client>=0.4.22 ⚠ Failed to install hindsight-client>=0.4.22 error: Failed to install: hindsight_client-0.5.4-py3-none-any.whl (hindsight-client==0.5.4) Caused by: Failed to create directory `/opt/hermes/.venv/lib/python3.13/site-packages/hindsight_client_api Run manually: uv pip install --python /opt/hermes/.venv/bin/python3 hindsight-client>=0.4.22

Fix Action

Fixed

PR fix notes

PR #17674: fix(docker): chown .venv to hermes user for plugin installs (#17636)

Description (problem / solution / changelog)

What does this PR do?

`uv venv` and `uv pip install --no-cache-dir -e ".[all]"` ran while the build was still `USER root`, so `/opt/hermes/.venv` ended up root-owned. When the container started as the unprivileged `hermes` user (the default for `docker compose up` and `docker run`), `hermes memory setup`, `hermes skills install`, and any other path that called `uv pip install --python /opt/hermes/.venv/bin/python ...` failed with `EACCES` on the venv's site-packages directory:

``` ⚠ Failed to install hindsight-client>=0.4.22 error: Failed to create directory `/opt/hermes/.venv/lib/python3.13/site-packages/hindsight_client_api` Caused by: Permission denied (os error 13) ```

This means no plugin install path (memory plugins, knowledge bases, hub-installed skills) works under Docker out-of-the-box.

Two-part fix:

  1. Dockerfile: `chown -R hermes:hermes /opt/hermes/.venv` immediately after `uv pip install` so the default uid-10000 case works without any `HERMES_UID` override.
  2. `docker/entrypoint.sh`: extend the existing `$HERMES_HOME` chown block to also chown `$INSTALL_DIR/.venv` whenever the entrypoint remaps the hermes UID/GID. Without this, the build-time chown becomes stale as soon as someone runs `HERMES_UID=$(id -u) docker compose up` (the documented `docker-compose.yml` pattern) and the bug returns.

Related Issue

Fixes #17636

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • `Dockerfile`: the `Python virtualenv` RUN step now ends with `chown -R hermes:hermes /opt/hermes/.venv` (3-line diff incl. comment).
  • `docker/entrypoint.sh`: the existing `if [ "$needs_chown" = true ]` block now also chowns `$INSTALL_DIR/.venv` after `$HERMES_HOME`. The new step uses the same `2>/dev/null || echo Warning…` pattern as the existing chown for rootless-Podman compatibility.
  • `tests/tools/test_dockerfile_venv_perms.py`: two new contract tests (`test_dockerfile_makes_venv_writable_by_hermes_user`, `test_entrypoint_rechowns_venv_when_hermes_uid_is_remapped`) that mirror the line-number-agnostic style of `test_dockerfile_pid1_reaping.py`. Both tests fail on main and pass with this fix.

How to Test

  1. Without HERMES_UID override (default case): ``` docker build -t hermes-agent . docker run --rm -d --name hermes hermes-agent sleep infinity docker exec -it -u hermes hermes /opt/hermes/.venv/bin/hermes memory setup ``` This currently fails on main with `Failed to create directory ... Permission denied`. With this PR, the install proceeds.

  2. With HERMES_UID override (`docker compose` default pattern): ``` HERMES_UID=$(id -u) HERMES_GID=$(id -g) docker compose up -d docker exec -it -u hermes hermes hermes memory setup ``` The entrypoint logs `Fixing ownership of /opt/data ...` and the new `chown of /opt/hermes/.venv` step. `uv pip install` works.

  3. Contract tests: ``` pytest tests/tools/test_dockerfile_venv_perms.py tests/tools/test_dockerfile_pid1_reaping.py -v ``` 8 pass (2 new + 6 existing). The 2 new tests fail without this fix.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (`fix(scope):`, `feat(scope):`, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run `pytest tests/tools/test_dockerfile_venv_perms.py tests/tools/test_dockerfile_pid1_reaping.py -q` and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.x (Dockerfile linting + contract tests; Docker exec verification noted above)

Documentation & Housekeeping

  • I've updated relevant documentation (README, `docs/`, docstrings) — or N/A
  • I've updated `cli-config.yaml.example` if I added/changed config keys — or N/A
  • I've updated `CONTRIBUTING.md` or `AGENTS.md` if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A. Rootless Podman is preserved by reusing the existing `2>/dev/null || echo Warning…` pattern.
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Changed files

  • Dockerfile (modified, +4/-1)
  • docker/entrypoint.sh (modified, +5/-0)
  • tests/tools/test_dockerfile_venv_perms.py (added, +125/-0)
RAW_BUFFERClick to expand / collapse

Problem or Use Case

I'm currently running Hermes in a Docker container. When I try to install the Hindsight memory plugin, I get the following error:

⚡ root@nanopi-r6s  ~  docker exec -it -u hermes hermes /opt/hermes/.venv/bin/hermes memory setup

Installing dependencies: hindsight-client>=0.4.22 ⚠ Failed to install hindsight-client>=0.4.22 error: Failed to install: hindsight_client-0.5.4-py3-none-any.whl (hindsight-client==0.5.4) Caused by: Failed to create directory `/opt/hermes/.venv/lib/python3.13/site-packages/hindsight_client_api Run manually: uv pip install --python /opt/hermes/.venv/bin/python3 hindsight-client>=0.4.22

The cause of this error is that the hermes user inside the Docker container does not have root permissions, while the .venv directory is owned by root. As a result, Hermes cannot install plugins. This is just one example — currently, Hermes deployed via Docker cannot use any features that require installing packages, including (but not limited to) memory plugins, knowledge bases, and skills. I hope the official team can provide a fix for this.

Proposed Solution

"I hope the official team can fix the Docker permission issue, or provide a feasible solution."

Alternatives Considered

No response

Feature Type

New tool

Scope

None

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

The issue can be resolved by adjusting the ownership of the .venv directory to the hermes user or by running the installation command with elevated privileges.

Guidance

  • Check the current ownership of the .venv directory using ls -l and verify that it is owned by root.
  • Consider running the hermes container with elevated privileges using the --user flag or by modifying the Dockerfile to set the correct ownership.
  • As a temporary workaround, manually install the required packages using the suggested command pip install --python /opt/hermes/.venv/bin/python3 hindsight-client>=0.4.22 with elevated privileges.
  • Review the Dockerfile and consider setting the WORKDIR and USER instructions to ensure the correct ownership and permissions for the hermes user.

Example

No code example is provided as it would require modifying the Dockerfile or running commands with elevated privileges, which may vary depending on the specific setup.

Notes

This solution assumes that the issue is solely related to the ownership and permissions of the .venv directory. If the issue persists, further investigation into the Dockerfile and the hermes application may be required.

Recommendation

Apply workaround: Adjust the ownership of the .venv directory or run the installation command with elevated privileges, as this is a more immediate solution to the problem.

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 - ✅(Solved) Fix [Bug]: Hopefully, the Docker deployment method can allow changing permissions. Currently, Hermes running in Docker cannot install plugins or its own skill packages. [1 pull requests, 1 participants]