Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

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