Co-authored-by: Claude (Opus 4.6) <claude@hermes.local> Co-committed-by: Claude (Opus 4.6) <claude@hermes.local>
1.3 KiB
1.3 KiB
Operator Setup Guide
Timmy's Nostr Identity
Timmy uses a secp256k1 Nostr keypair for his on-chain identity. Without a
persisted key, Timmy generates a new ephemeral identity on every restart —
losing continuity with anyone who knew his previous npub.
One-time setup
-
Generate a keypair:
bash scripts/generate-timmy-nsec.shThis prints the
nsec1...(private key),npub1...(public key), and anexportline you can copy-paste. -
Set the environment variable in your deployment environment:
- Replit: Add
TIMMY_NOSTR_NSECin the Secrets tab (padlock icon). - VPS (systemd): Add to
/opt/timmy-tower/.env:TIMMY_NOSTR_NSEC=nsec1... - Local dev: Export in your shell or add to a
.envfile:export TIMMY_NOSTR_NSEC="nsec1..."
- Replit: Add
-
Restart the API server. On startup you should see an
INFOlog:timmy-identity INFO timmy identity loaded from env { npub: "npub1..." }If you see a
WARNinstead, the env var is missing or malformed.
Security
- The
nsecis a private key — treat it like a password. - Never commit it to version control.
- Never log it or expose it in API responses.
- If compromised, generate a new keypair and update all references to the old
npub.