From be84aeacf620d9eb01de07a52d67bd4035985fbd Mon Sep 17 00:00:00 2001 From: reivilibre Date: Tue, 2 Aug 2022 10:56:24 +0000 Subject: deploy: c2f48712265de92bd833a15f86935bed1f1efbe5 --- .../usage/configuration/config_documentation.html | 352 +++++++++++---------- 1 file changed, 186 insertions(+), 166 deletions(-) (limited to 'latest/usage/configuration/config_documentation.html') diff --git a/latest/usage/configuration/config_documentation.html b/latest/usage/configuration/config_documentation.html index 0ed31b347f..f8d9ccd2e1 100644 --- a/latest/usage/configuration/config_documentation.html +++ b/latest/usage/configuration/config_documentation.html @@ -76,7 +76,7 @@ @@ -147,12 +147,12 @@

Configuring Synapse

-

This is intended as a guide to the Synapse configuration. The behavior of a Synapse instance can be modified -through the many configuration settings documented here — each config option is explained, +

This is intended as a guide to the Synapse configuration. The behavior of a Synapse instance can be modified +through the many configuration settings documented here — each config option is explained, including what the default is, how to change the default and what sort of behaviour the setting governs. -Also included is an example configuration for each setting. If you don't want to spend a lot of time +Also included is an example configuration for each setting. If you don't want to spend a lot of time thinking about options, the config as generated sets sensible defaults for all values. Do note however that the -database defaults to SQLite, which is not recommended for production usage. You can read more on this subject +database defaults to SQLite, which is not recommended for production usage. You can read more on this subject here.

Config Conventions

Configuration options that take a time period can be set using a number @@ -170,16 +170,16 @@ messages from the database after 5 minutes, rather than 5 months.

In addition, configuration options referring to size use the following suffixes:

For example, setting max_avatar_size: 10M means that Synapse will not accept files larger than 10,485,760 bytes -for a user avatar.

+for a user avatar.

YAML

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:

Contents

@@ -241,7 +241,7 @@ shown.

documentation on how to configure or create custom modules for Synapse.


modules

-

Use the module sub-option to add modules under this option to extend functionality. +

Use the module sub-option to add modules under this option to extend functionality. The module setting then has a sub-option, config, which can be used to define some configuration for the module.

Defaults to none.

@@ -271,9 +271,9 @@ a clean server_name.

The server_name cannot be changed later so it is important to configure this correctly before you start Synapse. It should be all lowercase and may contain an explicit port.

-

There is no default for this option.

+

There is no default for this option.

Example configuration #1:

-
server_name: matrix.org 
+
server_name: matrix.org
 

Example configuration #2:

server_name: localhost:8080
@@ -286,7 +286,7 @@ lowercase and may contain an explicit port.


web_client_location

-

The absolute URL to the web client which / will redirect to. Defaults to none.

+

The absolute URL to the web client which / will redirect to. Defaults to none.

Example configuration:

web_client_location: https://riot.example.com/
 
@@ -307,7 +307,7 @@ Otherwise, it should be the URL to reach Synapse's client HTTP listener (see

By default, other servers will try to reach our server on port 8448, which can be inconvenient in some environments.

Provided https://<server_name>/ on port 443 is routed to Synapse, this -option configures Synapse to serve a file at https://<server_name>/.well-known/matrix/server. +option configures Synapse to serve a file at https://<server_name>/.well-known/matrix/server. This will tell other servers to send traffic to port 443 instead.

This option currently defaults to false.

See https://matrix-org.github.io/synapse/latest/delegate.html for more @@ -319,11 +319,12 @@ information.

extra_well_known_client_content

This option allows server runners to add arbitrary key-value pairs to the client-facing .well-known response. Note that the public_baseurl config option must be provided for Synapse to serve a response to /.well-known/matrix/client at all.

-

If this option is provided, it parses the given yaml to json and +

If this option is provided, it parses the given yaml to json and serves it on /.well-known/matrix/client endpoint alongside the standard properties.

+

Added in Synapse 1.62.0.

Example configuration:

-
extra_well_known_client_content : 
+
extra_well_known_client_content :
   option1: value1
   option2: value2
 
@@ -331,15 +332,15 @@ alongside the standard properties.

soft_file_limit

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 hard limit. -Defaults to 0.

+Defaults to 0.

Example configuration:

soft_file_limit: 3
 

presence

Presence tracking allows users to see the state (e.g online/offline) -of other local and remote users. Set the enabled sub-option to false to
-disable presence tracking on this homeserver. Defaults to true. +of other local and remote users. Set the enabled sub-option to false to +disable presence tracking on this homeserver. Defaults to true. This option replaces the previous top-level 'use_presence' option.

Example configuration:

presence:
@@ -347,8 +348,8 @@ This option replaces the previous top-level 'use_presence' option.


require_auth_for_profile_requests

-

Whether to require authentication to retrieve profile data (avatars, display names) of other -users through the client API. Defaults to false. Note that profile data is also available +

Whether to require authentication to retrieve profile data (avatars, display names) of other +users through the client API. Defaults to false. Note that profile data is also available via the federation API, unless allow_profile_lookup_over_federation is set to false.

Example configuration:

require_auth_for_profile_requests: true
@@ -356,10 +357,10 @@ via the federation API, unless allow_profile_lookup_over_federation
 

limit_profile_requests_to_users_who_share_rooms

Use this option to require a user to share a room with another user in order -to retrieve their profile information. Only checked on Client-Server +to retrieve their profile information. Only checked on Client-Server requests. Profile requests from other servers should be checked by the requesting server. Defaults to false.

-

Example configuration:

+

Example configuration:

limit_profile_requests_to_users_who_share_rooms: true
 

@@ -392,7 +393,7 @@ rooms directory via federation. Defaults to false.

The default room version for newly created rooms on this server.

Known room versions are listed here

For example, for room version 1, default_room_version should be set -to "1".

+to "1".

Currently defaults to "9".

Example configuration:

default_room_version: "8"
@@ -400,14 +401,14 @@ to "1". 


gc_thresholds

The garbage collection threshold parameters to pass to gc.set_threshold, if defined. -Defaults to none.

