diff --git a/.env.sample b/.env.sample index c3a7d5c..6a81ae3 100644 --- a/.env.sample +++ b/.env.sample @@ -76,6 +76,10 @@ ENCRYPTED_BY_DEFAULT=all #TRACK_PUPPETED_USER_IPS=true +## Room complexity limit (prevents joining large remote rooms that cause DB bloat) +## complexity ≈ state_events / 500. Default 100.0 blocks rooms with >50000 state events. +#ROOM_COMPLEXITY_LIMIT=100.0 + ## Retention ALLOWED_LIFETIME_MAX=4w diff --git a/abra.sh b/abra.sh index 241ef5b..4f90829 100644 --- a/abra.sh +++ b/abra.sh @@ -1,6 +1,6 @@ export DISCORD_BRIDGE_YAML_VERSION=v2 export ENTRYPOINT_CONF_VERSION=v3 -export HOMESERVER_YAML_VERSION=v35 +export HOMESERVER_YAML_VERSION=v36 export LOG_CONFIG_VERSION=v2 export SHARED_SECRET_AUTH_VERSION=v2 export SIGNAL_BRIDGE_YAML_VERSION=v6 diff --git a/compose.yml b/compose.yml index a9209f6..0cc6bd7 100644 --- a/compose.yml +++ b/compose.yml @@ -90,6 +90,7 @@ services: - LOGIN_LIMIT_IP_BURST=${LOGIN_LIMIT_IP_BURST:-5} - LOGIN_LIMIT_ACCOUNT_PER_SECOND=${LOGIN_LIMIT_ACCOUNT_PER_SECOND:-0.003} - LOGIN_LIMIT_ACCOUNT_BURST=${LOGIN_LIMIT_ACCOUNT_BURST:-5} + - ROOM_COMPLEXITY_LIMIT=${ROOM_COMPLEXITY_LIMIT:-100.0} - WEB_CLIENT_LOCATION networks: - internal diff --git a/homeserver.yaml.tmpl b/homeserver.yaml.tmpl index 0fb7002..e51e2d7 100644 --- a/homeserver.yaml.tmpl +++ b/homeserver.yaml.tmpl @@ -69,7 +69,7 @@ admin_contact: 'mailto:{{ env "ADMIN_EMAIL" }}' # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#limit_remote_rooms limit_remote_rooms: enabled: true - complexity: 200.0 + complexity: {{ env "ROOM_COMPLEXITY_LIMIT" }} # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#max_avatar_size max_avatar_size: 10M