Hosting Hermes Agent on a VPS: specs, setup and what it really costs
TL;DR: Hermes Agent is an open-source (MIT) AI agent from Nous Research that remembers past conversations, writes reusable skills, and can be reached from Telegram, Discord, Slack, WhatsApp, Signal or email while it runs on a server. The agent itself is light: a 2 GB, 1 to 2 vCPU Linux VPS handles it when the language model runs through an API. You need more only if you host a model yourself, which calls for a GPU. Run it as a non-root user, keep the firewall closed, set the approval mode to ask, and back up its data directory off the server. The ongoing cost is mostly the model API, not the VPS.
What Hermes Agent is
Hermes Agent is an agent framework published by Nous Research under the MIT licence. Its pitch is a learning loop: it keeps persistent memory, searches past conversations, writes skills after completing complex tasks and refines them with use.
A single gateway process connects it to chat apps, so you can message it from Telegram, Discord, Slack, WhatsApp, Signal or email. It works with several model providers, including Nous Portal, OpenRouter and OpenAI, plus any custom OpenAI-compatible endpoint.
The project moves quickly. Treat the commands in this guide as a starting point and confirm them against the official README before you run anything on a production server.
Why run it on a VPS instead of your laptop
An agent that you message from your phone has to be awake when you message it. A laptop sleeps, changes networks and gets closed. A VPS stays online at a fixed address with a stable connection.
A VPS also keeps the agent's reach contained. Because Hermes has a terminal tool, it can run commands on whatever machine it lives on. Putting it on a dedicated server, separate from your personal files and from your production website, limits what a mistake or a malicious prompt can touch.
If you want the general principles for sizing a server for any agent, see what an AI agent VPS actually needs. This post covers what is specific to Hermes.
What size of VPS you need
Published guides differ slightly, which is itself useful. Two independent write-ups give these figures:
| Resource | Light, API-only use | Comfortable |
|---|---|---|
| vCPU | 1 | 2 or more |
| RAM | 1 to 2 GB | 4 GB |
| Disk | 5 to 10 GB | 20 GB or more |
| OS | Ubuntu 22.04 or Debian 12 | Ubuntu 24.04 LTS |
The installer provisions Python 3.11 or later and Node.js, along with tools such as ripgrep and ffmpeg, so leave room on the disk for those.
Two points matter more than the numbers:
- The model's context window. The agent needs a model with a large enough context window. One guide gives 64,000 tokens as the minimum. Check that the model you choose meets it.
- Local models change everything. If you run a model on the same server with a tool such as Ollama or vLLM, a plain CPU VPS will be slow. You need a GPU server, which is a different class of hosting. The honest requirements are in running an open-source LLM on your own server.
For most people, an API-backed agent on a 2 to 4 GB VPS is the right starting point.
Installing it safely
Do not install it as root. The agent can execute commands, so give it an unprivileged account.
1. Update the system and create a user
apt update && apt upgrade -y
apt install -y git curl ca-certificates
adduser hermes
usermod -aG sudo hermes
su - hermes
Copy your SSH public key to the new user before you disable password login. The steps are in SSH hardening.
2. Close the firewall
sudo apt-get install -y ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw --force enable
Telegram and most chat gateways connect outward, so you normally do not need to open any inbound port beyond SSH.
3. Install Hermes
The official installer from the project README:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
source ~/.bashrc
hermes --version
hermes doctor
Piping a script into bash runs whatever it contains. Download it, read it, then run it if you are cautious about what you install on a server.
4. Configure a model
Run the setup wizard with hermes setup, or set values directly. Keep the credentials file private:
chmod 600 ~/.hermes/.env
5. Set the approval mode
hermes config set approval_mode ask
The agent will then ask before running potentially risky actions. One guide advises against switching approvals off on a server. That advice is sound.
6. Connect a chat app
For Telegram, create a bot with BotFather, then put its token and your numeric user ID in the .env file so that only you can message it:
TELEGRAM_BOT_TOKEN=<token>
TELEGRAM_ALLOWED_USERS=<your_numeric_id>
Run hermes gateway in the foreground first to confirm it responds, then stop it with Ctrl+C.
Keeping it running 24/7
You have two sensible choices.
systemd. The tool can install its own service:
hermes gateway install
systemctl --user enable --now hermes-gateway
systemctl --user status hermes-gateway
journalctl --user -u hermes-gateway -f
This creates a user service and enables lingering, so it keeps running after you log out of SSH.
Docker. The project publishes an image. Pin a specific tag for production instead of latest, so an update never arrives unannounced:
docker run -d --name hermes-agent --restart unless-stopped \
-v hermes-data:/home/hermes/.hermes \
nousresearch/hermes-agent:<pinned-tag>
If you already run containers on the server, Docker Compose on a small VPS covers what fits in limited memory.
Whichever you choose, add log rotation so the logs never fill the disk. See log rotation on a VPS.
Locking it down
An agent with terminal access is a powerful thing to leave running. Treat the server accordingly.
- Allowlist your user. Restrict who can message the bot. An open bot is an open shell.
- Key-only SSH. Disable password logins and root login.
- Keep secrets in the
.envfile with mode 600, never in chat messages. - Review learned skills. Skills are scripts the agent writes and reuses. Look through the skills directory now and then to see what it has taught itself.
- Watch the logs. Check for unexpected activity, for example with
journalctl --user -u hermes-gateway --since "1 hour ago". - Add brute-force protection. Fail2ban is a quick win on any public SSH port.
- Keep it away from production. Do not place the agent on the same server as your live store.
What it really costs
Three costs add up, and the largest is not the server.
| Cost | What drives it |
|---|---|
| The VPS | Size of the plan. A small 2 to 4 GB server is enough for API use. |
| The model API | Tokens used. This depends on the model you pick and how often the agent runs. |
| Your time | Setup, updates and reviewing what it has learned. |
Hermes itself is free. You pay your chosen provider for model usage, and heavier use means a larger bill. A scheduled task that runs every few minutes against an expensive model can cost far more than the server it runs on. Set a spending cap at the provider, and test with a cheaper model first.
Many model providers bill in US dollars, so budget for exchange-rate movement and any card or foreign-transaction charges.
Backups and updates
The directory ~/.hermes holds memory, skills, sessions and credentials. It is the thing worth protecting.
- Back up. The tool includes a backup command (
hermes backup). Schedule it daily and, importantly, copy the archive off the server. A backup on the same disk does not survive a disk failure. - Update. Back up first, then run
hermes update, followed byhermes config migrateandhermes doctor. If an update misbehaves, restore from the backup you just made.
When a VPS is the wrong choice
- You want a local, private model. You need GPU hosting, not a standard VPS.
- You only use it occasionally. A serverless backend that hibernates when idle can cost less than an always-on server, and the project supports such options.
- You cannot maintain a server. If patching and monitoring are not something you will do, a managed option is safer than an unattended VPS.
FAQs
What is Hermes Agent?
An open-source AI agent from Nous Research, licensed under MIT. It keeps persistent memory, creates and improves skills, and can be reached through chat apps such as Telegram, Discord, Slack, WhatsApp and Signal.
How much RAM does a Hermes Agent VPS need?
For API-only use, between 1 and 2 GB is the stated minimum in published guides, and 2 to 4 GB is more comfortable. Hosting a model locally needs far more and usually a GPU.
Can I run Hermes Agent on shared hosting?
No. It needs a long-running process, a shell and the ability to install system packages, which shared hosting does not offer. Use a VPS.
Do I need a GPU?
Not if you use a hosted model through an API. You need a GPU only to run a large model on your own server.
Do I need to open any firewall ports?
For Telegram and most chat gateways, no inbound port beyond SSH is required, because the gateway makes outbound connections. If you use the local dashboard, tunnel it over SSH rather than exposing it.
Is it safe to give an AI agent terminal access?
It carries real risk. Reduce it by using a non-root user, an allowlist of who can message it, the ask approval mode, a dedicated server and regular review of its learned skills and logs.
Does it cost anything to use?
The software is free. You pay for the server and for the model provider's usage, which is usually the larger bill.
How do I update it without breaking things?
Take a backup, run the update command, migrate the config, run the doctor check and restart the service. Pin container image versions so updates only happen when you choose.
Conclusion
Hermes Agent is light enough to run on a modest VPS, and the effort lies in doing it safely: a non-root user, a closed firewall, an allowlisted bot, ask-before-acting approvals and off-server backups. Budget for the model API rather than the server, and test on a cheap model first.
If you want a Linux VPS in India to host it on, see HostCloud's plans at https://hostcloud.in.
Sources:
