Record the first droplet deployment; align deploy files with what ran

Documentation and deployment examples only; no application code changed.
The systemd unit and Caddyfile now match what is running on the droplet,
and docs/evidence/droplet/2026-11-21.md records the changes made and the
checks performed. No device or phone evidence.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-21 12:02:44 -08:00
co-authored by Claude Fable 5.2
parent f02715fb64
commit 98c7b03aa7
4 changed files with 112 additions and 17 deletions
+14 -8
View File
@@ -1,8 +1,8 @@
# Running the bridge on a DigitalOcean droplet
**Status: written, not run.** These steps have not been executed on a droplet. The bridge, the
built-in speech model and the Hermes adapter have only been run on the development desktop.
Creating the droplet, pointing DNS at it and starting services are Dan's actions.
**Status: run once, on 2026-11-21**, on the existing Hermes droplet rather than a new one. What
was actually done, including where it differed from the steps below, is recorded in
`docs/evidence/droplet/2026-11-21.md`. The steps below have been corrected to match.
## What runs where
@@ -61,15 +61,19 @@ accurate) and run `fetch-model` again.
the bridge refuses to start and leaves the directory exactly as it found it, even if its
mode is already 0700. If the owner is right but the mode is looser, the bridge sets it to
0700. So `-o hermeven` in the command above matters as much as `-m 0700`.
4. **Code.** Clone the repository into `/opt/hermeven`, then `npm ci`. (The dev dependencies are
needed: the bridge runs through `tsx`.)
4. **Code.** Put the repository at `/opt/hermeven/app` (a clone, or `git archive <sha> | tar -x`),
then run `npm ci` there as the unprivileged `hermeven` user and hand the tree back to root
afterwards (`chown -R root:root /opt/hermeven/app`), so package install scripts never run as
root and the running service cannot modify its own code. (The dev dependencies are needed:
the bridge runs through `tsx`.) Node.js is expected at `/opt/node/bin/node`.
5. **Configuration.** Copy `deploy/bridge.env.example` to `/etc/hermeven/bridge.env`, fill it
in, `chmod 600`, `chown hermeven`.
5a. **Speech model.** As root (not the service user), fetch and verify the pinned model into a
directory the service can read but not write:
```sh
HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env npm --prefix /opt/hermeven run bridge:cli -- fetch-model
HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env npm --prefix /opt/hermeven run bridge:cli -- verify-model
cd /opt/hermeven/app/services/bridge
HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env /opt/node/bin/node --import tsx src/cli.ts fetch-model
HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env /opt/node/bin/node --import tsx src/cli.ts verify-model
```
Every file is checked against the SHA-256 committed in `services/bridge/models/`. The running
service never downloads anything: it re-verifies these files each time it loads the model and
@@ -87,7 +91,9 @@ accurate) and run `fetch-model` again.
`HERMEVEN_BRIDGE_ORIGIN=https://bridge.example.com npm run -w @hermeven/even-client pack`.
10. **Pair.** On the droplet, as the service user with the same environment:
```sh
sudo -u hermeven HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env npm --prefix /opt/hermeven run bridge:cli -- pair
cd /opt/hermeven/app/services/bridge
runuser -u hermeven -- env HOME=/var/lib/hermeven HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env \
/opt/node/bin/node --import tsx src/cli.ts pair
```
11. **Origin.** Open the phone page, read Diagnostics, "Page origin", put it in
`HERMEVEN_ALLOWED_ORIGINS`, restart the service.
+67
View File
@@ -0,0 +1,67 @@
# Droplet deployment record, 2026-11-21
First deployment of the bridge. Done by Claude over SSH with Dan's approval for each kind of
change. This is evidence about the server only. **Nothing here involved the glasses or a phone.**
## Where
| Item | Value |
|---|---|
| Host | The existing Hermes droplet (Ubuntu 24.04, 4 vCPU "DO-Premium-AMD", 8 GB RAM), not a new one |
| Public name | `hermeven.xylo.gg` |
| Deployed commit | `f02715fb6487f4e2ff0adeccfaad2403e1724aa5` (the commit Cody marked SHIP), copied with `git archive` |
| Hermes | v0.23.1; profile `default` (Pepper) |
## What was changed on the server
| Change | Detail |
|---|---|
| Retired the unfinished browser-extension service | `hermes-extension-api-v0222` (crash-looping on a missing module) and `hermes-fury-extension-tunnel` (an SSH reverse tunnel of port 8642 to Dan's desktop) stopped and disabled. Unit files left in place. |
| Rotated `API_SERVER_KEY` | The old key was also in the retired extension's environment file. New 64-character key. |
| Enabled the Hermes API server | `platforms.api_server.enabled: true`, loopback `127.0.0.1:8642`. Gateway restarted once; about 33 s of downtime for `default`, `cody`, `natalie`, `wendy`. |
| Backups | The previous `config.yaml` and `.env` are in `~hermes/.hermes/backups/hermeven-20261121T195611Z/` (mode 600). |
| Node.js | v22.23.5 from nodejs.org, SHA-256 verified, at `/opt/node`. |
| Service user and state | `hermeven` (system user); `/var/lib/hermeven` 0700. |
| Bridge | `/opt/hermeven/app`, dependencies installed as `hermeven`, tree owned by root. Service `hermeven-bridge` on `127.0.0.1:8787`. |
| Speech model | Pinned `whisper-base` fetched and verified into `/opt/hermeven/models` (root-owned, read-only to the service). |
| Caddy | Ubuntu package 2.6.2; Let's Encrypt certificate obtained. Proxies `/v1/*` and `/healthz` to the bridge; serves the built client from `/opt/hermeven/www`. |
| Firewall | 80 and 443 opened. 8787 and 8642 are not reachable from outside. |
## Differences from the written guide (now corrected in it)
- The service starts Node directly (`node --import tsx src/main.ts`) instead of `npm run`.
- The code lives in `/opt/hermeven/app`, not `/opt/hermeven`.
- Caddy also serves the built phone page from the bridge's own origin.
- The built client was compiled on the desktop with the bridge address preset and uploaded.
## What was verified, and how
| Check | Result |
|---|---|
| Hermes API: `/health` | `{"status":"ok","platform":"hermes-agent","version":"0.23.1"}` |
| Hermes API without a key, and with a wrong key | 401, 401 |
| Hermes capabilities | runs, status, stop: true; idempotency supported, durable, 86,400 s |
| Bridge start | `stt.loading` then `stt.ready` in 2.0 s; 462 MB resident |
| State file modes | directory 700; database, WAL, SHM 600; owner `hermeven` |
| Transcription of the 11 s speech fixture, three runs | 2.3 s, 2.1 s, 1.8 s; transcript correct. A 4 s clip: 1.3 s |
| Typed question through the bridge to Pepper (real model) | "pong", outcome `succeeded`, 5.2 s in the agent |
| Follow-up in the same conversation ("what word did you reply with?") | "pong", 1.8 s: Hermes carried the context |
| From outside: `https://hermeven.xylo.gg/healthz` | 200 |
| From outside: `/v1/device` with no credential | 401 |
| From outside: plain HTTP | 308 redirect to HTTPS |
| From outside: ports 8787 and 8642 directly | no connection |
| The other agents and the n8n webhook after the restart | all five profiles `running`; webhook health ok |
The test device used for the two questions was revoked afterwards. Those two questions are real
turns in Pepper's history, in their own session.
## Not verified
- Anything on a phone or the glasses: page load in the Even app, pairing from the phone, the
microphone, the display, locked-phone behaviour.
- Speech from the glasses' microphone. The transcription timings use a clean archive recording.
- A question that makes Pepper use a tool or ask for approval.
- Memory and latency under sustained use; behaviour when Whisper and several agents are busy at once.
- Backups of `/var/lib/hermeven`, log rotation, monitoring, and an upgrade procedure.
- The service was started with these hardening options and loaded the model, but no option was
tested by trying to violate it.