Synapse: Add remote media lifetime + reformat file.

This commit is contained in:
Viyurz 2024-01-12 15:20:57 +01:00
parent bbeb86e678
commit 9f7d4119ae

View file

@ -1,14 +1,9 @@
# Configuration file for Synapse.
#
# This is a YAML file: see [1] for a quick introduction. Note in particular
# that *indentation is important*: all the elements of a list or dictionary
# should have the same indentation.
#
# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
#
# For more information on how to configure Synapse, including a complete accounting of # For more information on how to configure Synapse, including a complete accounting of
# each option, go to docs/usage/configuration/config_documentation.md or # each option, go to docs/usage/configuration/config_documentation.md or
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html # https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
# Server
server_name: "viyurz.fr" server_name: "viyurz.fr"
pid_file: /data/homeserver.pid pid_file: /data/homeserver.pid
listeners: listeners:
@ -20,6 +15,12 @@ listeners:
- names: [client, federation] - names: [client, federation]
compress: false compress: false
# Homeserver blocking
max_avatar_size: 2M
# Database
database: database:
name: psycopg2 name: psycopg2
args: args:
@ -30,17 +31,17 @@ database:
cp_min: 5 cp_min: 5
cp_max: 10 cp_max: 10
log_config: "/data/viyurz.fr.log.config"
media_store_path: /data/media_store
enable_registration: true
registration_requires_token: true
report_stats: true
signing_key_path: "/data/viyurz.fr.signing.key"
trusted_key_servers:
- server_name: "matrix.org"
# max_upload_size: 50M # Changer aussi le max_body_size dans le reverse proxy # Logging
max_avatar_size: 2M log_config: "/data/viyurz.fr.log.config"
# Media Store
media_store_path: /data/media_store
# Changer aussi le max_body_size dans le reverse proxy
max_upload_size: 50M
media_retention:
remote_media_lifetime: 14d
url_preview_enabled: true url_preview_enabled: true
url_preview_ip_range_blacklist: url_preview_ip_range_blacklist:
- '127.0.0.0/8' - '127.0.0.0/8'
@ -62,8 +63,29 @@ url_preview_ip_range_blacklist:
- '2001:db8::/32' - '2001:db8::/32'
- 'ff00::/8' - 'ff00::/8'
- 'fec0::/10' - 'fec0::/10'
url_preview_accept_language:
- 'en'
- 'fr'
- '*;q=0.2'
turn_uris: [ "turn:turns.viyurz.fr?transport=udp", "turn:turns.viyurz.fr?transport=tcp" ]
# TURN
turn_uris: ["turn:turns.viyurz.fr?transport=udp", "turn:turns.viyurz.fr?transport=tcp"]
turn_user_lifetime: 86400000 turn_user_lifetime: 86400000
turn_allow_guests: true turn_allow_guests: true
# vim:ft=yaml
# Registration
enable_registration: true
registration_requires_token: true
# Metrics
report_stats: true
# Signing Keys
signing_key_path: "/data/viyurz.fr.signing.key"
trusted_key_servers:
- server_name: "matrix.org"
suppress_key_server_warning: true