Files
Alvis b8efe4732d Sync infra config: HA/Zabbix relocation, Immich storage move, new services
Accumulated uncommitted infra changes:
- Caddyfile: repoint HA/Zabbix to 192.168.1.4/.3, add ~20 new site routes
- Immich: move media to /mnt/smsg, enable CUDA ML, mem limits, rewrite backup.sh
- Add service stacks: agap-mcp, anki, family, freshrss, iperf3, kanboard,
  linkwarden, qbittorrent, radicale, syncthing, vikunja, windows
- openwebui: enable API keys; ollama: drop CPU fallback
- seafile/zabbix: extra_hosts entries; matrix: add user juris
- Remove pihole stack and stale wiki/migrate.py
- Ignore marketplace-mcp (standalone repo) and linkwarden runtime data

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
2026-07-04 13:28:04 +00:00
..

Matrix Home Server

Self-hosted Matrix homeserver running on mtx.alogins.net.

Stack

Service Purpose
Synapse Matrix homeserver
PostgreSQL Synapse database
LiveKit MatrixRTC media server (calls)
lk-jwt-service LiveKit JWT auth for Matrix users
coturn TURN/STUN server (ICE fallback)

Clients

  • Element X (Android/iOS) — recommended, full call support
  • FluffyChat — messaging only, calls not supported

Connect clients to: https://mtx.alogins.net

Users

Username Admin
admin yes
elizaveta no
aleksandra no
juris no

Managing Users

# Add user
docker exec synapse register_new_matrix_user \
  -c /data/homeserver.yaml \
  -u <username> -p <password> --no-admin \
  http://localhost:8008

# Add admin
docker exec synapse register_new_matrix_user \
  -c /data/homeserver.yaml \
  -u <username> -p <password> -a \
  http://localhost:8008

Start / Stop

cd /home/alvis/agap_git/matrix

docker compose up -d       # start all
docker compose down        # stop all
docker compose restart     # restart all
docker compose ps          # status
docker compose logs -f     # logs

Caddy

Entries in /home/alvis/agap_git/Caddyfile:

Domain Purpose
mtx.alogins.net Synapse + well-known
lk.alogins.net LiveKit SFU
lkjwt.alogins.net LiveKit JWT service

Deploy Caddyfile changes:

sudo cp /home/alvis/agap_git/Caddyfile /etc/caddy/Caddyfile && sudo systemctl reload caddy

Firewall Ports Required

Port Protocol Service
443 TCP Caddy (HTTPS)
3478 UDP+TCP coturn TURN
5349 UDP+TCP coturn TURNS
7881 TCP LiveKit
49152-65535 UDP coturn relay
50100-50200 UDP LiveKit media

Data Locations

Data Path
Synapse config & media ./data/synapse/
PostgreSQL data ./data/postgres/
LiveKit config ./livekit/livekit.yaml
coturn config ./coturn/turnserver.conf

First-Time Setup (reference)

# Generate Synapse config
docker run --rm \
  -v ./data/synapse:/data \
  -e SYNAPSE_SERVER_NAME=mtx.alogins.net \
  -e SYNAPSE_REPORT_STATS=no \
  matrixdotorg/synapse:latest generate

# Edit database section in data/synapse/homeserver.yaml, then:
docker compose up -d