From c5426292649c917a3b33c5b9584f7925a5b6761a Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Wed, 6 Apr 2022 12:57:41 +0200 Subject: [PATCH] add SERVE_SERVER_WELLKNOWN variable This config allows matrix-synapse to create a endpoint on $DOMAIN/.well-known/matrix/server used for federation. It's a straight forward way (no port opening required) to enable federation if you are okay having a subdomain (matrix.example.org) as your homeserver address. --- .env.sample | 3 +++ compose.yml | 1 + homeserver.yaml.tmpl | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.env.sample b/.env.sample index a1daca8..d3dfcc4 100644 --- a/.env.sample +++ b/.env.sample @@ -15,6 +15,9 @@ COMPOSE_FILE="compose.yml" #DISABLE_FEDERATION=1 +# Set "true" to enable federation endpoint on $DOMAIN/.well-known/matrix/server +SERVE_SERVER_WELLKNOWN=false + ENABLE_REGISTRATION=false PASSWORD_LOGIN_ENABLED=true diff --git a/compose.yml b/compose.yml index fa7fccd..8b8dcf4 100644 --- a/compose.yml +++ b/compose.yml @@ -25,6 +25,7 @@ services: - PASSWORD_LOGIN_ENABLED - REDACTION_RETENTION_PERIOD - ROOT_LOG_LEVEL + - SERVE_SERVER_WELLKNOWN - SQL_LOG_LEVEL - STACK_NAME - SYNAPSE_ADMIN_EMAIL diff --git a/homeserver.yaml.tmpl b/homeserver.yaml.tmpl index 0d93752..7fa0752 100644 --- a/homeserver.yaml.tmpl +++ b/homeserver.yaml.tmpl @@ -85,7 +85,7 @@ public_baseurl: https://{{ env "DOMAIN" }}/ # # Defaults to 'false'. # -#serve_server_wellknown: true +serve_server_wellknown: {{ env "SERVE_SERVER_WELLKNOWN" }} # Set the soft limit on the number of file descriptors synapse can use # Zero is used to indicate synapse should set the soft limit to the