Repository navigation
Description
Bug Description
Running the official gateway + dashboard stack on a shared data volume (necessary to keep SQLite state databases, dynamic skills, and config in sync) triggers an endless, sub-second s6-log lock crash loop in the dashboard sidecar container under v0.15.0 and v0.15.1.
Steps to Reproduce
- Set up a standard multi-container Docker Compose stack containing both
gatewayanddashboardservices. - Bind-mount the same host data folder to both containers:
- /volume1/docker/hermes/data:/opt/data - Launch the stack:
docker compose up -d - The gateway container boots first and claims the shared logs lock.
- The dashboard container boots second, fails to lock the shared path, and crashes
s6-log. - Inspect the dashboard logs:
docker logs hermes-dashboard
Expected Behavior
Both containers should boot and execute their respective services (gateway and web dashboard) peacefully while sharing the same underlying data directory without locking conflicts or crash-loops.
Actual Behavior
The dashboard container is trapped in an endless, rapid log-supervisor crash loop because it cannot acquire the lock on /opt/data/logs/gateways/default/lock (which is already held by the gateway container).
This loop creates a continuous, high-frequency stream of disk writes on the host (rattling mechanical hard drives on Btrfs/ext4 systems continuously).
Affected Component
Other
Messaging Platform (if gateway-related)
No response
Debug Report
Host Environment: Synology DS224+ (Intel Celeron J4125, 10GB RAM)
Orchestration: Docker Compose
Mount Type: Shared Btrfs host volume bind-mountOperating System
Synology DSM 7.2+ (Linux Kernel 5.10.x)
Python Version
3.11.9
Hermes Version
0.15.1 (v2026.5.29)
Additional Logs / Traceback (optional)
s6-log: fatal: unable to lock /opt/data/logs/gateways/default/lock: Resource busy
s6-log: fatal: unable to lock /opt/data/logs/gateways/default/lock: Resource busy
s6-log: fatal: unable to lock /opt/data/logs/gateways/default/lock: Resource busy
s6-log: fatal: unable to lock /opt/data/logs/gateways/default/lock: Resource busyRoot Cause Analysis (optional)
In Hermes v0.15.0, process supervision via s6-overlay was introduced. Inside the base image, s6-log is hardcoded to acquire a file-level lock on /opt/data/logs/gateways/default/lock on startup.
Because both the gateway and dashboard containers share the /opt/data mount (to access the same SQLite database and user profiles/skills), they both execute s6-log targeting the exact same lock path. The first container locks the file successfully; the second container is immediately blocked with a Resource busy error, causing its s6-log service to crash and be continuously restarted by the container supervisor in a tight loop.
Proposed Fix (optional)
Decouple the s6-log locking path from the shared user data directory, or make the lock file path container-specific or configurable via an environment variable.
For example, s6-log could lock /opt/data/logs/gateways/default/lock-<hostname> or use a local container path like /var/log that is not bound to a shared host volume.
For end-users facing this, the immediate workaround is to map the logging directory of the sidecar container to an in-memory tmpfs volume in docker-compose.yml:
tmpfs:
- /opt/data/logs:uid=1026,gid=100,mode=1777
Activity
hulet commentedon Jun 1, 2026
Do we even want to fix this?
https://hermes-agent.nousresearch.com/docs/user-guide/docker explicitly says "Never run two Hermes gateway containers against the same data directory simultaneously — session files and memory stores are not designed for concurrent write access." and "Running the dashboard as a separate container is not supported: its gateway-liveness detection requires a shared PID namespace with the gateway process."
Doesn’t this issue describe an explicitly unsupported configuration?
CMOS3 commentedon Jun 1, 2026
Hi @hulet ,
Actually, this is the standard, officially documented configuration.
If you look at the official
docker-compose.ymlblueprint in the repository, both the gateway (hermes) and thedashboardservices are designed to map the exact same host volume (e.g.,~/.hermes) to/opt/datainside their respective containers. This shared volume is structurally necessary because the dashboard relies on direct access to/opt/datato read the active gateway's configuration, session SQLite databases, and current state.The issue reported here is a regression introduced in
v0.15.0with the transition tos6-overlayprocess supervision. The news6-logutility attempts to acquire a hard file lock on/opt/data/logs/gateways/default/lockon startup.Because both containers boot simultaneously and share the volume, whichever container boots second (usually the dashboard) is blocked by the lock, crashes its logging subprocess, and is repeatedly restarted by the s6 supervisor.
This lock collision can be resolved upstream by isolating the logger lock paths or appending unique container identifiers to the lock targets, which is what the proposed fix aims to address.
hulet commentedon Jun 1, 2026
You're right this setup is still shown in
docker-compose.ymlanddocker-compose.windows.yml. It looks like this should have been changed in commit 5671059f6, which updated the Docker Compose example at https://hermes-agent.nousresearch.com/docs/user-guide/docker#docker-compose-example, but failed to update thedocker-compose.ymlanddocker-compose.windows.ymlexample files.I don't have a lot of history with this project, though, so my read on 5671059 and https://hermes-agent.nousresearch.com/docs/user-guide/docker could be wrong.
#36235 would update
docker-compose.ymlanddocker-compose.windows.ymlto match 5671059.Have you tried the
HERMES_DASHBOARD=1flag?zjlariel commentedon Jun 3, 2026
I use the new docker-compose.windows.yml, it does work! thx!
Jakeshadow commentedon Jun 8, 2026
s6-log lock collision when dashboard and gateway share a data volume. Fix: --volumes-from instead of shared bind mounts, or separate /var/log/hermes volume per container. Full multi-container guide (8 errors, verified fixes): https://hermesdocker.com
hulet commentedon Jun 8, 2026
@Jakeshadow 5671059 deprecated the two-container setup in favor of the HERMES_DASHBOARD=1 flag, but failed to update the example docker-compose.yml (see #36235). https://hermes-agent.nousresearch.com/docs/user-guide/docker explicitly states "Running the dashboard as a separate container is not supported: its gateway-liveness detection requires a shared PID namespace with the gateway process." and "Never run two Hermes gateway containers against the same data directory simultaneously — session files and memory stores are not designed for concurrent write access.". You might update your site to describe how to use the
HERMES_DASHBOARD=1flag?teknium1 commentedon Jul 13, 2026
This is an automated hermes-sweeper review. Current
mainimplements the requested fix for the shared-volume dashboard/gateway lock collision.aca11c227eb7e8b2f53f6e130d6e922455a573c1(fix(docker): skip gateway reconciliation in dashboard container (autodetect), fix(docker): skip gateway reconciliation in dashboard container (autodetect) #46293) identifies this exacts6-logflock race and prevents the dashboard container from reconciling per-profile gateway services.hermes_cli/container_boot.py:328-346detects the dashboard role;hermes_cli/container_boot.py:544-560skips reconciliation before it can create conflicting log services.tests/hermes_cli/test_container_boot.py:934-962verifies dashboard startup creates neithergateway-workernorgateway-defaultservice slots.v2026.6.19.Thanks for the detailed reproduction and the discussion that traced the failure to the shared-volume compose setup.