Run your own encrypted chat server for the family, with WhatsApp bridged in
Your family's chats on a server you own, at addresses like @mum:yourname.co.uk, end-to-end encrypted, and able to talk to anyone else on Matrix the way email talks to any other email server. Add bridges and your WhatsApp and Telegram chats appear in the same app. You'll check how a real Matrix server is wired up before you rent anything.
- WhatsApp and Telegram bridged into the same app with mautrix v0.2609.0
- A kit: Docker Compose stack, Caddyfile, config edits, delegation files, server checker, invite guide and backup script
- A Linux VPS with 2 vCPUs and 4GB RAM (or a home server with ports 80 and 443 reachable). Set one up with Self-host n8n on a VPS and lock it down with Harden a server
- Your own domain with DNS you control: Your own domain with HTTPS
- Docker and Docker Compose on the server: Docker without fear
- For the Telegram bridge, your own Telegram API ID and hash from my.telegram.org; WhatsApp needs only your phone
How Matrix works, and a look at a real server
Understand homeservers, federation and delegation, and see them on a live server.
Matrix is email for chatEvery user lives on a homeserver (
@mum:yourname.co.uk), and homeservers talk to each other over an open protocol, so your family can chat with friends on matrix.org or any other server. Rooms are copied to every server that has a member in them. Messages are end-to-end encrypted between devices: the server stores ciphertext.The parts you'll runSynapse is the reference homeserver, maintained by Element. PostgreSQL stores everything. Caddy handles HTTPS. Clients (Element, FluffyChat) talk to Synapse's client API; other servers talk to its federation API.
DelegationYour addresses can end in
yourname.co.ukwhile the server itself runs atmatrix.yourname.co.uk. Two small JSON files athttps://yourname.co.uk/.well-known/matrix/tell clients and servers where to go. That's how big organisations host Matrix too. The kit's check_matrix.py shows the whole chain for any domain:Any computer with Pythonpython check_matrix.py mozilla.orgOutputChecking mozilla.org PASS well-known client https://mozilla.modular.im PASS well-known client CORS header * PASS well-known server (delegation) mozilla.modular.im:443 PASS client API 20 spec versions, newest v1.12 PASS federation API Synapse 1.162.0+pro.1 PASS matrix.org federation tester FederationOKMozilla's users are
@name:mozilla.org, but their server lives on a hosting provider's domain, on port 443, delegated by those two files. You're about to build exactly this. The kit: Download the kit or open kit.md.CarefulChoose your server name carefully: Synapse'sserver_nameis part of every user ID and can't be changed later. Use the domain you'll keep for years.