Hermes stack install: the agent runbook
Audience: an autonomous agent executing an install on a customer's own hardware. Companion doc: the human walkthrough, which covers the same install without commands and is the version the customer reads. Reference implementation: the build described in the case study, summarised at the end, and every command below was run on that build and reproduced as it ran, including the ones that failed first, because the failure is the part a second installer needs and the successful command is the part they can find in any documentation.
It is written for a single operator working alone on hardware somebody else owns, under a deadline, with no second pair of eyes on the configuration. That constraint shapes everything here: every stage ends with a check the operator can run and read, no stage relies on the installer telling the truth about what it did, and the stages that are usually skipped are given the most space because they decide whether the customer still trusts the system in a month. The order is the order the work has to happen in. Read the contracts first; they are short and they are load-bearing.
1. What this stack is
Four services on hardware the customer owns. Each gets its own container.
| # | Service | Role in plain terms | Port |
|---|---|---|---|
| 1 | Hermes agent | the worker: thinks, writes, uses tools | dashboard 9119, agent API 8642 |
| 2 | Paperclip | the board: every job lands here as an issue or comment | 3100 |
| 3 | Twenty | the CRM: contacts, companies, deals | 3000 |
| 4 | Semantica | the memory graph: durable facts written and searched later | 8000 |
The agent is useless without the other three. The board is how the customer sees the work. The graph is how the agent remembers between runs. The CRM is what it works from.
What each one actually buys, in the order a customer notices it:
- The board. It turns an invisible worker into a queue with a history. Every task, every rejection, every hand-back is a row a human can read without asking the agent anything. If you install only one of the other three, install this.
- The graph. It stops the agent re-deriving the same conclusion every morning. Without it, run seven knows nothing about run six. That is what separates a tool that gets used daily from a novelty abandoned in a fortnight.
- The CRM. The only place the customer's own commercial data lives. It is the least interesting to install and the one they will defend hardest, so treat its backup as a stage of its own rather than a line in a checklist.
The four are not a product suite and were not designed together. They are four services that happen to speak HTTP on the same LAN, and the install's job is to make them behave like one system. Most of the work below is therefore in the seams: the key one service uses to talk to another, the header one service insists on, the address one service learned from DHCP before it was pinned. Anybody can start four containers. The install is the seams.
2. Contracts
These hold for every install. Violating one invalidates the run.
- Every stage ends with a verification block. A stage whose verification fails is not finished, whatever the installer printed. Read the service state on the box.
- An installer's exit code is not evidence. Read the version, the port, the row.
- Credentials go onto the boxes, owner-readable. Never into chat, notes, issue comments or email, except the ones the customer owns and must receive.
- Nothing on the customer's cluster gets deleted. Archive or rename. History stays.
- The agent holds scoped keys only. Never an admin key, on any service.
- Ask before anything destructive, and before anything that exposes a service to the internet. Both are one-way doors in a customer's eyes.
The contracts exist because of specific failures, not as decoration. The "exit code is not evidence" line came from an installer that reported success while writing to /root instead of the service user's home. The service started, ran with no configuration, and answered every request with an empty result. Two days went into blaming the model before anyone read the process's working directory.
The credential rule has a narrower origin. A key pasted into an issue comment is on a remote server, in a database, in an email notification and in at least one backup, all within a minute, and none of those four places is one the customer agreed to. Rotating it afterwards does not un-copy it. The rule is absolute because the failure is irreversible, not because the breach is likely.
The deletion rule costs the most patience and saves the most grief. Stale records on a customer's cluster look obviously wrong to someone who did not create them, and they are wrong about a third of the time. The other two thirds are load-bearing in a way that is invisible until removed. Say what you would delete, in writing, and wait. Waiting is cheap and reversible.
3. Preconditions
Do not start until all four are true. Each is cheap to check now and expensive to discover later.
- Root or sudo on the Proxmox host, and a route to each target container.
- Pinned container addresses, or a documented DHCP reservation. Not "whatever it gets".
- A model provider API key that has been tested with a single cheap completion from the host, before it goes on the customer's box.
- Written confirmation of what may be created, and what must not be touched. In writing, from the person who owns the hardware.
A fifth precondition is easy to forget: know the customer's reboot policy. An appliance that gets power-cycled nightly behaves differently from one that runs for a year. Anything relying on in-memory state fails there, and you want that in the design rather than in the post-mortem.
Test the model key from the host, not from your laptop. A key that works on your machine can fail from behind a customer firewall that allowlists outbound destinations, and discovering that at Stage 2 costs an hour of debugging a provider that is doing nothing wrong.
Finally, agree the definition of finished before you begin. "Installed and working" means four services, a real task through the whole stack, a restore tested, and the customer operating it without you. If the customer's definition is narrower, find out now, because the gap will otherwise surface as an argument about scope at exactly the moment you are trying to leave.
4. Stage 0: recon, before touching anything
Inventory what already exists. Every one of these has saved an install.
pct list
cat /etc/pve/lxc/*.conf | grep -E "^(hostname|net0|memory|cores)"
ss -tlnp | sort -k4
df -h /
free -m
Read them for four things: which container IDs are free, which ports are already bound, whether the disk has room for four services plus their data volumes, and whether the RAM left over can hold a Node CRM alongside an agent. A CRM frontend build is the item that most often finds a memory ceiling, because it is the only step that wants several gigabytes for a few minutes and needs none of it afterwards.
Port collisions deserve a specific warning. A service that cannot bind its port frequently starts anyway, logs nothing useful, and reports healthy to anything that asks about its process state. The collision only becomes visible when another service calls it and gets whatever was already listening. Check the listening set before you start, and check it again after each service comes up.
Record the recon output to a file on the host. Two weeks later, when something is odd, that file is the baseline that tells you what changed. Without it, every post-install fault begins with an argument about whether it was there before you arrived.
Verify: you can name every occupied port you are about to use, and every free container ID you plan to claim, without re-running a command.
5. Stage 1: create the containers
pct create 210 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \
--hostname agent-hermes --memory 4096 --cores 4 --rootfs local-lvm:32 \
--net0 name=eth0,bridge=vmbr0,ip=192.168.0.210/24,gw=192.168.0.1 \
--features nesting=1 --unprivileged 1 --onboot 1
pct start 210
Set the address statically at creation. Letting a container take DHCP and pinning it later means reconfiguring every service that learned the old address, and something always gets missed. The service that gets missed is the one nobody checks until it matters, which is usually the backup routine pointing at an address that has belonged to something else for a month.
nesting=1 is required for any container that will run Docker inside it. Unprivileged containers are the default for a reason: a privileged container that gets compromised is a host compromise, and the customer's other workloads live on that host.
Repeat for each of the four services, adjusting memory and disk. The agent wants the most RAM; the graph wants the most disk. Give the graph its data on a volume or a dedicated mount from the start, because moving it later means copying a live database and stopping the service to do it.
Verify:
pct exec 210 -- ip -4 addr show eth0 | grep inet
pct exec 210 -- free -m
pct config 210 | grep onboot
Every container must report onboot: 1. An active service that is not enabled passes every check today and fails after the first reboot, and the reboot will be the customer's, on a weekend, without you there to read the log.
6. Stage 2: the worker (Hermes agent)
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq curl ca-certificates git sudo
useradd -m -s /bin/bash hermes
su - hermes -c "curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --non-interactive"
Pitfall, and it will happen. The install can stop partway on a missing libatomic1, because the Node runtime the installer fetches needs it and a minimal Debian image does not ship it. The fix is one package and a re-run. The installer resumes where it stopped:
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq libatomic1
su - hermes -c "curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --non-interactive"
Verify:
ls -la /home/hermes/.local/bin/hermes
su - hermes -c "/home/hermes/.local/bin/hermes --version"
The agent's home is /home/hermes/.hermes, not /root. An install driven by paths that assume /root reports success and then does nothing. The current documentation at hermes-agent.nousresearch.com/docs is the authority on install shape and configuration keys; read it rather than trusting a remembered flag list, because flags move between releases and a stale flag is silently ignored.
Run every subsequent command as the hermes user, not as root. A root-run agent writes root-owned state that the service user cannot later read, and the resulting failure looks like a permissions bug in the agent rather than an ownership mistake in the install.
6.1 Provider and dashboard
Put the model provider key in ~/.hermes/.env as the hermes user. Secrets live in .env; settings live in config.yaml. Never put a key in config.yaml, because that file is the one people paste into issues when asking for help.
Set the file mode to 600 and confirm the owner is the service user. A key that is correct but world-readable is a key you will be rotating.
Dashboard auth: set dashboard.basic_auth.username, then set dashboard.basic_auth.password_hash via hermes config set. If both a plaintext password and a password_hash exist, the hash wins, so set the hash explicitly to the new password's hash or your change silently does nothing. That is a genuinely unpleasant half hour: the password looks changed, the old one keeps working, and nothing logs a complaint.
The login endpoint is POST /auth/password-login with JSON {"provider":"basic","username":...,"password":...,"next":"/"}. Omitting provider returns 422, not 401. Do not chase a 422 as a credential fault; it is a schema rejection and the credentials were never examined.
Bind the dashboard to the LAN address, not the public interface. A dashboard with basic auth on a public IP is a password-spray target within hours of being indexed, and basic auth gives an attacker unlimited attempts.
6.2 Identity, then skills
Write the agent's identity file first: its name, whose it is, what it is allowed to touch, what it must never touch. The customer reads this file. Ambiguity here shows up as the agent doing something defensible that the customer did not want, and the argument afterwards is unwinnable because nobody wrote it down in advance.
Be specific about the boundaries. "Do not contact customers" is weaker than "no outbound email from any address on this install without a written instruction from the owner." The first is a preference the agent may reason around. The second is a test the agent can apply to itself.
Then seed skills, copying the chosen set into the profile rather than relying on a shared global directory. Count them on the box afterwards. A seed copier reports success for files that never arrived, and this is the failure that looks exactly like an agent that is simply not very capable.
Verify: a single test prompt returns a completion, and the response names the provider you configured. Then restart the container and prompt again. Half of all "it worked in testing" reports are processes that survived on state the reboot clears.
7. Stage 3: the memory graph (Semantica)
Bring the graph up in its own container and give it a data volume that is not the container's root disk. Docker's own guidance on volumes at docs.docker.com/storage/volumes exists because a container rebuild otherwise takes the data with it, and a container rebuild is exactly what happens when the image is updated.
docker run -d --name semantica --restart unless-stopped \
-p 8000:8000 -v /opt/semantica/data:/data semantica:latest
curl -s http://127.0.0.1:8000/health
--restart unless-stopped matters more than it looks. A container started by hand does not survive the host's reboot, and the graph is the service whose absence is least visible: the agent still runs, still answers, and simply forgets everything between sessions.
Then prove it round-trips, which is a different test from proving it answers health:
curl -s -X POST http://127.0.0.1:8000/facts -d '{"subject":"install","predicate":"verified","object":"semantica"}'
curl -s "http://127.0.0.1:8000/find_similar?scenario=install&max_results=5"
The write must be findable by the read. A graph that accepts writes and returns nothing on search looks healthy on every dashboard and is the most common silent failure in this stack. It is also the one the customer is least able to notice on their own, because the symptom is a capable agent that keeps asking questions it has already answered.
Restrict it to the LAN. A graph with no auth on a public port is a data leak with extra steps, and the content is by design a structured record of everything the customer's business has said.
Verify: restart the container, then read the fact back. If it survives a restart, the volume is real.
8. Stage 4: the board (Paperclip)
The board is where the customer's work becomes visible. Two configuration facts decide whether it functions at all on a LAN install.
- The board refuses a plain-HTTP gateway unless
dangerouslyAllowInsecureRemoteHttpis set. On a LAN with no TLS termination, set it deliberately and note in the handover that it is a LAN-only decision. The flag's name is the warning. - Agent comments need
X-Paperclip-Run-Id. Without the header the board silently refuses them.
That second one deserves its own paragraph because of how it presents. A comment POST returns a refusal that reads like a permissions problem, so the instinct is to go looking at the API key. The key is fine. The header is the missing piece, and the run id has to come from a run the server has actually bound to the issue, so having an id from somewhere else is not enough either.
Verify with a real round-trip, not a status code:
curl -s -H "Authorization: Bearer $KEY" "$API/api/companies/$CID/issues?limit=5"
curl -s -H "Authorization: Bearer $KEY" -H "X-Paperclip-Run-Id: $RUNID" \
-H "Content-Type: application/json" -X POST "$API/api/issues/$IID/comments" -d @comment.json
curl -s -H "Authorization: Bearer $KEY" "$API/api/issues/$IID/comments?order=desc&limit=1"
Read the comment back. A 201 that did not persist a body is not a comment, and a PATCH response is not proof either, because the write routes do not echo what they wrote. If the customer judges success by what appears on the board, then what appears on the board is the only acceptance test that counts.
9. Stage 5: the CRM (Twenty)
Build with the Node heap raised, or the build dies out of memory on a container that had plenty of RAM at idle:
export NODE_OPTIONS=--max-old-space-size=4096
yarn build
Then create the workspace, create the agent's scoped API key, and import nothing until the customer's own contact list has been counted. The count is the acceptance test later; without a baseline you cannot prove the import was complete, and an import that silently dropped a tenth of the records is indistinguishable from one that worked.
Give the agent a key that can read and write contacts but not administer the workspace. If the install's own test needs an admin key, that is a sign the scoped key is scoped wrong, not a reason to hand over admin.
Verify: create one company and one contact through the API, then find both in the UI. API-visible and UI-visible are separate tests, and the CRM is where they most often disagree. When they do, the answer is almost always a cache: the UI is serving a stale list and the data is fine, so check the API before you start rebuilding the frontend.
10. Stage 6: routines, backups, health
Cron installed as root never fires for the service user. Install it as the service user, and verify as the service user: su - hermes -c "crontab -l", not a bare crontab -l. The bare form shows root's crontab, which is empty and therefore looks like success.
Schedule at least three things: a nightly backup of the CRM, the graph volume and the agent's state directory; a health check that reads each service rather than pinging its port; and a digest that tells the customer, in one message, what ran and what it produced.
The health check is worth writing properly. A TCP connect proves a port is open, which any half-started process can manage. A health check that performs a real read through the service's own API is the only one that catches the failure mode this stack actually produces, where the process is up and the data path is not.
Backups must leave the host. A backup on the same disk protects against a bad write and nothing else. Test one restore, on a scratch container, before handover. A backup that has never been restored is a file, not a backup, and the customer will find that out at the worst possible moment.
Verify: trigger each routine once by hand, then confirm the output exists and has the expected shape. Then reboot the container and confirm the routines still exist and still fire.
11. Stage 7: acceptance
Run the customer's own question through the whole stack and follow it end to end. A real question, asked in their words, with the answer arriving somewhere they can see it.
- The task exists on the board as an issue.
- The agent worked it and the work is visible in the thread.
- Whatever it learned is in the graph, and a search finds it.
- Any contact it needed came from the CRM, and any change it made is in the CRM.
- Nothing was written that the customer did not ask for.
Then the negative test: ask it to do something outside its written scope and confirm it declines and says why. An agent that cannot refuse is not installed, it is loose. This test is uncomfortable to run in front of a customer and it is the most valuable five minutes of the engagement.
Verify: the customer has watched both tests. Acceptance signed by the installer alone is not acceptance, and the difference surfaces the first week they use it without you.
12. Pitfalls, all of which happened
libatomic1missing breaks the Hermes install on a minimal Debian image. Install it and re-run the installer, which resumes.pct pushreads from the Proxmox host's filesystem, not yours. Copy files to the host first or it fails to open them.pct execmangles nested quoting. Write a script to a file, copy it in, then run it. Do not inline nested quotes.- The CRM frontend build needs
NODE_OPTIONS=--max-old-space-size=4096or it dies out of memory. - Agent comments need
X-Paperclip-Run-Id. Without the header the board silently refuses them. - The board refuses a plain-HTTP gateway unless
dangerouslyAllowInsecureRemoteHttpis set. - Cron installed as root never fires for the service user. Verify with
su - <user> -c "crontab -l", notcrontab -l. - Mail to an unrouted address is discarded silently when a catch-all is set to DROP. Check that a customer-facing address actually routes before you publish it or send from it. No bounce will warn you.
- A seed copier reports success for files that never arrived. Count the skills on the box.
- DHCP addresses move. Pin them before handover.
- An active service that is not enabled passes every check today and fails after the first reboot.
- Do not delete anything on the customer's cluster without written confirmation, including stale records that look obviously wrong. Say what you would delete and wait.
Each of these cost real time on a real install. None of them is exotic. They are the ordinary friction of putting four services on hardware somebody else owns, and the reason a runbook beats an installer script: the script cannot tell you which of them just happened. The Proxmox VE documentation covers the container mechanics well and says nothing about any of the above, because none of it is a Proxmox behaviour. It is the behaviour of four services that disagree about quoting, headers, memory and time.
13. Network, TLS and the address plan
The four services talk over the LAN, but the customer will eventually want one of them reachable from a laptop in another country. Decide the address plan before you decide anything else, because retrofitting it is the change that breaks every integration.
Keep three planes separate in your own head even though they share a bridge: the management plane (Proxmox itself, SSH), the service plane (the four HTTP endpoints), and the customer plane (whatever the owner reaches from outside). Only the customer plane should ever be exposed, and only through one door.
For that one door, terminate TLS at a reverse proxy rather than at each service. A single proxy means a single certificate to renew, a single place to add auth, and a single access log that shows who reached what. Four services each renegotiating their own TLS on a LAN is four certificate expiries to forget.
# one standard 451 too many LAN installs skip
curl -sI https://agent.customer.example/ | head -1
openssl s_client -connect agent.customer.example:443 -servername agent.customer.example 2>/dev/null | openssl x509 -noout -dates
Two traps. First, a proxy that forwards Host verbatim to a service that does not expect that hostname produces redirect loops or a login that silently fails, and the loop looks like an auth bug. Rewrite the header at the proxy and say so in the config comment. Second, certificate renewal fails silently until it does not; a nightly curl -I against the public name, wired into the health routine from Stage 6, is the cheapest possible alarm.
Do not expose the agent's dashboard, however strong the password. The dashboard can change the agent's configuration, which means it can change what the agent is allowed to do. If the customer needs remote access to the dashboard, put it behind the proxy with a second auth layer and log every session.
Verify: from outside the customer's network, the customer-facing name answers on 443 with a valid certificate. From the LAN, the four services answer only on their own ports and only to the addresses you intended.
14. Logging and the evidence trail
An install that leaves no logs hands the customer a system they cannot diagnose and you a system you cannot defend. Two streams are non-negotiable: what the services did, and what the agent did.
journalctl -u docker --since "1 hour ago" --no-pager | tail -20
docker logs --since 1h semantica
su - hermes -c "tail -50 /home/hermes/.hermes/logs/agent.log"
Forward all three to a single location that survives the container. Docker's json-file driver rotates by default and can quietly drop the buffer that held the only record of a crash, so either configure rotation limits explicitly or ship logs off the box. If a customer asks "what happened at 3am" a month from now, the answer must be recoverable.
The agent's own log deserves particular attention because it is the one the customer will read. Make sure it records, per run: the task it was given, the tools it called, and the outcome. A log that records only success is worse than no log, because it teaches everyone to trust it.
Keep the install's own evidence too: the recon output from Stage 0, each verification block's result, and the gate you applied before calling the install finished. Store them where the customer's IT can find them without asking you. When a question comes six months later about whether the graph volume was ever tested, the answer is a file rather than a memory.
Verify: induce one failure deliberately (stop a service), then confirm the log shows it with enough context to identify the cause without you.
15. The security pass, before you call it done
Run this as a checklist over all four services, on the box, not on the architecture diagram.
- No public listeners.
ss -tlnpper container; every service bound to its LAN address or loopback, and nothing bound to0.0.0.0that does not need to be. - No admin keys in use. Each integration runs on a scoped key. Read the key's own permissions back through its service, do not assume the creation call did what you asked.
- Secrets off the config files and out of shell history. Environment files at mode 600, owned by the service user, and
historycleared of anything pasted inline. - SSH. Key-only for every account, root login disabled, and the installer's own key removed at handover. Both of those settings need a restart of the SSH service to take effect, so verify with a fresh connection that you still expect to succeed.
- Default credentials changed on every service that shipped with one, including the ones that look internal.
- Unused ports closed, including the ones a service opens for debugging and forgets to close in a production mode.
ss -tlnp
ss -tnp | grep ESTAB
The second command is the more revealing one. It shows who is actually connected, and it catches the case where a service bound correctly but something on the box is reaching out to an address the customer never approved.
Verify: every item above is checked on the box and the result recorded. A security pass whose output does not exist did not happen.
16. Rollback, and saying no
Install four services and something will need to come back out. Decide the rollback before you start, because the decision is easy while nothing is at risk and impossible at 2am.
Rollback has three tiers and they are not interchangeable. Tier 1 is configuration: restore a previous config file and restart, minutes, no data risk. Tier 2 is a service: rebuild a container from its image and reattach the data volume, roughly an hour, data intact if the volume was real. Tier 3 is data: restore the graph or CRM from backup, and this is the only tier where the backup you have never tested becomes the whole engagement.
Nothing in this stack should ever need Tier 3 for a failed install, because the install does not touch the customer's existing data. If you are reaching for Tier 3 during an install, stop: something is being deleted that should have been archived, and the contract in Stage 2 exists precisely to prevent this moment.
Say no early. There are requests during an install that should be refused on the spot: opening a database port to the internet "just for a minute", giving the agent an admin key "to save time", importing the customer's whole mailbox history on day one, or skipping the restore test because the window is tight. Each is defensible in the sentence it is asked in and expensive in the month after. Refusing them warmly, with the reason, is the part of the job the customer will remember when something else goes wrong.
Verify: you can state, for each of the four services, its Tier 1 and Tier 2 rollback in one sentence and the exact path of its data volume.
17. Case study
The reference build for this runbook is written up separately, with the customer's identity removed: Case study: one agent install, start to finish. Read it alongside these stages.
It covers what the build proved as opposed to what it installed, what was still open at handover, and how the builder's access was removed with the proof. If you are installing this stack for a business rather than a technical team, the human walkthrough of the same install is the document the customer will actually read and worth reading yourself to see which parts they will understand.
Two things from that build are worth carrying into your own. The first is that the failures clustered in the seams between services, not inside any one of them; every service passed its own tests while the stack as a whole did nothing. The second is that the handover took as long as the install. The customer's ability to operate and rotate what they own is the deliverable, and it is not a paragraph at the end of a ticket.
18. Handover
Deliver five things: a credential sheet listing what the customer owns and how to rotate it; the container map with pinned addresses; the routine schedule; the open items, stated plainly; and confirmation that the builder's remote access is gone. Then tell them it is done.
The credential sheet is the one document the customer will actually use, so write it for someone who has never seen the stack. What it is, where it lives, who can reach it, how to rotate it, what breaks if it is lost. Anything you are tempted to leave out because it is obvious is the thing that will cost them a day.
The open items list is where most installs lose trust. An install that ends with "all done" and then has three small surprises in the first fortnight is worse than one that ends with a written list of the three. Stated plainly and in advance, the same three items are normal engineering. Discovered later, they are the reason the customer never quite trusts the thing.
Remove your own access in front of them, and show the proof: the key deleted, the SSH entry gone, the session closed. "I have removed my access" is a claim. A screenshot of the empty list is evidence, and that distinction matters when they are deciding how much to trust the thing they just bought. It also protects you: an account nobody can prove was removed is an account that gets blamed for somebody else's incident a year later.
Sources
- Hermes Agent documentation, hermes-agent.nousresearch.com/docs: install shape, configuration keys and dashboard authentication.
- Docker documentation, docs.docker.com/storage/volumes: why service data must live on a volume rather than a container's writable layer.
- Proxmox VE documentation, pve.proxmox.com/pve-docs:
pct create, container configuration andonbootsemantics.