+Defaults to none.

Example configuration:

gc_thresholds: [700, 10, 10]
 

gc_min_interval

The minimum time in seconds between each GC for a generation, regardless of -the GC thresholds. This ensures that we don't do GC too frequently. A value of [1s, 10s, 30s] +the GC thresholds. This ensures that we don't do GC too frequently. A value of [1s, 10s, 30s] indicates that a second must pass between consecutive generation 0 GCs, etc.

Defaults to [1s, 10s, 30s].

Example configuration:

@@ -487,7 +488,7 @@ configuration.

Sub-options for each listener include:

  • -

    port: the TCP port to bind to.

    +

    port: the TCP port to bind to.

  • bind_addresses: a list of local addresses to listen on. The default is @@ -630,7 +631,7 @@ that room can become quite expensive. To mitigate this, once the number of forward extremities reaches a given threshold, Synapse will send an org.matrix.dummy_event event, which will reduce the forward extremities in the room.

    -

    This setting defines the threshold (i.e. number of forward extremities in the room) at which dummy events are sent. +

    This setting defines the threshold (i.e. number of forward extremities in the room) at which dummy events are sent. The default value is 10.

    Example configuration:

    dummy_events_threshold: 5
    @@ -647,30 +648,30 @@ delete any device that hasn't been accessed for more than the specified amount o
     

    Useful options for Synapse admins.


    admin_contact

    -

    How to reach the server admin, used in ResourceLimitError. Defaults to none.

    +

    How to reach the server admin, used in ResourceLimitError. Defaults to none.

    Example configuration:

    admin_contact: 'mailto:admin@server.com'
     

    hs_disabled and hs_disabled_message

    Blocks users from connecting to the homeserver and provides a human-readable reason -why the connection was blocked. Defaults to false.

    +why the connection was blocked. Defaults to false.

    Example configuration:

    hs_disabled: true
     hs_disabled_message: 'Reason for why the HS is blocked'
     

    limit_usage_by_mau

    -

    This option disables/enables monthly active user blocking. Used in cases where the admin or -server owner wants to limit to the number of monthly active users. When enabled and a limit is +

    This option disables/enables monthly active user blocking. Used in cases where the admin or +server owner wants to limit to the number of monthly active users. When enabled and a limit is reached the server returns a ResourceLimitError with error type Codes.RESOURCE_LIMIT_EXCEEDED. Defaults to false. If this is enabled, a value for max_mau_value must also be set.

    Example configuration:

    -
    limit_usage_by_mau: true 
    +
    limit_usage_by_mau: true
     

    max_mau_value

    -

    This option sets the hard limit of monthly active users above which the server will start +

    This option sets the hard limit of monthly active users above which the server will start blocking user actions if limit_usage_by_mau is enabled. Defaults to 0.

    Example configuration:

    max_mau_value: 50
    @@ -681,7 +682,7 @@ blocking user actions if limit_usage_by_mau is enabled. Defaults to
     means that users must be active for the specified number of days before they
     can be considered active and guards against the case where lots of users
     sign up in a short space of time never to return after their initial
    -session. Defaults to 0. 

    +session. Defaults to 0.

    Example configuration:

    mau_trial_days: 5
     
    @@ -692,7 +693,7 @@ trial number if the user was registered by an appservice. A value of 0 means no trial days are applied. Appservices not listed in this dictionary use the value of mau_trial_days instead.

    Example configuration:

    -
    mau_appservice_trial_days: 
    +
    mau_appservice_trial_days:
       my_appservice_id: 3
       another_appservice_id: 6
     
    @@ -710,7 +711,7 @@ means that alerting is enabled.

    mau_stats_only

    If enabled, the metrics for the number of monthly active users will be populated, however no one will be limited based on these numbers. If limit_usage_by_mau -is true, this is implied to be true. Defaults to false.

    +is true, this is implied to be true. Defaults to false.

    Example configuration:

    mau_stats_only: true
     
    @@ -728,7 +729,7 @@ reserved threepid (3rd party identifier).


    server_context

    This option is used by phonehome stats to group together related servers. -Defaults to none.

    +Defaults to none.

    Example configuration:

    server_context: context
     
    @@ -742,11 +743,11 @@ resource-constrained. Options for this setting include:

  • enabled: whether this check is enabled. Defaults to false.
  • complexity: the limit above which rooms cannot be joined. The default is 1.0.
  • complexity_error: override the error which is returned when the room is too complex with a -custom message.
  • +custom message.
  • admins_can_join: allow server admins to join complex rooms. Default is false.

Room complexity is an arbitrary measure based on factors such as the number of -users in the room.

+users in the room.

Example configuration:

limit_remote_rooms:
   enabled: true
@@ -772,7 +773,7 @@ Defaults to true.


max_avatar_size

The largest permissible file size in bytes for a user avatar. Defaults to no restriction. -Use M for MB and K for KB.

+Use M for MB and K for KB.

Note that user avatar changes will not work if this is set without using Synapse's media repository.

Example configuration:

max_avatar_size: 10M
@@ -804,7 +805,7 @@ this period redacted events get replaced with their redacted form in the DB.

request_token_inhibit_3pid_errors

Inhibits the /requestToken endpoints from returning an error that might leak information about whether an e-mail address is in use or not on this -homeserver. Defaults to false. +homeserver. Defaults to false. Note that for some endpoints the error situation is the e-mail already being used, and for others the error is entering the e-mail being unused. If this option is enabled, instead of returning an error, these endpoints will @@ -831,9 +832,9 @@ all domains.


templates and custom_template_directory

These options define templates to use when generating email or HTML page contents. -The custom_template_directory determines which directory Synapse will try to +The custom_template_directory determines which directory Synapse will try to find template files in to use to generate email or HTML page contents. -If not set, or a file is not found within the template directory, a default +If not set, or a file is not found within the template directory, a default template from within the Synapse package will be used.

See here for more information about using custom templates.

@@ -850,20 +851,20 @@ server level.

the allowed_lifetime_min and allowed_lifetime_max config options.

If this feature is enabled, Synapse will regularly look for and purge events which are older than the room's maximum retention period. Synapse will also -filter events received over federation so that events that should have been -purged are ignored and not stored again.

