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.
 
 

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