Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

3008 rader
113 KiB

  1. #jinja2: lstrip_blocks: True
  2. # Configuration file for Synapse.
  3. #
  4. # This is a YAML file: see [1] for a quick introduction. Note in particular
  5. # that *indentation is important*: all the elements of a list or dictionary
  6. # should have the same indentation.
  7. #
  8. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  9. ## Modules ##
  10. # Server admins can expand Synapse's functionality with external modules.
  11. #
  12. # See https://matrix-org.github.io/synapse/latest/modules/index.html for more
  13. # documentation on how to configure or create custom modules for Synapse.
  14. #
  15. #modules:
  16. #- module: my_super_module.MySuperClass
  17. # config:
  18. # do_thing: true
  19. #- module: my_other_super_module.SomeClass
  20. # config: {}
  21. modules: {{ matrix_synapse_modules|to_json }}
  22. ## Server ##
  23. # The public-facing domain of the server
  24. #
  25. # The server_name name will appear at the end of usernames and room addresses
  26. # created on this server. For example if the server_name was example.com,
  27. # usernames on this server would be in the format @alice:example.com
  28. #
  29. # In most cases you should avoid using a Matrix specific subdomain such as
  30. # matrix.example.com or synapse.example.com as the server_name for the same
  31. # reasons you wouldn't use user@email.example.com as your email address.
  32. # See https://matrix-org.github.io/synapse/latest/delegate.html
  33. # for information on how to host Synapse on a subdomain while preserving
  34. # a clean server_name.
  35. #
  36. # The server_name cannot be changed later so it is important to
  37. # configure this correctly before you start Synapse. It should be all
  38. # lowercase and may contain an explicit port.
  39. # Examples: matrix.org, localhost:8080
  40. #
  41. server_name: "{{ matrix_domain }}"
  42. # When running as a daemon, the file to store the pid in
  43. #
  44. pid_file: /homeserver.pid
  45. # The absolute URL to the web client which / will redirect to.
  46. #
  47. #web_client_location: https://riot.example.com/
  48. # The public-facing base URL that clients use to access this Homeserver (not
  49. # including _matrix/…). This is the same URL a user might enter into the
  50. # 'Custom Homeserver URL' field on their client. If you use Synapse with a
  51. # reverse proxy, this should be the URL to reach Synapse via the proxy.
  52. # Otherwise, it should be the URL to reach Synapse's client HTTP listener (see
  53. # 'listeners' below).
  54. #
  55. # Defaults to 'https://<server_name>/'.
  56. #
  57. public_baseurl: {{ matrix_synapse_public_baseurl | to_json }}
  58. # Uncomment the following to tell other servers to send federation traffic on
  59. # port 443.
  60. #
  61. # By default, other servers will try to reach our server on port 8448, which can
  62. # be inconvenient in some environments.
  63. #
  64. # Provided 'https://<server_name>/' on port 443 is routed to Synapse, this
  65. # option configures Synapse to serve a file at
  66. # 'https://<server_name>/.well-known/matrix/server'. This will tell other
  67. # servers to send traffic to port 443 instead.
  68. #
  69. # See https://matrix-org.github.io/synapse/latest/delegate.html for more
  70. # information.
  71. #
  72. # Defaults to 'false'.
  73. #
  74. #serve_server_wellknown: true
  75. # Set the soft limit on the number of file descriptors synapse can use
  76. # Zero is used to indicate synapse should set the soft limit to the
  77. # hard limit.
  78. #
  79. #soft_file_limit: 0
  80. # Presence tracking allows users to see the state (e.g online/offline)
  81. # of other local and remote users.
  82. #
  83. presence:
  84. # Uncomment to disable presence tracking on this homeserver. This option
  85. # replaces the previous top-level 'use_presence' option.
  86. #
  87. enabled: {{ matrix_synapse_presence_enabled|to_json }}
  88. # Whether to require authentication to retrieve profile data (avatars,
  89. # display names) of other users through the client API. Defaults to
  90. # 'false'. Note that profile data is also available via the federation
  91. # API, unless allow_profile_lookup_over_federation is set to false.
  92. #
  93. require_auth_for_profile_requests: {{ matrix_synapse_require_auth_for_profile_requests|to_json }}
  94. # Uncomment to require a user to share a room with another user in order
  95. # to retrieve their profile information. Only checked on Client-Server
  96. # requests. Profile requests from other servers should be checked by the
  97. # requesting server. Defaults to 'false'.
  98. #
  99. limit_profile_requests_to_users_who_share_rooms: {{ matrix_synapse_limit_profile_requests_to_users_who_share_rooms|to_json }}
  100. # Uncomment to prevent a user's profile data from being retrieved and
  101. # displayed in a room until they have joined it. By default, a user's
  102. # profile data is included in an invite event, regardless of the values
  103. # of the above two settings, and whether or not the users share a server.
  104. # Defaults to 'true'.
  105. #
  106. include_profile_data_on_invite: {{ matrix_synapse_include_profile_data_on_invite|to_json }}
  107. # If set to 'true', removes the need for authentication to access the server's
  108. # public rooms directory through the client API, meaning that anyone can
  109. # query the room directory. Defaults to 'false'.
  110. #
  111. allow_public_rooms_without_auth: {{ matrix_synapse_allow_public_rooms_without_auth|to_json }}
  112. # If set to 'true', allows any other homeserver to fetch the server's public
  113. # rooms directory via federation. Defaults to 'false'.
  114. #
  115. allow_public_rooms_over_federation: {{ matrix_synapse_allow_public_rooms_over_federation|to_json }}
  116. # The default room version for newly created rooms.
  117. #
  118. # Known room versions are listed here:
  119. # https://spec.matrix.org/latest/rooms/#complete-list-of-room-versions
  120. #
  121. # For example, for room version 1, default_room_version should be set
  122. # to "1".
  123. #
  124. default_room_version: {{ matrix_synapse_default_room_version|to_json }}
  125. # Set to true to automatically forget rooms for users when they leave them, either
  126. # normally or via a kick or ban. Defaults to false.
  127. forget_rooms_on_leave: {{ matrix_synapse_forget_rooms_on_leave | to_json }}
  128. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  129. #
  130. #gc_thresholds: [700, 10, 10]
  131. # The minimum time in seconds between each GC for a generation, regardless of
  132. # the GC thresholds. This ensures that we don't do GC too frequently.
  133. #
  134. # A value of `[1s, 10s, 30s]` indicates that a second must pass between consecutive
  135. # generation 0 GCs, etc.
  136. #
  137. # Defaults to `[1s, 10s, 30s]`.
  138. #
  139. #gc_min_interval: [0.5s, 30s, 1m]
  140. # Set the limit on the returned events in the timeline in the get
  141. # and sync operations. The default value is 100. -1 means no upper limit.
  142. #
  143. # Uncomment the following to increase the limit to 5000.
  144. #
  145. #filter_timeline_limit: 5000
  146. # Whether room invites to users on this server should be blocked
  147. # (except those sent by local server admins). The default is False.
  148. #
  149. #block_non_admin_invites: True
  150. # Room searching
  151. #
  152. # If disabled, new messages will not be indexed for searching and users
  153. # will receive errors when searching for messages. Defaults to enabled.
  154. #
  155. #enable_search: false
  156. # Prevent outgoing requests from being sent to the following blacklisted IP address
  157. # CIDR ranges. If this option is not specified then it defaults to private IP
  158. # address ranges (see the example below).
  159. #
  160. # The blacklist applies to the outbound requests for federation, identity servers,
  161. # push servers, and for checking key validity for third-party invite events.
  162. #
  163. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  164. # listed here, since they correspond to unroutable addresses.)
  165. #
  166. # This option replaces federation_ip_range_blacklist in Synapse v1.25.0.
  167. #
  168. # Note: The value is ignored when an HTTP proxy is in use
  169. #
  170. #ip_range_blacklist:
  171. # - '127.0.0.0/8'
  172. # - '10.0.0.0/8'
  173. # - '172.16.0.0/12'
  174. # - '192.168.0.0/16'
  175. # - '100.64.0.0/10'
  176. # - '192.0.0.0/24'
  177. # - '169.254.0.0/16'
  178. # - '192.88.99.0/24'
  179. # - '198.18.0.0/15'
  180. # - '192.0.2.0/24'
  181. # - '198.51.100.0/24'
  182. # - '203.0.113.0/24'
  183. # - '224.0.0.0/4'
  184. # - '::1/128'
  185. # - 'fe80::/10'
  186. # - 'fc00::/7'
  187. # - '2001:db8::/32'
  188. # - 'ff00::/8'
  189. # - 'fec0::/10'
  190. # List of IP address CIDR ranges that should be allowed for federation,
  191. # identity servers, push servers, and for checking key validity for
  192. # third-party invite events. This is useful for specifying exceptions to
  193. # wide-ranging blacklisted target IP ranges - e.g. for communication with
  194. # a push server only visible in your network.
  195. #
  196. # This whitelist overrides ip_range_blacklist and defaults to an empty
  197. # list.
  198. #
  199. #ip_range_whitelist:
  200. # - '192.168.1.1'
  201. # List of ports that Synapse should listen on, their purpose and their
  202. # configuration.
  203. #
  204. # Options for each listener include:
  205. #
  206. # port: the TCP port to bind to
  207. #
  208. # bind_addresses: a list of local addresses to listen on. The default is
  209. # 'all local interfaces'.
  210. #
  211. # type: the type of listener. Normally 'http', but other valid options are:
  212. # 'manhole' (see https://matrix-org.github.io/synapse/latest/manhole.html),
  213. # 'metrics' (see https://matrix-org.github.io/synapse/latest/metrics-howto.html),
  214. # 'replication' (see https://matrix-org.github.io/synapse/latest/workers.html).
  215. #
  216. # tls: set to true to enable TLS for this listener. Will use the TLS
  217. # key/cert specified in tls_private_key_path / tls_certificate_path.
  218. #
  219. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  220. # X-Forwarded-For header as the client IP. Useful when Synapse is
  221. # behind a reverse-proxy.
  222. #
  223. # resources: Only valid for an 'http' listener. A list of resources to host
  224. # on this port. Options for each resource are:
  225. #
  226. # names: a list of names of HTTP resources. See below for a list of
  227. # valid resource names.
  228. #
  229. # compress: set to true to enable HTTP compression for this resource.
  230. #
  231. # additional_resources: Only valid for an 'http' listener. A map of
  232. # additional endpoints which should be loaded via dynamic modules.
  233. #
  234. # Valid resource names are:
  235. #
  236. # client: the client-server API (/_matrix/client), and the synapse admin
  237. # API (/_synapse/admin). Also implies 'media' and 'static'.
  238. #
  239. # consent: user consent forms (/_matrix/consent).
  240. # See https://matrix-org.github.io/synapse/latest/consent_tracking.html.
  241. #
  242. # federation: the server-server API (/_matrix/federation). Also implies
  243. # 'media', 'keys', 'openid'
  244. #
  245. # keys: the key discovery API (/_matrix/keys).
  246. #
  247. # media: the media API (/_matrix/media).
  248. #
  249. # metrics: the metrics interface.
  250. # See https://matrix-org.github.io/synapse/latest/consent_tracking.html.
  251. #
  252. # openid: OpenID authentication.
  253. #
  254. # replication: the HTTP replication API (/_synapse/replication).
  255. # See https://matrix-org.github.io/synapse/latest/consent_tracking.html.
  256. #
  257. # static: static resources under synapse/static (/_matrix/static). (Mostly
  258. # useful for 'fallback authentication'.)
  259. #
  260. listeners:
  261. {% if matrix_synapse_metrics_enabled %}
  262. - type: metrics
  263. port: {{ matrix_synapse_metrics_port|to_json }}
  264. bind_addresses:
  265. - '0.0.0.0'
  266. {% endif %}
  267. {% if matrix_synapse_federation_port_enabled and matrix_synapse_tls_federation_listener_enabled %}
  268. # TLS-enabled listener: for when Matrix traffic is sent directly to synapse.
  269. - port: {{ matrix_synapse_container_federation_api_tls_port|to_json }}
  270. tls: true
  271. bind_addresses: ['::']
  272. type: http
  273. x_forwarded: {{ matrix_synapse_container_federation_api_tls_x_forwarded | to_json }}
  274. resources:
  275. - names: {{ matrix_synapse_federation_listener_resource_names|to_json }}
  276. compress: false
  277. {% endif %}
  278. # Insecure HTTP listener (Client API): for when Matrix traffic passes through a reverse proxy
  279. # that unwraps TLS.
  280. - port: {{ matrix_synapse_container_client_api_port|to_json }}
  281. tls: false
  282. bind_addresses: ['::']
  283. type: http
  284. x_forwarded: {{ matrix_synapse_container_client_api_x_forwarded | to_json }}
  285. resources:
  286. - names: {{ matrix_synapse_http_listener_resource_names|to_json }}
  287. compress: false
  288. {% if matrix_synapse_federation_port_enabled %}
  289. # Insecure HTTP listener (Federation API): for when Matrix traffic passes through a reverse proxy
  290. # that unwraps TLS.
  291. - port: {{ matrix_synapse_container_federation_api_plain_port|to_json }}
  292. tls: false
  293. bind_addresses: ['::']
  294. type: http
  295. x_forwarded: {{ matrix_synapse_container_federation_api_plain_x_forwarded | to_json }}
  296. resources:
  297. - names: {{ matrix_synapse_federation_listener_resource_names|to_json }}
  298. compress: false
  299. {% endif %}
  300. {% if matrix_synapse_manhole_enabled %}
  301. # Turn on the twisted ssh manhole service on localhost on the given
  302. # port.
  303. - port: 9000
  304. bind_addresses: ['0.0.0.0']
  305. type: manhole
  306. {% endif %}
  307. {% if matrix_synapse_workers_enabled %}
  308. {% if matrix_synapse_replication_listener_enabled %}
  309. # c.f. https://github.com/element-hq/synapse/tree/master/docs/workers.md
  310. # HTTP replication: for the workers to send data to the main synapse process
  311. - port: {{ matrix_synapse_replication_http_port }}
  312. bind_addresses: ['0.0.0.0']
  313. type: http
  314. resources:
  315. - names: [replication]
  316. {% endif %}
  317. # c.f. https://github.com/element-hq/synapse/tree/master/contrib/systemd-with-workers/README.md
  318. worker_app: synapse.app.homeserver
  319. daemonize: false
  320. {% endif %}
  321. # Connection settings for the manhole
  322. #
  323. manhole_settings:
  324. # The username for the manhole. This defaults to 'matrix'.
  325. #
  326. #username: manhole
  327. # The password for the manhole. This defaults to 'rabbithole'.
  328. #
  329. #password: mypassword
  330. # The private and public SSH key pair used to encrypt the manhole traffic.
  331. # If these are left unset, then hardcoded and non-secret keys are used,
  332. # which could allow traffic to be intercepted if sent over a public network.
  333. #
  334. #ssh_priv_key_path: /data/id_rsa
  335. #ssh_pub_key_path: /data/id_rsa.pub
  336. # Forward extremities can build up in a room due to networking delays between
  337. # homeservers. Once this happens in a large room, calculation of the state of
  338. # that room can become quite expensive. To mitigate this, once the number of
  339. # forward extremities reaches a given threshold, Synapse will send an
  340. # org.matrix.dummy_event event, which will reduce the forward extremities
  341. # in the room.
  342. #
  343. # This setting defines the threshold (i.e. number of forward extremities in the
  344. # room) at which dummy events are sent. The default value is 10.
  345. #
  346. #dummy_events_threshold: 5
  347. ## Homeserver blocking ##
  348. # How to reach the server admin, used in ResourceLimitError
  349. #
  350. admin_contact: {{ matrix_synapse_admin_contact | to_json }}
  351. # Global blocking
  352. #
  353. #hs_disabled: False
  354. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  355. #hs_disabled_limit_type: 'error code(str), to help clients decode reason'
  356. # Monthly Active User Blocking
  357. #
  358. # Used in cases where the admin or server owner wants to limit to the
  359. # number of monthly active users.
  360. #
  361. # 'limit_usage_by_mau' disables/enables monthly active user blocking. When
  362. # enabled and a limit is reached the server returns a 'ResourceLimitError'
  363. # with error type Codes.RESOURCE_LIMIT_EXCEEDED
  364. #
  365. # 'max_mau_value' is the hard limit of monthly active users above which
  366. # the server will start blocking user actions.
  367. #
  368. # 'mau_trial_days' is a means to add a grace period for active users. It
  369. # means that users must be active for this number of days before they
  370. # can be considered active and guards against the case where lots of users
  371. # sign up in a short space of time never to return after their initial
  372. # session.
  373. #
  374. # The option `mau_appservice_trial_days` is similar to `mau_trial_days`, but
  375. # applies a different trial number if the user was registered by an appservice.
  376. # A value of 0 means no trial days are applied. Appservices not listed in this
  377. # dictionary use the value of `mau_trial_days` instead.
  378. #
  379. # 'mau_limit_alerting' is a means of limiting client side alerting
  380. # should the mau limit be reached. This is useful for small instances
  381. # where the admin has 5 mau seats (say) for 5 specific people and no
  382. # interest increasing the mau limit further. Defaults to True, which
  383. # means that alerting is enabled
  384. #
  385. #limit_usage_by_mau: False
  386. #max_mau_value: 50
  387. #mau_trial_days: 2
  388. #mau_limit_alerting: false
  389. #mau_appservice_trial_days:
  390. # "appservice-id": 1
  391. # If enabled, the metrics for the number of monthly active users will
  392. # be populated, however no one will be limited. If limit_usage_by_mau
  393. # is true, this is implied to be true.
  394. #
  395. #mau_stats_only: False
  396. # Sometimes the server admin will want to ensure certain accounts are
  397. # never blocked by mau checking. These accounts are specified here.
  398. #
  399. #mau_limit_reserved_threepids:
  400. # - medium: 'email'
  401. # address: 'reserved_user@example.com'
  402. # Used by phonehome stats to group together related servers.
  403. #server_context: context
  404. # Resource-constrained homeserver settings
  405. limit_remote_rooms:
  406. enabled: {{ matrix_synapse_limit_remote_rooms_enabled | to_json }}
  407. complexity: {{ matrix_synapse_limit_remote_rooms_complexity | to_json }}
  408. complexity_error: {{ matrix_synapse_limit_remote_rooms_complexity_error | to_json }}
  409. admins_can_join: {{ matrix_synapse_limit_remote_rooms_admins_can_join | to_json }}
  410. # Whether to require a user to be in the room to add an alias to it.
  411. # Defaults to 'true'.
  412. #
  413. #require_membership_for_aliases: false
  414. # Whether to allow per-room membership profiles through the send of membership
  415. # events with profile information that differ from the target's global profile.
  416. # Defaults to 'true'.
  417. #
  418. #allow_per_room_profiles: false
  419. # The largest allowed file size for a user avatar. Defaults to no restriction.
  420. #
  421. # Note that user avatar changes will not work if this is set without
  422. # using Synapse's media repository.
  423. #
  424. #max_avatar_size: 10M
  425. # The MIME types allowed for user avatars. Defaults to no restriction.
  426. #
  427. # Note that user avatar changes will not work if this is set without
  428. # using Synapse's media repository.
  429. #
  430. #allowed_avatar_mimetypes: ["image/png", "image/jpeg", "image/gif"]
  431. # How long to keep redacted events in unredacted form in the database. After
  432. # this period redacted events get replaced with their redacted form in the DB.
  433. #
  434. # Defaults to `7d`. Set to `null` to disable.
  435. #
  436. #redaction_retention_period: 28d
  437. redaction_retention_period: {{ matrix_synapse_redaction_retention_period | to_json }}
  438. # How long to keep locally forgotten rooms before purging them from the DB.
  439. #
  440. #forgotten_room_retention_period: 28d
  441. forgotten_room_retention_period: {{ matrix_synapse_forgotten_room_retention_period | to_json }}
  442. # How long to track users' last seen time and IPs in the database.
  443. #
  444. # Defaults to `28d`. Set to `null` to disable clearing out of old rows.
  445. #
  446. #user_ips_max_age: 14d
  447. user_ips_max_age: {{ matrix_synapse_user_ips_max_age | to_json }}
  448. # Inhibits the /requestToken endpoints from returning an error that might leak
  449. # information about whether an e-mail address is in use or not on this
  450. # homeserver.
  451. # Note that for some endpoints the error situation is the e-mail already being
  452. # used, and for others the error is entering the e-mail being unused.
  453. # If this option is enabled, instead of returning an error, these endpoints will
  454. # act as if no error happened and return a fake session ID ('sid') to clients.
  455. #
  456. #request_token_inhibit_3pid_errors: true
  457. # A list of domains that the domain portion of 'next_link' parameters
  458. # must match.
  459. #
  460. # This parameter is optionally provided by clients while requesting
  461. # validation of an email or phone number, and maps to a link that
  462. # users will be automatically redirected to after validation
  463. # succeeds. Clients can make use this parameter to aid the validation
  464. # process.
  465. #
  466. # The whitelist is applied whether the homeserver or an
  467. # identity server is handling validation.
  468. #
  469. # The default value is no whitelist functionality; all domains are
  470. # allowed. Setting this value to an empty list will instead disallow
  471. # all domains.
  472. #
  473. #next_link_domain_whitelist: ["matrix.org"]
  474. # Templates to use when generating email or HTML page contents.
  475. #
  476. templates:
  477. # Directory in which Synapse will try to find template files to use to generate
  478. # email or HTML page contents.
  479. # If not set, or a file is not found within the template directory, a default
  480. # template from within the Synapse package will be used.
  481. #
  482. # See https://matrix-org.github.io/synapse/latest/templates.html for more
  483. # information about using custom templates.
  484. #
  485. #custom_template_directory: /path/to/custom/templates/
  486. {% if matrix_synapse_templates_custom_template_directory %}
  487. custom_template_directory: {{ matrix_synapse_templates_custom_template_directory | to_json }}
  488. {% endif %}
  489. # List of rooms to exclude from sync responses. This is useful for server
  490. # administrators wishing to group users into a room without these users being able
  491. # to see it from their client.
  492. #
  493. # By default, no room is excluded.
  494. #
  495. #exclude_rooms_from_sync:
  496. # - !qporfwt:example.com
  497. # Message retention policy at the server level.
  498. #
  499. # Room admins and mods can define a retention period for their rooms using the
  500. # 'm.room.retention' state event, and server admins can cap this period by setting
  501. # the 'allowed_lifetime_min' and 'allowed_lifetime_max' config options.
  502. #
  503. # If this feature is enabled, Synapse will regularly look for and purge events
  504. # which are older than the room's maximum retention period. Synapse will also
  505. # filter events received over federation so that events that should have been
  506. # purged are ignored and not stored again.
  507. #
  508. retention:
  509. {% if matrix_synapse_retention_enabled %}
  510. # The message retention policies feature is disabled by default. Uncomment the
  511. # following line to enable it.
  512. #
  513. enabled: {{ matrix_synapse_retention_enabled|to_json }}
  514. # Default retention policy. If set, Synapse will apply it to rooms that lack the
  515. # 'm.room.retention' state event. Currently, the value of 'min_lifetime' doesn't
  516. # matter much because Synapse doesn't take it into account yet.
  517. #
  518. {% if matrix_synapse_retention_default_policy_min_lifetime | length > 0 or matrix_synapse_retention_default_policy_max_lifetime | length > 0 %}
  519. default_policy:
  520. {% if matrix_synapse_retention_default_policy_min_lifetime | length > 0 %}
  521. min_lifetime: {{ matrix_synapse_retention_default_policy_min_lifetime|to_json }}
  522. {% endif %}
  523. {% if matrix_synapse_retention_default_policy_max_lifetime | length > 0 %}
  524. max_lifetime: {{ matrix_synapse_retention_default_policy_max_lifetime|to_json }}
  525. {% endif %}
  526. {% endif %}
  527. # Retention policy limits. If set, and the state of a room contains a
  528. # 'm.room.retention' event in its state which contains a 'min_lifetime' or a
  529. # 'max_lifetime' that's out of these bounds, Synapse will cap the room's policy
  530. # to these limits when running purge jobs.
  531. #
  532. {% if matrix_synapse_retention_allowed_lifetime_min | length > 0 %}
  533. allowed_lifetime_min: {{ matrix_synapse_retention_allowed_lifetime_min|to_json }}
  534. {% endif %}
  535. {% if matrix_synapse_retention_allowed_lifetime_max | length > 0 %}
  536. allowed_lifetime_max: {{ matrix_synapse_retention_allowed_lifetime_max|to_json }}
  537. {% endif %}
  538. # Server admins can define the settings of the background jobs purging the
  539. # events which lifetime has expired under the 'purge_jobs' section.
  540. #
  541. # If no configuration is provided, a single job will be set up to delete expired
  542. # events in every room daily.
  543. #
  544. # Each job's configuration defines which range of message lifetimes the job
  545. # takes care of. For example, if 'shortest_max_lifetime' is '2d' and
  546. # 'longest_max_lifetime' is '3d', the job will handle purging expired events in
  547. # rooms whose state defines a 'max_lifetime' that's both higher than 2 days, and
  548. # lower than or equal to 3 days. Both the minimum and the maximum value of a
  549. # range are optional, e.g. a job with no 'shortest_max_lifetime' and a
  550. # 'longest_max_lifetime' of '3d' will handle every room with a retention policy
  551. # which 'max_lifetime' is lower than or equal to three days.
  552. #
  553. # The rationale for this per-job configuration is that some rooms might have a
  554. # retention policy with a low 'max_lifetime', where history needs to be purged
  555. # of outdated messages on a more frequent basis than for the rest of the rooms
  556. # (e.g. every 12h), but not want that purge to be performed by a job that's
  557. # iterating over every room it knows, which could be heavy on the server.
  558. #
  559. # If any purge job is configured, it is strongly recommended to have at least
  560. # a single job with neither 'shortest_max_lifetime' nor 'longest_max_lifetime'
  561. # set, or one job without 'shortest_max_lifetime' and one job without
  562. # 'longest_max_lifetime' set. Otherwise some rooms might be ignored, even if
  563. # 'allowed_lifetime_min' and 'allowed_lifetime_max' are set, because capping a
  564. # room's policy to these values is done after the policies are retrieved from
  565. # Synapse's database (which is done using the range specified in a purge job's
  566. # configuration).
  567. purge_jobs: {{ matrix_synapse_retention_purge_jobs | to_json }}
  568. {% endif %}
  569. ## TLS ##
  570. # PEM-encoded X509 certificate for TLS.
  571. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  572. # certificate, signed by a recognised Certificate Authority.
  573. #
  574. # Be sure to use a `.pem` file that includes the full certificate chain including
  575. # any intermediate certificates (for instance, if using certbot, use
  576. # `fullchain.pem` as your certificate, not `cert.pem`).
  577. #
  578. tls_certificate_path: {{ matrix_synapse_tls_certificate_path|to_json }}
  579. # PEM-encoded private key for TLS
  580. #
  581. tls_private_key_path: {{ matrix_synapse_tls_private_key_path|to_json }}
  582. # Whether to verify TLS server certificates for outbound federation requests.
  583. #
  584. # Defaults to `true`. To disable certificate verification, uncomment the
  585. # following line.
  586. #
  587. #federation_verify_certificates: false
  588. # The minimum TLS version that will be used for outbound federation requests.
  589. #
  590. # Defaults to `1`. Configurable to `1`, `1.1`, `1.2`, or `1.3`. Note
  591. # that setting this value higher than `1.2` will prevent federation to most
  592. # of the public Matrix network: only configure it to `1.3` if you have an
  593. # entirely private federation setup and you can ensure TLS 1.3 support.
  594. #
  595. #federation_client_minimum_tls_version: 1.2
  596. # Skip federation certificate verification on the following whitelist
  597. # of domains.
  598. #
  599. # This setting should only be used in very specific cases, such as
  600. # federation over Tor hidden services and similar. For private networks
  601. # of homeservers, you likely want to use a private CA instead.
  602. #
  603. # Only effective if federation_verify_certicates is `true`.
  604. #
  605. #federation_certificate_verification_whitelist:
  606. # - lon.example.com
  607. # - "*.example.com"
  608. # - "*.onion"
  609. # List of custom certificate authorities for federation traffic.
  610. #
  611. # This setting should only normally be used within a private network of
  612. # homeservers.
  613. #
  614. # Note that this list will replace those that are provided by your
  615. # operating environment. Certificates must be in PEM format.
  616. #
  617. #federation_custom_ca_list:
  618. # - myCA1.pem
  619. # - myCA2.pem
  620. # - myCA3.pem
  621. ## Federation ##
  622. # Restrict federation to the following whitelist of domains.
  623. # N.B. we recommend also firewalling your federation listener to limit
  624. # inbound federation traffic as early as possible, rather than relying
  625. # purely on this application-layer restriction. If not specified, the
  626. # default is to whitelist everything.
  627. #
  628. #federation_domain_whitelist:
  629. # - lon.example.com
  630. # - nyc.example.com
  631. # - syd.example.com
  632. {% if matrix_synapse_federation_domain_whitelist is not none %}
  633. {# Cannot use `|to_nice_yaml` here, as an empty list does not get serialized properly by it. #}
  634. federation_domain_whitelist: {{ matrix_synapse_federation_domain_whitelist|to_json }}
  635. {% endif %}
  636. # Report prometheus metrics on the age of PDUs being sent to and received from
  637. # the following domains. This can be used to give an idea of "delay" on inbound
  638. # and outbound federation, though be aware that any delay can be due to problems
  639. # at either end or with the intermediate network.
  640. #
  641. # By default, no domains are monitored in this way.
  642. #
  643. #federation_metrics_domains:
  644. # - matrix.org
  645. # - example.com
  646. # Uncomment to disable profile lookup over federation. By default, the
  647. # Federation API allows other homeservers to obtain profile data of any user
  648. # on this homeserver. Defaults to 'true'.
  649. #
  650. #allow_profile_lookup_over_federation: false
  651. # Uncomment to allow device display name lookup over federation. By default, the
  652. # Federation API prevents other homeservers from obtaining the display names of
  653. # user devices on this homeserver. Defaults to 'false'.
  654. #
  655. #allow_device_name_lookup_over_federation: true
  656. ## Caching ##
  657. # Caching can be configured through the following options.
  658. #
  659. # A cache 'factor' is a multiplier that can be applied to each of
  660. # Synapse's caches in order to increase or decrease the maximum
  661. # number of entries that can be stored.
  662. # The number of events to cache in memory. Not affected by
  663. # caches.global_factor.
  664. #
  665. event_cache_size: {{ matrix_synapse_event_cache_size | to_json }}
  666. caches:
  667. # Controls the global cache factor, which is the default cache factor
  668. # for all caches if a specific factor for that cache is not otherwise
  669. # set.
  670. #
  671. # This can also be set by the "SYNAPSE_CACHE_FACTOR" environment
  672. # variable. Setting by environment variable takes priority over
  673. # setting through the config file.
  674. #
  675. # Defaults to 0.5, which will half the size of all caches.
  676. #
  677. global_factor: {{ matrix_synapse_caches_global_factor | to_json }}
  678. # A dictionary of cache name to cache factor for that individual
  679. # cache. Overrides the global cache factor for a given cache.
  680. #
  681. # These can also be set through environment variables comprised
  682. # of "SYNAPSE_CACHE_FACTOR_" + the name of the cache in capital
  683. # letters and underscores. Setting by environment variable
  684. # takes priority over setting through the config file.
  685. # Ex. SYNAPSE_CACHE_FACTOR_GET_USERS_WHO_SHARE_ROOM_WITH_USER=2.0
  686. #
  687. # Some caches have '*' and other characters that are not
  688. # alphanumeric or underscores. These caches can be named with or
  689. # without the special characters stripped. For example, to specify
  690. # the cache factor for `*stateGroupCache*` via an environment
  691. # variable would be `SYNAPSE_CACHE_FACTOR_STATEGROUPCACHE=2.0`.
  692. #
  693. per_cache_factors:
  694. #get_users_who_share_room_with_user: 2.0
  695. # Controls whether cache entries are evicted after a specified time
  696. # period. Defaults to true. Uncomment to disable this feature.
  697. #
  698. expire_caches: {{ matrix_synapse_caches_expire_caches | to_json }}
  699. # If expire_caches is enabled, this flag controls how long an entry can
  700. # be in a cache without having been accessed before being evicted.
  701. # Defaults to 30m. Uncomment to set a different time to live for cache entries.
  702. #
  703. cache_entry_ttl: {{ matrix_synapse_caches_cache_entry_ttl | to_json }}
  704. # Controls how long the results of a /sync request are cached for after
  705. # a successful response is returned. A higher duration can help clients with
  706. # intermittent connections, at the cost of higher memory usage.
  707. #
  708. # By default, this is zero, which means that sync responses are not cached
  709. # at all.
  710. #
  711. sync_response_cache_duration: {{ matrix_synapse_caches_sync_response_cache_duration | to_json }}
  712. cache_autotuning:
  713. max_cache_memory_usage: {{ ((matrix_synapse_cache_autotuning_max_cache_memory_usage | int | to_json) if matrix_synapse_cache_autotuning_max_cache_memory_usage else '') }}
  714. target_cache_memory_usage: {{ ((matrix_synapse_cache_autotuning_target_cache_memory_usage | int | to_json) if matrix_synapse_cache_autotuning_target_cache_memory_usage else '') }}
  715. min_cache_ttl: {{ matrix_synapse_cache_autotuning_min_cache_ttl | to_json }}
  716. ## Database ##
  717. # The 'database' setting defines the database that synapse uses to store all of
  718. # its data.
  719. #
  720. # 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or
  721. # 'psycopg2' (for PostgreSQL).
  722. #
  723. # 'txn_limit' gives the maximum number of transactions to run per connection
  724. # before reconnecting. Defaults to 0, which means no limit.
  725. #
  726. # 'allow_unsafe_locale' is an option specific to Postgres. Under the default behavior, Synapse will refuse to
  727. # start if the Postgres db is set to a non-C locale. You can override this behavior (which is *not* recommended)
  728. # by setting 'allow_unsafe_locale' to true. Note that doing so may corrupt your database. You can find more information
  729. # here: https://matrix-org.github.io/synapse/latest/postgres.html#fixing-incorrect-collate-or-ctype and here:
  730. # https://wiki.postgresql.org/wiki/Locale_data_changes
  731. #
  732. # 'args' gives options which are passed through to the database engine,
  733. # except for options starting 'cp_', which are used to configure the Twisted
  734. # connection pool. For a reference to valid arguments, see:
  735. # * for sqlite: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
  736. # * for postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
  737. # * for the connection pool: https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__
  738. #
  739. #
  740. # Example SQLite configuration:
  741. #
  742. #database:
  743. # name: sqlite3
  744. # args:
  745. # database: /path/to/homeserver.db
  746. #
  747. #
  748. # Example Postgres configuration:
  749. #
  750. #database:
  751. # name: psycopg2
  752. # txn_limit: 10000
  753. # args:
  754. # user: synapse_user
  755. # password: secretpassword
  756. # database: synapse
  757. # host: localhost
  758. # port: 5432
  759. # cp_min: 5
  760. # cp_max: 10
  761. #
  762. # For more information on using Synapse with Postgres,
  763. # see https://matrix-org.github.io/synapse/latest/postgres.html.
  764. #
  765. database:
  766. # The database engine name
  767. name: "psycopg2"
  768. txn_limit: {{ matrix_synapse_database_txn_limit }}
  769. args:
  770. user: {{ matrix_synapse_database_user | string|to_json }}
  771. password: {{ matrix_synapse_database_password | string|to_json }}
  772. database: "{{ matrix_synapse_database_database }}"
  773. host: "{{ matrix_synapse_database_host }}"
  774. port: {{ matrix_synapse_database_port }}
  775. cp_min: {{ matrix_synapse_database_cp_min | to_json }}
  776. cp_max: {{ matrix_synapse_database_cp_max | to_json }}
  777. ## Logging ##
  778. # A yaml python logging config file as described by
  779. # https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
  780. #
  781. log_config: "/data/{{ matrix_server_fqn_matrix }}.log.config"
  782. ## Ratelimiting ##
  783. # Ratelimiting settings for client actions (registration, login, messaging).
  784. #
  785. # Each ratelimiting configuration is made of two parameters:
  786. # - per_second: number of requests a client can send per second.
  787. # - burst_count: number of requests a client can send before being throttled.
  788. #
  789. # Synapse currently uses the following configurations:
  790. # - one for messages that ratelimits sending based on the account the client
  791. # is using
  792. # - one for registration that ratelimits registration requests based on the
  793. # client's IP address.
  794. # - one for checking the validity of registration tokens that ratelimits
  795. # requests based on the client's IP address.
  796. # - one for login that ratelimits login requests based on the client's IP
  797. # address.
  798. # - one for login that ratelimits login requests based on the account the
  799. # client is attempting to log into.
  800. # - one for login that ratelimits login requests based on the account the
  801. # client is attempting to log into, based on the amount of failed login
  802. # attempts for this account.
  803. # - one for ratelimiting redactions by room admins. If this is not explicitly
  804. # set then it uses the same ratelimiting as per rc_message. This is useful
  805. # to allow room admins to deal with abuse quickly.
  806. # - two for ratelimiting number of rooms a user can join, "local" for when
  807. # users are joining rooms the server is already in (this is cheap) vs
  808. # "remote" for when users are trying to join rooms not on the server (which
  809. # can be more expensive)
  810. # - one for ratelimiting how often a user or IP can attempt to validate a 3PID.
  811. # - two for ratelimiting how often invites can be sent in a room or to a
  812. # specific user.
  813. # - one for ratelimiting 3PID invites (i.e. invites sent to a third-party ID
  814. # such as an email address or a phone number) based on the account that's
  815. # sending the invite.
  816. #
  817. # The defaults are as shown below.
  818. #
  819. #rc_message:
  820. # per_second: 0.2
  821. # burst_count: 10
  822. rc_message: {{ matrix_synapse_rc_message|to_json }}
  823. #
  824. #rc_registration:
  825. # per_second: 0.17
  826. # burst_count: 3
  827. rc_registration: {{ matrix_synapse_rc_registration|to_json }}
  828. #
  829. #rc_registration_token_validity:
  830. # per_second: 0.1
  831. # burst_count: 5
  832. #
  833. #rc_login:
  834. # address:
  835. # per_second: 0.17
  836. # burst_count: 3
  837. # account:
  838. # per_second: 0.17
  839. # burst_count: 3
  840. # failed_attempts:
  841. # per_second: 0.17
  842. # burst_count: 3
  843. rc_login: {{ matrix_synapse_rc_login|to_json }}
  844. #
  845. #rc_admin_redaction:
  846. # per_second: 1
  847. # burst_count: 50
  848. rc_admin_redaction: {{ matrix_synapse_rc_admin_redaction|to_json }}
  849. #
  850. #rc_joins:
  851. # local:
  852. # per_second: 0.1
  853. # burst_count: 10
  854. # remote:
  855. # per_second: 0.01
  856. # burst_count: 10
  857. rc_joins: {{ matrix_synapse_rc_joins|to_json }}
  858. #
  859. #rc_3pid_validation:
  860. # per_second: 0.003
  861. # burst_count: 5
  862. #
  863. #rc_invites:
  864. # per_room:
  865. # per_second: 0.3
  866. # burst_count: 10
  867. # per_user:
  868. # per_second: 0.003
  869. # burst_count: 5
  870. #
  871. rc_invites: {{ matrix_synapse_rc_invites|to_json }}
  872. #rc_third_party_invite:
  873. # per_second: 0.2
  874. # burst_count: 10
  875. # Ratelimiting settings for incoming federation
  876. #
  877. # The rc_federation configuration is made up of the following settings:
  878. # - window_size: window size in milliseconds
  879. # - sleep_limit: number of federation requests from a single server in
  880. # a window before the server will delay processing the request.
  881. # - sleep_delay: duration in milliseconds to delay processing events
  882. # from remote servers by if they go over the sleep limit.
  883. # - reject_limit: maximum number of concurrent federation requests
  884. # allowed from a single server
  885. # - concurrent: number of federation requests to concurrently process
  886. # from a single server
  887. #
  888. # The defaults are as shown below.
  889. #
  890. #rc_federation:
  891. # window_size: 1000
  892. # sleep_limit: 10
  893. # sleep_delay: 500
  894. # reject_limit: 50
  895. # concurrent: 3
  896. rc_federation: {{ matrix_synapse_rc_federation|to_json }}
  897. # Target outgoing federation transaction frequency for sending read-receipts,
  898. # per-room.
  899. #
  900. # If we end up trying to send out more read-receipts, they will get buffered up
  901. # into fewer transactions.
  902. #
  903. #federation_rr_transactions_per_room_per_second: 50
  904. federation_rr_transactions_per_room_per_second: {{ matrix_synapse_federation_rr_transactions_per_room_per_second }}
  905. ## Media Store ##
  906. # Enable the media store service in the Synapse master. Uncomment the
  907. # following if you are using a separate media store worker.
  908. #
  909. #enable_media_repo: false
  910. enable_media_repo: {{ matrix_synapse_enable_media_repo | to_json }}
  911. # Enable the local on-disk media storage provider.
  912. # When disabled, media is stored only in configured media_storage_providers and temporary files are used for processing (no local caching).
  913. # Warning: If this option is set to false and no media_storage_providers are configured, all media requests will return 404 errors as there will be no storage backend available.
  914. enable_local_media_storage: {{ matrix_synapse_enable_local_media_storage | to_json }}
  915. # Enable authenticated media.
  916. # enable_authenticated_media blocks access to new media from the legacy endpoints
  917. # and freezes the unauthenticated media repo by blocking all downloads that are not using
  918. # the new authenticated endpoints. If this option is turned off all media reverts to being considered "old"
  919. enable_authenticated_media: {{ matrix_synapse_enable_authenticated_media | to_json }}
  920. # Directory where uploaded images and attachments are stored.
  921. #
  922. media_store_path: "/matrix-media-store-parent/{{ matrix_synapse_media_store_directory_name }}"
  923. # Media storage providers allow media to be stored in different
  924. # locations.
  925. #
  926. #media_storage_providers:
  927. # - module: file_system
  928. # # Whether to store newly uploaded local files
  929. # store_local: false
  930. # # Whether to store newly downloaded remote files
  931. # store_remote: false
  932. # # Whether to wait for successful storage for local uploads
  933. # store_synchronous: false
  934. # config:
  935. # directory: /mnt/some/other/directory
  936. media_storage_providers: {{ matrix_synapse_media_storage_providers | to_json }}
  937. # The largest allowed upload size in bytes
  938. #
  939. # If you are using a reverse proxy you may also need to set this value in
  940. # your reverse proxy's config. Notably Nginx has a small max body size by default.
  941. # See https://matrix-org.github.io/synapse/latest/reverse_proxy.html.
  942. #
  943. max_upload_size: "{{ matrix_synapse_max_upload_size_mb }}M"
  944. media_retention:
  945. {% if matrix_synapse_media_retention_local_media_lifetime %}
  946. local_media_lifetime: {{ matrix_synapse_media_retention_local_media_lifetime|to_json }}
  947. {% endif %}
  948. {% if matrix_synapse_media_retention_remote_media_lifetime %}
  949. remote_media_lifetime: {{ matrix_synapse_media_retention_remote_media_lifetime|to_json }}
  950. {% endif %}
  951. # Maximum number of pixels that will be thumbnailed
  952. #
  953. #max_image_pixels: 32M
  954. # Whether to generate new thumbnails on the fly to precisely match
  955. # the resolution requested by the client. If true then whenever
  956. # a new resolution is requested by the client the server will
  957. # generate a new thumbnail. If false the server will pick a thumbnail
  958. # from a precalculated list.
  959. #
  960. #dynamic_thumbnails: false
  961. # List of thumbnails to precalculate when an image is uploaded.
  962. #
  963. #thumbnail_sizes:
  964. # - width: 32
  965. # height: 32
  966. # method: crop
  967. # - width: 96
  968. # height: 96
  969. # method: crop
  970. # - width: 320
  971. # height: 240
  972. # method: scale
  973. # - width: 640
  974. # height: 480
  975. # method: scale
  976. # - width: 800
  977. # height: 600
  978. # method: scale
  979. # Is the preview URL API enabled?
  980. #
  981. # 'false' by default: uncomment the following to enable it (and specify a
  982. # url_preview_ip_range_blacklist blacklist).
  983. #
  984. url_preview_enabled: {{ matrix_synapse_url_preview_enabled|to_json }}
  985. # List of IP address CIDR ranges that the URL preview spider is denied
  986. # from accessing. There are no defaults: you must explicitly
  987. # specify a list for URL previewing to work. You should specify any
  988. # internal services in your network that you do not want synapse to try
  989. # to connect to, otherwise anyone in any Matrix room could cause your
  990. # synapse to issue arbitrary GET requests to your internal services,
  991. # causing serious security issues.
  992. #
  993. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  994. # listed here, since they correspond to unroutable addresses.)
  995. #
  996. # This must be specified if url_preview_enabled is set. It is recommended that
  997. # you uncomment the following list as a starting point.
  998. #
  999. # Note: The value is ignored when an HTTP proxy is in use
  1000. #
  1001. {% if matrix_synapse_url_preview_enabled %}
  1002. url_preview_ip_range_blacklist: {{ matrix_synapse_url_preview_ip_range_blacklist | to_json }}
  1003. {% endif %}
  1004. # List of IP address CIDR ranges that the URL preview spider is allowed
  1005. # to access even if they are specified in url_preview_ip_range_blacklist.
  1006. # This is useful for specifying exceptions to wide-ranging blacklisted
  1007. # target IP ranges - e.g. for enabling URL previews for a specific private
  1008. # website only visible in your network.
  1009. #
  1010. {% if matrix_synapse_url_preview_enabled %}
  1011. url_preview_ip_range_whitelist: {{ matrix_synapse_url_preview_ip_range_whitelist | to_json }}
  1012. {% endif %}
  1013. # Optional list of URL matches that the URL preview spider is
  1014. # denied from accessing. You should use url_preview_ip_range_blacklist
  1015. # in preference to this, otherwise someone could define a public DNS
  1016. # entry that points to a private IP address and circumvent the blacklist.
  1017. # This is more useful if you know there is an entire shape of URL that
  1018. # you know that will never want synapse to try to spider.
  1019. #
  1020. # Each list entry is a dictionary of url component attributes as returned
  1021. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  1022. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  1023. # The values of the dictionary are treated as an filename match pattern
  1024. # applied to that component of URLs, unless they start with a ^ in which
  1025. # case they are treated as a regular expression match. If all the
  1026. # specified component matches for a given list item succeed, the URL is
  1027. # blacklisted.
  1028. #
  1029. #url_preview_url_blacklist:
  1030. # # blacklist any URL with a username in its URI
  1031. # - username: '*'
  1032. #
  1033. # # blacklist all *.google.com URLs
  1034. # - netloc: 'google.com'
  1035. # - netloc: '*.google.com'
  1036. #
  1037. # # blacklist all plain HTTP URLs
  1038. # - scheme: 'http'
  1039. #
  1040. # # blacklist http(s)://www.acme.com/foo
  1041. # - netloc: 'www.acme.com'
  1042. # path: '/foo'
  1043. #
  1044. # # blacklist any URL with a literal IPv4 address
  1045. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  1046. {% if matrix_synapse_url_preview_url_blacklist | length > 0 %}
  1047. url_preview_url_blacklist: {{ matrix_synapse_url_preview_url_blacklist | to_json }}
  1048. {% endif %}
  1049. # The largest allowed URL preview spidering size in bytes
  1050. #
  1051. max_spider_size: 10M
  1052. # A list of values for the Accept-Language HTTP header used when
  1053. # downloading webpages during URL preview generation. This allows
  1054. # Synapse to specify the preferred languages that URL previews should
  1055. # be in when communicating with remote servers.
  1056. #
  1057. # Each value is a IETF language tag; a 2-3 letter identifier for a
  1058. # language, optionally followed by subtags separated by '-', specifying
  1059. # a country or region variant.
  1060. #
  1061. # Multiple values can be provided, and a weight can be added to each by
  1062. # using quality value syntax (;q=). '*' translates to any language.
  1063. #
  1064. # Defaults to "en".
  1065. #
  1066. # Example:
  1067. #
  1068. # url_preview_accept_language:
  1069. # - en-UK
  1070. # - en-US;q=0.9
  1071. # - fr;q=0.8
  1072. # - *;q=0.7
  1073. #
  1074. url_preview_accept_language: {{ matrix_url_preview_accept_language|to_json }}
  1075. # oEmbed allows for easier embedding content from a website. It can be
  1076. # used for generating URLs previews of services which support it.
  1077. #
  1078. oembed:
  1079. # A default list of oEmbed providers is included with Synapse.
  1080. #
  1081. # Uncomment the following to disable using these default oEmbed URLs.
  1082. # Defaults to 'false'.
  1083. #
  1084. #disable_default_providers: true
  1085. # Additional files with oEmbed configuration (each should be in the
  1086. # form of providers.json).
  1087. #
  1088. # By default, this list is empty (so only the default providers.json
  1089. # is used).
  1090. #
  1091. #additional_providers:
  1092. # - oembed/my_providers.json
  1093. additional_providers: {{ matrix_synapse_oembed_additional_providers|to_json }}
  1094. ## Captcha ##
  1095. # See docs/CAPTCHA_SETUP.md for full details of configuring this.
  1096. # This homeserver's ReCAPTCHA public key. Must be specified if
  1097. # enable_registration_captcha is enabled.
  1098. #
  1099. recaptcha_public_key: {{ matrix_synapse_recaptcha_public_key|string|to_json }}
  1100. # This homeserver's ReCAPTCHA private key. Must be specified if
  1101. # enable_registration_captcha is enabled.
  1102. #
  1103. recaptcha_private_key: {{ matrix_synapse_recaptcha_private_key|string|to_json }}
  1104. # Uncomment to enable ReCaptcha checks when registering, preventing signup
  1105. # unless a captcha is answered. Requires a valid ReCaptcha
  1106. # public/private key. Defaults to 'false'.
  1107. #
  1108. enable_registration_captcha: {{ matrix_synapse_enable_registration_captcha|to_json }}
  1109. # The API endpoint to use for verifying m.login.recaptcha responses.
  1110. # Defaults to "https://www.recaptcha.net/recaptcha/api/siteverify".
  1111. #
  1112. #recaptcha_siteverify_api: "https://my.recaptcha.site"
  1113. ## TURN ##
  1114. # The public URIs of the TURN server to give to clients
  1115. #
  1116. turn_uris: {{ matrix_synapse_turn_uris|to_json }}
  1117. # The shared secret used to compute passwords for the TURN server
  1118. #
  1119. turn_shared_secret: {{ matrix_synapse_turn_shared_secret | string | to_json }}
  1120. # The Username and password if the TURN server needs them and
  1121. # does not use a token
  1122. #
  1123. turn_username: {{ matrix_synapse_turn_username | string | to_json }}
  1124. turn_password: {{ matrix_synapse_turn_password | string | to_json }}
  1125. # How long generated TURN credentials last
  1126. #
  1127. #turn_user_lifetime: 1h
  1128. # Whether guests should be allowed to use the TURN server.
  1129. # This defaults to True, otherwise VoIP will be unreliable for guests.
  1130. # However, it does introduce a slight security risk as it allows users to
  1131. # connect to arbitrary endpoints without having first signed up for a
  1132. # valid account (e.g. by passing a CAPTCHA).
  1133. #
  1134. turn_allow_guests: {{ matrix_synapse_turn_allow_guests|to_json }}
  1135. ## Registration ##
  1136. #
  1137. # Registration can be rate-limited using the parameters in the "Ratelimiting"
  1138. # section of this file.
  1139. # Enable registration for new users. Defaults to 'false'. It is highly recommended that if you enable registration,
  1140. # you use either captcha, email, or token-based verification to verify that new users are not bots. In order to enable registration
  1141. # without any verification, you must also set `enable_registration_without_verification`, found below.
  1142. #
  1143. enable_registration: {{ matrix_synapse_enable_registration|to_json }}
  1144. # Enable registration without email or captcha verification. Note: this option is *not* recommended,
  1145. # as registration without verification is a known vector for spam and abuse. Defaults to false. Has no effect
  1146. # unless `enable_registration` is also enabled.
  1147. #
  1148. enable_registration_without_verification: {{ matrix_synapse_enable_registration_without_verification|to_json }}
  1149. # Time that a user's session remains valid for, after they log in.
  1150. #
  1151. # Note that this is not currently compatible with guest logins.
  1152. #
  1153. # Note also that this is calculated at login time: changes are not applied
  1154. # retrospectively to users who have already logged in.
  1155. #
  1156. # By default, this is infinite.
  1157. #
  1158. #session_lifetime: 24h
  1159. # Time that an access token remains valid for, if the session is
  1160. # using refresh tokens.
  1161. # For more information about refresh tokens, please see the manual.
  1162. # Note that this only applies to clients which advertise support for
  1163. # refresh tokens.
  1164. #
  1165. # Note also that this is calculated at login time and refresh time:
  1166. # changes are not applied to existing sessions until they are refreshed.
  1167. #
  1168. # By default, this is 5 minutes.
  1169. #
  1170. #refreshable_access_token_lifetime: 5m
  1171. # Time that a refresh token remains valid for (provided that it is not
  1172. # exchanged for another one first).
  1173. # This option can be used to automatically log-out inactive sessions.
  1174. # Please see the manual for more information.
  1175. #
  1176. # Note also that this is calculated at login time and refresh time:
  1177. # changes are not applied to existing sessions until they are refreshed.
  1178. #
  1179. # By default, this is infinite.
  1180. #
  1181. #refresh_token_lifetime: 24h
  1182. # Time that an access token remains valid for, if the session is NOT
  1183. # using refresh tokens.
  1184. # Please note that not all clients support refresh tokens, so setting
  1185. # this to a short value may be inconvenient for some users who will
  1186. # then be logged out frequently.
  1187. #
  1188. # Note also that this is calculated at login time: changes are not applied
  1189. # retrospectively to existing sessions for users that have already logged in.
  1190. #
  1191. # By default, this is infinite.
  1192. #
  1193. #nonrefreshable_access_token_lifetime: 24h
  1194. # The user must provide all of the below types of 3PID when registering.
  1195. #
  1196. #registrations_require_3pid:
  1197. # - email
  1198. # - msisdn
  1199. {% if matrix_synapse_registrations_require_3pid|length > 0 %}
  1200. registrations_require_3pid: {{ matrix_synapse_registrations_require_3pid|to_json }}
  1201. {% endif %}
  1202. # Explicitly disable asking for MSISDNs from the registration
  1203. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  1204. #
  1205. disable_msisdn_registration: {{ matrix_synapse_disable_msisdn_registration|to_json }}
  1206. # Mandate that users are only allowed to associate certain formats of
  1207. # 3PIDs with accounts on this server.
  1208. #
  1209. #allowed_local_3pids:
  1210. # - medium: email
  1211. # pattern: '^[^@]+@matrix\.org$'
  1212. # - medium: email
  1213. # pattern: '^[^@]+@vector\.im$'
  1214. # - medium: msisdn
  1215. # pattern: '\+44'
  1216. {% if matrix_synapse_allowed_local_3pids|length > 0 %}
  1217. allowed_local_3pids: {{ matrix_synapse_allowed_local_3pids|to_json }}
  1218. {% endif %}
  1219. # Enable 3PIDs lookup requests to identity servers from this server.
  1220. #
  1221. #enable_3pid_lookup: true
  1222. # Require users to submit a token during registration.
  1223. # Tokens can be managed using the admin API:
  1224. # https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/registration_tokens.html
  1225. # Note that `enable_registration` must be set to `true`.
  1226. # Disabling this option will not delete any tokens previously generated.
  1227. # Defaults to false. Uncomment the following to require tokens:
  1228. #
  1229. registration_requires_token: {{ matrix_synapse_registration_requires_token|to_json }}
  1230. # Allow users to submit a token during registration to bypass any required 3pid
  1231. # steps configured in `registrations_require_3pid`.
  1232. # Defaults to false, requiring that registration tokens (if enabled) complete a 3pid flow.
  1233. #
  1234. #enable_registration_token_3pid_bypass: false
  1235. # If set, allows registration of standard or admin accounts by anyone who
  1236. # has the shared secret, even if registration is otherwise disabled.
  1237. #
  1238. registration_shared_secret: {{ matrix_synapse_registration_shared_secret | string|to_json }}
  1239. # Set the number of bcrypt rounds used to generate password hash.
  1240. # Larger numbers increase the work factor needed to generate the hash.
  1241. # The default number is 12 (which equates to 2^12 rounds).
  1242. # N.B. that increasing this will exponentially increase the time required
  1243. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  1244. #
  1245. #bcrypt_rounds: 12
  1246. # Allows users to register as guests without a password/email/etc, and
  1247. # participate in rooms hosted on this server which have been made
  1248. # accessible to anonymous users.
  1249. #
  1250. allow_guest_access: {{ matrix_synapse_allow_guest_access|to_json }}
  1251. # The identity server which we suggest that clients should use when users log
  1252. # in on this server.
  1253. #
  1254. # (By default, no suggestion is made, so it is left up to the client.
  1255. # This setting is ignored unless public_baseurl is also explicitly set.)
  1256. #
  1257. #default_identity_server: https://matrix.org
  1258. # Handle threepid (phone etc) registration and password resets through a set of
  1259. # *trusted* identity servers. Note that this allows the configured identity server to
  1260. # reset passwords for accounts!
  1261. #
  1262. # Additionally, if `msisdn` is not set, registration and password resets via msisdn
  1263. # will be disabled regardless, and users will not be able to associate an msisdn
  1264. # identifier to their account. This is due to Synapse currently not supporting
  1265. # any method of sending SMS messages on its own.
  1266. #
  1267. # To enable using an identity server for operations regarding a particular third-party
  1268. # identifier type, set the value to the URL of that identity server as shown in the
  1269. # examples below.
  1270. #
  1271. # Servers handling the these requests must answer the `/requestToken` endpoints defined
  1272. # by the Matrix Identity Service API specification:
  1273. # https://matrix.org/docs/spec/identity_service/latest
  1274. #
  1275. account_threepid_delegates:
  1276. msisdn: {{ matrix_synapse_account_threepid_delegates_msisdn|to_json }}
  1277. # Whether users are allowed to change their displayname after it has
  1278. # been initially set. Useful when provisioning users based on the
  1279. # contents of a third-party directory.
  1280. #
  1281. # Does not apply to server administrators. Defaults to 'true'
  1282. #
  1283. #enable_set_displayname: false
  1284. # Whether users are allowed to change their avatar after it has been
  1285. # initially set. Useful when provisioning users based on the contents
  1286. # of a third-party directory.
  1287. #
  1288. # Does not apply to server administrators. Defaults to 'true'
  1289. #
  1290. #enable_set_avatar_url: false
  1291. # Whether users can change the 3PIDs associated with their accounts
  1292. # (email address and msisdn).
  1293. #
  1294. # Defaults to 'true'
  1295. #
  1296. #enable_3pid_changes: false
  1297. # Users who register on this homeserver will automatically be joined
  1298. # to these rooms.
  1299. #
  1300. # By default, any room aliases included in this list will be created
  1301. # as a publicly joinable room when the first user registers for the
  1302. # homeserver. This behaviour can be customised with the settings below.
  1303. # If the room already exists, make certain it is a publicly joinable
  1304. # room. The join rule of the room must be set to 'public'.
  1305. #
  1306. #auto_join_rooms:
  1307. # - "#example:example.com"
  1308. {% if matrix_synapse_auto_join_rooms|length > 0 %}
  1309. auto_join_rooms:
  1310. {{ matrix_synapse_auto_join_rooms|to_nice_yaml(indent=2, width=999999) }}
  1311. {% endif %}
  1312. # Where auto_join_rooms are specified, setting this flag ensures that the
  1313. # the rooms exist by creating them when the first user on the
  1314. # homeserver registers.
  1315. #
  1316. # By default the auto-created rooms are publicly joinable from any federated
  1317. # server. Use the autocreate_auto_join_rooms_federated and
  1318. # autocreate_auto_join_room_preset settings below to customise this behaviour.
  1319. #
  1320. # Setting to false means that if the rooms are not manually created,
  1321. # users cannot be auto-joined since they do not exist.
  1322. #
  1323. # Defaults to true. Uncomment the following line to disable automatically
  1324. # creating auto-join rooms.
  1325. #
  1326. autocreate_auto_join_rooms: {{ matrix_synapse_autocreate_auto_join_rooms|to_json }}
  1327. # Whether the auto_join_rooms that are auto-created are available via
  1328. # federation. Only has an effect if autocreate_auto_join_rooms is true.
  1329. #
  1330. # Note that whether a room is federated cannot be modified after
  1331. # creation.
  1332. #
  1333. # Defaults to true: the room will be joinable from other servers.
  1334. # Uncomment the following to prevent users from other homeservers from
  1335. # joining these rooms.
  1336. #
  1337. #autocreate_auto_join_rooms_federated: false
  1338. # The room preset to use when auto-creating one of auto_join_rooms. Only has an
  1339. # effect if autocreate_auto_join_rooms is true.
  1340. #
  1341. # This can be one of "public_chat", "private_chat", or "trusted_private_chat".
  1342. # If a value of "private_chat" or "trusted_private_chat" is used then
  1343. # auto_join_mxid_localpart must also be configured.
  1344. #
  1345. # Defaults to "public_chat", meaning that the room is joinable by anyone, including
  1346. # federated servers if autocreate_auto_join_rooms_federated is true (the default).
  1347. # Uncomment the following to require an invitation to join these rooms.
  1348. #
  1349. #autocreate_auto_join_room_preset: private_chat
  1350. # The local part of the user ID which is used to create auto_join_rooms if
  1351. # autocreate_auto_join_rooms is true. If this is not provided then the
  1352. # initial user account that registers will be used to create the rooms.
  1353. #
  1354. # The user ID is also used to invite new users to any auto-join rooms which
  1355. # are set to invite-only.
  1356. #
  1357. # It *must* be configured if autocreate_auto_join_room_preset is set to
  1358. # "private_chat" or "trusted_private_chat".
  1359. #
  1360. # Note that this must be specified in order for new users to be correctly
  1361. # invited to any auto-join rooms which have been set to invite-only (either
  1362. # at the time of creation or subsequently).
  1363. #
  1364. # Note that, if the room already exists, this user must be joined and
  1365. # have the appropriate permissions to invite new members.
  1366. #
  1367. auto_join_mxid_localpart: {{ matrix_synapse_auto_join_mxid_localpart | to_json }}
  1368. # When auto_join_rooms is specified, setting this flag to false prevents
  1369. # guest accounts from being automatically joined to the rooms.
  1370. #
  1371. # Defaults to true.
  1372. #
  1373. #auto_join_rooms_for_guests: false
  1374. auto_accept_invites:
  1375. enabled: {{ matrix_synapse_auto_accept_invites_enabled | to_json }}
  1376. only_for_direct_messages: {{ matrix_synapse_auto_accept_invites_only_for_direct_messages | to_json }}
  1377. only_from_local_users: {{ matrix_synapse_auto_accept_invites_only_from_local_users | to_json }}
  1378. worker_to_run_on: {{ matrix_synapse_auto_accept_invites_worker_to_run_on | to_json }}
  1379. # Whether to inhibit errors raised when registering a new account if the user ID
  1380. # already exists. If turned on, that requests to /register/available will always
  1381. # show a user ID as available, and Synapse won't raise an error when starting
  1382. # a registration with a user ID that already exists. However, Synapse will still
  1383. # raise an error if the registration completes and the username conflicts.
  1384. #
  1385. # Defaults to false.
  1386. #
  1387. #inhibit_user_in_use_error: true
  1388. ## Metrics ###
  1389. # Enable collection and rendering of performance metrics
  1390. #
  1391. enable_metrics: {{ matrix_synapse_metrics_enabled|to_json }}
  1392. # Enable sentry integration
  1393. # Note: While attempts are made to ensure that the logs don't contain
  1394. # any sensitive information, this cannot be guaranteed. By enabling
  1395. # this option the sentry server may therefore receive sensitive
  1396. # information, and it in turn may then diseminate sensitive information
  1397. # through insecure notification channels if so configured.
  1398. #
  1399. {% if matrix_synapse_sentry_dsn != "" %}
  1400. sentry:
  1401. dsn: {{ matrix_synapse_sentry_dsn|to_json }}
  1402. {% endif %}
  1403. # Flags to enable Prometheus metrics which are not suitable to be
  1404. # enabled by default, either for performance reasons or limited use.
  1405. #
  1406. metrics_flags:
  1407. # Publish synapse_federation_known_servers, a gauge of the number of
  1408. # servers this homeserver knows about, including itself. May cause
  1409. # performance problems on large homeservers.
  1410. #
  1411. #known_servers: true
  1412. # Whether or not to report homeserver usage statistics.
  1413. #
  1414. report_stats: {{ matrix_synapse_report_stats|to_json }}
  1415. # The endpoint to report homeserver usage statistics to.
  1416. # Defaults to https://matrix.org/report-usage-stats/push
  1417. #
  1418. #report_stats_endpoint: https://example.com/report-usage-stats/push
  1419. report_stats_endpoint: {{ matrix_synapse_report_stats_endpoint|to_json }}
  1420. ## API Configuration ##
  1421. # Controls for the state that is shared with users who receive an invite
  1422. # to a room
  1423. #
  1424. room_prejoin_state:
  1425. # By default, the following state event types are shared with users who
  1426. # receive invites to the room:
  1427. #
  1428. # - m.room.join_rules
  1429. # - m.room.canonical_alias
  1430. # - m.room.avatar
  1431. # - m.room.encryption
  1432. # - m.room.name
  1433. # - m.room.create
  1434. # - m.room.topic
  1435. #
  1436. # Uncomment the following to disable these defaults (so that only the event
  1437. # types listed in 'additional_event_types' are shared). Defaults to 'false'.
  1438. #
  1439. #disable_default_event_types: true
  1440. # Additional state event types to share with users when they are invited
  1441. # to a room.
  1442. #
  1443. # By default, this list is empty (so only the default event types are shared).
  1444. #
  1445. #additional_event_types:
  1446. # - org.example.custom.event.type
  1447. # We record the IP address of clients used to access the API for various
  1448. # reasons, including displaying it to the user in the "Where you're signed in"
  1449. # dialog.
  1450. #
  1451. # By default, when puppeting another user via the admin API, the client IP
  1452. # address is recorded against the user who created the access token (ie, the
  1453. # admin user), and *not* the puppeted user.
  1454. #
  1455. # Uncomment the following to also record the IP address against the puppeted
  1456. # user. (This also means that the puppeted user will count as an "active" user
  1457. # for the purpose of monthly active user tracking - see 'limit_usage_by_mau' etc
  1458. # above.)
  1459. #
  1460. #track_puppeted_user_ips: true
  1461. # A list of application service config files to use
  1462. #
  1463. app_service_config_files: {{ matrix_synapse_app_service_config_files_final|to_json }}
  1464. # Uncomment to enable tracking of application service IP addresses. Implicitly
  1465. # enables MAU tracking for application service users.
  1466. #
  1467. #track_appservice_user_ips: True
  1468. # a secret which is used to sign access tokens. If none is specified,
  1469. # the registration_shared_secret is used, if one is given; otherwise,
  1470. # a secret key is derived from the signing key.
  1471. #
  1472. macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key | string|to_json }}
  1473. # a secret which is used to calculate HMACs for form values, to stop
  1474. # falsification of values. Must be specified for the User Consent
  1475. # forms to work.
  1476. #
  1477. form_secret: {{ matrix_synapse_form_secret | string|to_json }}
  1478. ## Signing Keys ##
  1479. # Path to the signing key to sign messages with
  1480. #
  1481. signing_key_path: "/data/{{ matrix_server_fqn_matrix }}.signing.key"
  1482. # The keys that the server used to sign messages with but won't use
  1483. # to sign new messages.
  1484. #
  1485. old_signing_keys:
  1486. # For each key, `key` should be the base64-encoded public key, and
  1487. # `expired_ts`should be the time (in milliseconds since the unix epoch) that
  1488. # it was last used.
  1489. #
  1490. # It is possible to build an entry from an old signing.key file using the
  1491. # `export_signing_key` script which is provided with synapse.
  1492. #
  1493. # For example:
  1494. #
  1495. #"ed25519:id": { key: "base64string", expired_ts: 123456789123 }
  1496. # How long key response published by this server is valid for.
  1497. # Used to set the valid_until_ts in /key/v2 APIs.
  1498. # Determines how quickly servers will query to check which keys
  1499. # are still valid.
  1500. #
  1501. #key_refresh_interval: 1d
  1502. # The trusted servers to download signing keys from.
  1503. #
  1504. # When we need to fetch a signing key, each server is tried in parallel.
  1505. #
  1506. # Normally, the connection to the key server is validated via TLS certificates.
  1507. # Additional security can be provided by configuring a `verify key`, which
  1508. # will make synapse check that the response is signed by that key.
  1509. #
  1510. # This setting supersedes an older setting named `perspectives`. The old format
  1511. # is still supported for backwards-compatibility, but it is deprecated.
  1512. #
  1513. # 'trusted_key_servers' defaults to matrix.org, but using it will generate a
  1514. # warning on start-up. To suppress this warning, set
  1515. # 'suppress_key_server_warning' to true.
  1516. #
  1517. # Options for each entry in the list include:
  1518. #
  1519. # server_name: the name of the server. required.
  1520. #
  1521. # verify_keys: an optional map from key ID to base64-encoded public key.
  1522. # If specified, we will check that the response is signed by at least
  1523. # one of the given keys.
  1524. #
  1525. # accept_keys_insecurely: a boolean. Normally, if `verify_keys` is unset,
  1526. # and federation_verify_certificates is not `true`, synapse will refuse
  1527. # to start, because this would allow anyone who can spoof DNS responses
  1528. # to masquerade as the trusted key server. If you know what you are doing
  1529. # and are sure that your network environment provides a secure connection
  1530. # to the key server, you can set this to `true` to override this
  1531. # behaviour.
  1532. #
  1533. # An example configuration might look like:
  1534. #
  1535. #trusted_key_servers:
  1536. # - server_name: "my_trusted_server.example.com"
  1537. # verify_keys:
  1538. # "ed25519:auto": "abcdefghijklmnopqrstuvwxyzabcdefghijklmopqr"
  1539. # - server_name: "my_other_trusted_server.example.com"
  1540. #
  1541. trusted_key_servers: {{ matrix_synapse_trusted_key_servers|to_json }}
  1542. # Uncomment the following to disable the warning that is emitted when the
  1543. # trusted_key_servers include 'matrix.org'. See above.
  1544. #
  1545. suppress_key_server_warning: {{ matrix_synapse_suppress_key_server_warning|to_json }}
  1546. # The signing keys to use when acting as a trusted key server. If not specified
  1547. # defaults to the server signing key.
  1548. #
  1549. # Can contain multiple keys, one per line.
  1550. #
  1551. #key_server_signing_keys_path: "key_server_signing_keys.key"
  1552. ## Single sign-on integration ##
  1553. # The following settings can be used to make Synapse use a single sign-on
  1554. # provider for authentication, instead of its internal password database.
  1555. #
  1556. # You will probably also want to set the following options to `false` to
  1557. # disable the regular login/registration flows:
  1558. # * enable_registration
  1559. # * password_config.enabled
  1560. #
  1561. # You will also want to investigate the settings under the "sso" configuration
  1562. # section below.
  1563. # Enable SAML2 for registration and login. Uses pysaml2.
  1564. #
  1565. # At least one of `sp_config` or `config_path` must be set in this section to
  1566. # enable SAML login.
  1567. #
  1568. # Once SAML support is enabled, a metadata file will be exposed at
  1569. # https://<server>:<port>/_synapse/client/saml2/metadata.xml, which you may be able to
  1570. # use to configure your SAML IdP with. Alternatively, you can manually configure
  1571. # the IdP to use an ACS location of
  1572. # https://<server>:<port>/_synapse/client/saml2/authn_response.
  1573. #
  1574. saml2_config:
  1575. # `sp_config` is the configuration for the pysaml2 Service Provider.
  1576. # See pysaml2 docs for format of config.
  1577. #
  1578. # Default values will be used for the 'entityid' and 'service' settings,
  1579. # so it is not normally necessary to specify them unless you need to
  1580. # override them.
  1581. #
  1582. sp_config:
  1583. # Point this to the IdP's metadata. You must provide either a local
  1584. # file via the `local` attribute or (preferably) a URL via the
  1585. # `remote` attribute.
  1586. #
  1587. #metadata:
  1588. # local: ["saml2/idp.xml"]
  1589. # remote:
  1590. # - url: https://our_idp/metadata.xml
  1591. # Allowed clock difference in seconds between the homeserver and IdP.
  1592. #
  1593. # Uncomment the below to increase the accepted time difference from 0 to 3 seconds.
  1594. #
  1595. #accepted_time_diff: 3
  1596. # By default, the user has to go to our login page first. If you'd like
  1597. # to allow IdP-initiated login, set 'allow_unsolicited: true' in a
  1598. # 'service.sp' section:
  1599. #
  1600. #service:
  1601. # sp:
  1602. # allow_unsolicited: true
  1603. # The examples below are just used to generate our metadata xml, and you
  1604. # may well not need them, depending on your setup. Alternatively you
  1605. # may need a whole lot more detail - see the pysaml2 docs!
  1606. #description: ["My awesome SP", "en"]
  1607. #name: ["Test SP", "en"]
  1608. #ui_info:
  1609. # display_name:
  1610. # - lang: en
  1611. # text: "Display Name is the descriptive name of your service."
  1612. # description:
  1613. # - lang: en
  1614. # text: "Description should be a short paragraph explaining the purpose of the service."
  1615. # information_url:
  1616. # - lang: en
  1617. # text: "https://example.com/terms-of-service"
  1618. # privacy_statement_url:
  1619. # - lang: en
  1620. # text: "https://example.com/privacy-policy"
  1621. # keywords:
  1622. # - lang: en
  1623. # text: ["Matrix", "Element"]
  1624. # logo:
  1625. # - lang: en
  1626. # text: "https://example.com/logo.svg"
  1627. # width: "200"
  1628. # height: "80"
  1629. #organization:
  1630. # name: Example com
  1631. # display_name:
  1632. # - ["Example co", "en"]
  1633. # url: "http://example.com"
  1634. #contact_person:
  1635. # - given_name: Bob
  1636. # sur_name: "the Sysadmin"
  1637. # email_address": ["admin@example.com"]
  1638. # contact_type": technical
  1639. # Instead of putting the config inline as above, you can specify a
  1640. # separate pysaml2 configuration file:
  1641. #
  1642. #config_path: "/data/sp_conf.py"
  1643. # The lifetime of a SAML session. This defines how long a user has to
  1644. # complete the authentication process, if allow_unsolicited is unset.
  1645. # The default is 15 minutes.
  1646. #
  1647. #saml_session_lifetime: 5m
  1648. # An external module can be provided here as a custom solution to
  1649. # mapping attributes returned from a saml provider onto a Matrix user.
  1650. #
  1651. user_mapping_provider:
  1652. # The custom module's class. Uncomment to use a custom module.
  1653. #
  1654. #module: mapping_provider.SamlMappingProvider
  1655. # Custom configuration values for the module. Below options are
  1656. # intended for the built-in provider, they should be changed if
  1657. # using a custom module. This section will be passed as a Python
  1658. # dictionary to the module's `parse_config` method.
  1659. #
  1660. config:
  1661. # The SAML attribute (after mapping via the attribute maps) to use
  1662. # to derive the Matrix ID from. 'uid' by default.
  1663. #
  1664. # Note: This used to be configured by the
  1665. # saml2_config.mxid_source_attribute option. If that is still
  1666. # defined, its value will be used instead.
  1667. #
  1668. #mxid_source_attribute: displayName
  1669. # The mapping system to use for mapping the saml attribute onto a
  1670. # Matrix ID.
  1671. #
  1672. # Options include:
  1673. # * 'hexencode' (which maps unpermitted characters to '=xx')
  1674. # * 'dotreplace' (which replaces unpermitted characters with
  1675. # '.').
  1676. # The default is 'hexencode'.
  1677. #
  1678. # Note: This used to be configured by the
  1679. # saml2_config.mxid_mapping option. If that is still defined, its
  1680. # value will be used instead.
  1681. #
  1682. #mxid_mapping: dotreplace
  1683. # In previous versions of synapse, the mapping from SAML attribute to
  1684. # MXID was always calculated dynamically rather than stored in a
  1685. # table. For backwards- compatibility, we will look for user_ids
  1686. # matching such a pattern before creating a new account.
  1687. #
  1688. # This setting controls the SAML attribute which will be used for this
  1689. # backwards-compatibility lookup. Typically it should be 'uid', but if
  1690. # the attribute maps are changed, it may be necessary to change it.
  1691. #
  1692. # The default is 'uid'.
  1693. #
  1694. #grandfathered_mxid_source_attribute: upn
  1695. # It is possible to configure Synapse to only allow logins if SAML attributes
  1696. # match particular values. The requirements can be listed under
  1697. # `attribute_requirements` as shown below. All of the listed attributes must
  1698. # match for the login to be permitted.
  1699. #
  1700. #attribute_requirements:
  1701. # - attribute: userGroup
  1702. # value: "staff"
  1703. # - attribute: department
  1704. # value: "sales"
  1705. # If the metadata XML contains multiple IdP entities then the `idp_entityid`
  1706. # option must be set to the entity to redirect users to.
  1707. #
  1708. # Most deployments only have a single IdP entity and so should omit this
  1709. # option.
  1710. #
  1711. #idp_entityid: 'https://our_idp/entityid'
  1712. # List of OpenID Connect (OIDC) / OAuth 2.0 identity providers, for registration
  1713. # and login.
  1714. #
  1715. # Options for each entry include:
  1716. #
  1717. # idp_id: a unique identifier for this identity provider. Used internally
  1718. # by Synapse; should be a single word such as 'github'.
  1719. #
  1720. # Note that, if this is changed, users authenticating via that provider
  1721. # will no longer be recognised as the same user!
  1722. #
  1723. # (Use "oidc" here if you are migrating from an old "oidc_config"
  1724. # configuration.)
  1725. #
  1726. # idp_name: A user-facing name for this identity provider, which is used to
  1727. # offer the user a choice of login mechanisms.
  1728. #
  1729. # idp_icon: An optional icon for this identity provider, which is presented
  1730. # by clients and Synapse's own IdP picker page. If given, must be an
  1731. # MXC URI of the format mxc://example.com/<media-id>. (An easy way to
  1732. # obtain such an MXC URI is to upload an image to an (unencrypted) room
  1733. # and then copy the "url" from the source of the event.)
  1734. #
  1735. # idp_brand: An optional brand for this identity provider, allowing clients
  1736. # to style the login flow according to the identity provider in question.
  1737. # See the spec for possible options here.
  1738. #
  1739. # discover: set to 'false' to disable the use of the OIDC discovery mechanism
  1740. # to discover endpoints. Defaults to true.
  1741. #
  1742. # issuer: Required. The OIDC issuer. Used to validate tokens and (if discovery
  1743. # is enabled) to discover the provider's endpoints.
  1744. #
  1745. # client_id: Required. oauth2 client ID to use.
  1746. #
  1747. # client_secret: oauth2 client secret to use. May be omitted if
  1748. # client_secret_jwt_key is given, or if client_auth_method is 'none'.
  1749. #
  1750. # client_secret_jwt_key: Alternative to client_secret: details of a key used
  1751. # to create a JSON Web Token to be used as an OAuth2 client secret. If
  1752. # given, must be a dictionary with the following properties:
  1753. #
  1754. # key: a pem-encoded signing key. Must be a suitable key for the
  1755. # algorithm specified. Required unless 'key_file' is given.
  1756. #
  1757. # key_file: the path to file containing a pem-encoded signing key file.
  1758. # Required unless 'key' is given.
  1759. #
  1760. # jwt_header: a dictionary giving properties to include in the JWT
  1761. # header. Must include the key 'alg', giving the algorithm used to
  1762. # sign the JWT, such as "ES256", using the JWA identifiers in
  1763. # RFC7518.
  1764. #
  1765. # jwt_payload: an optional dictionary giving properties to include in
  1766. # the JWT payload. Normally this should include an 'iss' key.
  1767. #
  1768. # client_auth_method: auth method to use when exchanging the token. Valid
  1769. # values are 'client_secret_basic' (default), 'client_secret_post' and
  1770. # 'none'.
  1771. #
  1772. # scopes: list of scopes to request. This should normally include the "openid"
  1773. # scope. Defaults to ["openid"].
  1774. #
  1775. # authorization_endpoint: the oauth2 authorization endpoint. Required if
  1776. # provider discovery is disabled.
  1777. #
  1778. # token_endpoint: the oauth2 token endpoint. Required if provider discovery is
  1779. # disabled.
  1780. #
  1781. # userinfo_endpoint: the OIDC userinfo endpoint. Required if discovery is
  1782. # disabled and the 'openid' scope is not requested.
  1783. #
  1784. # jwks_uri: URI where to fetch the JWKS. Required if discovery is disabled and
  1785. # the 'openid' scope is used.
  1786. #
  1787. # skip_verification: set to 'true' to skip metadata verification. Use this if
  1788. # you are connecting to a provider that is not OpenID Connect compliant.
  1789. # Defaults to false. Avoid this in production.
  1790. #
  1791. # user_profile_method: Whether to fetch the user profile from the userinfo
  1792. # endpoint, or to rely on the data returned in the id_token from the
  1793. # token_endpoint.
  1794. #
  1795. # Valid values are: 'auto' or 'userinfo_endpoint'.
  1796. #
  1797. # Defaults to 'auto', which uses the userinfo endpoint if 'openid' is
  1798. # not included in 'scopes'. Set to 'userinfo_endpoint' to always use the
  1799. # userinfo endpoint.
  1800. #
  1801. # allow_existing_users: set to 'true' to allow a user logging in via OIDC to
  1802. # match a pre-existing account instead of failing. This could be used if
  1803. # switching from password logins to OIDC. Defaults to false.
  1804. #
  1805. # user_mapping_provider: Configuration for how attributes returned from a OIDC
  1806. # provider are mapped onto a Matrix user. This setting has the following
  1807. # sub-properties:
  1808. #
  1809. # module: The class name of a custom mapping module. Default is
  1810. # 'synapse.handlers.oidc.JinjaOidcMappingProvider'.
  1811. # See https://matrix-org.github.io/synapse/latest/sso_mapping_providers.html#openid-mapping-providers
  1812. # for information on implementing a custom mapping provider.
  1813. #
  1814. # config: Configuration for the mapping provider module. This section will
  1815. # be passed as a Python dictionary to the user mapping provider
  1816. # module's `parse_config` method.
  1817. #
  1818. # For the default provider, the following settings are available:
  1819. #
  1820. # subject_claim: name of the claim containing a unique identifier
  1821. # for the user. Defaults to 'sub', which OpenID Connect
  1822. # compliant providers should provide.
  1823. #
  1824. # localpart_template: Jinja2 template for the localpart of the MXID.
  1825. # If this is not set, the user will be prompted to choose their
  1826. # own username (see the documentation for the
  1827. # 'sso_auth_account_details.html' template). This template can
  1828. # use the 'localpart_from_email' filter.
  1829. #
  1830. # confirm_localpart: Whether to prompt the user to validate (or
  1831. # change) the generated localpart (see the documentation for the
  1832. # 'sso_auth_account_details.html' template), instead of
  1833. # registering the account right away.
  1834. #
  1835. # display_name_template: Jinja2 template for the display name to set
  1836. # on first login. If unset, no displayname will be set.
  1837. #
  1838. # email_template: Jinja2 template for the email address of the user.
  1839. # If unset, no email address will be added to the account.
  1840. #
  1841. # extra_attributes: a map of Jinja2 templates for extra attributes
  1842. # to send back to the client during login.
  1843. # Note that these are non-standard and clients will ignore them
  1844. # without modifications.
  1845. #
  1846. # When rendering, the Jinja2 templates are given a 'user' variable,
  1847. # which is set to the claims returned by the UserInfo Endpoint and/or
  1848. # in the ID Token.
  1849. #
  1850. # It is possible to configure Synapse to only allow logins if certain attributes
  1851. # match particular values in the OIDC userinfo. The requirements can be listed under
  1852. # `attribute_requirements` as shown below. All of the listed attributes must
  1853. # match for the login to be permitted. Additional attributes can be added to
  1854. # userinfo by expanding the `scopes` section of the OIDC config to retrieve
  1855. # additional information from the OIDC provider.
  1856. #
  1857. # If the OIDC claim is a list, then the attribute must match any value in the list.
  1858. # Otherwise, it must exactly match the value of the claim. Using the example
  1859. # below, the `family_name` claim MUST be "Stephensson", but the `groups`
  1860. # claim MUST contain "admin".
  1861. #
  1862. # attribute_requirements:
  1863. # - attribute: family_name
  1864. # value: "Stephensson"
  1865. # - attribute: groups
  1866. # value: "admin"
  1867. #
  1868. # See https://matrix-org.github.io/synapse/latest/openid.html
  1869. # for information on how to configure these options.
  1870. #
  1871. # For backwards compatibility, it is also possible to configure a single OIDC
  1872. # provider via an 'oidc_config' setting. This is now deprecated and admins are
  1873. # advised to migrate to the 'oidc_providers' format. (When doing that migration,
  1874. # use 'oidc' for the idp_id to ensure that existing users continue to be
  1875. # recognised.)
  1876. #
  1877. {% if matrix_synapse_oidc_enabled and matrix_synapse_oidc_providers | length > 0 %}
  1878. # Generic example
  1879. #matrix_synapse_oidc_providers:
  1880. #- idp_id: my_idp
  1881. # idp_name: "My OpenID provider"
  1882. # idp_icon: "mxc://example.com/mediaid"
  1883. # discover: false
  1884. # issuer: "https://accounts.example.com/"
  1885. # client_id: "provided-by-your-issuer"
  1886. # client_secret: "provided-by-your-issuer"
  1887. # client_auth_method: client_secret_post
  1888. # scopes: ["openid", "profile"]
  1889. # authorization_endpoint: "https://accounts.example.com/oauth2/auth"
  1890. # token_endpoint: "https://accounts.example.com/oauth2/token"
  1891. # userinfo_endpoint: "https://accounts.example.com/userinfo"
  1892. # jwks_uri: "https://accounts.example.com/.well-known/jwks.json"
  1893. # skip_verification: true
  1894. # user_mapping_provider:
  1895. # config:
  1896. # subject_claim: "id"
  1897. # localpart_template: "{% raw %}{{ user.login }}{% endraw %}"
  1898. # display_name_template: "{% raw %}{{ user.name }}{% endraw %}"
  1899. # email_template: "{% raw %}{{ user.email }}{% endraw %}"
  1900. # attribute_requirements:
  1901. # - attribute: userGroup
  1902. # value: "synapseUsers"
  1903. oidc_providers: {{ matrix_synapse_oidc_providers }}
  1904. {% endif %}
  1905. # Enable Central Authentication Service (CAS) for registration and login.
  1906. #
  1907. cas_config:
  1908. # Uncomment the following to enable authorization against a CAS server.
  1909. # Defaults to false.
  1910. #
  1911. enabled: {{ matrix_synapse_cas_config_enabled | to_json }}
  1912. # The URL of the CAS authorization endpoint.
  1913. #
  1914. #server_url: "https://cas-server.com"
  1915. # The attribute of the CAS response to use as the display name.
  1916. #
  1917. # If unset, no displayname will be set.
  1918. #
  1919. #displayname_attribute: name
  1920. # It is possible to configure Synapse to only allow logins if CAS attributes
  1921. # match particular values. All of the keys in the mapping below must exist
  1922. # and the values must match the given value. Alternately if the given value
  1923. # is None then any value is allowed (the attribute just must exist).
  1924. # All of the listed attributes must match for the login to be permitted.
  1925. #
  1926. #required_attributes:
  1927. # userGroup: "staff"
  1928. # department: None
  1929. # Additional settings to use with single-sign on systems such as OpenID Connect,
  1930. # SAML2 and CAS.
  1931. #
  1932. # Server admins can configure custom templates for pages related to SSO. See
  1933. # https://matrix-org.github.io/synapse/latest/templates.html for more information.
  1934. #
  1935. sso:
  1936. # A list of client URLs which are whitelisted so that the user does not
  1937. # have to confirm giving access to their account to the URL. Any client
  1938. # whose URL starts with an entry in the following list will not be subject
  1939. # to an additional confirmation step after the SSO login is completed.
  1940. #
  1941. # WARNING: An entry such as "https://my.client" is insecure, because it
  1942. # will also match "https://my.client.evil.site", exposing your users to
  1943. # phishing attacks from evil.site. To avoid this, include a slash after the
  1944. # hostname: "https://my.client/".
  1945. #
  1946. # The login fallback page (used by clients that don't natively support the
  1947. # required login flows) is whitelisted in addition to any URLs in this list.
  1948. #
  1949. # By default, this list contains only the login fallback page.
  1950. #
  1951. #client_whitelist:
  1952. # - https://riot.im/develop
  1953. # - https://my.custom.client/
  1954. # Uncomment to keep a user's profile fields in sync with information from
  1955. # the identity provider. Currently only syncing the displayname is
  1956. # supported. Fields are checked on every SSO login, and are updated
  1957. # if necessary.
  1958. #
  1959. # Note that enabling this option will override user profile information,
  1960. # regardless of whether users have opted-out of syncing that
  1961. # information when first signing in. Defaults to false.
  1962. #
  1963. #update_profile_information: true
  1964. # JSON web token integration. The following settings can be used to make
  1965. # Synapse JSON web tokens for authentication, instead of its internal
  1966. # password database.
  1967. #
  1968. # Each JSON Web Token needs to contain a "sub" (subject) claim, which is
  1969. # used as the localpart of the mxid.
  1970. #
  1971. # Additionally, the expiration time ("exp"), not before time ("nbf"),
  1972. # and issued at ("iat") claims are validated if present.
  1973. #
  1974. # Note that this is a non-standard login type and client support is
  1975. # expected to be non-existent.
  1976. #
  1977. # See https://matrix-org.github.io/synapse/latest/jwt.html.
  1978. #
  1979. #jwt_config:
  1980. # Uncomment the following to enable authorization using JSON web
  1981. # tokens. Defaults to false.
  1982. #
  1983. #enabled: true
  1984. # This is either the private shared secret or the public key used to
  1985. # decode the contents of the JSON web token.
  1986. #
  1987. # Required if 'enabled' is true.
  1988. #
  1989. #secret: "provided-by-your-issuer"
  1990. # The algorithm used to sign the JSON web token.
  1991. #
  1992. # Supported algorithms are listed at
  1993. # https://pyjwt.readthedocs.io/en/latest/algorithms.html
  1994. #
  1995. # Required if 'enabled' is true.
  1996. #
  1997. #algorithm: "provided-by-your-issuer"
  1998. # Name of the claim containing a unique identifier for the user.
  1999. #
  2000. # Optional, defaults to `sub`.
  2001. #
  2002. #subject_claim: "sub"
  2003. # The issuer to validate the "iss" claim against.
  2004. #
  2005. # Optional, if provided the "iss" claim will be required and
  2006. # validated for all JSON web tokens.
  2007. #
  2008. #issuer: "provided-by-your-issuer"
  2009. # A list of audiences to validate the "aud" claim against.
  2010. #
  2011. # Optional, if provided the "aud" claim will be required and
  2012. # validated for all JSON web tokens.
  2013. #
  2014. # Note that if the "aud" claim is included in a JSON web token then
  2015. # validation will fail without configuring audiences.
  2016. #
  2017. #audiences:
  2018. # - "provided-by-your-issuer"
  2019. password_config:
  2020. # Uncomment to disable password login
  2021. #
  2022. enabled: {{ matrix_synapse_password_config_enabled|to_json }}
  2023. # Uncomment to disable authentication against the local password
  2024. # database. This is ignored if `enabled` is false, and is only useful
  2025. # if you have other password_providers.
  2026. #
  2027. localdb_enabled: {{ matrix_synapse_password_config_localdb_enabled|to_json }}
  2028. # Uncomment and change to a secret random string for extra security.
  2029. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  2030. #
  2031. pepper: {{ matrix_synapse_password_config_pepper | string|to_json }}
  2032. # Define and enforce a password policy. Each parameter is optional.
  2033. # This is an implementation of MSC2000.
  2034. #
  2035. policy:
  2036. # Whether to enforce the password policy.
  2037. # Defaults to 'false'.
  2038. #
  2039. #enabled: true
  2040. # Minimum accepted length for a password.
  2041. # Defaults to 0.
  2042. #
  2043. #minimum_length: 15
  2044. # Whether a password must contain at least one digit.
  2045. # Defaults to 'false'.
  2046. #
  2047. #require_digit: true
  2048. # Whether a password must contain at least one symbol.
  2049. # A symbol is any character that's not a number or a letter.
  2050. # Defaults to 'false'.
  2051. #
  2052. #require_symbol: true
  2053. # Whether a password must contain at least one lowercase letter.
  2054. # Defaults to 'false'.
  2055. #
  2056. #require_lowercase: true
  2057. # Whether a password must contain at least one uppercase letter.
  2058. # Defaults to 'false'.
  2059. #
  2060. #require_uppercase: true
  2061. ui_auth:
  2062. # The amount of time to allow a user-interactive authentication session
  2063. # to be active.
  2064. #
  2065. # This defaults to 0, meaning the user is queried for their credentials
  2066. # before every action, but this can be overridden to allow a single
  2067. # validation to be re-used. This weakens the protections afforded by
  2068. # the user-interactive authentication process, by allowing for multiple
  2069. # (and potentially different) operations to use the same validation session.
  2070. #
  2071. # This is ignored for potentially "dangerous" operations (including
  2072. # deactivating an account, modifying an account password, and
  2073. # adding a 3PID).
  2074. #
  2075. # Uncomment below to allow for credential validation to last for 15
  2076. # seconds.
  2077. #
  2078. #session_timeout: "15s"
  2079. {% if matrix_synapse_email_enabled %}
  2080. # Configuration for sending emails from Synapse.
  2081. #
  2082. # Server admins can configure custom templates for email content. See
  2083. # https://matrix-org.github.io/synapse/latest/templates.html for more information.
  2084. #
  2085. email:
  2086. # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
  2087. #
  2088. #smtp_host: mail.server
  2089. smtp_host: {{ matrix_synapse_email_smtp_host | string|to_json }}
  2090. # The port on the mail server for outgoing SMTP. Defaults to 25.
  2091. #
  2092. #smtp_port: 587
  2093. smtp_port: {{ matrix_synapse_email_smtp_port|to_json }}
  2094. # Username/password for authentication to the SMTP server. By default, no
  2095. # authentication is attempted.
  2096. {% if matrix_synapse_email_smtp_user %}
  2097. smtp_user: {{ matrix_synapse_email_smtp_user | string|to_json }}
  2098. smtp_pass: {{ matrix_synapse_email_smtp_pass | string|to_json }}
  2099. {% endif %}
  2100. # Uncomment the following to require TLS transport security for SMTP.
  2101. # By default, Synapse will connect over plain text, and will then switch to
  2102. # TLS via STARTTLS *if the SMTP server supports it*. If this option is set,
  2103. # Synapse will refuse to connect unless the server supports STARTTLS.
  2104. #
  2105. #require_transport_security: true
  2106. require_transport_security: {{ matrix_synapse_email_smtp_require_transport_security|to_json }}
  2107. # Uncomment the following to disable TLS for SMTP.
  2108. #
  2109. # By default, if the server supports TLS, it will be used, and the server
  2110. # must present a certificate that is valid for 'smtp_host'. If this option
  2111. # is set to false, TLS will not be used.
  2112. #
  2113. enable_tls: {{ matrix_synapse_email_smtp_enable_tls|to_json }}
  2114. # notif_from defines the "From" address to use when sending emails.
  2115. # It must be set if email sending is enabled.
  2116. #
  2117. # The placeholder '%(app)s' will be replaced by the application name,
  2118. # which is normally 'app_name' (below), but may be overridden by the
  2119. # Matrix client application.
  2120. #
  2121. # Note that the placeholder must be written '%(app)s', including the
  2122. # trailing 's'.
  2123. #
  2124. #notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>"
  2125. notif_from: {{ matrix_synapse_email_notif_from | string|to_json }}
  2126. # app_name defines the default value for '%(app)s' in notif_from and email
  2127. # subjects. It defaults to 'Matrix'.
  2128. #
  2129. #app_name: my_branded_matrix_server
  2130. app_name: {{ matrix_synapse_email_app_name | to_json }}
  2131. # Uncomment the following to enable sending emails for messages that the user
  2132. # has missed. Disabled by default.
  2133. #
  2134. #enable_notifs: false
  2135. enable_notifs: {{ matrix_synapse_email_enable_notifs|to_json }}
  2136. # Uncomment the following to disable automatic subscription to email
  2137. # notifications for new users. Enabled by default.
  2138. #
  2139. #notif_for_new_users: false
  2140. notif_for_new_users: {{ matrix_synapse_email_notif_for_new_users|to_json }}
  2141. # Custom URL for client links within the email notifications. By default
  2142. # links will be based on "https://matrix.to".
  2143. #
  2144. # (This setting used to be called riot_base_url; the old name is still
  2145. # supported for backwards-compatibility but is now deprecated.)
  2146. #
  2147. #client_base_url: "http://localhost/riot"
  2148. client_base_url: {{ matrix_synapse_email_client_base_url | string|to_json }}
  2149. # Configure the time that a validation email will expire after sending.
  2150. # Defaults to 1h.
  2151. #
  2152. #validation_token_lifetime: 15m
  2153. # The web client location to direct users to during an invite. This is passed
  2154. # to the identity server as the org.matrix.web_client_location key. Defaults
  2155. # to unset, giving no guidance to the identity server.
  2156. #
  2157. invite_client_location: {{ matrix_synapse_email_invite_client_location | string|to_json }}
  2158. # Subjects to use when sending emails from Synapse.
  2159. #
  2160. # The placeholder '%(app)s' will be replaced with the value of the 'app_name'
  2161. # setting above, or by a value dictated by the Matrix client application.
  2162. #
  2163. # If a subject isn't overridden in this configuration file, the value used as
  2164. # its example will be used.
  2165. #
  2166. #subjects:
  2167. # Subjects for notification emails.
  2168. #
  2169. # On top of the '%(app)s' placeholder, these can use the following
  2170. # placeholders:
  2171. #
  2172. # * '%(person)s', which will be replaced by the display name of the user(s)
  2173. # that sent the message(s), e.g. "Alice and Bob".
  2174. # * '%(room)s', which will be replaced by the name of the room the
  2175. # message(s) have been sent to, e.g. "My super room".
  2176. #
  2177. # See the example provided for each setting to see which placeholder can be
  2178. # used and how to use them.
  2179. #
  2180. # Subject to use to notify about one message from one or more user(s) in a
  2181. # room which has a name.
  2182. #message_from_person_in_room: "[%(app)s] You have a message on %(app)s from %(person)s in the %(room)s room…"
  2183. #
  2184. # Subject to use to notify about one message from one or more user(s) in a
  2185. # room which doesn't have a name.
  2186. #message_from_person: "[%(app)s] You have a message on %(app)s from %(person)s…"
  2187. #
  2188. # Subject to use to notify about multiple messages from one or more users in
  2189. # a room which doesn't have a name.
  2190. #messages_from_person: "[%(app)s] You have messages on %(app)s from %(person)s…"
  2191. #
  2192. # Subject to use to notify about multiple messages in a room which has a
  2193. # name.
  2194. #messages_in_room: "[%(app)s] You have messages on %(app)s in the %(room)s room…"
  2195. #
  2196. # Subject to use to notify about multiple messages in multiple rooms.
  2197. #messages_in_room_and_others: "[%(app)s] You have messages on %(app)s in the %(room)s room and others…"
  2198. #
  2199. # Subject to use to notify about multiple messages from multiple persons in
  2200. # multiple rooms. This is similar to the setting above except it's used when
  2201. # the room in which the notification was triggered has no name.
  2202. #messages_from_person_and_others: "[%(app)s] You have messages on %(app)s from %(person)s and others…"
  2203. #
  2204. # Subject to use to notify about an invite to a room which has a name.
  2205. #invite_from_person_to_room: "[%(app)s] %(person)s has invited you to join the %(room)s room on %(app)s…"
  2206. #
  2207. # Subject to use to notify about an invite to a room which doesn't have a
  2208. # name.
  2209. #invite_from_person: "[%(app)s] %(person)s has invited you to chat on %(app)s…"
  2210. # Subject for emails related to account administration.
  2211. #
  2212. # On top of the '%(app)s' placeholder, these one can use the
  2213. # '%(server_name)s' placeholder, which will be replaced by the value of the
  2214. # 'server_name' setting in your Synapse configuration.
  2215. #
  2216. # Subject to use when sending a password reset email.
  2217. #password_reset: "[%(server_name)s] Password reset"
  2218. #
  2219. # Subject to use when sending a verification email to assert an address's
  2220. # ownership.
  2221. #email_validation: "[%(server_name)s] Validate your email"
  2222. {% endif %}
  2223. # Password providers allow homeserver administrators to integrate
  2224. # their Synapse installation with existing authentication methods
  2225. # ex. LDAP, external tokens, etc.
  2226. #
  2227. # For more information and known implementations, please see
  2228. # https://github.com/element-hq/synapse/blob/master/docs/password_auth_providers.md
  2229. #
  2230. # Note: instances wishing to use SAML or CAS authentication should
  2231. # instead use the `saml2_config` or `cas_config` options,
  2232. # respectively.
  2233. #
  2234. # password_providers:
  2235. # # Example config for an LDAP auth provider
  2236. # - module: "ldap_auth_provider.LdapAuthProvider"
  2237. # config:
  2238. # enabled: true
  2239. # uri: "ldap://ldap.example.com:389"
  2240. # start_tls: true
  2241. # base: "ou=users,dc=example,dc=com"
  2242. # attributes:
  2243. # uid: "cn"
  2244. # mail: "email"
  2245. # name: "givenName"
  2246. # #bind_dn:
  2247. # #bind_password:
  2248. # #filter: "(objectClass=posixAccount)"
  2249. {% if matrix_synapse_password_providers_enabled %}
  2250. password_providers:
  2251. {% if matrix_synapse_ext_password_provider_rest_auth_enabled %}
  2252. - module: "rest_auth_provider.RestAuthProvider"
  2253. config:
  2254. endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint | string|to_json }}
  2255. policy:
  2256. registration:
  2257. username:
  2258. enforceLowercase: {{ matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase }}
  2259. profile:
  2260. name: {{ matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill }}
  2261. login:
  2262. profile:
  2263. name: {{ matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill }}
  2264. {% endif %}
  2265. {% if matrix_synapse_ext_password_provider_ldap_enabled %}
  2266. - module: "ldap_auth_provider.LdapAuthProvider"
  2267. config:
  2268. enabled: true
  2269. mode: {{ matrix_synapse_ext_password_provider_ldap_mode | string | to_json }}
  2270. uri: {{ matrix_synapse_ext_password_provider_ldap_uri | to_json }}
  2271. start_tls: {{ matrix_synapse_ext_password_provider_ldap_start_tls|to_json }}
  2272. base: {{ matrix_synapse_ext_password_provider_ldap_base | string|to_json }}
  2273. active_directory: {{ matrix_synapse_ext_password_provider_ldap_active_directory|to_json }}
  2274. default_domain: {{ matrix_synapse_ext_password_provider_ldap_default_domain | string|to_json }}
  2275. attributes:
  2276. uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid | string|to_json }}
  2277. mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail | string|to_json }}
  2278. name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name | string|to_json }}
  2279. {% if matrix_synapse_ext_password_provider_ldap_bind_dn %}
  2280. bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn | string|to_json }}
  2281. bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password | string|to_json }}
  2282. {% endif %}
  2283. filter: {{ matrix_synapse_ext_password_provider_ldap_filter | string|to_json }}
  2284. tls_options:
  2285. validate: {{ matrix_synapse_ext_password_provider_ldap_tls_options_validate | to_json }}
  2286. {% endif %}
  2287. {% endif %}
  2288. ## Push ##
  2289. push:
  2290. # enabled: false
  2291. # Clients requesting push notifications can either have the body of
  2292. # the message sent in the notification poke along with other details
  2293. # like the sender, or just the event ID and room ID (`event_id_only`).
  2294. # If clients choose the former, this option controls whether the
  2295. # notification request includes the content of the event (other details
  2296. # like the sender are still included). For `event_id_only` push, it
  2297. # has no effect.
  2298. #
  2299. # For modern android devices the notification content will still appear
  2300. # because it is loaded by the app. iPhone, however will send a
  2301. # notification saying only that a message arrived and who it came from.
  2302. #
  2303. # The default value is "true" to include message details. Uncomment to only
  2304. # include the event ID and room ID in push notification payloads.
  2305. #
  2306. include_content: {{ matrix_synapse_push_include_content|to_json }}
  2307. # When a push notification is received, an unread count is also sent.
  2308. # This number can either be calculated as the number of unread messages
  2309. # for the user, or the number of *rooms* the user has unread messages in.
  2310. #
  2311. # The default value is "true", meaning push clients will see the number of
  2312. # rooms with unread messages in them. Uncomment to instead send the number
  2313. # of unread messages.
  2314. #
  2315. #group_unread_count_by_room: false
  2316. ## Rooms ##
  2317. # Controls whether locally-created rooms should be end-to-end encrypted by
  2318. # default.
  2319. #
  2320. # Possible options are "all", "invite", and "off". They are defined as:
  2321. #
  2322. # * "all": any locally-created room
  2323. # * "invite": any room created with the "private_chat" or "trusted_private_chat"
  2324. # room creation presets
  2325. # * "off": this option will take no effect
  2326. #
  2327. # The default value is "off".
  2328. #
  2329. # Note that this option will only affect rooms created after it is set. It
  2330. # will also not affect rooms created by other servers.
  2331. #
  2332. encryption_enabled_by_default_for_room_type: {{ matrix_synapse_encryption_enabled_by_default_for_room_type|to_json }}
  2333. # User Directory configuration
  2334. #
  2335. user_directory:
  2336. # Defines whether users can search the user directory. If false then
  2337. # empty responses are returned to all queries. Defaults to true.
  2338. #
  2339. # Uncomment to disable the user directory.
  2340. #
  2341. #enabled: false
  2342. # Defines whether to search all users visible to your HS when searching
  2343. # the user directory. If false, search results will only contain users
  2344. # visible in public rooms and users sharing a room with the requester.
  2345. # Defaults to false.
  2346. #
  2347. # NB. If you set this to true, and the last time the user_directory search
  2348. # indexes were (re)built was before Synapse 1.44, you'll have to
  2349. # rebuild the indexes in order to search through all known users.
  2350. # These indexes are built the first time Synapse starts; admins can
  2351. # manually trigger a rebuild via API following the instructions at
  2352. # https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/background_updates.html#run
  2353. #
  2354. # Uncomment to return search results containing all known users, even if that
  2355. # user does not share a room with the requester.
  2356. #
  2357. search_all_users: {{ matrix_synapse_user_directory_search_all_users | to_json }}
  2358. # Defines whether to prefer local users in search query results.
  2359. # If True, local users are more likely to appear above remote users
  2360. # when searching the user directory. Defaults to false.
  2361. #
  2362. # Uncomment to prefer local over remote users in user directory search
  2363. # results.
  2364. #
  2365. prefer_local_users: {{ matrix_synapse_user_directory_prefer_local_users | to_json }}
  2366. # If set to true, the search will only return local users. Defaults to false.
  2367. exclude_remote_users: {{ matrix_synapse_user_directory_exclude_remote_users | to_json }}
  2368. # User Consent configuration
  2369. #
  2370. # for detailed instructions, see
  2371. # https://matrix-org.github.io/synapse/latest/consent_tracking.html
  2372. #
  2373. # Parts of this section are required if enabling the 'consent' resource under
  2374. # 'listeners', in particular 'template_dir' and 'version'.
  2375. #
  2376. # 'template_dir' gives the location of the templates for the HTML forms.
  2377. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  2378. # and each language directory should contain the policy document (named as
  2379. # '<version>.html') and a success page (success.html).
  2380. #
  2381. # 'version' specifies the 'current' version of the policy document. It defines
  2382. # the version to be served by the consent resource if there is no 'v'
  2383. # parameter.
  2384. #
  2385. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  2386. # asking them to consent to the privacy policy. The 'server_notices' section
  2387. # must also be configured for this to work. Notices will *not* be sent to
  2388. # guest users unless 'send_server_notice_to_guests' is set to true.
  2389. #
  2390. # 'block_events_error', if set, will block any attempts to send events
  2391. # until the user consents to the privacy policy. The value of the setting is
  2392. # used as the text of the error.
  2393. #
  2394. # 'require_at_registration', if enabled, will add a step to the registration
  2395. # process, similar to how captcha works. Users will be required to accept the
  2396. # policy before their account is created.
  2397. #
  2398. # 'policy_name' is the display name of the policy users will see when registering
  2399. # for an account. Has no effect unless `require_at_registration` is enabled.
  2400. # Defaults to "Privacy Policy".
  2401. #
  2402. #user_consent:
  2403. # template_dir: res/templates/privacy
  2404. # version: 1.0
  2405. # server_notice_content:
  2406. # msgtype: m.text
  2407. # body: >-
  2408. # To continue using this homeserver you must review and agree to the
  2409. # terms and conditions at %(consent_uri)s
  2410. # send_server_notice_to_guests: True
  2411. # block_events_error: >-
  2412. # To continue using this homeserver you must review and agree to the
  2413. # terms and conditions at %(consent_uri)s
  2414. # require_at_registration: False
  2415. # policy_name: Privacy Policy
  2416. #
  2417. # Settings for local room and user statistics collection. See
  2418. # https://matrix-org.github.io/synapse/latest/room_and_user_statistics.html.
  2419. #
  2420. stats:
  2421. # Uncomment the following to disable room and user statistics. Note that doing
  2422. # so may cause certain features (such as the room directory) not to work
  2423. # correctly.
  2424. #
  2425. #enabled: false
  2426. # Server Notices room configuration
  2427. #
  2428. # Uncomment this section to enable a room which can be used to send notices
  2429. # from the server to users. It is a special room which cannot be left; notices
  2430. # come from a special "notices" user ID.
  2431. #
  2432. # If you uncomment this section, you *must* define the system_mxid_localpart
  2433. # setting, which defines the ID of the user which will be used to send the
  2434. # notices.
  2435. #
  2436. # It's also possible to override the room name, the display name of the
  2437. # "notices" user, and the avatar for the user.
  2438. #
  2439. #server_notices:
  2440. # system_mxid_localpart: notices
  2441. # system_mxid_display_name: "Server Notices"
  2442. # system_mxid_avatar_url: "mxc://example.com/oumMVlgDnLYFaPVkExemNVVZ"
  2443. # room_name: "Server Notices"
  2444. {% if matrix_synapse_server_notices_enabled %}
  2445. server_notices:
  2446. system_mxid_localpart: {{ matrix_synapse_server_notices_system_mxid_localpart | string | to_json }}
  2447. system_mxid_display_name: {{ matrix_synapse_server_notices_system_mxid_display_name | string | to_json }}
  2448. {% if matrix_synapse_server_notices_system_mxid_avatar_url %}
  2449. system_mxid_avatar_url: {{ matrix_synapse_server_notices_system_mxid_avatar_url | string | to_json }}
  2450. {% endif %}
  2451. room_name: {{ matrix_synapse_server_notices_room_name | string | to_json }}
  2452. {% endif %}
  2453. # Uncomment to disable searching the public room list. When disabled
  2454. # blocks searching local and remote room lists for local and remote
  2455. # users by always returning an empty list for all queries.
  2456. #
  2457. #enable_room_list_search: false
  2458. enable_room_list_search: {{ matrix_synapse_enable_room_list_search|to_json }}
  2459. # The `alias_creation` option controls who's allowed to create aliases
  2460. # on this server.
  2461. #
  2462. # The format of this option is a list of rules that contain globs that
  2463. # match against user_id, room_id and the new alias (fully qualified with
  2464. # server name). The action in the first rule that matches is taken,
  2465. # which can currently either be "allow" or "deny".
  2466. #
  2467. # Missing user_id/room_id/alias fields default to "*".
  2468. #
  2469. # If no rules match the request is denied. An empty list means no one
  2470. # can create aliases.
  2471. #
  2472. # Options for the rules include:
  2473. #
  2474. # user_id: Matches against the creator of the alias
  2475. # alias: Matches against the alias being created
  2476. # room_id: Matches against the room ID the alias is being pointed at
  2477. # action: Whether to "allow" or "deny" the request if the rule matches
  2478. #
  2479. # The default is:
  2480. #
  2481. #alias_creation_rules:
  2482. # - user_id: "*"
  2483. # alias: "*"
  2484. # room_id: "*"
  2485. # action: allow
  2486. alias_creation_rules: {{ matrix_synapse_alias_creation_rules|to_json }}
  2487. # The `room_list_publication_rules` option controls who can publish and
  2488. # which rooms can be published in the public room list.
  2489. #
  2490. # The format of this option is the same as that for
  2491. # `alias_creation_rules`.
  2492. #
  2493. # If the room has one or more aliases associated with it, only one of
  2494. # the aliases needs to match the alias rule. If there are no aliases
  2495. # then only rules with `alias: *` match.
  2496. #
  2497. # If no rules match the request is denied. An empty list means no one
  2498. # can publish rooms.
  2499. #
  2500. # Options for the rules include:
  2501. #
  2502. # user_id: Matches against the creator of the alias
  2503. # room_id: Matches against the room ID being published
  2504. # alias: Matches against any current local or canonical aliases
  2505. # associated with the room
  2506. # action: Whether to "allow" or "deny" the request if the rule matches
  2507. #
  2508. # The default is:
  2509. #
  2510. #room_list_publication_rules:
  2511. # - user_id: "*"
  2512. # alias: "*"
  2513. # room_id: "*"
  2514. # action: allow
  2515. room_list_publication_rules: {{ matrix_synapse_room_list_publication_rules|to_json }}
  2516. ## Opentracing ##
  2517. # These settings enable opentracing, which implements distributed tracing.
  2518. # This allows you to observe the causal chains of events across servers
  2519. # including requests, key lookups etc., across any server running
  2520. # synapse or any other other services which supports opentracing
  2521. # (specifically those implemented with Jaeger).
  2522. #
  2523. opentracing:
  2524. # tracing is disabled by default. Uncomment the following line to enable it.
  2525. #
  2526. #enabled: true
  2527. # The list of homeservers we wish to send and receive span contexts and span baggage.
  2528. # See https://matrix-org.github.io/synapse/latest/opentracing.html.
  2529. #
  2530. # This is a list of regexes which are matched against the server_name of the
  2531. # homeserver.
  2532. #
  2533. # By default, it is empty, so no servers are matched.
  2534. #
  2535. #homeserver_whitelist:
  2536. # - ".*"
  2537. # A list of the Matrix IDs of users whose requests will always be traced,
  2538. # even if the tracing system would otherwise drop the traces due to
  2539. # probabilistic sampling.
  2540. #
  2541. # By default, the list is empty.
  2542. #
  2543. #force_tracing_for_users:
  2544. # - "@alice:server_name"
  2545. # - "@bob:server_name"
  2546. # Jaeger can be configured to sample traces at different rates.
  2547. # All configuration options provided by Jaeger can be set here.
  2548. # Jaeger's configuration is mostly related to trace sampling which
  2549. # is documented here:
  2550. # https://www.jaegertracing.io/docs/latest/sampling/.
  2551. #
  2552. #jaeger_config:
  2553. # sampler:
  2554. # type: const
  2555. # param: 1
  2556. # logging:
  2557. # false
  2558. ## Workers ##
  2559. # It is possible to run multiple federation sender workers, in which case the
  2560. # work is balanced across them.
  2561. #
  2562. # This configuration must be shared between all federation sender workers, and if
  2563. # changed all federation sender workers must be stopped at the same time and then
  2564. # started, to ensure that all instances are running with the same config (otherwise
  2565. # events may be dropped).
  2566. #
  2567. #federation_sender_instances:
  2568. # - federation_sender1
  2569. {% if matrix_synapse_federation_sender_instances | length > 0 %}
  2570. federation_sender_instances: {{ matrix_synapse_federation_sender_instances | to_json }}
  2571. {% endif %}
  2572. {% if matrix_synapse_federation_pusher_instances | length > 0 %}
  2573. pusher_instances: {{ matrix_synapse_federation_pusher_instances | to_json }}
  2574. {% endif %}
  2575. # When using workers this should be a map from `worker_name` to the
  2576. # HTTP replication listener of the worker, if configured.
  2577. #
  2578. #instance_map:
  2579. # worker1:
  2580. # host: localhost
  2581. # port: 8034
  2582. instance_map: {{ matrix_synapse_instance_map | to_json }}
  2583. # Experimental: When using workers you can define which workers should
  2584. # handle event persistence and typing notifications. Any worker
  2585. # specified here must also be in the `instance_map`.
  2586. #
  2587. #stream_writers:
  2588. # events: worker1
  2589. # typing: worker1
  2590. stream_writers: {{ matrix_synapse_stream_writers | to_json }}
  2591. {% if matrix_synapse_notify_appservices_from_worker != '' %}
  2592. notify_appservices_from_worker: {{ matrix_synapse_notify_appservices_from_worker | to_json }}
  2593. {% endif %}
  2594. {% if matrix_synapse_update_user_directory_from_worker != '' %}
  2595. update_user_directory_from_worker: {{ matrix_synapse_update_user_directory_from_worker | to_json }}
  2596. {% endif %}
  2597. # The worker that is used to run background tasks (e.g. cleaning up expired
  2598. # data). If not provided this defaults to the main process.
  2599. #
  2600. #run_background_tasks_on: worker1
  2601. {% if matrix_synapse_run_background_tasks_on != '' %}
  2602. run_background_tasks_on: {{ matrix_synapse_run_background_tasks_on | to_json }}
  2603. {% endif %}
  2604. {% if matrix_synapse_media_instance_running_background_jobs != '' %}
  2605. media_instance_running_background_jobs: {{ matrix_synapse_media_instance_running_background_jobs | to_json }}
  2606. {% endif %}
  2607. # A shared secret used by the replication APIs to authenticate HTTP requests
  2608. # from workers.
  2609. #
  2610. # By default this is unused and traffic is not authenticated.
  2611. #
  2612. #worker_replication_secret: ""
  2613. # Configuration for Redis when using workers. This *must* be enabled when
  2614. # using workers (unless using old style direct TCP configuration).
  2615. #
  2616. redis:
  2617. # Uncomment the below to enable Redis support.
  2618. #
  2619. enabled: {{ matrix_synapse_redis_enabled | to_json }}
  2620. # Optional host and port to use to connect to redis. Defaults to
  2621. # localhost and 6379
  2622. #
  2623. host: {{ matrix_synapse_redis_host | to_json }}
  2624. port: {{ matrix_synapse_redis_port | to_json }}
  2625. # Optional database ID to connect to. Defaults to 0.
  2626. dbid: {{ matrix_synapse_redis_dbid | to_json }}
  2627. # Optional password if configured on the Redis instance
  2628. {% if matrix_synapse_redis_password %}
  2629. password: {{ matrix_synapse_redis_password | to_json }}
  2630. {% endif %}
  2631. use_tls: {{ matrix_synapse_redis_use_tls | to_json }}
  2632. ## Background Updates ##
  2633. # Background updates are database updates that are run in the background in batches.
  2634. # The duration, minimum batch size, default batch size, whether to sleep between batches and if so, how long to
  2635. # sleep can all be configured. This is helpful to speed up or slow down the updates.
  2636. #
  2637. background_updates:
  2638. # How long in milliseconds to run a batch of background updates for. Defaults to 100. Uncomment and set
  2639. # a time to change the default.
  2640. #
  2641. #background_update_duration_ms: 500
  2642. # Whether to sleep between updates. Defaults to True. Uncomment to change the default.
  2643. #
  2644. #sleep_enabled: false
  2645. # If sleeping between updates, how long in milliseconds to sleep for. Defaults to 1000. Uncomment
  2646. # and set a duration to change the default.
  2647. #
  2648. #sleep_duration_ms: 300
  2649. # Minimum size a batch of background updates can be. Must be greater than 0. Defaults to 1. Uncomment and
  2650. # set a size to change the default.
  2651. #
  2652. #min_batch_size: 10
  2653. # The batch size to use for the first iteration of a new background update. The default is 100.
  2654. # Uncomment and set a size to change the default.
  2655. #
  2656. #default_batch_size: 50
  2657. {% if matrix_synapse_matrix_authentication_service_enabled %}
  2658. matrix_authentication_service:
  2659. enabled: true
  2660. endpoint: {{ matrix_synapse_matrix_authentication_service_endpoint | to_json }}
  2661. secret: {{ matrix_synapse_matrix_authentication_service_secret | to_json }}
  2662. {% endif %}
  2663. experimental_features:
  2664. {% if matrix_synapse_experimental_features_msc2409_to_device_messages_enabled %}
  2665. msc2409_to_device_messages_enabled: true
  2666. {% endif %}
  2667. {% if matrix_synapse_experimental_features_msc3202_transaction_extensions_enabled %}
  2668. msc3202_transaction_extensions: true
  2669. {% endif %}
  2670. {% if matrix_synapse_experimental_features_msc3266_enabled %}
  2671. msc3266_enabled: true
  2672. {% endif %}
  2673. {% if matrix_synapse_experimental_features_msc4108_enabled %}
  2674. msc4108_enabled: true
  2675. {% endif %}
  2676. {% if matrix_synapse_experimental_features_msc4140_enabled %}
  2677. msc4140_enabled: true
  2678. {% endif %}
  2679. {% if matrix_synapse_experimental_features_msc4222_enabled %}
  2680. msc4222_enabled: true
  2681. {% endif %}
  2682. {% if matrix_synapse_experimental_features_msc4140_enabled %}
  2683. max_event_delay_duration: {{ matrix_synapse_max_event_delay_duration | to_json }}
  2684. rc_delayed_event_mgmt: {{ matrix_synapse_rc_delayed_event_mgmt | to_json }}
  2685. {% endif %}
  2686. # vim:ft=yaml