F.3: Matrix-Dendrite bundle (federated real-time chat)#12
Open
kh0pper wants to merge 1 commit intof2-writefreely-bundlefrom
Open
F.3: Matrix-Dendrite bundle (federated real-time chat)#12kh0pper wants to merge 1 commit intof2-writefreely-bundlefrom
kh0pper wants to merge 1 commit intof2-writefreely-bundlefrom
Conversation
First multi-container federated bundle and the first exerciser of F.0's
:8448 second-cert path. Stacked on F.2 (WriteFreely).
Dendrite instead of Synapse — Go monolith, lighter footprint, same
client-server API semantics. Two containers on the shared
crow-federation network (dendrite + postgres), no host port publish.
First-boot entrypoint generates signing keys, writes dendrite.yaml, and
prints the registration shared secret to the log.
Bundle (bundles/matrix-dendrite/):
- manifest.json consent_required with explicit EN/ES text on the 8448
either/or federation story, media cache growth risk
(tens of GB from Matrix HQ alone), and hardware-gate
threshold. min_ram_mb=2048, recommended=4096 —
Pi-class (4-8 GB total) will at best be warned once
other bundles are co-installed
- docker-compose.yml dendrite v0.13.8 + postgres:16-alpine. Postgres
isolated to default docker network; Dendrite joins
both default and crow-federation so Caddy can reach
:8008 client-server and :8448 federation listeners.
Entrypoint idempotent: skips key/config generation
when they exist (survives container recreate). Prints
a fresh registration_shared_secret on first boot and
writes it into dendrite.yaml in place
- server/server.js 10 MCP tools:
matrix_status, matrix_joined_rooms,
matrix_create_room, matrix_join_room,
matrix_leave_room, matrix_send_message,
matrix_room_messages, matrix_sync,
matrix_invite_user, matrix_register_appservice,
matrix_federation_health
Content-producing verbs wrapped with the F.0 shared
rate limiter. Alias->ID resolution via
/directory/room/{alias} (federated). Sync is one-shot
(1.5s server timeout by default, returns compact
joined-room deltas — full tree would be megabytes).
federation_health calls the public
federationtester.matrix.org and returns structured
verdict incl. .well-known path + 8448 reachability
- skills/matrix-dendrite.md "pick one" federation table for :8448 vs
.well-known/matrix/server delegation, first-run
bootstrap recipe, F.12 appservice prep notes,
moderation model explanation (room-scoped vs
instance-scoped), E2EE clarification (MCP sends
plaintext — Element handles device keys)
- panel/ status + federation health (green/red badge with error list
from federation tester) + joined rooms preview.
XSS-safe
- scripts/ backup.sh (pg_dump -Fc + signing key tar, warns about
identity-binding), post-install.sh (waits for health,
scrapes secret from logs, prints two-path next-step
guide)
F.12 prep:
matrix_register_appservice returns a YAML registration body + the
install path + restart instructions. The F.12.1 matrix-bridges
meta-bundle will call this tool for each mautrix-* sidecar. Does NOT
restart Dendrite itself — the caller owns restart-with-health-wait
because Dendrite only reloads appservice registrations at startup.
Platform wiring:
- registry/add-ons.json matrix-dendrite entry, federated-comms
category
- skills/superpowers.md EN/ES trigger row
- CLAUDE.md Skills Reference entry
Verified:
- node --check on all changed files
- MCP server boots via createMatrixDendriteServer()
- docker compose -f docker-compose.yml config parses
- registry JSON validates
- bash -n on scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First multi-container federated bundle. First exerciser of F.0's
caddy_add_matrix_federation_portandcaddy_set_wellknownmatrix-server paths. Stacked on F.2.Dendrite instead of Synapse — Go monolith, lighter footprint, same client-server API. Two containers on the shared
crow-federationnetwork (dendrite + postgres), no host port publish. First-boot entrypoint generates signing keys, writesdendrite.yaml, and prints the registration shared secret to the log.Stacked on #11 (F.2). Merge order: #9 → #10 → #11 → this.
What ships
Bundle (`bundles/matrix-dendrite/`)
F.12 prep
`matrix_register_appservice` returns a YAML registration body + install path + restart instructions. The F.12.1 matrix-bridges meta-bundle calls this tool for each mautrix-* sidecar. Does NOT restart Dendrite itself — the caller owns restart-with-health-wait because Dendrite only reloads appservice registrations at startup (plan round-2 review flagged this explicitly).
Design notes
Test plan