Add public nostr submission relay and approved-content sync #705

Merged
raucao merged 8 commits from feature/nostr_submission_relay into master 2026-11-18 11:09:47 +00:00
8 Commits
Author SHA1 Message Date
raucao f50abc655a Update nodes 2026-11-18 15:08:34 +04:00
raucao 9585dd5ba7 Merge remote-tracking branch 'origin/master' into feature/nostr_submission_relay 2026-11-18 14:31:20 +04:00
raucao 1b1e2fbb3d Runbook: document the deployed state and fix the NIP-11 check
The submission relay and both promotion paths are live in production, so the
runbook no longer claims that nothing has been deployed. Reframe the deployment
order and pre-go-live checks as completed, and fix the verification command:
strfry only returns the NIP-11 JSON with an Accept header, so the old
curl | jq pipeline could never work.
2026-11-18 14:31:00 +04:00
raucao ab60ae1ea8 Set nofiles in the approved-sync config
strfry raises RLIMIT_NOFILE to relay.nofiles at startup and exits if that exceeds the process hard limit. The sync config omitted nofiles, so strfry used its compiled-in default (1000000) while the systemd default here is 524288, and strfry-sync.service failed to start with:

  Unable to set NOFILES limit to 1000000, exceeds max of 524288

Set nofiles explicitly (from the production relay config, falling back to 524288, as the production template does) and extend the regression test to assert it.
2026-11-18 01:19:09 +04:00
raucao 128e9ce585 Add chef-managed member bridge (strfry router, LDAP-only)
Add kosmos_strfry::member_bridge: a strfry router stream group that subscribes to the local submission relay (ws://localhost:7778) and writes member-authored events into the production database. dir = "down" keeps it strictly one-way, and pluginDown is the new LDAP-only policy (ldap-only-policy.ts) from akkounts extras/strfry, so membership is decided per event by LDAP with no member list.

The two promotion paths (approved_sync, member_bridge) are enabled as role overrides in role[strfry_submission], not in the production environment config.

Also add a render regression test for the router config and update the runbook.

Refs raucao/marco#97.
2026-11-18 00:32:05 +04:00
raucao 366b308c1d Update nodes 2026-11-17 23:29:32 +04:00
raucao 5913bca004 Document the live DNS CNAME and the verified LMDB concurrency gate
submit.nostr.kosmos.org is now a CNAME to lb.kosmos.org, so the "add an
A/AAAA record" step is replaced by "verify the CNAME resolves". Also record
the LMDB concurrency test result: a strfry sync ran against the same LMDB
while the live relay served 13/13 subscriptions on the nuc's :7777 mirror.
2026-11-17 19:25:36 +04:00
raucao 511a512908 Add public nostr submission relay and approved-content sync
Add a second strfry instance and the machinery to promote moderated content
into the members relay, for raucao/marco#97.

New role[strfry_submission] and the kosmos_strfry_submission cookbook run a
separate relay (port 7778, own DB capped at a 4 GiB mapsize) fronted at
submit.nostr.kosmos.org, using the open submission write policy from akkounts
extras/strfry. It is deliberately not role[strfry], so nginx never adds it to
the members relay's _strfry upstream.

Add kosmos_strfry::approved_sync: a dedicated fail-closed sync config plus a
5-minute timer that pulls moderator-approved content from the nuc staging relay
into the members relay. The sync command URL and STAGING_RELAY_URL come from a
single attribute so the policy's byte-exact source match cannot drift.

Also add a role-scoped Node 22 install (the global Node attribute is
untouched), a proxy-scoped firewall rule, an nginx site, a runbook, and a
render regression check for the sync template.

Deployment is gated: approved_sync.enabled defaults to false, and the akkounts
policy files must be on the live branch before converging.
2026-11-17 14:23:03 +04:00