+filter events received over federation so that events that should have been +purged are ignored and not stored again.

The message retention policies feature is disabled by default.

This setting has the following sub-options:

  • default_policy: Default retention policy. If set, Synapse will apply it to rooms that lack the -'m.room.retention' state event. This option is further specified by the -min_lifetime and max_lifetime sub-options associated with it. Note that the -value of min_lifetime doesn't matter much because Synapse doesn't take it into account yet.

    +'m.room.retention' state event. This option is further specified by the +min_lifetime and max_lifetime sub-options associated with it. Note that the +value of min_lifetime doesn't matter much because Synapse doesn't take it into account yet.

  • -

    allowed_lifetime_min and allowed_lifetime_max: Retention policy limits. If -set, and the state of a room contains a m.room.retention event in its state +

    allowed_lifetime_min and allowed_lifetime_max: Retention policy limits. If +set, and the state of a room contains a m.room.retention event in its state which contains a min_lifetime or a max_lifetime that's out of these bounds, Synapse will cap the room's policy to these limits when running purge jobs.

  • @@ -908,7 +909,7 @@ configuration).

    - longest_max_lifetime: 3d interval: 12h - shortest_max_lifetime: 3d - interval: 1d + interval: 1d

TLS

@@ -917,16 +918,16 @@ configuration).

tls_certificate_path

This option specifies a PEM-encoded X509 certificate for TLS. This certificate, as of Synapse 1.0, will need to be a valid and verifiable -certificate, signed by a recognised Certificate Authority. Defaults to none.

+certificate, signed by a recognised Certificate Authority. Defaults to none.

Be sure to use a .pem file that includes the full certificate chain including any intermediate certificates (for instance, if using certbot, use -fullchain.pem as your certificate, not cert.pem).

+fullchain.pem as your certificate, not cert.pem).

Example configuration:

tls_certificate_path: "CONFDIR/SERVERNAME.tls.crt"
 

tls_private_key_path

-

PEM-encoded private key for TLS. Defaults to none.

+

PEM-encoded private key for TLS. Defaults to none.

Example configuration:

tls_private_key_path: "CONFDIR/SERVERNAME.tls.key"
 
