1. Prepare the Server
On Ubuntu 24.04, secure the server and install Docker for the sandbox in step 4. The installer needs only Git, curl and tar to start; it fetches its own Python, Node.js and tools. Create a user for the agent, since its docs say never to run the gateway as root:
sudo apt install -y git curl tar sudo adduser hermes sudo usermod -aG docker hermes # lets it start sandbox containers sudo loginctl enable-linger hermes # keep its service running after logout sudo -iu hermes
Membership of the docker group is close to root on that server, which is one more reason to give the agent a server of its own.
2. Install and Choose a Model
As hermes:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash source ~/.bashrc hermes setup # the full wizard: provider, model, tools hermes doctor # checks the install
Settings live in ~/.hermes/config.yaml, and API keys in ~/.hermes/.env. Change one later with hermes config set, for example hermes config set OPENROUTER_API_KEY your_key. Run hermes to talk to it in the terminal.
3. Connect Your Chat Apps
hermes gateway setup # pick platforms and paste their bot tokens hermes gateway install # a systemd user service hermes gateway status journalctl --user -u hermes-gateway -f
By default the gateway refuses anyone who is not on an allowlist or paired. Keep it that way: put your own user IDs in ~/.hermes/.env, for example TELEGRAM_ALLOWED_USERS=123456789, or approve a pairing code with hermes pairing approve telegram CODE. The docs warn against GATEWAY_ALLOW_ALL_USERS=true on any agent that can run commands.
4. Keep Its Commands in a Sandbox
With the default local backend, the agent's commands run directly on the server. Switch to Docker in ~/.hermes/config.yaml:
terminal: backend: docker container_memory: 2048 # MB; the default is 5120 container_persistent: true
Containers drop almost every Linux capability and cannot gain new privileges. Environment variables you forward into them with docker_forward_env are visible to whatever the agent runs, so forward only what a task needs. Restart the gateway with hermes gateway stop && hermes gateway start after changing the config.
Command approval stays on in smart mode, asking before risky commands and refusing if nobody answers within five minutes. Leave the --yolo switch for experiments.
Updates, Backups and Size
- Update with
hermes update, then restart the gateway. - Back up
~/.hermes: memory, skills, sessions and keys all live there. Treat the backup as secret, and keep it on a storage box with Borg. - Size: with a hosted model, the agent itself is light, and the sandbox containers are what use memory. Running the model on your own hardware is a different scale: see how much VRAM an LLM needs and GPU servers.
Comparing agents? See running OpenClaw on a VPS.