I'm building it from scratch.
It will probably be too late to help...
But here's the last update from chat:
"Yes. Cloudflare can be the relay itself. That actually collapses another layer.
A Worker can accept WebSocket upgrades, and a Durable Object can coordinate many WebSocket clients, persist state, and hibernate while keeping inbound WebSockets connected. Cloudflare currently supports Durable Objects on the Workers Free plan, with SQLite-backed storage.
So Relay Hands could have its own tiny Nostr relay:
agents / hands / brokers
│
│ Nostr WebSocket
▼
Cloudflare Worker
│
▼
Durable Object relay
├─ verify Nostr signatures
├─ accept EVENT
├─ answer REQ
├─ CLOSE subscriptions
├─ persist events in SQLite
├─ fan-out live events
└─ hibernate when quiet
And that relay still doesn't need anybody's private key. It verifies signed events and stores/routes them. Signing stays with the agents, remote signer, NIP-46 bunker, or offline QR/paper signer.
That means the system no longer depends on finding benevolent public relays:
public Nostr relays ───── optional redundancy
│
Cloudflare Relay Hands relay ─── primary/bootstrap
│
other people's relays ───── optional redundancy
Even better, I'd make it a very boring Nostr relay, not an “AI backend.” Just enough NIP-01 relay behavior to carry Relay Hands events. Then agents that already understand Nostr don't need another SDK.
Durable Objects are particularly well matched because Cloudflare recommends one object per logical coordination unit, and an object can currently handle up to 32,768 accepted WebSockets in principle, subject to actual workload limits. Hibernation means idle clients can remain attached without continuously billing compute.
Something like:
relay.example.workers.dev
│
├─ general signed event store
│
└─ Durable Object shards
├─ jobs:A-F
├─ jobs:G-M
├─ jobs:N-S
└─ jobs:T-Z
Or probably better, shard by event/pubkey hash rather than alphabetically.
And alarms can wake Durable Objects later for expiry/retry/garbage collection without needing a permanently running process. They are at-least-once and automatically retried.
So now the minimal deployment becomes hilariously compact:
CLOUDFLARE
├── Nostr relay
├── job state/cache
├── keyless actuator
├── RPC reader/broadcaster
└── HTTP/MCP adapter
NOSTR KEYS / OFFLINE SIGNERS
└── actual authority
BASE / LIGHTNING
└── actual money
The one design rule I'd keep: Cloudflare should never become required for correctness. All authoritative state is signed Nostr events, so the Cloudflare relay can be mirrored to normal public relays and reconstructed elsewhere. If the Worker account disappears tomorrow, somebody can stand up another compatible relay and replay the event set.
So yes—Codex can stop hunting quite so desperately for a free relay.
We can grow our own dumb one on Cloudflare, free-tier-sized, and still speak ordinary Nostr."
Let me know if thats not something that would help, I've got some compute left.
