在centos的docker环境部署hermes agent hermes webui hermes dashboard从hermes webui获取docker-compose.three-container.yml文件运行后并不能直接跑起来修改后如下# Three-container Docker Compose: Hermes Agent Dashboard WebUI # # This extends the two-container setup with the Hermes Dashboard for # monitoring agent activity, sessions, and resource usage. # # Usage: # docker compose -f docker-compose.three-container.yml up -d # # Services: # hermes-agent — gateway API on port 8642 (CLI, Telegram, cron, tools) # hermes-dashboard — monitoring dashboard on port 9119 # hermes-webui — browser chat interface on port 8787 # # All three share the same hermes-home volume so config, sessions, # skills, and memory are consistent across all surfaces. services: hermes-agent: image: docker.xuanyuan.run/nousresearch/hermes-agent:latest container_name: hermes-agent command: gateway run ports: - 0.0.0.0:8642:8642 volumes: # Persist config, state, sessions, skills, memory across restarts - /data/hermes/home:/home/hermes/.hermes # Expose agent source so the WebUI can install dependencies from it - hermes-agent-src:/opt/hermes environment: - HERMES_HOME/home/hermes/.hermes restart: unless-stopped deploy: resources: limits: memory: 4G cpus: 2.0 networks: - hermes-net hermes-dashboard: image: docker.xuanyuan.run/nousresearch/hermes-agent:latest container_name: hermes-dashboard command: dashboard --host 0.0.0.0 --insecure ports: - 0.0.0.0:9119:9119 volumes: - /data/hermes/home:/home/hermes/.hermes environment: - HERMES_HOME/home/hermes/.hermes # Dashboard connects to the gateway for health/session data - GATEWAY_HEALTH_URLhttp://hermes-agent:8642 depends_on: - hermes-agent restart: unless-stopped deploy: resources: limits: memory: 512M cpus: 0.5 networks: - hermes-net hermes-webui: image: ghcr.io/nesquena/hermes-webui:latest container_name: hermes-webui depends_on: - hermes-agent ports: # Expose on localhost only. Remove 127.0.0.1: to expose on all interfaces # (set HERMES_WEBUI_PASSWORD if doing so). - 0.0.0.0:8787:8787 volumes: # Same hermes home as the agent — shares config, sessions, state - /data/hermes/home:/home/hermeswebui/.hermes # Agent source mounted where docker_init.bash expects it. # At startup the init script runs: # uv pip install /home/hermeswebui/.hermes/hermes-agent # which installs the agent and all its Python dependencies. - hermes-agent-src:/home/hermeswebui/.hermes/hermes-agent # Workspace directory — browse and edit files from the WebUI. # Adapt the host path to your project directory. - /data/hermes/workspace:/workspace environment: - HERMES_WEBUI_HOST0.0.0.0 - HERMES_WEBUI_PORT8787 - HERMES_WEBUI_STATE_DIR/home/hermeswebui/.hermes/webui # Match your host users UID/GID for correct file permissions. # Run id -u and id -g to find your values. # On macOS, UIDs start at 501 (not 1000) — set these in a .env file: # echo UID$(id -u) .env echo GID$(id -g) .env - WANTED_UID10000 - WANTED_GID10000 # Optional: set a password for remote access # - HERMES_WEBUI_PASSWORDyour-secret-password restart: unless-stopped networks: - hermes-net networks: hermes-net: driver: bridge volumes: # hermes-home: hermes-agent-src:修改内容一 ports: - 0.0.0.0:8642:8642把127.0.0.1修改为0.0.0.0这样才能在局域网访问否则智能本机访问服务。修改内容二- /data/hermes/home:/home/hermes/.hermes把hermes的安装目录定义为宿主机的一个自定义目录为了更好的观察和测试系统。修改内容三 - HERMES_HOME/home/hermes/.hermes这里原来是root目录导致程序因为权限问题启动失败修改为home目录。修改内容五- WANTED_UID10000 - WANTED_GID10000在容器中执行id -u id -g获取的实际值。