add delegation for federation etc

This commit is contained in:
2024-09-09 20:16:31 +02:00
parent 1974d24aff
commit 1a6ba90529

View File

@@ -19,13 +19,15 @@ Default DB is SQLite.
3. (optional) Set db in config: `nano ${BASEDIR:-.}/files/synapse/homeserver.yaml` 3. (optional) Set db in config: `nano ${BASEDIR:-.}/files/synapse/homeserver.yaml`
4. Edit element config: `nano ${BASEDIR:-.}/files/element-config.json` 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 ```json
{ {
"default_server_name": "ao-it.net",
"default_server_config": { "default_server_config": {
"m.homeserver": { "m.homeserver": {
"base_url": "https://ao-it.net", "base_url": "https://ao-it.net",
"server_name": "ao-it.net" "server_name": "matrix.org"
}, },
... ...
``` ```
@@ -81,6 +83,9 @@ database:
### caddy config ### caddy config
#### synapse #### 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 { synapse.example.com {
reverse_proxy /_matrix/* $IPOFDOCKERHOST:8008 reverse_proxy /_matrix/* $IPOFDOCKERHOST:8008
@@ -96,6 +101,10 @@ synapse.example.com {
X-Robots-Tag none X-Robots-Tag none
-server -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://cyberhost.uk/element-matrix-setup/
- https://raw.githubusercontent.com/vector-im/element-web/v1.5.13/config.sample.json - 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://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 [^jitsi]: https://github.com/element-hq/element-web/blob/develop/docs/jitsi.md