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.
 
 

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