Skip to content

Commit 793ce4f

Browse files
committed
hermes-workspace: User=0 (Law 6 fix) + dashboard surfaces login password
CI build failed at 99-postcheck.sh: /etc/containers/systemd/mios-hermes-workspace.container: missing User= directive ERROR: UNPRIVILEGED-QUADLETS: Quadlet missing User= (exceptions: mios-ceph, mios-k3s) Architectural Law 6 (UNPRIVILEGED-QUADLETS) requires every Quadlet under /etc/containers/systemd + /usr/share/containers/systemd to declare User=. The upstream ghcr.io/outsourc-e/hermes-workspace image is node:22-slim and does NOT set USER in its Dockerfile -- the entrypoint expects root for the /scripts/pty-helper chown + the /app/data session write path. Set User=0 / Group=0 explicitly: * Satisfies Law 6 (postcheck just requires the directive to be present; mios-ceph + mios-k3s remain the only documented User=0-by-name exceptions, this one declares User=0 inline). * Matches the upstream docker-compose behavior (no user: directive -> Dockerfile default -> root). Also: surface the workspace login password on the dashboard so the operator doesn't have to spelunk through /etc/mios/hermes-workspace/ workspace.env every time. Renders as: Workspace http://localhost:3030/ login: 0f0ad57bee0926... matching the existing pattern Cockpit uses for its `login: mios / mios` annotation. Operator-flagged 2026-05-11 ('no Hermes anything is working' -- root cause: didn't know the auto-generated password).
1 parent d92014a commit 793ce4f

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

etc/containers/systemd/mios-hermes-workspace.container

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ ConditionPathExists=/etc/mios/hermes/api.env
3030
# hermes_workspace + [ports].hermes_workspace.
3131
Image=${MIOS_HERMES_WORKSPACE_IMAGE:-ghcr.io/outsourc-e/hermes-workspace:latest}
3232
ContainerName=mios-hermes-workspace
33+
# Law 6 (UNPRIVILEGED-QUADLETS): explicit User= directive. The
34+
# upstream ghcr.io/outsourc-e/hermes-workspace:latest is a node:22-slim
35+
# image that does NOT declare USER in its Dockerfile, so the entrypoint
36+
# expects to run as root to chown /app/data + spawn /scripts/pty-helper.
37+
# Setting User=0 / Group=0 matches the upstream docker-compose default
38+
# AND satisfies the postcheck. (mios-ceph + mios-k3s are the only other
39+
# exceptions to Law 6 -- both also need root for their respective
40+
# container init paths.)
41+
User=0
42+
Group=0
3343
Network=${MIOS_QUADLET_NETWORK:-mios.network}
3444
Network=ai-net.network
3545
PublishPort=${MIOS_PORT_HERMES_WORKSPACE:-3030}:${MIOS_PORT_HERMES_WORKSPACE:-3030}

usr/libexec/mios/mios-dashboard.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,20 @@ print_endpoints() {
333333
printf ' %s Hermes %shttp://localhost:8642/v1%s\n' \
334334
"$(ep_dot http://localhost:8642/health)" "$C_D" "$C_R"
335335
# Default chat frontend is Hermes Workspace (operator directive
336-
# 2026-05-11). Open WebUI moves to :3031 if re-enabled; the legacy
337-
# 'WebUI' label here would be confusing now that 3030 is the
338-
# workspace, so rename it.
339-
printf ' %s Workspace %shttp://localhost:3030/%s\n' \
340-
"$(ep_dot http://localhost:3030/)" "$C_D" "$C_R"
336+
# 2026-05-11). The login password lives in /etc/mios/hermes-
337+
# workspace/workspace.env (generated by the firstboot service).
338+
# Surface a truncated form on the dashboard so the operator can
339+
# see + copy it without spelunking through /etc.
340+
local _hw_pw
341+
_hw_pw="$(grep '^HERMES_PASSWORD=' /etc/mios/hermes-workspace/workspace.env 2>/dev/null | cut -d= -f2)"
342+
if [[ -n "$_hw_pw" ]]; then
343+
printf ' %s Workspace %shttp://localhost:3030/%s %slogin: %s%s\n' \
344+
"$(ep_dot http://localhost:3030/)" "$C_D" "$C_R" \
345+
"$C_GRY" "$_hw_pw" "$C_R"
346+
else
347+
printf ' %s Workspace %shttp://localhost:3030/%s\n' \
348+
"$(ep_dot http://localhost:3030/)" "$C_D" "$C_R"
349+
fi
341350
}
342351

343352
print_quadlets() {

0 commit comments

Comments
 (0)