From 001046b66e7cf9d27f0edda65c763a15c181fd26 Mon Sep 17 00:00:00 2001
From: erikjohnston Synapse
@@ -176,6 +189,16 @@ messages from the database after 5 minutes, rather than 5 months.
For example, setting max_avatar_size: 10M
means that Synapse will not accept files larger than 10,485,760 bytes
for a user avatar.
The configuration file can be validated with the following command:
+python -m synapse.config read <config key to print> -c <path to config>
+
+To validate the entire file, omit read <config key to print>
:
python -m synapse.config -c <path to config>
+
+To see how to set other options, check the help reference:
+python -m synapse.config --help
+
The configuration file is a YAML file, which means that certain syntax rules apply if you want your config file to be read properly. A few helpful things to know:
@@ -635,7 +658,7 @@ for workers and containers without listener e.g # Note that x_forwarded will default to true, when using a UNIX socket. Please see # https://matrix-org.github.io/synapse/latest/reverse_proxy.html. # - - path: /var/run/synapse/main_public.sock + - path: /run/synapse/main_public.sock type: http resources: - names: [client, federation] @@ -1390,7 +1413,7 @@ see here. args: user: synapse_user password: secretpassword - database: synapse + dbname: synapse host: localhost port: 5432 cp_min: 5 @@ -1472,7 +1495,7 @@ when Synapse is started. args: user: synapse_user password: secretpassword - database: synapse_main + dbname: synapse_main host: localhost port: 5432 cp_min: 5 @@ -1485,7 +1508,7 @@ when Synapse is started. args: user: synapse_user password: secretpassword - database: synapse_state + dbname: synapse_state host: localhost port: 5432 cp_min: 5 @@ -1665,6 +1688,16 @@ sending the invite. Defaults toper_second: 0.2
, burst_count:
burst_count: 10
rc_media_create
This option ratelimits creation of MXC URIs via the /_matrix/media/v1/create
+endpoint based on the account that's creating the media. Defaults to
+per_second: 10
, burst_count: 50
.
Example configuration:
+rc_media_create:
+ per_second: 10
+ burst_count: 50
+
+rc_federation
Defines limits on federation requests.
The rc_federation
configuration has the following sub-options:
media_store_path: "DATADIR/media_store"
max_pending_media_uploads
How many pending media uploads can a given user have? A pending media upload
+is a created MXC URI that (a) is not expired (the unused_expires_at
timestamp
+has not passed) and (b) the media has not yet been uploaded for. Defaults to 5.
Example configuration:
+max_pending_media_uploads: 5
+
+unused_expiration_time
How long to wait in milliseconds before expiring created media IDs. Defaults to +"24h"
+Example configuration:
+unused_expiration_time: "1h"
+
+media_storage_providers
Media storage providers allow media to be stored in different locations. Defaults to none. Associated sub-options are:
@@ -3425,6 +3473,8 @@ notices.system_mxid_display_name
: set the display name of the "notices" usersystem_mxid_avatar_url
: set the avatar for the "notices" userroom_name
: set the room name of the server notices roomauto_join
: boolean. If true, the user will be automatically joined to the room instead of being invited.
+Defaults to false. Added in Synapse 1.98.0.Example configuration:
server_notices:
@@ -3432,6 +3482,7 @@ notices.
system_mxid_display_name: "Server Notices"
system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
room_name: "Server Notices"
+ auto_join: true
enable_room_list_search
listener
block for a replication
l
Example configuration(#2, for UNIX sockets):
instance_map:
main:
- path: /var/run/synapse/main_replication.sock
+ path: /run/synapse/main_replication.sock
worker1:
- path: /var/run/synapse/worker1_replication.sock
+ path: /run/synapse/worker1_replication.sock
stream_writers
Also see the worker documentation -for more info.
Added in Synapse 1.89.0.
+run_background_tasks_on
The worker that is used to run background tasks (e.g. cleaning up expired data). If not provided this @@ -3900,13 +3953,13 @@ requests from other workers.
Example configuration(#2, using UNIX sockets with a replication
listener):
worker_listeners:
- type: http
- path: /var/run/synapse/worker_public.sock
+ path: /run/synapse/worker_replication.sock
resources:
- - names: [client, federation]
+ - names: [replication]
- type: http
- path: /var/run/synapse/worker_replication.sock
+ path: /run/synapse/worker_public.sock
resources:
- - names: [replication]
+ - names: [client, federation]
worker_manhole