01 What you're actually building
Hermes is a free, open-source program made by Nous Research. You give it a task in normal language — "check how much space is left on my server", "summarise this folder", "every morning, tell me what changed in these files" — and it does the work by itself: it reads files, runs commands, searches the web, then answers you.
You could run it on your own laptop, but then it only exists while the laptop is open. The point of this guide is to put it on a small computer that never sleeps, so you can reach it from your phone, in Telegram, at any hour.
Three words come up constantly, so here they are once:
- A server (or VPS) — a computer you rent in a data centre. It runs day and night, and you control it by typing commands into it from your own machine. "VPS" simply means "virtual private server": a slice of a bigger computer.
- A terminal — the window where you type commands. You reach the rented
computer with a program called
ssh, which opens a terminal on it as if you were sitting in front of it. - An API key — a long password-like string that lets your agent use an AI model. You pay the model provider for what you use. The key stays on your server and never goes into a chat.
That is the whole idea. The rest of this page is the same thing step by step, with a check after each step so you always know where you are.
02 What you need before you start
- A server. Any provider works — Hetzner, OVH, DigitalOcean, Scaleway. The cheapest tier is enough: 2 processor cores, 4 GB of memory, 40 GB of disk, with Debian 12 or Ubuntu 24.04 as the system. Roughly five to ten euros a month.
- Its login details. When the server is created you receive an IP address, a
username (often
root) and a password or a key file. - A model API key. From a provider such as DeepSeek, OpenRouter, Anthropic or Nous Portal. Create the account, add a little credit, copy the key.
- Telegram on your phone. Free, and it is how you will talk to the agent.
- A terminal on your own computer — Terminal on Mac or Linux, PowerShell on Windows.
You do not need to know Linux, and you do not need a graphics card. The heavy computing happens at the model provider, not on your server.
03 Get a server and log in
Create the server at your provider, choosing Debian 12 or Ubuntu 24.04 as the system. Wait a minute or two until it says running, then open your terminal and connect — replacing the address with the one your provider gave you:
ssh root@203.0.113.10 The first time, it asks whether you trust this machine: type yes and press Enter. If
it asks for a password, paste the one from your provider. Nothing appears while you paste — that
is normal, and it is not broken.
How to know it worked: your prompt changes to something like root@server:~#. You are now typing into the rented computer, not your own.
Before installing anything, two small habits. The first is a normal user: working as root all the time is how small mistakes become big ones.
apt update
apt install -y sudo ufw curl
adduser agent
usermod -aG sudo agent
su - agent Line by line: refresh the list of available software, install three basic tools, create a user
called agent (it asks you for a password), let that user run administrator commands
when it needs to, then switch to it. Your prompt now shows agent@ instead of root@.
The second habit is a firewall: close every door except the one you came in through.
sudo ufw allow OpenSSH
sudo ufw enable If your terminal still responds after enable, you did it right. The agent needs no
other open door, because it calls out to the internet rather than waiting to be called.
04 Install Hermes
One command downloads and installs everything, including its own copies of the tools it needs:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash It takes a few minutes and prints a lot of text. Let it finish. Then teach your terminal where the program lives, and ask the program to check itself:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
hermes doctor The first two lines mean: "remember this folder, so I can type hermes from anywhere".
The third runs a health check — it looks at what was installed and tells you, in plain lines,
whether anything is missing.
How to know it worked: hermes doctor ends with a list of checks and
no failures. Warnings about optional extras are fine at this stage.
If it says command not found right after installing, close the terminal, open a new
one and try again. The program is there; the old terminal simply had not learned the new location
yet.
05 Give it a model
The agent is only the body; the intelligence comes from a model you rent by the token. Run the interactive picker and follow it:
hermes model Choose your provider, then a model. If you are unsure, pick a small, fast, cheap one: it handles reading files, running commands and summarising perfectly well, and you can switch later with the same command.
Now the key. Hermes keeps two separate files, and the difference matters:
~/.hermes/config.yaml— your settings. No secrets, ever.~/.hermes/.env— your keys only. This is the file nobody else should read.
nano ~/.hermes/.env A text editor opens inside the terminal. Add one line, using the key you copied:
DEEPSEEK_API_KEY=sk-your-key-here Save with Ctrl+O then Enter, and leave with Ctrl+X. Then lock the file so
only your user can read it:
chmod 600 ~/.hermes/.env Time for the first real test. This sends one question and exits:
hermes chat -q "say hello in one short line" How to know it worked: it answers. That single line proves the install, the key and the model all work. If it fails, the message names which of the three is wrong — and you have not touched Telegram yet, so the problem can only be here.
One thing worth knowing early: a conversation that runs for days gets shortened to fit the model's memory, and old details fade. Start a fresh conversation for a new topic. You get sharper answers and a smaller bill.
06 Talk to it on Telegram
Your agent needs a Telegram bot of its own, and Telegram gives those away for free. In the Telegram app, search for @BotFather, open it, and send:
/newbot It asks for a display name, then for a username that must end in bot — for example my_helper_bot. It replies with a token: a long line of letters and
numbers. Treat it like the password to your server, because that is effectively what it is.
Back in your terminal, start the setup helper:
hermes gateway setup Choose Telegram and paste the token when asked. "Gateway" is just the part of Hermes that talks to messaging apps; one gateway can serve Telegram, Discord and others at the same time.
Now the step most guides skip. The agent can run commands on your server, so an open bot is a server anyone can reach. Add your own Telegram user id to the allowlist:
nano ~/.hermes/.env TELEGRAM_ALLOWED_USERS=123456789 Not sure of your number? Message @userinfobot on Telegram and it replies with your id. Save the file the same way as before.
Then start the gateway:
hermes gateway install
hermes gateway status The first line sets Hermes up to start on its own and to restart if it ever crashes. The second tells you whether it is running right now.
How to know it worked: open your bot in Telegram, press Start and say hello. It
answers within a few seconds. If nothing comes back, run hermes gateway status — the
line it prints usually names the reason.
07 Keep it running after you close the terminal
Closing your terminal must not switch the agent off, and rebooting the server must not either. One command makes the "starts by itself" part survive without you logging in:
sudo loginctl enable-linger agent Three commands cover almost everything from here on. You do not need to memorise them; keep them somewhere handy:
hermes gateway status
journalctl --user -u hermes-gateway -f
hermes gateway restart - status — is it running, and since when.
- journalctl — the running diary of what it is doing, errors included. The
-fmeans "keep showing new lines"; pressCtrl+Cto stop watching. - restart — needed after you change settings or the key, because those files are read once, at startup.
Two more worth writing down. hermes update brings the program up to date; expect it to
restart the gateway when it finishes. And hermes backup saves your whole setup, keys
included, as one file you can copy off the server — hermes import restores it on a new
machine. That turns a dead server into a twenty-minute inconvenience instead of a loss.
08 Teach it your habits
A fresh agent knows nothing about you. Three features fix that, and you do not configure them — you just talk.
- Memory. Tell it a fact once — "my sites live in /home/me/projects", "answer short, in English" — and it writes that down and loads it at the start of every future conversation. You stop repeating yourself.
- Skills. When it finishes a task you will repeat, say "save this as a skill". It writes the procedure down, and next time it follows the same steps instead of improvising. This is the part that makes it feel less like a chatbot and more like a colleague.
- Scheduled jobs. Ask in plain words: "every morning at seven, check the disk space and message me if it is above 80%". It runs on its own and messages you in Telegram.
- Approvals. By default, dangerous commands pause and ask you first. Keep that on. Turning it off to save one tap is how people delete something they needed.
A good first week: ask it to check something harmless on the server, then ask it to save that as a skill. You will see the difference immediately.
09 Keep it safe
You have given a program a command line on a machine connected to the internet. That is fine, as long as you treat it like what it is:
- Run it as the normal user you created, never as
root. - Keep the Telegram allowlist filled in, and check it again after any settings change.
- Treat the bot token like a password. If it ever leaks, revoke it in BotFather and paste a new one.
- Keep
~/.hermes/.envreadable only by you, and never paste keys into a chat or a project folder. - Leave the firewall on. The agent needs no open port of its own — it calls out, nothing calls in.
- If you plan to let it run code you do not trust, run it inside a container instead of directly on the server. Hermes supports that; it is a separate setup, worth doing once you are comfortable.
10 When something breaks
Almost every beginner problem is one of these five. Check them in this order.
- "command not found: hermes". The terminal does not know where the program is.
Close it, open a new one, try again. If it persists, run the
export PATHline from step 04 once more. - The bot stays silent. Run
hermes gateway status. If it says stopped, runhermes gateway restart, then read the last lines ofjournalctl --user -u hermes-gateway— a wrong token or a missing allowlist entry is named there. - Two copies answering at once. If you started the gateway by hand while the
automatic one was already running, both fight over the same bot: duplicated replies, or
nothing. Keep one;
hermes gateway statustells you which. - The disk slowly filling. Logs, downloads and caches add up quietly. Run
df -honce a week; past 85%, clean up rather than wait for an outage. - Answers getting vague. The conversation has grown long and been shortened.
Start a new one with
/newin Telegram.
If it is none of those, run hermes doctor. It is a general health check and usually
points at the real cause in one line.
11 What it costs
Two bills, both small. The server is a fixed monthly price — five to ten euros for the tier above. The model is paid per use, by the token, and you only pay for what the agent actually reads and writes.
In practice, a cheap model and a few conversations a day come to a couple of euros a month. The expensive part is never chatting; it is pointing a large model at a big project and letting it read everything. Keep the cheap model as your default, and switch to a bigger one only for the question that really needs it.
Both kinds of provider show your balance. Set a spending limit on the model provider's dashboard on day one — not because something will go wrong, but because a limit turns "I wonder what this costs" into a number you cannot exceed.
12 Was it worth it
If all you want is a chatbot, use a hosted one. It is cheaper, and you will not spend an evening reading logs. What you get here is different: an agent with real tools, on a machine you control, with your keys and your files, reachable from your phone, working while you sleep.
The honest cost is one evening to set up, ten euros a month, and the willingness to read an error message instead of guessing. The honest reward is that the boring half of your computer work — checking, summarising, tidying, reporting — starts happening without you.
Start with the smallest server and the cheapest model. You can grow both later, and by then you will know exactly which part you actually need.