Back to Article List

Hermes Desktop remote backend setup on a VPS

Hermes Desktop remote backend setup on a VPS

Hermes Desktop has two operating modes: local mode (the agent runs on the same machine as the GUI) and remote mode (the agent runs somewhere else and Desktop connects to it over an API). This article covers remote mode against a Linux VPS.

This is the setup I run on my main machine. Agent stays up 24/7 on the VPS, gateways keep answering messages overnight, Desktop on the laptop is just a client. If the laptop dies I install Desktop on a new one and point it at the same VPS in under a minute.

Prerequisites

Before you start, you need:

  • A Linux VPS with Hermes Agent installed. If you don't have one, see install Hermes Agent on Ubuntu.
  • Hermes Desktop installed locally. Download from project releases.
  • SSH access to the VPS already tested from the laptop.
  • A decision: SSH tunnel only (private) or HTTPS exposed (public)?

Decide: SSH tunnel or HTTPS

You have two ways to make the VPS dashboard reachable from your laptop.

SSH tunnel (recommended for personal use)

Dashboard stays bound to 127.0.0.1 on the VPS. From your laptop you open an SSH tunnel that maps localhost:8642 on the laptop to localhost:8642 on the VPS. Traffic is encrypted by SSH. No public exposure.

HTTPS exposed (when messaging gateways need public endpoints)

Dashboard binds to 0.0.0.0 with basic auth. Nginx in front terminates TLS. Use this when you need webhooks coming in from external services like WhatsApp Meta API or Discord interactions endpoint.

I run mixed mode myself: SSH tunnel for daily Desktop use, HTTPS for the webhook endpoints. You'll see how to do both below.

Setup path 1: SSH tunnel

On the VPS, start the dashboard

By default Hermes binds the dashboard to 127.0.0.1:8642. That is what you want for the tunnel approach. Just start it:

hermes dashboard start

For 24/7 running put it under systemd. See run Hermes Agent with systemd.

On the laptop, open the tunnel

ssh -L 8642:127.0.0.1:8642 user@your-vps-ip

Keep this terminal open. Closing it closes the tunnel.

Point Desktop at it