@@ -1061,12 +1062,12 @@ variable would be SYNAPSE_CACHE_FACTOR_STATEGROUPCACHE=2.0.

  • expire_caches: Controls whether cache entries are evicted after a specified time period. Defaults to true. Set to false to disable this feature. Note that never expiring -caches may result in excessive memory usage.

    +caches may result in excessive memory usage.

  • cache_entry_ttl: If expire_caches is enabled, this flag controls how long an entry can be in a cache without having been accessed before being evicted. -Defaults to 30m.

    +Defaults to 30m.

  • sync_response_cache_duration: Controls how long the results of a /sync request are @@ -1074,11 +1075,12 @@ cached for after a successful response is returned. A higher duration can help c with intermittent connections, at the cost of higher memory usage. A value of zero means that sync responses are not cached. Defaults to 2m.

    +

    Changed in Synapse 1.62.0: The default was changed from 0 to 2m.

  • cache_autotuning and its sub-options max_cache_memory_usage, target_cache_memory_usage, and -min_cache_ttl work in conjunction with each other to maintain a balance between cache memory -usage and cache entry availability. You must be using jemalloc +min_cache_ttl work in conjunction with each other to maintain a balance between cache memory +usage and cache entry availability. You must be using jemalloc to utilize this option, and all three of the options must be specified for this feature to work. This option defaults to off, enable it by providing values for the sub-options listed below. Please note that the feature will not work and may cause unstable behavior (such as excessive emptying of caches or exceptions) if all of the values are not provided. @@ -1092,7 +1094,7 @@ the setting below, or until the min_cache_ttl is hit. There is no d for this option.

  • min_cache_ttl sets a limit under which newer cache entries are not evicted and is only applied when caches are actively being evicted/max_cache_memory_usage has been exceeded. This is to protect hot caches -from being emptied while Synapse is evicting due to memory. There is no default value for this option.
  • +from being emptied while Synapse is evicting due to memory. There is no default value for this option. @@ -1112,7 +1114,7 @@ from being emptied while Synapse is evicting due to memory. There is no default SIGHUP signal to Synapse using e.g.

    kill -HUP [PID_OF_SYNAPSE_PROCESS]
     
    -

    If you are running multiple workers, you must individually update the worker +

    If you are running multiple workers, you must individually update the worker config file and send this signal to each worker process.

    If you're using the example systemd service file in Synapse's contrib directory, you can send a SIGHUP signal by using @@ -1128,7 +1130,7 @@ its data.

    • name: this option specifies the database engine to use: either sqlite3 (for SQLite) -or psycopg2 (for PostgreSQL). If no name is specified Synapse will default to SQLite.

      +or psycopg2 (for PostgreSQL). If no name is specified Synapse will default to SQLite.

    • txn_limit gives the maximum number of transactions to run per connection @@ -1269,7 +1271,7 @@ when Synapse is started.


    Logging

    -

    Config options related to logging.

    +

    Config options related to logging.


    log_config

    This option specifies a yaml python logging config file as described here.

    @@ -1278,7 +1280,7 @@ when Synapse is started.


    Ratelimiting

    -

    Options related to ratelimiting in Synapse.

    +

    Options related to ratelimiting in Synapse.

    Each ratelimiting configuration is made of two parameters:

    • per_second: number of requests a client can send per second.
    • @@ -1297,7 +1299,7 @@ is using. It defaults to: per_second: 0.2, burst_count: 10

      rc_registration

      This option ratelimits registration requests based on the client's IP address. -It defaults to per_second: 0.17, burst_count: 3.

      +It defaults to per_second: 0.17, burst_count: 3.

      Example configuration:

      rc_registration:
         per_second: 0.15
      @@ -1305,7 +1307,7 @@ It defaults to per_second: 0.17, burst_count: 3. 


      rc_registration_token_validity

      -

      This option checks the validity of registration tokens that ratelimits requests based on +

      This option checks the validity of registration tokens that ratelimits requests based on the client's IP address. Defaults to per_second: 0.1, burst_count: 5.

      Example configuration:

      @@ -1346,9 +1348,9 @@ attempts for this account. Defaults to per_second: 0.17, burs

    rc_admin_redaction

    -

    This option sets ratelimiting redactions by room admins. If this is not explicitly +

    This option sets ratelimiting redactions by room admins. If this is not explicitly set then it uses the same ratelimiting as per rc_message. This is useful -to allow room admins to deal with abuse quickly.

    +to allow room admins to deal with abuse quickly.

    Example configuration:

    rc_admin_redaction:
       per_second: 1
    @@ -1359,13 +1361,13 @@ to allow room admins to deal with abuse quickly. 

    This option allows for ratelimiting number of rooms a user can join. This setting has the following sub-options:

    • -

      local: ratelimits when users are joining rooms the server is already in. +

      local: ratelimits when users are joining rooms the server is already in. Defaults to per_second: 0.1, burst_count: 10.

    • remote: ratelimits when users are trying to join rooms not on the server (which can be more computationally expensive than restricting locally). Defaults to -per_second: 0.01, burst_count: 10

      +per_second: 0.01, burst_count: 10

    Example configuration:

    @@ -1378,6 +1380,19 @@ can be more computationally expensive than restricting locally). Defaults to burst_count: 12

    +

    rc_joins_per_room

    +

    This option allows admins to ratelimit joins to a room based on the number of recent +joins (local or remote) to that room. It is intended to mitigate mass-join spam +waves which target multiple homeservers.

    +

    By default, one join is permitted to a room every second, with an accumulating +buffer of up to ten instantaneous joins.

    +

    Example configuration (default values):

    +
    rc_joins_per_room:
    +  per_second: 1
    +  burst_count: 10
    +
    +

    Added in Synapse 1.64.0.

    +

    rc_3pid_validation

    This option ratelimits how often a user or IP can attempt to validate a 3PID. Defaults to per_second: 0.003, burst_count: 5.

    @@ -1388,9 +1403,9 @@ Defaults to per_second: 0.003, burst_count: 5.


    rc_invites

    -

    This option sets ratelimiting how often invites can be sent in a room or to a +

    This option sets ratelimiting how often invites can be sent in a room or to a specific user. per_room defaults to per_second: 0.3, burst_count: 10 and -per_user defaults to per_second: 0.003, burst_count: 5.

    +per_user defaults to per_second: 0.003, burst_count: 5.

    Client requests that invite user(s) when creating a room will count against the rc_invites.per_room limit, whereas @@ -1403,6 +1418,7 @@ limit only, as Synapse presumes ratelimiting by room will be done by the sending sender, meaning that a rc_invite.per_user.burst_count of 5 mandates that a single user cannot receive more than a burst of 5 invites at a time.

    In contrast, the rc_invites.per_issuer limit applies to the issuer of the invite, meaning that a rc_invite.per_issuer.burst_count of 5 mandates that single user cannot send more than a burst of 5 invites at a time.

    +

    Changed in version 1.63: added the per_issuer limit.

    Example configuration:

    rc_invites:
       per_room:
    @@ -1415,7 +1431,6 @@ cannot receive more than a burst of 5 invites at a time.

    per_second: 0.5 burst_count: 5
    -

    Changed in version 1.63: added the per_issuer limit.


    rc_third_party_invite

    This option ratelimits 3PID invites (i.e. invites sent to a third-party ID @@ -1428,7 +1443,7 @@ sending the invite. Defaults to per_second: 0.2, burst_count:


    rc_federation

    -

    Defines limits on federation requests.

    +

    Defines limits on federation requests.

    The rc_federation configuration has the following sub-options:

    Example configuration:

    media_storage_providers:
    @@ -1499,7 +1514,7 @@ locations. Defaults to none. Associated sub-options are:

    The largest allowed upload size in bytes.

    If you are using a reverse proxy you may also need to set this value in your reverse proxy's config. Defaults to 50M. Notably Nginx has a small max body size by default. -See here for more on using a reverse proxy with Synapse.

    +See here for more on using a reverse proxy with Synapse.

    Example configuration:

    max_upload_size: 60M
     
    @@ -1515,7 +1530,7 @@ See here for more on using a reverse prox the resolution requested by the client. If true then whenever a new resolution is requested by the client the server will generate a new thumbnail. If false the server will pick a thumbnail -from a precalculated list. Defaults to false.

    +from a precalculated list. Defaults to false.

    Example configuration:

    dynamic_thumbnails: true
     
    @@ -1621,7 +1636,7 @@ you use the following example list as a starting point.

    to access even if they are specified in url_preview_ip_range_blacklist. This is useful for specifying exceptions to wide-ranging blacklisted target IP ranges - e.g. for enabling URL previews for a specific private -website only visible in your network. Defaults to none.

    +website only visible in your network. Defaults to none.

    Example configuration:

    url_preview_ip_range_whitelist:
        - '192.168.1.1'
    @@ -1635,7 +1650,7 @@ entry that points to a private IP address and circumvent the blacklist.
     This is more useful if you know there is an entire shape of URL that
     you know that will never want synapse to try to spider.

    Each list entry is a dictionary of url component attributes as returned -by urlparse.urlsplit as applied to the absolute form of the URL. See +by urlparse.urlsplit as applied to the absolute form of the URL. See here for more information. Some examples are:

      @@ -1698,8 +1713,8 @@ using quality value syntax (;q=). '*' translates to any language.

      oEmbed allows for easier embedding content from a website. It can be used for generating URLs previews of services which support it. A default list of oEmbed providers is included with Synapse. Set disable_default_providers to true to disable using -these default oEmbed URLs. Use additional_providers to specify additional files with oEmbed configuration (each -should be in the form of providers.json). By default this list is empty.

      +these default oEmbed URLs. Use additional_providers to specify additional files with oEmbed configuration (each +should be in the form of providers.json). By default this list is empty.

      Example configuration:

      oembed:
         disable_default_providers: true
      @@ -1711,14 +1726,14 @@ should be in the form of providers.json). By default this list is empty. 

      See here for full details on setting up captcha.


      recaptcha_public_key

      -

      This homeserver's ReCAPTCHA public key. Must be specified if enable_registration_captcha is +

      This homeserver's ReCAPTCHA public key. Must be specified if enable_registration_captcha is enabled.

      Example configuration:

      recaptcha_public_key: "YOUR_PUBLIC_KEY"
       

      recaptcha_private_key

      -

      This homeserver's ReCAPTCHA private key. Must be specified if enable_registration_captcha is +

      This homeserver's ReCAPTCHA private key. Must be specified if enable_registration_captcha is enabled.

      Example configuration:

      recaptcha_private_key: "YOUR_PRIVATE_KEY"
      @@ -1726,7 +1741,7 @@ enabled.


      enable_registration_captcha

      Set to true to enable ReCaptcha checks when registering, preventing signup -unless a captcha is answered. Requires a valid ReCaptcha public/private key. +unless a captcha is answered. Requires a valid ReCaptcha public/private key. Defaults to false.

      Example configuration:

      enable_registration_captcha: true
      @@ -1780,7 +1795,7 @@ it allows users to connect to arbitrary endpoints without having first signed up
       

      enable_registration

      Enable registration for new users. Defaults to false. It is highly recommended that if you enable registration, -you use either captcha, email, or token-based verification to verify that new users are not bots. In order to enable registration +you use either captcha, email, or token-based verification to verify that new users are not bots. In order to enable registration without any verification, you must also set enable_registration_without_verification to true.

      Example configuration:

      enable_registration: true
      @@ -1797,7 +1812,7 @@ unless enable_registration is also enabled.

      session_lifetime

      Time that a user's session remains valid for, after they log in.

      Note that this is not currently compatible with guest logins.

      -

      Note also that this is calculated at login time: changes are not applied retrospectively to users who have already +

      Note also that this is calculated at login time: changes are not applied retrospectively to users who have already logged in.

      By default, this is infinite.

      Example configuration:

      @@ -1808,7 +1823,7 @@ logged in.

      Time that an access token remains valid for, if the session is using refresh tokens.

      For more information about refresh tokens, please see the manual.

      Note that this only applies to clients which advertise support for refresh tokens.

      -

      Note also that this is calculated at login time and refresh time: changes are not applied to +

      Note also that this is calculated at login time and refresh time: changes are not applied to existing sessions until they are refreshed.

      By default, this is 5 minutes.

      Example configuration:

      @@ -1919,24 +1934,20 @@ This setting is ignored unless public_baseurl is also explicitly se

      account_threepid_delegates

      -

      Handle threepid (email/phone etc) registration and password resets through a set of -trusted identity servers. Note that this allows the configured identity server to -reset passwords for accounts!

      -

      Be aware that if email is not set, and SMTP options have not been -configured in the email config block, registration and user password resets via -email will be globally disabled.

      -

      Additionally, if msisdn is not set, registration and password resets via msisdn -will be disabled regardless, and users will not be able to associate an msisdn -identifier to their account. This is due to Synapse currently not supporting -any method of sending SMS messages on its own.

      -

      To enable using an identity server for operations regarding a particular third-party -identifier type, set the value to the URL of that identity server as shown in the -examples below.

      -

      Servers handling the these requests must answer the /requestToken endpoints defined -by the Matrix Identity Service API specification.

      +

      Delegate verification of phone numbers to an identity server.

      +

      When a user wishes to add a phone number to their account, we need to verify that they +actually own that phone number, which requires sending them a text message (SMS). +Currently Synapse does not support sending those texts itself and instead delegates the +task to an identity server. The base URI for the identity server to be used is +specified by the account_threepid_delegates.msisdn option.

      +

      If this is left unspecified, Synapse will not allow users to add phone numbers to +their account.

      +

      (Servers handling the these requests must answer the /requestToken endpoints defined +by the Matrix Identity Service API +specification.)

      +

      Updated in Synapse 1.64.0: The email option is deprecated.

      Example configuration:

      account_threepid_delegates:
      -    email: https://example.com     # Delegate email sending to example.com
           msisdn: http://localhost:8090  # Delegate SMS sending to this local process
       

      @@ -1973,7 +1984,7 @@ to the rooms listed under this option.

      as a publicly joinable room when the first user registers for the homeserver. If the room already exists, make certain it is a publicly joinable room, i.e. the join rule of the room must be set to 'public'. You can find more options -relating to auto-joining rooms below.

      +relating to auto-joining rooms below.

      Example configuration:

      auto_join_rooms:
         - "#exampleroom:example.com"
      @@ -2013,9 +2024,9 @@ effect if autocreate_auto_join_rooms is true.

      • "public_chat": the room is joinable by anyone, including federated servers if autocreate_auto_join_rooms_federated is true (the default).
      • -
      • "private_chat": an invitation is required to join these rooms.
      • +
      • "private_chat": an invitation is required to join these rooms.
      • "trusted_private_chat": an invitation is required to join this room and the invitee is -assigned a power level of 100 upon joining the room.
      • +assigned a power level of 100 upon joining the room.

      If a value of "private_chat" or "trusted_private_chat" is used then auto_join_mxid_localpart must also be configured.

      @@ -2064,7 +2075,7 @@ raise an error if the registration completes and the username conflicts.

      Config options related to metrics.


      enable_metrics

      -

      Set to true to enable collection and rendering of performance metrics. +

      Set to true to enable collection and rendering of performance metrics. Defaults to false.

      Example configuration:

      enable_metrics: true
      @@ -2072,10 +2083,10 @@ Defaults to false.


      sentry

      Use this option to enable sentry integration. Provide the DSN assigned to you by sentry -with the dsn setting.

      +with the dsn setting.

      NOTE: While attempts are made to ensure that the logs don't contain any sensitive information, this cannot be guaranteed. By enabling -this option the sentry server may therefore receive sensitive +this option the sentry server may therefore receive sensitive information, and it in turn may then disseminate sensitive information through insecure notification channels if so configured.

      Example configuration:

      @@ -2086,7 +2097,7 @@ through insecure notification channels if so configured.

      metrics_flags

      Flags to enable Prometheus metrics which are not suitable to be enabled by default, either for performance reasons or limited use. -Currently the only option is known_servers, which publishes +Currently the only option is known_servers, which publishes synapse_federation_known_servers, a gauge of the number of servers this homeserver knows about, including itself. May cause performance problems on large homeservers.

      @@ -2119,7 +2130,7 @@ Defaults to https://matrix.org/report-usage-stats/push


      room_prejoin_state:

      Controls for the state that is shared with users who receive an invite -to a room. By default, the following state event types are shared with users who +to a room. By default, the following state event types are shared with users who receive invites to the room:

      • m.room.join_rules
      • @@ -2132,7 +2143,7 @@ receive invites to the room:

      To change the default behavior, use the following sub-options:

        -
      • disable_default_event_types: set to true to disable the above defaults. If this +
      • disable_default_event_types: set to true to disable the above defaults. If this is enabled, only the event types listed in additional_event_types are shared. Defaults to false.
      • additional_event_types: Additional state event types to share with users when they are invited @@ -2240,7 +2251,7 @@ warning on start-up. To suppress this warning, set If specified, we will check that the response is signed by at least one of the given keys.
      • accept_keys_insecurely: a boolean. Normally, if verify_keys is unset, -and federation_verify_certificates is not true, synapse will refuse +and federation_verify_certificates is not true, synapse will refuse to start, because this would allow anyone who can spoof DNS responses to masquerade as the trusted key server. If you know what you are doing and are sure that your network environment provides a secure connection @@ -2308,16 +2319,16 @@ to allow IdP-initiated login, set allow_unsolicited to true under < section.
      -
    • config_path: specify a separate pysaml2 configuration file thusly: +
    • config_path: specify a separate pysaml2 configuration file thusly: config_path: "CONFDIR/sp_conf.py"
    • saml_session_lifetime: The lifetime of a SAML session. This defines how long a user has to complete the authentication process, if allow_unsolicited is unset. The default is 15 minutes.
    • -
    • user_mapping_provider: Using this option, an external module can be provided as a -custom solution to mapping attributes returned from a saml provider onto a matrix user. The +
    • user_mapping_provider: Using this option, an external module can be provided as a +custom solution to mapping attributes returned from a saml provider onto a matrix user. The user_mapping_provider has the following attributes:
        -
      • module: The custom module's class.
      • -
      • config: Custom configuration values for the module. Use the values provided in the +
      • module: The custom module's class.
      • +
      • config: Custom configuration values for the module. Use the values provided in the example if you are using the built-in user_mapping_provider, or provide your own config values for a custom class if you are using one. This section will be passed as a Python dictionary to the module's parse_config method. The built-in provider takes the following two @@ -2339,7 +2350,7 @@ The default is hexencode. Note: This used to be configured by the MXID was always calculated dynamically rather than stored in a table. For backwards- compatibility, we will look for user_ids matching such a pattern before creating a new account. This setting controls the SAML attribute which will be used for this backwards-compatibility lookup. Typically it should be 'uid', but if the attribute maps are changed, it may be necessary to change it. -The default is 'uid'.
      • +The default is 'uid'.
      • attribute_requirements: It is possible to configure Synapse to only allow logins if SAML attributes match particular values. The requirements can be listed under attribute_requirements as shown in the example. All of the listed attributes must @@ -2405,16 +2416,16 @@ the IdP to use an ACS location of sur_name: "the Sysadmin" email_address": ["admin@example.com"] contact_type": technical - + saml_session_lifetime: 5m - + user_mapping_provider: - # Below options are intended for the built-in provider, they should be - # changed if using a custom module. + # Below options are intended for the built-in provider, they should be + # changed if using a custom module. config: mxid_source_attribute: displayName mxid_mapping: dotreplace - + grandfathered_mxid_source_attribute: upn attribute_requirements: @@ -2568,7 +2579,7 @@ compliant providers should provide.

      • localpart_template: Jinja2 template for the localpart of the MXID. If this is not set, the user will be prompted to choose their -own username (see the documentation for the sso_auth_account_details.html +own username (see the documentation for the sso_auth_account_details.html template). This template can use the localpart_from_email filter.

      • @@ -2598,7 +2609,7 @@ which is set to the claims returned by the UserInfo Endpoint and/or in the ID Token.

      -

      It is possible to configure Synapse to only allow logins if certain attributes +

      It is possible to configure Synapse to only allow logins if certain attributes match particular values in the OIDC userinfo. The requirements can be listed under attribute_requirements as shown here:

      attribute_requirements:
      @@ -2611,7 +2622,7 @@ match particular values in the OIDC userinfo. The requirements can be listed und
       userinfo by expanding the scopes section of the OIDC config to retrieve
       additional information from the OIDC provider.

      If the OIDC claim is a list, then the attribute must match any value in the list. -Otherwise, it must exactly match the value of the claim. Using the example +Otherwise, it must exactly match the value of the claim. Using the example above, the family_name claim MUST be "Stephensson", but the groups claim MUST contain "admin".

      Example configuration:

      @@ -2671,7 +2682,7 @@ All of the listed attributes must match for the login to be permitted.
    • sso

      Additional settings to use with single-sign on systems such as OpenID Connect, SAML2 and CAS.

      -

      Server admins can configure custom templates for pages related to SSO. See +

      Server admins can configure custom templates for pages related to SSO. See here for more information.

      Options include:

        @@ -2687,7 +2698,7 @@ The login fallback page (used by clients that don't natively support the required login flows) is whitelisted in addition to any URLs in this list. By default, this list contains only the login fallback page.
      • update_profile_information: Use this setting to keep a user's profile fields in sync with information from -the identity provider. Currently only syncing the displayname is supported. Fields +the identity provider. Currently only syncing the displayname is supported. Fields are checked on every SSO login, and are updated if necessary. Note that enabling this option will override user profile information, regardless of whether users have opted-out of syncing that @@ -2724,7 +2735,7 @@ Supported algorithms are listed Required if enabled is set to true.
      • subject_claim: Name of the claim containing a unique identifier for the user. Optional, defaults to sub.
      • -
      • issuer: The issuer to validate the "iss" claim against. Optional. If provided the +
      • issuer: The issuer to validate the "iss" claim against. Optional. If provided the "iss" claim will be required and validated for all JSON web tokens.
      • audiences: A list of audiences to validate the "aud" claim against. Optional. If provided the "aud" claim will be required and validated for all JSON web tokens. @@ -2733,7 +2744,7 @@ validation will fail without configuring audiences.

      Example configuration:

      jwt_config:
      -    enabled: true 
      +    enabled: true
           secret: "provided-by-your-issuer"
           algorithm: "provided-by-your-issuer"
           subject_claim: "name_of_claim"
      @@ -2743,7 +2754,7 @@ validation will fail without configuring audiences.
       

      password_config

      -

      Use this setting to enable password-based logins.

      +

      Use this setting to enable password-based logins.

      This setting has the following sub-options:

      • enabled: Defaults to true. @@ -2752,10 +2763,10 @@ Set to only_for_reauth to allow users with existing passwords to us to log in and reauthenticate, whilst preventing new users from setting passwords.
      • localdb_enabled: Set to false to disable authentication against the local password database. This is ignored if enabled is false, and is only useful -if you have other password_providers. Defaults to true.
      • +if you have other password_providers. Defaults to true.
      • pepper: Set the value here to a secret random string for extra security. DO NOT CHANGE THIS AFTER INITIAL SETUP!
      • -
      • policy: Define and enforce a password policy, such as minimum lengths for passwords, etc. +
      • policy: Define and enforce a password policy, such as minimum lengths for passwords, etc. Each parameter is optional. This is an implementation of MSC2000. Parameters are as follows:
        • enabled: Defaults to false. Set to true to enable.
        • @@ -2788,7 +2799,7 @@ Defaults to false.

          ui_auth

          The amount of time to allow a user-interactive authentication session to be active.

          -

          This defaults to 0, meaning the user is queried for their credentials +

          This defaults to 0, meaning the user is queried for their credentials before every action, but this can be overridden to allow a single validation to be re-used. This weakens the protections afforded by the user-interactive authentication process, by allowing for multiple @@ -2812,13 +2823,21 @@ adding a 3PID).

          smtp_host: The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.

        • -

          smtp_port: The port on the mail server for outgoing SMTP. Defaults to 25.

          +

          smtp_port: The port on the mail server for outgoing SMTP. Defaults to 465 if force_tls is true, else 25.

          +

          Changed in Synapse 1.64.0: the default port is now aware of force_tls.

        • smtp_user and smtp_pass: Username/password for authentication to the SMTP server. By default, no authentication is attempted.

        • +

          force_tls: By default, Synapse connects over plain text and then optionally upgrades +to TLS via STARTTLS. If this option is set to true, TLS is used from the start (Implicit TLS), +and the option require_transport_security is ignored. +It is recommended to enable this if supported by your mail server.

          +

          New in Synapse 1.64.0.

          +
        • +
        • require_transport_security: Set to true to require TLS transport security for SMTP. By default, Synapse will connect over plain text, and will then switch to TLS via STARTTLS if the SMTP server supports it. If this option is set, @@ -2870,7 +2889,7 @@ of the user(s) that sent the message(s), e.g. "Alice and Bob", and '%( message(s) have been sent to, e.g. "My super room". In addition, emails related to account administration will can use the '%(server_name)s' placeholder, which will be replaced by the value of the server_name setting in your Synapse configuration.

          -

          Here is a list of subjects for notification emails that can be set:

          +

          Here is a list of subjects for notification emails that can be set:

          • message_from_person_in_room: Subject to use to notify about one message from one or more user(s) in a room which has a name. Defaults to "[%(app)s] You have a message on %(app)s from %(person)s in the %(room)s room..."
          • @@ -2880,13 +2899,13 @@ room which doesn't have a name. Defaults to "[%(app)s] You have a message o a room which doesn't have a name. Defaults to "[%(app)s] You have messages on %(app)s from %(person)s..."
          • messages_in_room: Subject to use to notify about multiple messages in a room which has a name. Defaults to "[%(app)s] You have messages on %(app)s in the %(room)s room..."
          • -
          • messages_in_room_and_others: Subject to use to notify about multiple messages in multiple rooms. +
          • messages_in_room_and_others: Subject to use to notify about multiple messages in multiple rooms. Defaults to "[%(app)s] You have messages on %(app)s in the %(room)s room and others..."
          • messages_from_person_and_others: Subject to use to notify about multiple messages from multiple persons in multiple rooms. This is similar to the setting above except it's used when -the room in which the notification was triggered has no name. Defaults to +the room in which the notification was triggered has no name. Defaults to "[%(app)s] You have messages on %(app)s from %(person)s and others..."
          • -
          • invite_from_person_to_room: Subject to use to notify about an invite to a room which has a name. +
          • invite_from_person_to_room: Subject to use to notify about an invite to a room which has a name. Defaults to "[%(app)s] %(person)s has invited you to join the %(room)s room on %(app)s..."
          • invite_from_person: Subject to use to notify about an invite to a room which doesn't have a name. Defaults to "[%(app)s] %(person)s has invited you to chat on %(app)s..."
          • @@ -2902,6 +2921,7 @@ ownership. Defaults to "[%(server_name)s] Validate your email" smtp_port: 587 smtp_user: "exampleusername" smtp_pass: "examplepassword" + force_tls: true require_transport_security: true enable_tls: false notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>" @@ -2929,7 +2949,7 @@ ownership. Defaults to "[%(server_name)s] Validate your email"

            Configuration settings related to push notifications


            push

            -

            This setting defines options for push notifications.

            +

            This setting defines options for push notifications.

            This option has a number of sub-options. They are as follows:

            • include_content: Clients requesting push notifications can either have the body of @@ -2944,7 +2964,7 @@ because it is loaded by the app. iPhone, however will send a notification saying only that a message arrived and who it came from. Defaults to true. Set to false to only include the event ID and room ID in push notification payloads.
            • group_unread_count_by_room: false: When a push notification is received, an unread count is also sent. -This number can either be calculated as the number of unread messages for the user, or the number of rooms the +This number can either be calculated as the number of unread messages for the user, or the number of rooms the user has unread messages in. Defaults to true, meaning push clients will see the number of rooms with unread messages in them. Set to false to instead send the number of unread messages.
            • @@ -2976,7 +2996,7 @@ will also not affect rooms created by other servers.


      user_directory

      -

      This setting defines options related to the user directory.

      +

      This setting defines options related to the user directory.

      This option has the following sub-options:

      • enabled: Defines whether users can search the user directory. If false then @@ -2994,7 +3014,7 @@ https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/backg Set to true to return search results containing all known users, even if that user does not share a room with the requester.
      • prefer_local_users: Defines whether to prefer local users in search query results. -If set to true, local users are more likely to appear above remote users when searching the +If set to true, local users are more likely to appear above remote users when searching the user directory. Defaults to false.

      Example configuration:

      @@ -3061,14 +3081,14 @@ Defaults to "Privacy Policy".


      stats

      Settings for local room and user statistics collection. See here -for more.

      +for more.

      • enabled: Set to false to disable room and user statistics. Note that doing so may cause certain features (such as the room directory) not to work -correctly. Defaults to true.
      • +correctly. Defaults to true.

      Example configuration:

      -
      stats:  
      +
      stats:
         enabled: false
       

      @@ -3096,7 +3116,7 @@ notices.

      Set to false to disable searching the public room list. When disabled blocks searching local and remote room lists for local and remote -users by always returning an empty list for all queries. Defaults to true.

      +users by always returning an empty list for all queries. Defaults to true.

      Example configuration:

      enable_room_list_search: false
       
      @@ -3116,7 +3136,7 @@ can create aliases.

    • user_id: Matches against the creator of the alias. Defaults to "*".
    • alias: Matches against the alias being created. Defaults to "*".
    • room_id: Matches against the room ID the alias is being pointed at. Defaults to "*"
    • -
    • action: Whether to "allow" or "deny" the request if the rule matches. Defaults to allow.
    • +
    • action: Whether to "allow" or "deny" the request if the rule matches. Defaults to allow.

    Example configuration:

    alias_creation_rules:
    @@ -3141,7 +3161,7 @@ can publish rooms.

  • user_id: Matches against the creator of the alias. Defaults to "*".
  • alias: Matches against any current local or canonical aliases associated with the room. Defaults to "*".
  • room_id: Matches against the room ID being published. Defaults to "*".
  • -
  • action: Whether to "allow" or "deny" the request if the rule matches. Defaults to allow.
  • +
  • action: Whether to "allow" or "deny" the request if the rule matches. Defaults to allow.
  • Example configuration:

    room_list_publication_rules:
    @@ -3183,14 +3203,14 @@ synapse or any other services which support opentracing
     
    • enabled: whether tracing is enabled. Set to true to enable. Disabled by default.
    • homeserver_whitelist: The list of homeservers we wish to send and receive span contexts and span baggage. -See here for more. +See here for more. This is a list of regexes which are matched against the server_name of the homeserver. By default, it is empty, so no servers are matched.
    • force_tracing_for_users: # A list of the matrix IDs of users whose requests will always be traced, even if the tracing system would otherwise drop the traces due to probabilistic sampling. By default, the list is empty.
    • jaeger_config: Jaeger can be configured to sample traces at different rates. -All configuration options provided by Jaeger can be set here. Jaeger's configuration is +All configuration options provided by Jaeger can be set here. Jaeger's configuration is mostly related to trace sampling which is documented here.

    Example configuration:

    @@ -3215,18 +3235,18 @@ mostly related to trace sampling which is documented send_federation

    Controls sending of outbound federation transactions on the main process. -Set to false if using a federation sender worker. Defaults to true.

    +Set to false if using a federation sender worker. Defaults to true.

    Example configuration:

    send_federation: false
     

    federation_sender_instances

    It is possible to run multiple federation sender workers, in which case the -work is balanced across them. Use this setting to list the senders.

    +work is balanced across them. Use this setting to list the senders.

    This configuration setting must be shared between all federation sender workers, and if changed all federation sender workers must be stopped at the same time and then started, to ensure that all instances are running with the same config (otherwise -events may be dropped).

    +events may be dropped).

    Example configuration:

    federation_sender_instances:
       - federation_sender1
    @@ -3234,7 +3254,7 @@ events may be dropped). 


    instance_map

    When using workers this should be a map from worker name to the -HTTP replication listener of the worker, if configured.

    +HTTP replication listener of the worker, if configured.

    Example configuration:

    instance_map:
       worker1:
    @@ -3271,7 +3291,7 @@ from workers.

    using workers (unless using old style direct TCP configuration). This setting has the following sub-options:

      -
    • enabled: whether to use Redis support. Defaults to false.
    • +
    • enabled: whether to use Redis support. Defaults to false.
    • host and port: Optional host and port to use to connect to redis. Defaults to localhost and 6379
    • password: Optional password if configured on the Redis instance.
    • @@ -3284,7 +3304,7 @@ localhost and 6379 password: <secret_password>

    Background Updates

    -

    Configuration settings related to background updates.

    +

    Configuration settings related to background updates.


    background_updates

    Background updates are database updates that are run in the background in batches. @@ -3292,7 +3312,7 @@ The duration, minimum batch size, default batch size, whether to sleep between b sleep can all be configured. This is helpful to speed up or slow down the updates. This setting has the following sub-options:

      -
    • background_update_duration_ms: How long in milliseconds to run a batch of background updates for. Defaults to 100. +
    • background_update_duration_ms: How long in milliseconds to run a batch of background updates for. Defaults to 100. Set a different time to change the default.
    • sleep_enabled: Whether to sleep between updates. Defaults to true. Set to false to change the default.
    • sleep_duration_ms: If sleeping between updates, how long in milliseconds to sleep for. Defaults to 1000. @@ -3302,7 +3322,7 @@ Set a size to change the default.
    • default_batch_size: The batch size to use for the first iteration of a new background update. The default is 100. Set a size to change the default.
    -

    Example configuration:

    +

    Example configuration:

    background_updates:
         background_update_duration_ms: 500
         sleep_enabled: false
    -- 
    cgit 1.5.1