Matrix Server (Synapse)
Overview
IMVEE uses Synapse as the Matrix homeserver. Synapse is the reference implementation of the Matrix protocol and natively supports Sliding Sync (MSC3575) from v1.114 onwards — required for Element X (iPhone/Mac).
| Property | Value |
|---|---|
| Server (client) | matrix.dev.imvee.de |
| server_name | matrix.imvee.de (user/room IDs bound) |
| Version | Synapse v1.127.1 |
| Namespace | imvee-dev |
| Service | synapse:8008 |
| Database | PostgreSQL: synapse_db / synapse_user |
| Sliding Sync | org.matrix.simplified_msc3575 ✅ |
| Manifests | orchestrator/k8s/matrix/ |
Why Synapse Instead of Dendrite?
Dendrite (Go-based) was originally used as a lightweight alternative. Dendrite does not support Sliding Sync — Element X cannot be used with it. Synapse is battle-tested, production-ready and supports all modern Matrix features.
Rooms
| Room | ID | Purpose |
|---|---|---|
| Orchestration | !PIJhngKgyWiqcHRvYJ:matrix.imvee.de | Orchestrator Agent communication |
| IMVEE SOCsuite (Dev) | !CBWqrVXCAOkHHTtCGD:matrix.imvee.de | SOCSuite development |
Configuration
Manifest path: orchestrator/k8s/matrix/
| File | Content |
|---|---|
configmap.yaml | synapse-config ConfigMap — homeserver.yaml (secret-free) + log.config |
deployment.yaml | Synapse Deployment + Service (port 8008) |
pvc.yaml | synapse-data-pvc (10Gi) — signing key + media store |
serviceaccount.yaml | ServiceAccount synapse + NetworkPolicy synapse-netpol |
httproute.yaml | Gateway-API HTTPRoute matrix-route (backend synapse:8008) |
kustomization.yaml | Kustomize aggregation + labels |
Secret pattern: projected volume
DB credentials and registration_shared_secret are never in the ConfigMap — they live in the k8s secret synapse-secret as a YAML snippet. Synapse merges the ConfigMap and the Secret at runtime via projected volume mounted under /config/:
args:
- run
- --config-path=/config/homeserver.yaml # ConfigMap
- --config-path=/config/50-db-creds.yaml # SecretKey config parameters:
server_name: "matrix.imvee.de"
public_baseurl: "https://matrix.dev.imvee.de"
enable_registration: false
experimental_features:
msc3575_enabled: true # Sliding Sync for Element XCheck Status
# Pod status
kubectl get pods -n imvee-dev -l app=synapse
# Logs
kubectl logs -n imvee-dev deploy/synapse
# Matrix versions (incl. Sliding Sync)
curl -s https://matrix.dev.imvee.de/_matrix/client/versions | python3 -c "
import json,sys; r=json.load(sys.stdin)
print('Sliding Sync:', 'org.matrix.simplified_msc3575' in r.get('unstable_features', {}))
"
# Health
curl -s https://matrix.dev.imvee.de/_matrix/client/versions | python3 -m json.tool | head -5Set Up Element X (iPhone/Mac)
- Install Element X from the App Store
- Server:
https://matrix.dev.imvee.de - Login with your Matrix user and password
- Rooms are already joined: Orchestration and IMVEE SOCsuite (Dev)
The Let's Encrypt certificate (*.dev.imvee.de) is automatically trusted by Element X — no manual Keychain entry needed.
Troubleshooting
Synapse does not start — permission error on log file
Cause: log_config points to /data/log.config (generated by --generate-keys with FileHandler).
Fix: In homeserver.yaml ensure log_config: "/config/log.config" points to /config/ (not /data/).
Element X: "Server not supported"
Cause: Server does not support Sliding Sync.
Check: curl https://matrix.dev.imvee.de/_matrix/client/versions | grep msc3575
Postgres connection fails
NetworkPolicy postgres-netpol must allow app: synapse — check in socsuite/infrastructure/k8s/base/postgres/networkpolicy.yaml.
Important Operational Notes
Dendrite remnants can shadow Synapse
If a Dendrite deployment or service is still running in the cluster, Traefik may select the wrong backend or certificate via SNI. Check:
kubectl get all,pvc,cm,netpol,secret -n imvee-dev | grep dendriteShould return nothing. If it does, run ./orchestrator/k8s/matrix/install.sh --cleanup-dendrite.
Certificate check for matrix.dev.imvee.de
matrix.dev.imvee.de is served through the Gateway listener websecure (443, hostname
*.dev.imvee.de) with the Let's Encrypt wildcard imvee-tls. The former SNI conflict
(internal CA certificate covering matrix.imvee.de, selected by Traefik over the
public one) is gone with the move to matrix.dev.imvee.de (Dev_o-151) — matrix.imvee.de
is no longer an active route.
Check (SANs of the served certificate):
kubectl get secret imvee-tls -n imvee-dev \
-o jsonpath='{.data.tls\.crt}' | base64 -d | openssl x509 -noout -text | grep "Subject Alternative" -A2Expected: DNS:*.dev.imvee.de (issuer Let's Encrypt).
Check HTTPRoute after kubectl apply
After every kubectl apply -k ensure the HTTPRoute points to synapse:
kubectl get httproute matrix-route -n imvee-dev \
-o jsonpath='{.spec.rules[0].backendRefs[0].name}'
# Expected: synapseIf still wrong:
kubectl apply -k orchestrator/k8s/matrix/