Sanitized reference stack for a self-hosted Matrix homeserver, bridges, monitoring, backups, migration tooling, and an old-account autoreply service.
  • Shell 76.7%
  • Python 23.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-04 09:32:38 +02:00
bridges Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
coturn Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
docs Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
examples Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
host Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
scripts Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
synapse Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
systemd Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
.env.example Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
.gitignore Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
compose.yaml Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
LICENSE Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
README.md Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
REVIEW-NOTES.md Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00
SECURITY.md Initial sanitized Matrix stack reference 2026-09-04 09:32:38 +02:00

Self-Hosted Matrix Stack

A sanitized, reproducible reference for running Synapse, PostgreSQL, Coturn and five Mautrix bridges on a small ARM64 server. It also includes the operational jobs used to recover services after boot, monitor bridge logins and NVMe health, update Coturn behind dynamic IPv4, create verified NAS backups, test database restores quarterly, and answer direct messages sent to a retired Matrix account.

This repository contains source and example configuration only. It does not contain a production database, media, bridge sessions, encryption stores, access tokens, appservice tokens, signing keys, sync cursors, device IDs, real domains, addresses, accounts, rooms, email addresses, NAS paths or SSH keys.

Included

  • compose.yaml: PostgreSQL and Synapse
  • bridges/: Telegram, WhatsApp, Signal, Discord and LinkedIn bridge examples
  • coturn/: TURN container and configuration example
  • synapse/: homeserver, logging and appservice examples
  • scripts/: recovery, monitoring, backup, restore and retired-account autoreply
  • systemd/: services and timers for those scripts
  • host/: optional ZRAM example
  • docs/: architecture, setup, security and operations notes

Important

Every CHANGE_ME_*, example.com and documentation address must be replaced before deployment. Generate new appservice registrations, Synapse secrets, signing keys, database passwords, TURN secrets and a dedicated backup SSH key. Never reuse values from another installation.

Run ./scripts/validate.sh before committing or publishing changes.

License

Original code in this repository is available under GPL-2.0-or-later. Third-party containers and software keep their own licenses.