Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

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