diff --git a/README.md b/README.md index d7a4cad..c78c121 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ Matrix bot and server improvements for the Lotus Guild homeserver (`matrix.lotus **Repo**: https://code.lotusguild.org/LotusGuild/matrixBot -## Status: Planning +## Status: Phase 1 Complete (Database + Voice/Video) --- ## Priority Order (suggested) -1. PostgreSQL migration (SQLite will bottleneck everything else) -2. TURN server (makes voice/video actually reliable) +1. ~~PostgreSQL migration (SQLite will bottleneck everything else)~~ +2. ~~TURN server (makes voice/video actually reliable)~~ 3. Custom Element Web (chat.lotusguild.org with branding) 4. Discord bridge (lets people transition gradually) 5. Custom emoji packs (makes it feel like home) @@ -21,12 +21,32 @@ Matrix bot and server improvements for the Lotus Guild homeserver (`matrix.lotus --- +## Infrastructure + +| Service | Host | IP | LXC | Notes | +|---------|------|-----|-----|-------| +| Synapse | storage-01 | 10.10.10.29 | 151 | Homeserver + coturn | +| PostgreSQL 17 | storage-01 | 10.10.10.44 | 109 | Synapse database backend | +| NPM | large1 | 10.10.10.27 | 139 | Reverse proxy for matrix.lotusguild.org | + +**Key paths on Synapse LXC (10.10.10.29):** +- Synapse config: `/etc/matrix-synapse/homeserver.yaml` +- Synapse venv: `/opt/venvs/matrix-synapse/` +- coturn config: `/etc/turnserver.conf` +- SQLite backup: `/var/lib/matrix-synapse/homeserver.db` + +**Port forwarding (router -> 10.10.10.29):** +- TCP+UDP 3478 (TURN signaling) +- UDP 49152-65535 (media relay) + +--- + ## Server - Quality of Life -- [ ] Migrate from SQLite to PostgreSQL (critical for performance at any real scale) -- [ ] Enable URL previews in Synapse (preview_url in homeserver.yaml) -- [ ] Increase upload size limit for media/GIFs (default is 50MB, may want higher) -- [ ] Enable message search (full-text search requires Synapse config + postgres) -- [ ] Set up TURN/STUN server (coturn) for reliable voice/video calls behind NAT +- [x] Migrate from SQLite to PostgreSQL (critical for performance at any real scale) +- [x] Set up TURN/STUN server (coturn) for reliable voice/video calls behind NAT +- [x] Enable URL previews in Synapse +- [x] Increase upload size limit for media/GIFs (200MB) +- [x] Enable message search (full-text search with PostgreSQL backend) - [ ] Enable push notifications gateway for mobile clients - [ ] Configure media retention policy (auto-cleanup old remote media) - [ ] Set up sliding sync proxy (faster room loading in Element) @@ -139,7 +159,7 @@ Matrix bot and server improvements for the Lotus Guild homeserver (`matrix.lotus - [ ] Systemd service (`matrixbot.service`) - [ ] Auto-deploy from Gitea webhook (matching Discord bot pattern) - [ ] Deployment script (`/usr/local/bin/matrix_bot_deploy.sh`) -- [ ] Determine host LXC (new container or colocate with Synapse on 10.10.10.205) +- [ ] Determine host LXC (new container or colocate with Synapse on 10.10.10.29) ## Bot - Not Porting (Discord-specific) - Reaction roles (no Matrix equivalent) @@ -151,7 +171,9 @@ Matrix bot and server improvements for the Lotus Guild homeserver (`matrix.lotus ## Tech Stack - **Language**: Python 3 - **Library**: matrix-nio (with E2EE) -- **Homeserver**: matrix.lotusguild.org (Synapse on 10.10.10.205) +- **Homeserver**: matrix.lotusguild.org (Synapse on 10.10.10.29) +- **Database**: PostgreSQL 17 on 10.10.10.44 +- **TURN**: coturn on 10.10.10.29 (colocated with Synapse) - **Dependencies**: matrix-nio[e2ee], aiohttp, python-dotenv, mcrcon ## Production Server