Document tested persistent Debian Webtop workspace for Hermes

This commit is contained in:
Mikei386 committed 2026-10-16 13:53:16 +02:00
1 parent 7af7084aac
commit 19f58a3f5f
9 files changed
+315

No files matched your search

@@ -66,3 +66,16 @@ User authorized a manually managed official Nous desktop sandbox with SSH.
Installed Hermes-Sandbox and selected terminal.backend=ssh. See ssh-sandbox/
for complete source, three correct Appdata mounts, Unraid template, tests,
update and restore limits. The agent's Docker socket remains absent.
## Superseding state: persistent Debian Webtop experiment
The above fixed Nous SSH sandbox was subsequently removed at the user's request,
including its image, Appdata, template and key. User then explicitly authorized
LinuxServer Debian Webtop with persistent additional programs and SSH integration.
Current container is Hermes-Workspace, official lscr.io/linuxserver/webtop:debian-xfce,
not a custom image. Terminal runs over SSH; the existing Webtop display is driven
by official Cua MCP over SSH, not Hermes' separate Bot Screen. No Docker socket.
See [Webtop workspace](webtop-workspace/README.md) for versions, persisted startup
recipes, recreation tests, limitations and restore requirements. Existing 19 MCP
definitions were retained; webtop-desktop adds one (20 total). This section
supersedes both prior sandbox descriptions.
@@ -0,0 +1,19 @@
# Hermes Workspace (Webtop)
Your terminal backend is SSH into the persistent Hermes-Workspace container, user abc.
Work in /config/workspace. /config is the persistent home. You have no host Docker socket.
Browser automation: use /opt/hermes-workspace/bin/webtop-browser (agent-browser CLI).
Examples: webtop-browser open URL; webtop-browser snapshot -i; webtop-browser screenshot /config/workspace/page.png.
It uses the visible Webtop Chromium and a persistent browser profile.
For the existing visible Webtop desktop, discover tools from MCP server webtop-desktop.
Use list_windows/get_window_state to ground actions, then click/type_text/press_key.
Prefer element handles when available; use foreground delivery on this dedicated desktop when background delivery fails.
Verify the actual result after actions. A driver action reported as unverifiable is not proof of success.
Do not use Hermes Bot Screen/computer_use for this desktop: that path creates a separate Xvnc desktop.
Files, browser profile and tools under /config or /opt/hermes-workspace survive container recreation.
For additional Debian packages, keep one package name per line in /config/.hermes-workspace/packages.txt.
The startup installer restores packages on recreation. An ad-hoc apt install alone does not survive an image update.
Never modify Unraid or other containers to fix a workspace problem.
@@ -0,0 +1,128 @@
# Hermes Workspace: Debian Webtop over SSH
Status: installed and tested on Unraid, 2026-10-16. This supersedes the removed
`Hermes-Sandbox` SSH derivative. User explicitly authorized this Webtop experiment,
including persistent additional packages. No custom Docker image or Hermes code patch.
## Components and boundaries
- Community Apps: https://ca.unraid.net/apps/webtop-1mtwder1vw909b
- Image: `lscr.io/linuxserver/webtop:debian-xfce`
- Pulled manifest: `sha256:d925f9c84663fe57735be4defe95a338d32bc37f2e12b9e0f0981e91b6bd0a5d`
- Tested amd64 image ID: `sha256:293999375c3afb3c365aaec873a9d6a6d44b0846cb6376f16b296e2a756e46e5`
- Version: `eb802092-ls217`, vendor build 2026-10-13.
- Cua driver 0.36.0, official release from https://github.com/trycua/cua/releases/tag/cua-driver-rs-v0.36.0
- Driver SHA256: `d09deb163d5c505493c865c0882ccf261d460c515afe9df1ad1e5d4173f2a4f9`
- agent-browser 0.26.0 from npm; Debian's Chromium from Webtop.
- Container `Hermes-Workspace`, bridge network, UID/GID 1000, no privileged mode,
no Docker socket. Hermes-Agent also has no Docker socket.
- LAN ports: `192.168.1.2:3020` HTTP desktop, `3021` HTTPS desktop, `2224` SSH.
Webtop HTTPS uses its own certificate; a browser may request certificate acceptance.
The persisted Unraid template publishes standard host ports; a GUI recreation may
bind all host interfaces instead of the explicit LAN-IP used by the installation.
- Old never-started Webtop-Debian definition was replaced; its Appdata retained.
Port 3010 belongs to Immich-Kiosk and was not changed.
## Persistence and update mechanism
Host `/mnt/nvme-storage/appdata/Webtop-Debian` is `/config` (user home).
Its `init` subdirectory is additionally mounted at `/custom-cont-init.d:ro`;
`services` at `/custom-services.d:ro`; `tools` at `/opt/hermes-workspace`.
`install-tools.sh` is deployed as `init/10-hermes-tools`; `sshd-service.sh` as
`services/sshd`. `webtop-session` and `webtop-browser` live in `tools/bin`.
These are LinuxServer's documented custom init/service mechanisms:
https://docs.linuxserver.io/general/container-customization/
LinuxServer does not formally support user-authored extensions themselves.
The installer restores missing Debian packages from
`/config/.hermes-workspace/packages.txt` when the container is recreated.
Native packages are reinstalled, not magically preserved in the image. Package
repositories/network must therefore be reachable on first boot after recreation.
Node package and Cua binary files live in the persistent tools mount.
Browser profile is `/config/.hermes-workspace/browser-profile`; work is
`/config/workspace`. The boot recipe clears only this browser's stale singleton
locks and own agent-browser runtime socket/PID files before a fresh session starts.
Additional apt packages must be recorded one per line in packages.txt; an ad-hoc
apt install alone does not survive an image replacement. Other user-installed
software also needs a persistent location or an explicit installation recipe.
Debian's openssh-server is configured for key-only `abc` login. Host private keys
are under `/config/.hermes-workspace/hostkeys` (root-only); authorized_keys is 0600.
The bootstrap prevents package post-install scripts from starting an unconfigured
sshd. pam_loginuid is removed from this container's SSH PAM chain because container
loginuid cannot be written; neither Unraid PAM nor Hermes binaries are changed.
## Hermes integration
Terminal configuration: backend ssh, host 192.168.1.2, port 2224, user abc,
key `/opt/data/ssh/id_ed25519_webtop`, cwd `/config/workspace`.
The dedicated key is generated internally, never printed. MCP pins the host public
key through `/opt/data/ssh/webtop_known_hosts`, obtained directly from the container.
The ordinary SSH backend also has this verified host key in its known_hosts.
`mcp_servers.webtop-desktop` runs the official Cua MCP driver via SSH:
`/opt/hermes-workspace/bin/webtop-session /opt/hermes-workspace/cua/cua-driver mcp --no-overlay`.
The session helper uses Webtop's existing X11 display `:1` and its current D-Bus
session. This is NOT Hermes' built-in computer_use/Bot Screen path: that path starts
its own separate Xvnc screen. No second Xvnc desktop is installed or started here.
Browser automation runs through the terminal command
`/opt/hermes-workspace/bin/webtop-browser`, using a headed Chromium with its own
persistent profile. Native Hermes browser tools were not rewritten to point there.
SOUL.md has a short routing instruction; workspace AGENTS.md documents the tools.
Existing instructions were retained and a protected private backup made in
`/opt/data/backups/webtop-20261016`.
Hermes discovered 66 tools from webtop-desktop. Existing 19 MCP definitions remain
unchanged (20 definitions total). Existing deferred Tool Search behavior remains.
Only Hermes-Agent was restarted to activate its configuration; no Athena, Deck,
OpenCode or other service restart.
## Verification
- SSH authenticated as abc with the dedicated key; cwd correct.
- Real Hermes terminal_tool executed commands and opened Example Domain in Chromium.
- Upload/download via scp from Hermes matched exactly.
- Cua MCP captured Webtop's actual 1024x768 desktop and Mousepad window.
- Cua mouse click, foreground keyboard entry and Ctrl+S saved exactly
HERMES_WEBTOP_DESKTOP_OK; verified by independent file read.
- Browser opened a synthetic localhost HTTP fixture, filled a field, clicked its
button and read exactly OK: HERMES_BROWSER_OK. Screenshot visually inspected.
- Public https://example.org navigation and title read passed.
- Actual Hermes MCP discovery/registry registered 66 tools and dispatched list_windows.
- Full container removal/recreation from the same untouched manufacturer image
performed twice. Files, key identity and driver survived; SSH/system packages
were restored by the boot recipe. Final browser/form test passed after recreation.
- Latest image pull reported up-to-date. This tests image recreation, not an
untested future Debian/Python major-version upgrade.
- Final Webtop HTTPS returned 200; Hermes dashboard reachable (302 login redirect).
Limits: background Cua input is not reliable on every widget. The tested path uses
foreground input on this dedicated desktop. Cua may report `effect: unverifiable`;
verify actual effects independently. Driver emits cursor-overlay warnings despite
--no-overlay; tested capture/input still worked. agent-browser reports that repeated
launch flags are ignored while its already-configured daemon runs; tests passed.
No LLM autonomous multi-step task or broad third-party website compatibility suite
was performed. Tool execution and integration, not model intelligence, were tested.
## Restore and removal
This is an optional Unraid integration, not a native Athena Deck dependency.
Back up the entire Webtop-Debian Appdata tree and Hermes-Agent Appdata, including
SSH keys, browser profile, config.yaml and SOUL.md, using an encrypted backup.
Keep the Unraid template `/boot/config/plugins/dockerMan/templates-user/my-Hermes-Workspace.xml`.
No claim that an existing backup job already includes these paths has been made.
Restore appdata plus template before creating the vendor image. Preserve ownership
and executable bits; root-owned init/service scripts need 0755. Generate a new
SSH key only if the old private backup is unavailable, then replace authorized_keys
internally and re-pin the container host key. Never put keys/cookies/config backups
into Git. On a fresh Debian host Docker plus the documented image/mounts are required;
no dependence on today's Athena CUDA/compiler/model stack.
For removal: return Hermes terminal to local, remove only webtop-desktop MCP and the
added SOUL section, then remove the Workspace container/template. Preserve user work
unless explicitly asked to delete it. Private pre-change Hermes config backups exist,
but restoring them wholesale later could overwrite newer settings.
@@ -0,0 +1,75 @@
#!/bin/bash
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
mkdir -p /config/.hermes-workspace /config/.cache/apt/archives/partial
if ! test -f /config/.hermes-workspace/packages.txt; then
printf '%s\n' openssh-server rsync python3 python3-venv python3-pil nodejs curl ca-certificates xdotool at-spi2-core dbus-x11 xauth > /config/.hermes-workspace/packages.txt
fi
packages=()
while IFS= read -r package; do
[[ -z "$package" || "$package" == \#* ]] && continue
[[ "$package" =~ ^[a-z0-9][a-z0-9+.-]*$ ]] || { echo 'Invalid package name'; exit 1; }
dpkg-query -W -f='${Status}' "$package" 2>/dev/null | grep -qx 'install ok installed' || packages+=("$package")
done < /config/.hermes-workspace/packages.txt
if (( ${#packages[@]} )); then
policy_added=0
if ! test -e /usr/sbin/policy-rc.d; then
printf '#!/bin/sh\nexit 101\n' > /usr/sbin/policy-rc.d; chmod 755 /usr/sbin/policy-rc.d; policy_added=1
fi
apt-get update
apt-get -o Dir::Cache::archives=/config/.cache/apt/archives install -y --no-install-recommends "${packages[@]}"
if (( policy_added )); then rm /usr/sbin/policy-rc.d; fi
fi
mkdir -p /run/sshd /config/.hermes-workspace/hostkeys /config/workspace /opt/hermes-workspace/bin
chown root:root /config/.hermes-workspace/hostkeys
chmod 700 /config/.hermes-workspace/hostkeys
for kind in ed25519 rsa; do
test -f /config/.hermes-workspace/hostkeys/ssh_host_${kind}_key || ssh-keygen -q -t "$kind" -N '' -f /config/.hermes-workspace/hostkeys/ssh_host_${kind}_key
done
usermod -s /bin/bash abc
if ! test -f /opt/hermes-workspace/cua/version-0.36.0; then
mkdir -p /opt/hermes-workspace/cua
curl -fsSL --retry 3 https://github.com/trycua/cua/releases/download/cua-driver-rs-v0.36.0/cua-driver-rs-0.36.0-linux-x86_64-binary.tar.gz | tar -xz -C /opt/hermes-workspace/cua
touch /opt/hermes-workspace/cua/version-0.36.0
fi
if ! test -x /opt/hermes-workspace/node/bin/agent-browser; then
npm install -g --prefix /opt/hermes-workspace/node --ignore-scripts --no-audit 'agent-browser@0.26.0'
fi
cat > /etc/ssh/sshd_config.d/hermes-workspace.conf <<'EOF'
Port 22
HostKey /config/.hermes-workspace/hostkeys/ssh_host_ed25519_key
HostKey /config/.hermes-workspace/hostkeys/ssh_host_rsa_key
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile /config/.hermes-workspace/authorized_keys
AllowUsers abc
UsePAM yes
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
PermitUserEnvironment no
EOF
sed -i '/pam_loginuid.so/d' /etc/pam.d/sshd
cat > /etc/profile.d/hermes-workspace.sh <<'EOF'
export PATH=/opt/hermes-workspace/bin:/opt/hermes-workspace/node/bin:$PATH
export AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
export AGENT_BROWSER_HEADED=1
export DISPLAY=:1
EOF
ln -sf /opt/hermes-workspace/node/bin/agent-browser /usr/local/bin/agent-browser
ln -sf /opt/hermes-workspace/bin/webtop-browser /usr/local/bin/webtop-browser
ln -sf /opt/hermes-workspace/cua/cua-driver /usr/local/bin/cua-driver
chown abc:abc /config/.hermes-workspace /config/.hermes-workspace/packages.txt
chown -R abc:abc /config/workspace /opt/hermes-workspace/node
if test -f /config/.hermes-workspace/authorized_keys; then
chown abc:abc /config/.hermes-workspace/authorized_keys
chmod 600 /config/.hermes-workspace/authorized_keys
fi
if ! pgrep -u "$(id -u abc)" -x chromium >/dev/null; then
rm -f /config/.hermes-workspace/browser-profile/SingletonLock /config/.hermes-workspace/browser-profile/SingletonSocket /config/.hermes-workspace/browser-profile/SingletonCookie
rm -f /config/.agent-browser/hermes-workspace.sock /config/.agent-browser/hermes-workspace.pid /config/.agent-browser/hermes-workspace.engine /config/.agent-browser/hermes-workspace.stream /config/.agent-browser/hermes-workspace.version
fi
chmod +x /config/.local/bin/proot-apps
printf 'ready\n' > /config/.hermes-workspace/setup-ready
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<Container version="2">
<Name>Hermes-Workspace</Name>
<Repository>lscr.io/linuxserver/webtop:debian-xfce</Repository>
<Registry>https://github.com/orgs/linuxserver/packages/container/package/webtop</Registry>
<Network>bridge</Network>
<MyIP/>
<Shell>bash</Shell>
<Privileged>false</Privileged>
<Support>https://github.com/linuxserver/docker-webtop/issues/new/choose</Support>
<Project>https://github.com/linuxserver/docker-webtop</Project>
<Overview>Webtop(https://github.com/linuxserver/docker-webtop) - Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported flavors accessible via any modern web browser.</Overview>
<Category>Other:</Category>
<WebUI>https://[IP]:[PORT:3001]</WebUI>
<TemplateURL>https://raw.githubusercontent.com/linuxserver/templates/master/unraid/webtop.xml</TemplateURL>
<Icon>https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png</Icon>
<ExtraParams>--shm-size=1g</ExtraParams>
<PostArgs/>
<CPUset>0</CPUset>
<DateInstalled>1756329008</DateInstalled>
<DonateText>Donations</DonateText>
<DonateLink>https://www.linuxserver.io/donate</DonateLink>
<Requires/>
<Config Name="WebUI" Target="3000" Default="3020" Mode="tcp" Description="Web Desktop GUI" Type="Port" Display="always" Required="true" Mask="false">3020</Config>
<Config Name="Port: 3001" Target="3001" Default="3021" Mode="tcp" Description="Web Desktop GUI HTTPS" Type="Port" Display="always" Required="true" Mask="false">3021</Config>
<Config Name="SUBFOLDER" Target="SUBFOLDER" Default="/" Mode="{3}" Description="Specify a subfolder to use with reverse proxies, IE `/subfolder/`" Type="Variable" Display="always" Required="false" Mask="false">/</Config>
<Config Name="TITLE" Target="TITLE" Default="Hermes Workspace" Mode="{3}" Description="String which will be used as page/tab title in the web browser." Type="Variable" Display="always" Required="false" Mask="false">Hermes Workspace</Config>
<Config Name="/dev/dri" Target="/dev/dri" Default="/dev/dri" Mode="{3}" Description="Add this for GL support (Linux hosts only)" Type="Device" Display="always" Required="false" Mask="false">/dev/dri</Config>
<Config Name="Appdata" Target="/config" Default="/mnt/user/appdata/webtop" Mode="rw" Description="abc users home directory" Type="Path" Display="advanced" Required="true" Mask="false">/mnt/nvme-storage/appdata/Webtop-Debian/</Config>
<Config Name="PUID" Target="PUID" Default="1000" Mode="{3}" Description="" Type="Variable" Display="advanced" Required="true" Mask="false">1000</Config>
<Config Name="PGID" Target="PGID" Default="1000" Mode="{3}" Description="" Type="Variable" Display="advanced" Required="true" Mask="false">1000</Config>
<Config Name="UMASK" Target="UMASK" Default="022" Mode="{3}" Description="" Type="Variable" Display="advanced" Required="false" Mask="false">022</Config>
<TailscaleStateDir/>
<Config Name="/custom-cont-init.d" Target="/custom-cont-init.d" Default="/mnt/nvme-storage/appdata/Webtop-Debian/init" Mode="ro" Type="Path" Display="always" Required="true" Mask="false">/mnt/nvme-storage/appdata/Webtop-Debian/init</Config><Config Name="/custom-services.d" Target="/custom-services.d" Default="/mnt/nvme-storage/appdata/Webtop-Debian/services" Mode="ro" Type="Path" Display="always" Required="true" Mask="false">/mnt/nvme-storage/appdata/Webtop-Debian/services</Config><Config Name="/opt/hermes-workspace" Target="/opt/hermes-workspace" Default="/mnt/nvme-storage/appdata/Webtop-Debian/tools" Mode="rw" Type="Path" Display="always" Required="true" Mask="false">/mnt/nvme-storage/appdata/Webtop-Debian/tools</Config><Config Name="SSH" Target="22" Default="2224" Mode="tcp" Type="Port" Display="always" Required="true" Mask="false">2224</Config><Config Name="LC_ALL" Target="LC_ALL" Default="de_DE.UTF-8" Type="Variable" Display="always" Required="true" Mask="false">de_DE.UTF-8</Config></Container>
@@ -0,0 +1,2 @@
#!/usr/bin/with-contenv bash
exec /usr/sbin/sshd -D -e
@@ -0,0 +1,24 @@
{
"date": "2026-10-16",
"container": "Hermes-Workspace",
"custom_image": false,
"docker_socket": false,
"privileged": false,
"terminal_backend": "ssh",
"desktop_transport": "cua-driver MCP over SSH on Webtop display :1",
"mcp_tools_discovered": 66,
"existing_mcp_definitions_preserved": 19,
"ssh_auth": "passed",
"hermes_terminal_tool": "passed",
"file_transfer_exact": true,
"desktop_capture": "passed",
"desktop_click_type_save_exact": true,
"gui_input_mode_tested": "foreground",
"browser_local_form_exact": true,
"browser_public_navigation": true,
"browser_screenshot_visually_checked": true,
"container_recreations_tested": 2,
"post_recreation_files_tools_ssh_browser": "passed",
"autonomous_llm_task_tested": false,
"future_image_version_tested": false
}
@@ -0,0 +1,4 @@
#!/bin/bash
set -euo pipefail
mkdir -p /config/.hermes-workspace/browser-profile
exec /opt/hermes-workspace/bin/webtop-session /opt/hermes-workspace/node/bin/agent-browser --session hermes-workspace --profile /config/.hermes-workspace/browser-profile --executable-path /usr/bin/chromium --headed --args '--no-sandbox,--disable-dev-shm-usage' "$@"
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail
export DISPLAY=:1
export HOME=/config
export PATH=/opt/hermes-workspace/node/bin:/opt/hermes-workspace/bin:/usr/local/bin:/usr/bin:/bin
export AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
export AGENT_BROWSER_HEADED=1
export CUA_DRIVER_RS_TELEMETRY_ENABLED=0
export RUST_LOG=error
f="/config/.dbus/session-bus/$(cat /etc/machine-id)-1"
if test -f "$f"; then
source "$f"
export DBUS_SESSION_BUS_ADDRESS
fi
exec "$@"