Append a PKCE provider to the existing Synapse OIDC configuration. Require explicit account links and preserve Google and password login.
3.0 KiB
chatterbox
The Matrix homeserver for nul.ie (Synapse) and its bridges to other chat networks.
middleman fronts it as matrix.nul.ie for clients and on :8448 for
federation.
- Source:
shill/containers/chatterbox.nix - Host: NixOS container on
shill - nixpkgs:
mine
Role
Synapse
matrix-synapse serves nul.ie at https://matrix.nul.ie, with Element at element.nul.ie.
Port 8008 carries client and federation traffic with forwarded headers, while a localhost manhole
uses port 9000. Registration and guest access are disabled; uploads, dynamic thumbnails and URL
previews are enabled, with preview fetching restricted to middleman.
Pocket ID sign-in
Synapse offers Pocket ID alongside Google and password login.
matrix-synapse appends the Pocket ID provider to the existing provider list at startup.
The matrix client requires PKCE, and new account registration through it is disabled.
Deploy middleman to register the client before deploying chatterbox. For each existing
Matrix account, use Synapse's Admin API from inside chatterbox to link a verified Pocket ID
subject (sub).
- Read the account with
GET /_synapse/admin/v2/users/<matrix-id>. - Send a
PUTfor that account with the existingexternal_idsplus{"auth_provider":"oidc-pocket-id","external_id":"<Pocket ID subject>"}. Include the currentadminvalue to preserve the account's administrator status. - Sign in through Pocket ID in a fresh Element session and verify the Matrix ID is the same. For encrypted rooms, verify the new session or restore from the existing recovery key.
See the Synapse User Admin API.
Bridges
The box runs heisenbridge for IRC, mautrix-whatsapp, and two mautrix-meta instances for
Messenger and Instagram. The mautrix bridges use colony-psql, default to
end-to-end encryption, and share the secret doublepuppet.yaml registration for double puppeting
onto nul.ie. The firewall admits ports 8008 and 8009 in addition to netdata.
Network assignments
See the consolidated network assignments table (this box: chatterbox).
Notes
- Synapse's real database config lives in the
chatterbox/synapse.yamlage secret — options only merge at the top level, so the base config carries a dummysqlite3block to satisfy the module defaults. The signing key is also an age secret. olm-3.2.16is allowed viapermittedInsecurePackages(a nixpkgs E2EE library issue).- The bridge services get
ffmpegon theirPATHfor GIF→video conversion.
Notable config files
nixos/boxes/colony/vms/shill/containers/chatterbox.nix— container definition, Synapse settings and all bridge configuration