working on configurable room complexity limits

This commit is contained in:
notplants
2026-04-30 15:06:54 -04:00
parent a809333dcb
commit f66bfef727
4 changed files with 7 additions and 2 deletions

View File

@ -76,6 +76,10 @@ ENCRYPTED_BY_DEFAULT=all
#TRACK_PUPPETED_USER_IPS=true #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 ## Retention
ALLOWED_LIFETIME_MAX=4w ALLOWED_LIFETIME_MAX=4w

View File

@ -1,6 +1,6 @@
export DISCORD_BRIDGE_YAML_VERSION=v2 export DISCORD_BRIDGE_YAML_VERSION=v2
export ENTRYPOINT_CONF_VERSION=v3 export ENTRYPOINT_CONF_VERSION=v3
export HOMESERVER_YAML_VERSION=v35 export HOMESERVER_YAML_VERSION=v36
export LOG_CONFIG_VERSION=v2 export LOG_CONFIG_VERSION=v2
export SHARED_SECRET_AUTH_VERSION=v2 export SHARED_SECRET_AUTH_VERSION=v2
export SIGNAL_BRIDGE_YAML_VERSION=v6 export SIGNAL_BRIDGE_YAML_VERSION=v6

View File

@ -90,6 +90,7 @@ services:
- LOGIN_LIMIT_IP_BURST=${LOGIN_LIMIT_IP_BURST:-5} - LOGIN_LIMIT_IP_BURST=${LOGIN_LIMIT_IP_BURST:-5}
- LOGIN_LIMIT_ACCOUNT_PER_SECOND=${LOGIN_LIMIT_ACCOUNT_PER_SECOND:-0.003} - LOGIN_LIMIT_ACCOUNT_PER_SECOND=${LOGIN_LIMIT_ACCOUNT_PER_SECOND:-0.003}
- LOGIN_LIMIT_ACCOUNT_BURST=${LOGIN_LIMIT_ACCOUNT_BURST:-5} - LOGIN_LIMIT_ACCOUNT_BURST=${LOGIN_LIMIT_ACCOUNT_BURST:-5}
- ROOM_COMPLEXITY_LIMIT=${ROOM_COMPLEXITY_LIMIT:-100.0}
- WEB_CLIENT_LOCATION - WEB_CLIENT_LOCATION
networks: networks:
- internal - internal

View File

@ -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 # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#limit_remote_rooms
limit_remote_rooms: limit_remote_rooms:
enabled: true 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 # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#max_avatar_size
max_avatar_size: 10M max_avatar_size: 10M