The Hermes Agent Cookbook
Free recipes / Safety, Costs and Troubleshooting

Harden a Hermes Agent VPS: A Security Checklist

A message that has Hermes audit the VPS it runs on against a hardening checklist, read-only, and hand you a table of exact fixes to run yourself.

You moved Hermes to a small server so the gateway runs around the clock, and you want to be sure it is not running as root, leaking keys or exposing its dashboard to the internet. Saves about 45 minutes

The recipe

Role: You are a careful Linux administrator auditing this server. This is read-only: change nothing. Goal: Check this VPS, where Hermes Agent runs as [HERMES_USER], against the list below and report what passes and what needs a fix. Check: 1. The gateway process does not run as root. Show its user and the output of hermes gateway status. 2. ~/.hermes/.env is owned by [HERMES_USER] with permission mode 600. Show only the mode and owner, never the contents. 3. For each messaging platform in use, an allowed users variable such as TELEGRAM_ALLOWED_USERS exists in .env, and GATEWAY_ALLOW_ALL_USERS is not set at all. Report variable names only, never values. 4. hermes config get approvals.mode is manual or smart, and approvals.cron_mode is deny. List every command_allowlist entry and flag broad ones. 5. hermes config get terminal.backend and terminal.cwd. The working directory must not be the home folder, root or any folder of secrets. 6. List the listening ports. The dashboard (9119) and the API server (8642), if running, must listen on 127.0.0.1 only, never on 0.0.0.0 or a public address. 7. The firewall allows SSH and only these other services from the internet: [PUBLIC_SERVICES]. 8. The gateway is installed as a service with hermes gateway install, and lingering is enabled for [HERMES_USER] so it survives reboots. 9. hermes --version against the latest release on the NousResearch/hermes-agent GitHub page, plus hermes doctor without --fix. 10. The last errors in ~/.hermes/logs/errors.log and gateway.log, with any secrets masked. Rules: - If a check needs sudo, write the command for me to run in my SSH session. Sudo cannot prompt through the gateway. - Never print secret values. Do not restart anything. Never: suggest exposing the dashboard to the internet, running the gateway as root, or loosening approvals. Output format: a table with Item, Status (OK, Fix or Unknown), Evidence and Exact fix, then the three most important fixes in order.

Fill in these brackets

[HERMES_USER]e.g. hermes; the Linux user that runs Hermes on the server
[PUBLIC_SERVICES]e.g. none, or ports 80 and 443 for my website

Pro tip

Reach the dashboard through a tunnel instead of opening a port: ssh -L 9119:127.0.0.1:9119 followed by your user and server, then open http://127.0.0.1:9119 on your own computer. Tailscale works too. Rerun this audit after every server change.

Variation

Add the Docker backend to the checklist once you trust the basics, with limits set in terminal.container_cpu, terminal.container_memory (MB) and terminal.container_disk (MB), and remember that container backends skip the dangerous-command checks, so the deny list and your instructions matter more there.

Written for Hermes Agent v0.21.x. Check commands against your version with hermes --version. This site is independent and not affiliated with Nous Research.

Want 14 more like this, free?

Get the Hermes Starter Pack: 15 recipes for setup, SOUL.md, memory, skills, scheduled jobs, Telegram and approvals.

More free recipes: Lock Down Hermes Agent Approvals and the Command Allowlist · Cut Your Hermes Agent Token Costs

No spam. Confirm your email with one click and the PDF is yours.

Need the whole set? The Hermes Agent Cookbook has 100 recipes for $27.