5.6 KiB
title, created, updated, type, tags, sources, confidence, contested
| title | created | updated | type | tags | sources | confidence | contested | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Remote Hermes CLI Access via SSH and tmux | 2026-10-17 | 2026-10-17 | concept |
|
|
medium | false |
Remote Hermes CLI Access via SSH and tmux
Run tmux on the VPS host, not inside the Hermes container. A host-side session survives SSH disconnects and does not modify an ephemeral container.
The connection chain is:
home CLI → SSH over Tailscale → host tmux → container exec → Hermes TUI
The source environment was verified as follows:
- Hermes executable:
/opt/hermes/bin/hermes - State and configuration:
/opt/data - Container OS: Debian 13
- Underlying container runtime: containerd/overlayfs
tmuxis not installed inside the container
1. Verify Tailscale on the VPS host
Access the VPS through its provider console or an existing administrative route, then run:
tailscale status
tailscale ip -4
hostname
Record the Tailscale hostname or 100.x.y.z address.
If Tailscale is not installed on the host:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Follow the authentication URL it prints.
2. Enable SSH access
Recommended: Tailscale SSH
On the VPS host:
sudo tailscale set --ssh
Check the Linux username:
whoami
Connect from a homelab machine:
ssh <username>@<vps-tailscale-hostname>
Example:
ssh alister@vps-3d0ee869
Tailscale SSH access is controlled by the tailnet access policy. If authentication is refused, add or correct the required SSH rule in that policy.
Alternative: ordinary OpenSSH over Tailscale
On a Debian or Ubuntu VPS host:
sudo apt update
sudo apt install -y openssh-server
sudo systemctl enable --now ssh
Test from home using the Tailscale address:
ssh <username>@100.x.y.z
Do not disable the existing VPS access route until the new SSH path works. An incorrect SSH or firewall change can lock you out.
3. Install tmux on the VPS host
sudo apt update
sudo apt install -y tmux
tmux -V
4. Identify the Hermes container
Check Docker first:
sudo docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}'
Find the container running Hermes, then verify the executable:
sudo docker exec <container-name> \
sh -lc 'test -x /opt/hermes/bin/hermes && echo "Hermes container confirmed"'
Verify the data directory and Hermes version:
sudo docker exec <container-name> \
sh -lc 'test -d /opt/data && /opt/hermes/bin/hermes --version'
If the host uses nerdctl instead of Docker:
sudo nerdctl ps
sudo nerdctl exec <container-name> \
sh -lc 'test -x /opt/hermes/bin/hermes && /opt/hermes/bin/hermes --version'
If neither command exists, inspect the containerd namespaces:
sudo ctr namespaces list
sudo ctr --namespace default containers list
sudo ctr --namespace k8s.io containers list
The exact entry command depends on the container manager that owns the container. Docker is the most likely path even when containerd is the underlying runtime.
5. Start a persistent host-side tmux session
SSH into the VPS:
ssh <username>@<vps-tailscale-hostname>
Start a new session or reattach the existing one:
tmux new-session -A -s hermes
Inside tmux, enter the container and launch Hermes:
sudo docker exec -it <container-name> \
sh -lc 'cd /opt/data && export HERMES_HOME=/opt/data && exec /opt/hermes/bin/hermes --tui'
If the TUI has terminal-rendering problems, pass TERM explicitly:
sudo docker exec -it \
-e TERM="$TERM" \
-e HERMES_HOME=/opt/data \
<container-name> \
sh -lc 'cd /opt/data && exec /opt/hermes/bin/hermes --tui'
The TUI now uses that Hermes instance's configuration, memory, skills, sessions, and files.
6. Disconnect without stopping Hermes
Detach from tmux:
Ctrl-B, then D
The SSH connection can now be closed. The host-side tmux session and the container process remain running.
Reconnect later:
ssh <username>@<vps-tailscale-hostname>
tmux attach -t hermes
List existing sessions:
tmux list-sessions
7. Reduce access to one local command
On the homelab machine, add this host entry to ~/.ssh/config:
Host suzi-vps
HostName <vps-tailscale-hostname>
User <vps-linux-username>
RequestTTY force
Test it:
ssh suzi-vps
Create a host-side launcher at /usr/local/bin/hermes-container:
sudo tee /usr/local/bin/hermes-container >/dev/null <<'EOF'
#!/bin/sh
exec sudo docker exec -it \
-e TERM="${TERM:-xterm-256color}" \
-e HERMES_HOME=/opt/data \
<container-name> \
sh -lc 'cd /opt/data && exec /opt/hermes/bin/hermes --tui'
EOF
sudo chmod 755 /usr/local/bin/hermes-container
Replace <container-name> before saving the launcher.
The homelab command can then be:
ssh -t suzi-vps 'tmux new-session -A -s hermes /usr/local/bin/hermes-container'
For a shorter invocation, create a local alias:
alias suzi="ssh -t suzi-vps 'tmux new-session -A -s hermes /usr/local/bin/hermes-container'"
Then run:
suzi
Limitation after a container restart
If the Hermes container restarts or is recreated, the interactive Hermes process ends. The host tmux session may remain, but /usr/local/bin/hermes-container must be run again. Ordinary SSH disconnects do not affect the running process.