Skip to content

fix(docker): add profiles directory and honor HERMES_HOME env override in entrypoint - #8862

Closed
luyao618 wants to merge 1 commit into
NousResearch:mainfrom
luyao618:fix/docker-volume-profiles-hermes-home
Closed

fix(docker): add profiles directory and honor HERMES_HOME env override in entrypoint#8862
luyao618 wants to merge 1 commit into
NousResearch:mainfrom
luyao618:fix/docker-volume-profiles-hermes-home

Conversation

@luyao618

Copy link
Copy Markdown
Contributor

What does this PR do?

The Docker entrypoint.sh hardcoded HERMES_HOME="/opt/data", silently overriding any user-supplied -e HERMES_HOME=/custom value. Users who wanted to customize the data directory location (e.g. docker run -e HERMES_HOME=/custom/path -v /host/path:/custom/path) had their override ignored. Additionally, the mkdir -p bootstrap list was missing the profiles directory, which is required for multi-profile deployments (hermes profile create).

PR #6936 previously addressed missing directories (skins/plans/workspace) but the maintainer explicitly noted "Left HERMES_HOME hardcoded for now". This PR completes the remaining fix.

Related Issue

Fixes #6877

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • docker/entrypoint.sh:
    • Replace HERMES_HOME="/opt/data" with HERMES_HOME="${HERMES_HOME:-/opt/data}" to honor user-supplied env var while keeping the default
    • Add export HERMES_HOME so the variable survives the gosu re-exec (line 29) and reaches the final exec hermes process (line 64)
    • Add profiles to the mkdir -p directory bootstrap list

How to Test

  1. Default behavior (backward compatible):

    docker run nousresearch/hermes-agent env | grep HERMES_HOME
    # Should show: HERMES_HOME=/opt/data
  2. Custom HERMES_HOME:

    docker run -e HERMES_HOME=/custom/path nousresearch/hermes-agent env | grep HERMES_HOME
    # Should show: HERMES_HOME=/custom/path
  3. Profiles directory created:

    docker run nousresearch/hermes-agent ls -d /opt/data/profiles
    # Should exist without error

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/ -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 (Apple Silicon)

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
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

…e in entrypoint

The Docker entrypoint hardcoded HERMES_HOME="/opt/data", silently
overriding any user-supplied -e HERMES_HOME=/custom value. Also the
mkdir -p list was missing the profiles directory needed for multi-profile
deployments.

- Use ${HERMES_HOME:-/opt/data} to respect user overrides while keeping
  the default
- Export HERMES_HOME so it survives the gosu re-exec and reaches the
  final exec hermes process
- Add profiles to the bootstrapped directory list
@luyao618
luyao618 force-pushed the fix/docker-volume-profiles-hermes-home branch from 4f06447 to 78488bb Compare April 24, 2026 17:05
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists area/docker Docker image, Compose, packaging labels Apr 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to #8115 (also open, same HERMES_HOME env override fix). This PR also adds profiles directory bootstrap.

@luyao618 luyao618 closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docker Docker image, Compose, packaging P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docker] Default volume mount misses profiles, SOUL.md, config, and skills — not persisted across rebuilds

2 participants