Installing Hermes Agent on Arch Linux
What is the Hermes Agent?
After configuring my machine to run Ollama, I wanted to experiment with Hermes Agent. For those who are unaware, I will directly quote from their website to explain what it is:
The self-improving AI agent built by Nous Research. The only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, and builds a deepening model of who you are across sessions.
It is an open-source AI agent with far too many features to summarize here.
Why not use OpenClaw?
It is essentially an alternative to OpenClaw.
What attracted me to Hermes was that OpenClaw has had a bunch of security issues. I won’t go over them all here because they are numerous.
Installation
There are several installation methods available. I wanted to install it locally on my Arch Linux machine.
I wanted to keep it somewhat isolated while still allowing it access to my hardware. Over time, I’ve grown to dislike running certain services via Docker/Podman.
So, I elected to install it under its own user. Much like my Ollama installation, it runs under its own user with its own home directory. This way, I am able to limit what the agent can access.
In my post about setting up Ollama, I created a separate partition and mounted it under /srv/ai.
I intend to put the Hermes Agent user’s home directory in /srv/ai/hermes and have the installation live there.
I’ve adapted these steps from the Non-Sudo / System Service User Installs instructions.
Hermes needs Chromium for its browser automation tools, plus standard build tools for the installer:
sudo pacman -Syu --needed --noconfirm base-devel git curl xz chromium
I then create the Hermes user and set /srv/ai/hermes as the home directory:
sudo useradd -m -d /srv/ai/hermes -r -s /bin/bash hermes
Run the official installer as the hermes user:
sudo -u hermes -i bash -c "$(curl -fsSL [https://hermes-agent.nousresearch.com/install.sh](https://hermes-agent.nousresearch.com/install.sh))"
Once this completes, Hermes is installed. The default Hermes installation directory is ~/.hermes.
Some things to note: if you log in as the hermes user:
$ sudo -u hermes -i
And then inspect the .bashrc, you will find that Hermes has added a new PATH entry:
$ cat ~/.bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '
# Hermes Agent — ensure ~/.local/bin is on PATH
export PATH="$HOME/.local/bin:$PATH"
You can see that Hermes does indeed live there:
$ which hermes
/srv/ai/hermes/.local/bin/hermes
Setting up a systemd service
Because the installer script runs as an unprivileged user, it cannot set up a systemd service definition.
To run it as a service, we can create a systemd unit file.
I had OpenCode extract the relevant systemd service file from the installer script.
You can then create the /etc/systemd/system/hermes-agent.service file:
sudo tee /etc/systemd/system/hermes-agent.service > /dev/null << EOF
[Unit]
Description=Hermes Agent Service
After=network.target
[Service]
Type=simple
User=hermes
Group=hermes
WorkingDirectory=/srv/ai/hermes
Environment=HOME=/srv/ai/hermes
Environment=PLAYWRIGHT_MCP_EXECUTABLE_PATH=/usr/bin/chromium
ExecStart=/srv/ai/hermes/.local/bin/hermes gateway start
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
Reload the systemd manager configuration:
sudo systemctl daemon-reload
We haven’t started the daemon yet.
Post-install configuration
After the script runs, you still need to configure Hermes with API keys and a model. Because the agent runs under the hermes user, you do this through sudo:
sudo -u hermes -i hermes setup
I am going to cover how I set this up with Ollama and Telegram in a future post.