Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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