For Håvard · a gift, assembled

Hermes on your Portainer box

Your home server already runs Portainer and Tailscale. That is all this needs: one stack, two panels, and the agent is yours.

Håvard — this is the whole setup, and it runs on the home server you already manage with Portainer, with an admin panel and the web app. You reach both over Tailscale from wherever you are, and the only thing that leaves the house is what the model needs to answer you.

Hermes Agent Explained In 5 Minutes — CodeHead. Prefer a longer sitting? Tina Huang’s 29-minute walkthrough goes further.

Before you start Three things, and about twenty minutes — most of it waiting for the first download.

1 Deploy the stack

Everything Hermes needs is one container and one volume. In Portainer: Stacks → Add stack, name it hermes, choose Web editor, and paste this. Three values are yours to fill in — the ALL-CAPS placeholders. On a phone the block scrolls sideways; it is one paste either way.

services:
  hermes:
    image: nousresearch/hermes-agent:latest
    container_name: hermes
    restart: unless-stopped
    command: gateway run
    ports:
      - "TAILSCALE_IP:9119:9119"
      - "TAILSCALE_IP:9120:9120"
    volumes:
      - hermes_data:/opt/data
    environment:
      - HERMES_DASHBOARD=1
      - HERMES_DASHBOARD_BASIC_AUTH_USERNAME=havard
      - HERMES_DASHBOARD_BASIC_AUTH_PASSWORD=YOUR_PASSWORD
      - HERMES_DASHBOARD_BASIC_AUTH_SECRET=YOUR_SECRET
    deploy:
      resources:
        limits:
          memory: 4G
          cpus: "2.0"

volumes:
  hermes_data:

Filling in the blanks

  1. TAILSCALE_IP — the home server’s tailnet address, from tailscale ip -4 on it or from the Tailscale admin console. It looks like 100.x.y.z. Publishing the ports on that address and nothing else is the point: the LAN cannot see them, the internet cannot see them, Tailscale is the only way in. Start Tailscale on the host before the stack — Docker refuses to bind an address that is not there yet.
  2. YOUR_PASSWORD — a long password you choose. Put it in your password manager next to the API key; you will type it every time you sign in.
  3. YOUR_SECRET — generate it on the host with openssl rand -base64 32. It only keeps sessions valid across restarts; it never leaves the stack.
  4. Leave the username as havard, unless you would rather sign in as something else.

The two published ports are the two things you will use: 9119 is the admin panel, 9120 is the web app.

Then Deploy the stack, and give it time: the image is well over a gigabyte, so on a home connection the first start can take ten minutes. Watch Containers → hermes → Logs; it is done when it stops mentioning downloads and names the dashboard on 9119.

If it keeps restarting One of the three HERMES_DASHBOARD_BASIC_AUTH_* lines is wrong — usually a mistyped name or an empty password. The log line names the variable it is missing.

2 Turn on the panels

The admin panel comes up on its own. The web app — Hermes Desktop in a browser tab — is shipped in the image but off until you say so. One console visit does both, and it is the last time you need a shell.

In Portainer: Containers → hermes → Console, connect with /bin/sh, and run these four lines:

hermes config set webapp.enabled true
hermes config set webapp.host 0.0.0.0
hermes config set webapp.port 9120
hermes config set webapp.public_url \
  http://TAILSCALE_IP:9120

Use the same tailnet address as in the stack. Then restart the container once — Containers → hermes → Restart — so the gateway picks the settings up.

Two things to open

If you have MagicDNS on, the machine’s tailnet name works just as well as the IP — http://hermes-box.your-tailnet.ts.net:9119 — and is worth using on the phone.

Sanity check, back in the console:

hermes webapp --status
hermes doctor

The first should say it is serving on port 9120 — it will name 127.0.0.1 even when it is bound correctly, because that is the container’s own loopback, so do not read that as a failure. A gateway that has just restarted may answer “the gateway is not running” for a few seconds; run it again. The second is green across the board when everything is in order.

Nothing answers on 9119 or 9120 Two usual causes: the ports were published on a tailnet address the host no longer has (check tailscale ip -4 again), or Tailscale is down on the device you are browsing from. The container itself is fine — docker logs hermes will show the dashboard listening.

3 The model, and your first conversation

Your key comes from me, already set up for DeepSeek. There is nothing to sign up for and no provider to hunt down: paste it once, pick a model, and Hermes can answer. OpenRouter sits in front of those models, so the same key also works in anything that speaks the OpenAI API, not just here.

Where to get it The key reaches you as a Bitwarden shared item. It opens in a browser — no account, no app, nothing to install — and it expires after a few days. Copy the value, paste it in, and that is the last time you need it. If it has expired by the time you get to it, ask me and I will send a new one.

In the admin panel:

  1. Go to API Keys, find OpenRouter under LLM providers.
  2. Paste the key and save. It goes to /opt/data/.env inside the volume, never to a chat log.

Choose a model

Every model the key can reach starts with deepseek/. Pick one in the page you are chatting in: the admin panel’s Chat tab takes /model, and the web app has a model picker of its own. Choose one with at least 64,000 tokens of context — Hermes refuses smaller windows because it cannot hold a multi-step task.

Say hello

Both panels are ordinary web pages, so stay in whichever you prefer: the admin panel’s Chat tab and the web app talk to the same sessions and the same memory, so a conversation started in one picks up in the other.

Give it something worth checking:

What can you see from inside this container, and which tools do you have?

There is a ceiling on the key, so a surprise cannot get expensive.

If Hermes starts answering with 403 Key limit exceeded, the key has hit that ceiling. Message me and we will sort it out — nothing is broken.

4 Where things live

Everything Hermes knows about you sits in the Docker volume hermes_data, mounted at /opt/data inside the container. The image itself is disposable; the volume is the part that is yours. In Portainer, Volumes → hermes_data → Browse shows you the same files with a file manager.

config.yaml
Settings: model, tools, terminal backend, memory limits
.env
Secrets — your OpenRouter key and the panel’s sign-in live here
memories/MEMORY.md
The agent’s own notes: environment, conventions, lessons
memories/USER.md
Its profile of you: preferences, style, expectations
skills/
Procedures it can follow, many of them written by the agent itself
state.db
Every past session, searchable from the admin panel’s Sessions page
logs/
Runtime logs, also visible under Logs in the admin panel

Read memories/USER.md after a week. It is the clearest picture you will get of what the thing has understood about you — and you can correct it by just saying so. Memory is deliberately small (about 1,300 tokens in total) so it stays useful; the agent prunes it as it goes.

Updating is replacing the image, not running an updater: Stacks → hermes → Editor → Pull and redeploy. The container is rebuilt from latest and picks the volume back up, sessions and memory included. The admin panel’s System → Operations page can make a backup of the volume before you do, if you want one.

5 Where to read more

The documentation is good, and the Docker page in particular matches what you just deployed:

If something is stuck

Container restart loop
Missing or empty HERMES_DASHBOARD_BASIC_AUTH_*; the log names the variable
9119 or 9120 unreachable
Ports are published on the tailnet IP — confirm it with tailscale ip -4, and that Tailscale is up on your device
Web app answers 502 or refuses
webapp.host is still 127.0.0.1 or the container was not restarted after the config change
Empty or broken replies
Admin panel → API Keys: check the OpenRouter key, then start a new chat
It “forgot” something
Memory only persists when it calls the memory tool; ask it to save explicitly, then start a new session
Anything else
Container console: hermes doctor first — it names the fix