Open Hermes Desktop. Pick remote mode. Enter:

  • API URL: http://127.0.0.1:8642
  • API key: leave empty unless you also set up auth (you don't need it for SSH tunnel becuase the tunnel itself is the security)

Desktop validates the connection. If it opens the workspace, you're connected.

Setup path 2: HTTPS exposed dashboard

On the VPS, bind to all interfaces with auth

export HERMES_DASHBOARD_USERNAME="your-user"
export HERMES_DASHBOARD_PASSWORD="a-long-random-string"
hermes dashboard start --host 0.0.0.0 --auth basic

Important: never expose the dashboard publicly without auth. The dashboard can edit API keys and bot tokens. Open dashboard = stolen keys.

Put Nginx in front

Set up Nginx with TLS termination and proxy to localhost:8642. The full Nginx config including WebSocket upgrade headers (you need these for the chat stream) is in our Hermes Agent behind Nginx with HTTPS tutorial.

Verify with curl before opening Desktop

curl -s -u your-user:your-password https://your-domain/api/status | head -c 200

You should see JSON with auth_required: true and an auth_providers array that includes "basic". If not, the basic auth provider didn't initialise. Check that the env vars were exported in the same shell that started the dashboard.

Connect Desktop

Open Desktop in remote mode. Enter:

  • API URL: https://your-domain
  • API key: your basic auth password

Common error: WebSocket closes with code 4403 or 4401

Desktop pairs the chat over a WebSocket after initial HTTP auth succeeds. The WebSocket can fail even if HTTP works. Two specific close codes you might see in the Desktop dev console:

Code 4401: WebSocket ticket didn't authenticate

The dashboard issued a ticket for the WebSocket handshake but the ticket wasn't valid by the time Desktop sent it. Usually because the dashboard restarted between Desktop's HTTP auth and the WebSocket upgrade.

Code 4403: Request rejected by the chat WS guard

The dashboard's auth provider config is missing "basic" or the request didn't include the right auth header. Check:

curl -s http://127.0.0.1:8642/api/status | jq '.auth_required, .auth_providers'

You want true and an array including "basic". If the array is empty, the dashboard started before the env vars loaded. Restart with vars exported in the same shell that runs the start command, or move them into the systemd unit's Environment= directives.

Cloudflare Access in front of the dashboard

If you put Cloudflare Access (or another zero-trust proxy) in front, the first Desktop request gets a 302 redirect to login. Desktop follows but the Access cookie may not survive the WebSocket upgrade. Symptom: HTTP works, chat fails.

Fix: issue a Cloudflare Access service token, add it as a custom HTTP header in Desktop's advanced settings. The Cloudflare service token docs walk the issuance.

Per-profile remote hosts

One Desktop install can connect to multiple VPS backends through different profiles. You can have a Work profile pointed at production and a Dev profile pointed at staging. Switch with one click in the sidebar. Configure the remote URL inside each profile rather than globally.

Useful for keeping staging and production agents fully separate without two installs of Desktop.

What I wish I had known earlier

Auth env vars need to be in the same process

The dashboard auth env vars (HERMES_DASHBOARD_USERNAME, HERMES_DASHBOARD_PASSWORD) need to be loaded by the same process that runs hermes dashboard start. Setting them in ~/.bashrc doesn't help when the dashboard runs under a systemd service that doesn't read bashrc. Add them to the systemd unit's Environment= lines or export them in the same shell that runs the dashboard.

This cost me an hour the first time.

Test with curl before opening Desktop

If curl -u user:pass https://domain/api/status returns sensible JSON, Desktop will pair. If curl fails, fix that first. Desktop's error messages are better than they used to be but a clean curl test from the same machine still saves you guessing.

What comes next

Once Desktop is talking to the VPS, the natural follow ups are:

Hosting on LumaDock

The hybrid pattern needs a Linux VPS to host the agent. The LumaDock Hermes Agent template gives you that with Hermes preinstalled, the systemd unit configured and the dashboard ready to bind. Unmetered bandwidth on all plans, useful because Desktop in remote mode streams chat over WebSocket constantly. No setup fees, instant deploy. Full template details in our Hermes Agent complete guide.

Your idea deserves better hosting

24/7 support 30-day money-back guarantee Cancel anytime
Betalingscyclus

1 GB RAM VPS

$3.99 Save  25 %
$2.99 Maandelijks
  • 1 vCPU AMD EPYC
  • 30 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Firewall-beheer
  • Server-monitoring

2 GB RAM VPS

$5.99 Save  17 %
$4.99 Maandelijks
  • 2 vCPU AMD EPYC
  • 30 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Firewall-beheer
  • Server-monitoring

6 GB RAM VPS

$14.99 Save  33 %
$9.99 Maandelijks
  • 6 vCPU AMD EPYC
  • 70 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Firewall-beheer
  • Server-monitoring

AMD EPYC VPS.P1

$7.99 Save  25 %
$5.99 Maandelijks
  • 2 vCPU AMD EPYC
  • 4 GB RAM-geheugen
  • 40 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

AMD EPYC VPS.P2

$14.99 Save  27 %
$10.99 Maandelijks
  • 2 vCPU AMD EPYC
  • 8 GB RAM-geheugen
  • 80 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

AMD EPYC VPS.P4

$29.99 Save  20 %
$23.99 Maandelijks
  • 4 vCPU AMD EPYC
  • 16 GB RAM-geheugen
  • 160 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

AMD EPYC VPS.P5

$36.49 Save  21 %
$28.99 Maandelijks
  • 8 vCPU AMD EPYC
  • 16 GB RAM-geheugen
  • 180 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

AMD EPYC VPS.P6

$56.99 Save  21 %
$44.99 Maandelijks
  • 8 vCPU AMD EPYC
  • 32 GB RAM-geheugen
  • 200 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

AMD EPYC VPS.P7

$69.99 Save  20 %
$55.99 Maandelijks
  • 16 vCPU AMD EPYC
  • 32 GB RAM-geheugen
  • 240 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

EPYC Genoa VPS.G1

$4.99 Save  20 %
$3.99 Maandelijks
  • 1 vCPU AMD EPYC Gen4 AMD EPYC Genoa 4e generatie 9xx4 met 3,25 GHz of vergelijkbaar, op Zen 4-architectuur.
  • 1 GB DDR5 geheugen
  • 25 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

EPYC Genoa VPS.G2

$12.99 Save  23 %
$9.99 Maandelijks
  • 2 vCPU AMD EPYC Gen4 AMD EPYC Genoa 4e generatie 9xx4 met 3,25 GHz of vergelijkbaar, op Zen 4-architectuur.
  • 4 GB DDR5 geheugen
  • 50 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

EPYC Genoa VPS.G4

$25.99 Save  27 %
$18.99 Maandelijks
  • 4 vCPU AMD EPYC Gen4 AMD EPYC Genoa 4e generatie 9xx4 met 3,25 GHz of vergelijkbaar, op Zen 4-architectuur.
  • 8 GB DDR5 geheugen
  • 100 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

EPYC Genoa VPS.G6

$48.99 Save  31 %
$33.99 Maandelijks
  • 8 vCPU AMD EPYC Gen4 AMD EPYC Genoa 4e generatie 9xx4 met 3,25 GHz of vergelijkbaar, op Zen 4-architectuur.
  • 16 GB DDR5 geheugen
  • 200 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

EPYC Genoa VPS.G7

$74.99 Save  27 %
$54.99 Maandelijks
  • 8 vCPU AMD EPYC Gen4 AMD EPYC Genoa 4e generatie 9xx4 met 3,25 GHz of vergelijkbaar, op Zen 4-architectuur.
  • 32 GB DDR5 geheugen
  • 250 GB NVMe opslag
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • 1 Gbps netwerk
  • Back-up inbegrepen
  • Firewall-beheer
  • Serverbewaking gratis

AMD Ryzen VPS.R1

$15.99 Save  31 %
$10.99 Maandelijks
  • 1 dedicated CPU AMD Ryzen 9 7950X met 4,5 GHz of vergelijkbaar, op Zen 4-architectuur. vCPU
  • 4 GB DDR5GEHEUGEN
  • 50 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • Auto back-up inbegrepen

AMD Ryzen VPS.R2

$27.99 Save  21 %
$21.99 Maandelijks
  • 2 dedicated CPUs AMD Ryzen 9 7950X met 4,5 GHz of vergelijkbaar, op Zen 4-architectuur. vCPU
  • 8 GB DDR5GEHEUGEN
  • 100 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • Auto back-up inbegrepen

AMD Ryzen VPS.R4

$99.99 Save  20 %
$79.99 Maandelijks
  • 8 dedicated CPUs AMD Ryzen 9 7950X met 4,5 GHz of vergelijkbaar, op Zen 4-architectuur. vCPU
  • 32 GB DDR5GEHEUGEN
  • 400 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • Auto back-up inbegrepen

My answers to frequent questions

How do I connect Hermes Desktop to a remote Hermes Agent on a VPS?

Pick remote mode on Desktop's first run. Enter the API URL (either http://127.0.0.1:8642 if you tunnel over SSH, or https://your-domain if you exposed the dashboard with auth) and an API key if you set basic auth on the dashboard.

Your agent runs wild. Your bill doesn't.

Easily deploy Hermes in one click on Ubuntu 24.04 with AMD EPYC, NVMe storage and unmetered bandwidth. The price stays the same whatever the agent does, no setup fees, no overage charges and no tier traps.

GPU products are in high demand at the moment. Fill the form to get notified as soon as your preferred GPU server is back in stock.