hermes serve
Start the Hermes backend server (headless; powers the desktop app and remote backends).
Start the Hermes backend server — the JSON-RPC/WebSocket gateway the desktop app and remote clients connect to. It is the same server hermes dashboard runs, but headless: it never opens a browser UI. The desktop app launches its own hermes serve backend; use this command directly when you want a headless backend on a remote host. Accepts the same --host / --port / --insecure / --skip-build / --stop / --status options as hermes dashboard below (a non-loopback bind engages the same auth gate). Requires the [web] extra; the embedded Chat socket additionally needs [pty] on a POSIX host.
Port conflicts: if the requested port (default 9119) is already held by another process (e.g. a second hermes serve or the gateway), the command prints a machine-readable sentinel line BACKEND_PORT_IN_USE port=<port> to stdout, a human hint naming the likely holder, and exits with code 75 (EX_TEMPFAIL) instead of a generic error — so scripts and the desktop app can tell "port occupied" apart from "backend broken". Pass --port 0 to bind a free ephemeral port (the successful boot announces the chosen port via HERMES_BACKEND_READY port=<port>).
From the official Hermes Agent CLI reference.
hermes serve