Skip to content

Docker: Chat tab broken — npm install fails with EACCES due to root-owned node_modules #18800

@renne

Description

@renne

Summary

When running the dashboard via Docker with HERMES_DASHBOARD_TUI=1, the Chat tab immediately shows [session ended] and no input is accepted.

Root Cause

/opt/hermes/ui-tui and its subdirectories (including packages/hermes-ink/node_modules) are owned by root in the Docker image, but the dashboard process runs as uid 10000 (hermes) after privilege drop in entrypoint.sh.

When the Chat tab opens a WebSocket connection, _make_tui_argv() in hermes_cli/main.py calls npm install in /opt/hermes/ui-tui. This fails with:

npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/opt/hermes/ui-tui/packages/hermes-ink/node_modules/@esbuild/aix-ppc64'

_make_tui_argv then calls sys.exit(1), which is caught as SystemExit in pty_ws() (web_server.py line ~3007) and results in the WebSocket closing immediately — shown to the user as [session ended].

The same issue affects /opt/hermes/node_modules.

Steps to Reproduce

  1. Run hermes-dashboard via Docker Compose (standard setup from docs)
  2. Set HERMES_DASHBOARD_TUI=1
  3. Open the dashboard and click the Chat tab
  4. Observe [session ended] — typing is not possible

Fix

Add a chown in the Dockerfile before the image is finalized:

RUN chown -R hermes:hermes /opt/hermes/ui-tui /opt/hermes/node_modules

This ensures the hermes user (uid 10000) can write to node_modules when npm install runs at Chat tab startup.

Environment

  • Image: nousresearch/hermes-agent:latest (v0.12.0, 2026.4.30)
  • HERMES_DASHBOARD_TUI=1
  • Linux/amd64, Docker Compose

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/dockerDocker image, Compose, packagingcomp/tuiTerminal UI (ui-tui/ + tui_gateway/)type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions