Repository navigation
Description
Bug Description
On a non-Docker Hermes install, opening the native Dashboard Files tab from another machine on the same network can cause the dashboard to treat the request as "hosted" and force the managed files root to /opt/data.
On a normal host install, /opt/data is a Docker-oriented path and may not exist or may be unreadable by the dashboard user. The result is a 500 in the Files tab instead of showing a valid host filesystem root.
Actual Behavior
Files tab shows:
{"detail":"Managed files root is unavailable: [Errno 13] Permission denied: '/opt/data'"}In the same session, there was also a separate issue where the dashboard process needed a restart before the newer /api/files* routes became live, because web_server.py had been updated after the service started. After restart, the /api/files routes worked, but remote access still failed because the managed files root resolved to /opt/data.
Expected Behavior
For a non-Docker host install, remote dashboard access should not silently force /opt/data.
Reasonable expected behavior would be one of:
- use the same host root policy as local requests (for example,
Path.home()), or - detect whether Hermes is actually running in a containerized/hosted filesystem layout before forcing
/opt/data, or - fail with a clearer configuration error and documented override path.
Environment
- Hermes version: 0.16.0
- Install type: source/host install (not Docker)
- OS: Ubuntu 24.04
- Dashboard exposed on LAN with
--host 0.0.0.0 --insecure - Reproduced when opening the dashboard from another machine on the same LAN
Steps to Reproduce
- Run Hermes dashboard as a host user service on Linux (non-Docker install).
- Bind dashboard for LAN access, e.g.
--host 0.0.0.0 --insecure. - Open the dashboard from another machine on the LAN.
- Click Files.
Result
The Files view resolves the managed root to /opt/data and returns:
{"detail":"Managed files root is unavailable: [Errno 13] Permission denied: '/opt/data'"}Relevant Source
Current logic appears to be:
def _managed_files_policy(request: Request, *, create_root: bool = True) -> ManagedFilesPolicy:
raw_forced_root = os.environ.get(_MANAGED_FILES_ROOT_ENV, "").strip()
if raw_forced_root:
...
if not _local_dashboard_request(request) or _default_hermes_root_is_opt_data():
root = _ensure_managed_root(_HOSTED_MANAGED_FILES_ROOT) if create_root else _HOSTED_MANAGED_FILES_ROOT
return ManagedFilesPolicy(default_path=root, locked_root=root, can_change_path=False)
home = _canonical_path(Path.home())
return ManagedFilesPolicy(default_path=home, locked_root=None, can_change_path=True)The not _local_dashboard_request(request) branch seems too broad for normal LAN usage on non-Docker installs.
Workaround
Set an explicit override for the dashboard service:
[Service]
Environment="HERMES_DASHBOARD_FILES_ROOT=/home/<user>"Then restart hermes-dashboard.service.
This fixes the issue locally, but it looks like a workaround for an incorrect default policy.
Activity
AIalliAI commentedon Jun 11, 2026
Reproduced from the code:
_managed_files_policytreats every non-local request (remote client orauth_required) as hosted and locks the Files root to/opt/data, which only exists in the Docker layout.Opened #44139: the
/opt/datalock now keys off the actual hosted-layout signal (HERMES_HOME→/opt/data), and remote/auth-gated requests on host installs get a locked root at the dashboard user's home instead — keeping the non-local confinement without 500ing.HERMES_DASHBOARD_FILES_ROOToverride behavior is unchanged.BigDon86 commentedon Jun 12, 2026
Additional report from Windows + WSL (virgin dashboard, MS Edge):
Error:
Error: 500: {"detail":"Managed files root is unavailable: [Errno 13] Permission denied: '/opt/data'"}Reproduced on first run when clicking the Files tab.
See vault report: [[Bug_Report_Hermes_Dashboard_vs_Gateway_Process_20260612]]
This matches the behavior described in the original report.
AIalliAI commentedon Jun 12, 2026
@BigDon86 Your WSL repro is consistent with the same root cause, and notably it shows the bug isn't limited to LAN access. There are two ways a "virgin dashboard" on WSL lands in the forced-
/opt/databranch:--insecure,should_require_authengages the OAuth gate, and_local_dashboard_requestthen returnsFalsefor every request — including from a browser on the same machine.localhost) fails both the Host-header and client-IP loopback checks.Either way the policy locks the root to
/opt/data, and on a stock Ubuntu/WSL install/optis root-owned, so themkdirfails with exactly theErrno 13you saw.The fix in #44139 covers both paths: the
/opt/datalock only engages whenHERMES_HOMEactually resolves to/opt/data(the Docker/hosted layout), and remote/auth-gated requests on host installs get a locked root at the dashboard user's home instead. Until it lands, the workaround from the original report applies on WSL too: setHERMES_DASHBOARD_FILES_ROOT=/home/<user>for the dashboard process and restart it.Small note: the
[[Bug_Report_…]]vault link in your comment doesn't resolve on GitHub — if you can share the launch command and the URL you opened in Edge, that would confirm which of the two triggers you hit (useful for a regression test, though the fix is the same either way).BigDon86 commentedon Jun 12, 2026
Confirmed reproduction details from WSL:
Launch command (currently running on the affected machine):
/home/don/.hermes/hermes-agent/venv/bin/python -m hermes_cli.main dashboard --host 172.31.211.128 --port 9119 --insecure --no-open --skip-build
URL opened in Edge:
http://172.31.211.128:9119
This matches the non-loopback client/host trigger (WSL IP instead of localhost).
AIalliAI commentedon Jun 12, 2026
Thanks — that pins it down cleanly.
--insecurerules out the auth-gate path (trigger 1), so your repro isolates trigger 2: the browser connects via172.31.211.128, so both the client address and the Host header are non-loopback,_local_dashboard_requestreturnsFalse, and the current policy forces/opt/data— which is root-owned on WSL Ubuntu, hence theErrno 13.#44139 covers this exact launch: since
HERMES_HOMEon your install isn't/opt/data, the remote request gets a Files root locked to the dashboard user's home (/home/don) instead of the Docker-only path —test_remote_request_on_host_install_locks_to_homein the PR models precisely this scenario. Until it lands, settingHERMES_DASHBOARD_FILES_ROOT=/home/donin the dashboard process's environment is the workaround.test(dashboard): drop superseded NousResearch#44139 host-install home…
test(dashboard): drop superseded NousResearch#44139 host-install home…
fix(dashboard): don't force /opt/data files root for remote requests …
fix(dashboard): don't force /opt/data files root for remote requests …
test(dashboard): align test_gated_local_mode assertion with new remot…
teknium1 commentedon Jul 14, 2026
Thanks for the detailed LAN and WSL reproductions. This is already fixed on current
mainby an automated hermes-sweeper review.d206e1f51dfbb12e06d2cc67eb5c6223b53bfdc4(fix(dashboard): keep local file browser on home) removed the non-local-request condition that forced/opt/data.hermes_cli/web_server.py:1695-1705locks to/opt/dataonly when the actual Hermes root is/opt/data; host installs fall back to the dashboard user's home.tests/hermes_cli/test_web_server_files.py:196-220covers an auth-gated, non-loopback request on a host install and verifies the home policy.v2026.6.19. The related fix(dashboard): don't force /opt/data files root for remote requests on host installs #44139 discussion correctly identified the original failure mode; its additional remote-root-locking behavior is not needed for this issue's reported 500.