Running Hermes on a Personal or Work Machine
تأمين Hermes على جهاز شخصي أو جهاز عمل
What this page is, and what it holds.
This page covers Running Hermes on a Personal or Work Machine. It carries a source warning and takes about 8 minutes to read. Do not disable approvals to save time. Start read-only and widen once you trust the results.
A security-posture walkthrough for running Hermes Agent on the machine you live on — what the defaults protect, how to tighten further, and how to undo mistakes
Outcomes taken from this page, not a template.
- Understand what الأمان والموافقات is and when you need it.
- Run
hermes chatand understand what happens next. - Read the table and take only the row that applies to you.
- Set
HERMES_WRITE_SAFE_ROOTin the right place.
Exactly as they appear in Hermes.
hermes chat
HERMES_WRITE_SAFE_ROOTTERMINAL_SSH_HOSTTERMINAL_SSH_USERTERMINAL_SSH_KEYGATEWAY_ALLOW_ALL_USERSTELEGRAM_ALLOWED_USERSGATEWAY_ALLOWED_USERS
Jump to the part you need.
Nothing summarised away.
The documentation body below is reproduced from the official source so commands and identifiers stay exact. Each section carries a short note describing what it contains.
You're about to run an agent on the machine you live on — a personal laptop or an employer-managed workstation. What's the safe posture?
Short answer: the defaults already do most of the work. Hermes ships secure-by-default, with a defense-in-depth model covering command approval, file-write safety, and credential handling. This page walks through what's on out of the box, which knobs to tighten for a shared or work machine, and how to undo mistakes when they happen. Every control here is covered in depth in the Security guide.
What the Defaults Already Protect
Explains the idea itself. Read it slowly; the later sections build on it.
Fresh install, no configuration — these protections are active:
Dangerous commands require approval. Before executing any command, Hermes checks it against a curated list of dangerous patterns — recursive deletes, writes to /etc/, disk operations, pipe-to-shell, and more. The default approvals.mode: smart uses an auxiliary LLM to assess risk: low-risk commands are auto-approved for that command only, genuinely dangerous commands are auto-denied, and uncertain cases escalate to a manual prompt.
Approval prompts fail closed. If you don't respond to an approval prompt within the timeout (default 300 seconds), the command is denied. Walking away from your desk never silently approves anything.
A hardline blocklist is the always-on floor. Some commands — rm -rf /, fork bombs, zeroing a physical disk — are refused regardless of approval mode, --yolo, or an explicit "allow always". The blocklist trips before the approval layer even sees the command, and there is no override flag.
File writes to sensitive paths are blocked. The write_file and patch tools cannot touch OS credential stores (~/.ssh/, ~/.aws/, ~/.kube/, /etc/sudoers, ~/.netrc), Hermes credential stores (auth.json, .env, pairing data), or project secret files (.env, .env.local, .envrc) anywhere on disk. Blocked writes return an error immediately — there is no approval prompt and no way to override from the chat UI.
Secrets are redacted from output. security.redact_secrets is on by default: patterns that look like API keys, tokens, and passwords in tool output are redacted before they enter the conversation context and logs.
Your data goes only where you point it. API calls go only to the LLM provider you configure. Hermes Agent does not collect telemetry, usage data, or analytics. Your conversations, memory, and skills are stored locally in ~/.hermes/. See the FAQ.
The Undo Layer: Checkpoints and `/rollback`
A lookup table. Do not read it all; find the row that applies to you. Commands here: hermes chat.
Approval gates prevent damage; checkpoints reverse it. When enabled, Hermes automatically snapshots your project before destructive operations — write_file, patch, and destructive terminal commands like rm, mv, sed -i, and git reset — into a shadow git store under ~/.hermes/checkpoints/store/. Your real project .git is never touched.
Checkpoints are opt-in. Enable per-session:
hermes chat --checkpointsOr globally:
checkpoints:
enabled: trueThen, in a session:
| Command | Description |
|---|---|
/rollback | List all checkpoints with change stats |
/rollback diff <N> | Preview what changed since checkpoint N |
/rollback <N> | Restore to checkpoint N (also undoes the last chat turn) |
/rollback <N> <file> | Restore a single file from checkpoint N |
What This Threat Model Is — and Isn't
Explains the idea itself. Read it slowly; the later sections build on it.
Be clear-eyed about what these controls defend against. As the Security guide puts it:
Deny rules are a guardrail against an honest-but-wrong agent, the same threat model as the dangerous-pattern detector. They are not a sandbox against a deliberately adversarial process — for that, use an isolated backend (Docker, Modal) or an egress-restricted environment.
The same applies to the file-write guards: they apply to write_file and patch only, while the terminal tool runs as the same OS user. The denylist reduces accidental damage and gives models a clear stop signal; it does not sandbox a hostile or compromised agent. If your requirement is containment rather than guardrails, the answer is an isolated terminal backend — that's the boundary designed for it.
A Cautious Starting Config
Settings you configure once. Change one at a time so you can see what each does. Set HERMES_WRITE_SAFE_ROOT in your environment, not in the chat.
Everything above, assembled. Adjust to taste in ~/.hermes/config.yaml:
approvals:
mode: manual # See every flagged command yourself
timeout: 300 # Unanswered prompts are denied (fail-closed)
deny: # Never-run list — survives even /yolo
- "git push --force*"
- "*curl*|*sh*"
- "dd if=* of=/dev/*"
security:
redact_secrets: true # Already the default; stated here for clarity
checkpoints:
enabled: true # Snapshot before destructive operations
terminal:
backend: docker # Or ssh — keep execution off the host
docker_forward_env: [] # No host secrets inside the containerAnd in ~/.hermes/.env, if you want the write sandbox:
HERMES_WRITE_SAFE_ROOT=/path/to/project:/home/you/.hermesSee Also
Explains the idea itself. Read it slowly; the later sections build on it.
- Security — the full defense-in-depth reference: every approval pattern, container hardening flags, gateway authorization, MCP credential filtering
- Checkpoints & Rollback — configuration, store maintenance, and restore workflows
- Tools & Toolsets — all terminal backends and their configuration
- Configuration — the complete
config.yamlreference
5 questions answered by this page alone.
Every option is a real identifier from the Hermes documentation. The wrong ones are real too, just from other pages.