📋 Overview
Hermes Agent is designed to live wherever makes sense — a $5 VPS, a home server, a beefy GPU machine, or a cloud VM you never SSH into yourself. The Desktop App (available on macOS, Windows, and Linux) can connect to a remote Hermes backend, giving you a native, polished UI on your laptop while all the heavy lifting — tool execution, cron jobs, skills, memory — runs on the remote machine.
This guide walks you through the complete setup: installing Hermes on a remote server, configuring it to accept connections, securing the channel with Tailscale (or SSH tunnels), and connecting the Desktop App from your local machine. By the end, you'll have a setup where you can chat with your remote Hermes from anywhere, with full access to all its tools and capabilities.
Desktop App
Encrypted tunnel
hermes dashboard --tui
1 The Big Picture
The Hermes architecture separates the agent backend (the Python process that runs conversations, executes tools, manages memory and skills) from the frontend (the UI you interact with). All frontends — CLI, TUI, Desktop App, Web Dashboard, Telegram, Discord — talk to the same backend and share state.
For remote access, the Desktop App connects to the backend's Dashboard API — a web server that exposes:
/api/status— health check and backend info/api/ws— WebSocket for real-time chat/api/pty— pseudo-terminal WebSocket for the embedded TUI
The connection is authenticated via a session token that you pin on the backend and paste into the Desktop App. The backend must be started with --tui to enable the chat WebSockets.
2 Prerequisites
Remote Machine (Server / VM)
- OS: Linux (Ubuntu 22.04+, Debian 12+, or any modern distro), macOS, or WSL2
- RAM: 2 GB minimum (4 GB+ recommended for heavy tool use)
- Disk: 5 GB free space for Hermes + dependencies
- Network: Outbound internet access (for API calls to LLM providers)
- Shell: bash
Local Machine (Laptop)
- OS: macOS, Windows, or Linux
- Network: Ability to reach the remote machine (VPN, SSH, or direct network)
Accounts & Keys
- An LLM provider API key (OpenRouter, Anthropic, OpenAI, etc.) — you'll configure this on the remote machine
- A Tailscale account (free for personal use — recommended for secure access)
3 Install Hermes on the Remote Machine
SSH into your remote server and run the one-line installer:
The installer handles everything: Python 3.11, Node.js 22, uv, ripgrep, ffmpeg, and the Hermes source code. It clones the repo into ~/.hermes/hermes-agent/, creates a virtual environment, and adds hermes to your PATH.
After installation, run the setup wizard:
Verify the installation:
hermes setup and manually paste API keys. The --portal OAuth flow needs a browser redirect.4 Configure the Remote Backend for Desktop Connection
The Desktop App connects to the Hermes Dashboard — a web server that exposes the agent's API. You need to:
Step 4.1 — Create a Stable Session Token
By default, Hermes generates a random token on every boot and injects it directly into the served HTML — there's nothing to copy. For remote connections, you pin a token yourself:
Step 4.2 — Start the Dashboard with Required Flags
Three flags are mandatory for remote Desktop App connections:
| Flag | Why It's Needed |
|---|---|
--tui | Enables the /api/ws and /api/pty WebSockets the Desktop App uses for chat. Without it, the app connects but chat stays dead. |
--no-open | Prevents trying to open a browser (headless server has none) |
--insecure | Required for non-loopback bind. Without it, Hermes enables the OAuth gate which ignores session tokens entirely |
--host 0.0.0.0 | Listen on all interfaces (or use your Tailscale IP for tighter security) |
--port 9119 | The port the Desktop App will connect to (default: 9119) |
--insecure exposes a port that can run agent commands and read your .env (API keys, secrets). Never expose it to the open internet. Always use a VPN (Tailscale) or SSH tunnel.5 Secure the Connection with Tailscale VPN
Tailscale creates a secure, encrypted mesh VPN between your devices. It's free for personal use (up to 100 devices) and takes under 5 minutes to set up. This is the recommended way to secure your Hermes remote connection.
Step 5.1 — Install Tailscale on Both Machines
After logging in on both machines, they'll be on the same private network (your "tailnet"). You can find each machine's Tailscale IP with:
Step 5.2 — Bind Hermes to the Tailscale IP
Instead of binding to 0.0.0.0 (all interfaces), bind specifically to the Tailscale IP so only your tailnet can reach it:
Step 5.3 — Tailscale MagicDNS (Optional)
Tailscale's MagicDNS lets you use friendly hostnames instead of IPs:
6 Run as a Persistent systemd Service
You want the dashboard to survive reboots, SSH logouts, and crashes. The cleanest way is a systemd user service.
Step 6.1 — Create the Service File
Step 6.2 — Enable and Start
loginctl enable-linger is critical — without it, your user services die when you close the SSH session. This is the #1 reason people's gateway/dashboard services mysteriously stop.Step 6.3 — View Logs
7 Install the Desktop App on Your Laptop
The Hermes Desktop App is a native Electron application available for macOS, Windows, and Linux.
Option A — Download the Installer (Recommended)
Download the latest installer from hermes-agent.nousresearch.com or from GitHub Releases.
- macOS: DMG (signed and notarized)
- Windows: NSIS installer or MSI
- Linux: AppImage, .deb, or .rpm
Option B — CLI Install with Desktop
If you already have Hermes CLI installed locally:
8 Connect the Desktop App to Your Remote Backend
This is the moment everything comes together.
Step 8.1 — Open Settings
In the Desktop App, navigate to Settings → Gateway → Remote gateway.
Step 8.2 — Enter Connection Details
- Remote URL:
http://<tailscale-ip>:9119(orhttp://my-server.tail12345.ts.net:9119if using MagicDNS) - Session token: paste the token you generated in Step 4.1
Step 8.3 — Test and Connect
- Click "Test remote" — this verifies the backend is reachable and the token is accepted
- If the test passes, click "Save and reconnect"
- The Desktop App switches to the remote backend — you're now chatting with your remote Hermes
Alternative: Environment Variables
You can also configure the connection without the UI:
9 Alternative: SSH Tunnel (No VPN Required)
If you don't want to use Tailscale, you can create an SSH tunnel to forward the dashboard port to your local machine. This works with any SSH access and requires no additional software.
Step 9.1 — Start the Dashboard on Localhost Only
On the remote server, bind to 127.0.0.1 instead of 0.0.0.0:
Step 9.2 — Create the SSH Tunnel
On your local machine, forward the remote port to a local port:
| Flag | Meaning |
|---|---|
-N | Don't execute a remote command (tunnel only) |
-L 9119:127.0.0.1:9119 | Forward local:9119 → remote:127.0.0.1:9119 |
Step 9.3 — Connect the Desktop App
In the Desktop App settings, use:
- Remote URL:
http://localhost:9119 - Session token: same token from Step 4.1
autossh for automatic reconnection).Auto-Reconnecting Tunnel with autossh
10 Alternative: Web Dashboard (Browser-Only)
If you don't want to install the Desktop App, you can access the same interface through a web browser. The Hermes Web Dashboard serves the same agent experience as a web page.
Once the dashboard is running on the remote (Steps 3–6), simply open your browser and navigate to:
The web dashboard provides:
- Chat tab — embedded TUI with full agent capabilities (requires
--tuiflag) - Admin panel — manage config, sessions, cron jobs, skills, and gateway channels
- Settings — modify providers, models, and tools from the browser
| Feature | Desktop App | Web Dashboard |
|---|---|---|
| Multi-conversation tabs | ✅ | ❌ |
| File browser | ✅ | ❌ |
| Native voice mode | ✅ | Limited |
| Preview rail | ✅ | ❌ |
| Drag-and-drop files | ✅ | ❌ |
| Works anywhere (no install) | ❌ | ✅ |
| Admin panel | Via settings | ✅ Full |
| Auto-update | ✅ | N/A |
11 Troubleshooting
❌ "Test" fails with 401 Unauthorized
- The token in the Desktop App doesn't match
HERMES_DASHBOARD_SESSION_TOKENin~/.hermes/.env - You're bound to a non-loopback address without
--insecure— the OAuth gate is on and ignores session tokens - Verify manually:
❌ App says "Ready" but chat does nothing
- The backend was started without
--tui. The/api/statusprobe passes, but the chat WebSocket is refused. - Fix: restart the backend with
--tui(or setHERMES_DASHBOARD_TUI=1in the environment)
❌ Connection refused / times out
- Backend bound to
127.0.0.1(default) — change to0.0.0.0or the Tailscale IP - Firewall blocking port 9119 — open it:
sudo ufw allow 9119/tcp - Tailscale not connected on one or both devices
❌ "No token to copy"
This is expected! Hermes never surfaces the default ephemeral token. You must create one yourself (see Step 4.1). There's nothing to "find" in the logs or config — you mint it.
❌ Service dies after SSH logout
You forgot loginctl enable-linger. Run:
❌ Desktop App boot failure
Check the desktop log:
12 Security Best Practices
- Never expose port 9119 to the public internet. The
--insecureflag disables the OAuth gate, leaving only the session token as protection. Always use Tailscale or SSH tunnels. - Use strong tokens. The
openssl rand -base64 32command generates 256-bit tokens. Don't use weak or guessable strings. - Secure
~/.hermes/.env. This file contains your API keys and session token. Keep it atchmod 600(owner read/write only). - Use Tailscale ACLs for multi-user environments. You can restrict which Tailscale users can reach the Hermes port.
- Rotate tokens periodically. Generate a new token, update
~/.hermes/.env, restart the service, and update the Desktop App. - Enable
redact_secrets(on by default) so API keys don't leak into conversation logs. - Consider a reverse proxy (nginx, Caddy) with TLS if you need HTTPS. Caddy with a Tailscale certificate is the simplest path.
🎯 Key Takeaways
🔑 Key Takeaways
- Hermes separates backend from frontend — install the heavy backend on a remote server, use the lightweight Desktop App as your local interface.
- Three mandatory flags:
--tui(enables chat WebSockets),--insecure(for non-loopback bind), and--host(bind address). - You mint your own token — Hermes never surfaces its default ephemeral one. Generate with
openssl rand -base64 32and pin in~/.hermes/.env. - Tailscale is the recommended secure channel — free, encrypted, zero-config mesh VPN. Bind to the Tailscale IP for maximum security.
- SSH tunnels work too — no extra software needed, just
ssh -NL 9119:127.0.0.1:9119. Useautosshfor auto-reconnect. - systemd + linger = persistent service — survives SSH logouts, reboots, and crashes.
- All frontends share state — start a session in the Desktop App, continue on Telegram, resume from CLI. Skills, memory, and sessions are universal.
- Web Dashboard as fallback — no install needed, just open a browser to your remote dashboard URL.
- Never expose
--insecureto the public internet — always tunnel through Tailscale or SSH.
🔗 Resources & Links
- NousResearch/hermes-agent — Hermes Agent GitHub repository (source code, releases, issues)
- Hermes Desktop App Documentation — official docs covering installation, features, remote backend setup, and troubleshooting
- Hermes Configuration Guide — full config reference including dashboard and gateway settings
- Hermes Installation Guide — detailed installation instructions for all platforms
- Hermes Docker Guide — running Hermes in Docker containers (alternative to bare-metal install)
- Tailscale Installation Guide — install Tailscale on Linux, macOS, Windows, and more
- Tailscale MagicDNS — use friendly hostnames instead of IPs on your tailnet
- loginctl enable-linger — systemd docs on enabling user services after logout
- autossh — automatically restart SSH tunnels on failure
- Hermes TUI Documentation — the terminal UI the Desktop App's chat runs on top of
- Hermes Environment Variables Reference — all env vars including
HERMES_DASHBOARD_SESSION_TOKEN,HERMES_DESKTOP_REMOTE_URL, etc.