From 1a6ba90529c5e72e54d6dcdd7511195d483f1d4f Mon Sep 17 00:00:00 2001 From: Schreiner Pascal Date: Mon, 9 Sep 2024 20:16:31 +0200 Subject: [PATCH] add delegation for federation etc --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ee4c64b..2b611c3 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,15 @@ Default DB is SQLite. 3. (optional) Set db in config: `nano ${BASEDIR:-.}/files/synapse/homeserver.yaml` 4. Edit element config: `nano ${BASEDIR:-.}/files/element-config.json` - 1. set "server_name" to your domain for Synapse + 1. set "default_server_name" to your domain for Synapse + - must be manually add in first indention from json, was removed from newer versions (?) ```json { + "default_server_name": "ao-it.net", "default_server_config": { "m.homeserver": { "base_url": "https://ao-it.net", - "server_name": "ao-it.net" + "server_name": "matrix.org" }, ... ``` @@ -81,6 +83,9 @@ database: ### caddy config #### synapse +1) replace "matrix.example.com" with your servername! twice ! +this "delegation" is need to NOT open port 8448 to your synapse + ``` synapse.example.com { reverse_proxy /_matrix/* $IPOFDOCKERHOST:8008 @@ -96,6 +101,10 @@ synapse.example.com { X-Robots-Tag none -server } + header /.well-known/matrix/* Content-Type application/json + header /.well-known/matrix/* Access-Control-Allow-Origin * + respond /.well-known/matrix/server `{"m.server": "matrix.example.com:443"}` + respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://matrix.example.com"}}` } ``` @@ -131,5 +140,6 @@ element.example.com { - https://cyberhost.uk/element-matrix-setup/ - https://raw.githubusercontent.com/vector-im/element-web/v1.5.13/config.sample.json - https://github.com/element-hq/element-web/blob/develop/docs/jitsi.md +- https://element-hq.github.io/synapse/latest/delegate.html#well-known-delegation -[^jitsi]: https://github.com/element-hq/element-web/blob/develop/docs/jitsi.md \ No newline at end of file +[^jitsi]: https://github.com/element-hq/element-web/blob/develop/docs/jitsi.md