LAN clients now connect directly to 192.168.0.143:8787 (password-gated via HERMES_WEBUI_PASSWORD); the SSH tunnel via port 22 remains the sole off-network ingress. Recreation also re-reads the rotated password from dankclaw/.env via the [Container] EnvironmentFile.
52 lines
2.1 KiB
INI
52 lines
2.1 KiB
INI
# Quadlet unit: Hermex webui (rootless, boot-persistent).
|
|
#
|
|
# Install path on dankclaw: ~/.config/containers/systemd/hermes-webui.container
|
|
# Unit name: hermes-webui.service (container name: hermes-webui)
|
|
#
|
|
# Runs the open-source hermes-webui (github.com/nesquena/hermes-webui) in
|
|
# foreground mode: bootstrap.py creates .venv inside the mounted checkout,
|
|
# installs WebUI + agent deps, then execs server.py as a single foreground
|
|
# process. It reads HERMES_HOME=/data, so it drives the SAME agent state
|
|
# (memory, skills, sessions) as the gateway container. Published on the LAN
|
|
# interface only (192.168.0.143:8787): password-gated (HERMES_WEBUI_PASSWORD
|
|
# in the host .env, git-ignored), so LAN clients connect directly and the
|
|
# SSH tunnel (phone -> Dankclaw:22) remains the sole off-network ingress.
|
|
|
|
[Unit]
|
|
Description=Hermes webui (Hermex) container
|
|
|
|
[Container]
|
|
ContainerName=hermes-webui
|
|
Image=localhost/hermes-agent:latest
|
|
Pull=never
|
|
Network=dankclaw_default
|
|
EnvironmentFile=/home/dank/serverAppConfigs/dankclaw/.env
|
|
Environment=HERMES_HOME=/data
|
|
Environment=HERMES_WEBUI_HOST=0.0.0.0
|
|
Environment=HERMES_WEBUI_PORT=8787
|
|
Environment=HERMES_WEBUI_PASSWORD=${HERMES_WEBUI_PASSWORD}
|
|
# Headless host: never show the first-run wizard (a profile already
|
|
# exists in /data from the gateway).
|
|
Environment=HERMES_WEBUI_SKIP_ONBOARDING=1
|
|
Volume=/home/dank/hermes-data:/data
|
|
Volume=/home/dank/hermes-webui:/webui
|
|
PublishPort=192.168.0.143:8787:8787
|
|
Exec=python3 /webui/bootstrap.py --foreground
|
|
# JSON exec form on purpose: this quadlet generator joins a bare HealthCmd
|
|
# into ONE argv element with \x20 escapes and then shell-executes it — the
|
|
# python one-liner's quoting would be mangled. A JSON array is passed through
|
|
# verbatim. Start period covers first-boot pip installs into /webui/.venv.
|
|
HealthCmd=["python3","-c","import urllib.request;urllib.request.urlopen('http://127.0.0.1:8787/health')"]
|
|
HealthInterval=30s
|
|
HealthTimeout=10s
|
|
HealthRetries=5
|
|
HealthStartPeriod=600s
|
|
|
|
[Service]
|
|
Restart=always
|
|
RestartSec=5
|
|
EnvironmentFile=/home/dank/serverAppConfigs/dankclaw/.env
|
|
|
|
[Install]
|
|
WantedBy=default.target
|