Remote script. This cleanup downloads and runs a script from the internet, so check the script first and run it only on the machine that hosts Hermes.
Credentials. Deleting the API_SERVER_KEY stops Hermes' API server from starting, which can break other tools that use that key.
Who it is forA person who installed Hermes with an older setup helper, uses Console 1.3 on all phones, and wants to stop the Gateway from listening on the network.
The problemAn older helper saved an API_SERVER_KEY and opened port 8642 on your network, which is more exposure than Console needs.
The outcomeThe Gateway no longer listens on your network, Console still connects through the Dashboard, and the old key is kept unless you choose to remove it.
What you need first
- A computer or server where Hermes Agent is installed or can be installed
- Terminal on Linux or macOS, or PowerShell on Windows, on that machine
- An Android phone with Console installed
- Your home network or Tailscale so the phone can reach the Dashboard
Steps
- Update every phone that uses Console to version 1.3 or newer, because the cleanup is meant to run only after that.
- On the computer, run
curl -fsSL https://raw.githubusercontent.com/xP3ta/hermes-setup/main/hermes-dashboard-setup.sh | sh -s -- --retire-gateway-exposure, or the PowerShell form with-RetireGatewayExposurefrom the README. - Keep the API_SERVER_KEY, or add
--also-remove-api-keyto the command if you want it removed too. - Optional: if you do not use Hermes' API server for anything else, delete the API_SERVER_KEY line from
~/.hermes/.envand restart the Gateway withhermes gateway restart. - Open Console and confirm it still connects to your Dashboard.
Prompt for your agent
In the xP3ta/hermes-console setup, run the retire-gateway-exposure option from the xP3ta/hermes-setup helper on <target host>, keeping the API_SERVER_KEY. Expected output: a message that the Gateway exposure was undone. Verify that Console on every phone still connects to the Dashboard before removing anything else.
Caveat. Run the cleanup only after every phone uses Console 1.3, because the README warns that older versions still depend on the Gateway.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for xP3ta/hermes-console and "Close the old Gateway port left open by a previous setup"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer