Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

1512 linhas
51 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. # vim:ft=yaml
  3. ## Server ##
  4. # The domain name of the server, with optional explicit port.
  5. # This is used by remote servers to connect to this server,
  6. # e.g. matrix.org, localhost:8080, etc.
  7. # This is also the last part of your UserID.
  8. #
  9. server_name: "{{ matrix_domain }}"
  10. # When running as a daemon, the file to store the pid in
  11. #
  12. pid_file: /homeserver.pid
  13. # The path to the web client which will be served at /_matrix/client/
  14. # if 'webclient' is configured under the 'listeners' configuration.
  15. #
  16. #web_client_location: "/path/to/web/root"
  17. # The public-facing base URL that clients use to access this HS
  18. # (not including _matrix/...). This is the same URL a user would
  19. # enter into the 'custom HS URL' field on their client. If you
  20. # use synapse with a reverse proxy, this should be the URL to reach
  21. # synapse via the proxy.
  22. #
  23. public_baseurl: https://{{ matrix_server_fqn_matrix }}/
  24. # Set the soft limit on the number of file descriptors synapse can use
  25. # Zero is used to indicate synapse should set the soft limit to the
  26. # hard limit.
  27. #
  28. #soft_file_limit: 0
  29. # Set to false to disable presence tracking on this homeserver.
  30. #
  31. use_presence: {{ matrix_synapse_use_presence|to_json }}
  32. # Whether to require authentication to retrieve profile data (avatars,
  33. # display names) of other users through the client API. Defaults to
  34. # 'false'. Note that profile data is also available via the federation
  35. # API, so this setting is of limited value if federation is enabled on
  36. # the server.
  37. #
  38. #require_auth_for_profile_requests: true
  39. # If set to 'false', requires authentication to access the server's public rooms
  40. # directory through the client API. Defaults to 'true'.
  41. #
  42. #allow_public_rooms_without_auth: false
  43. # If set to 'false', forbids any other homeserver to fetch the server's public
  44. # rooms directory via federation. Defaults to 'true'.
  45. #
  46. #allow_public_rooms_over_federation: false
  47. # The default room version for newly created rooms.
  48. #
  49. # Known room versions are listed here:
  50. # https://matrix.org/docs/spec/#complete-list-of-room-versions
  51. #
  52. # For example, for room version 1, default_room_version should be set
  53. # to "1".
  54. #
  55. default_room_version: {{ matrix_synapse_default_room_version|to_json }}
  56. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  57. #
  58. #gc_thresholds: [700, 10, 10]
  59. # Set the limit on the returned events in the timeline in the get
  60. # and sync operations. The default value is -1, means no upper limit.
  61. #
  62. #filter_timeline_limit: 5000
  63. # Whether room invites to users on this server should be blocked
  64. # (except those sent by local server admins). The default is False.
  65. #
  66. #block_non_admin_invites: True
  67. # Room searching
  68. #
  69. # If disabled, new messages will not be indexed for searching and users
  70. # will receive errors when searching for messages. Defaults to enabled.
  71. #
  72. #enable_search: false
  73. # Restrict federation to the following whitelist of domains.
  74. # N.B. we recommend also firewalling your federation listener to limit
  75. # inbound federation traffic as early as possible, rather than relying
  76. # purely on this application-layer restriction. If not specified, the
  77. # default is to whitelist everything.
  78. #
  79. #federation_domain_whitelist:
  80. # - lon.example.com
  81. # - nyc.example.com
  82. # - syd.example.com
  83. {% if matrix_synapse_federation_domain_whitelist is not none %}
  84. {# Cannot use `|to_nice_yaml` here, as an empty list does not get serialized properly by it. #}
  85. federation_domain_whitelist: {{ matrix_synapse_federation_domain_whitelist|to_json }}
  86. {% endif %}
  87. # Prevent federation requests from being sent to the following
  88. # blacklist IP address CIDR ranges. If this option is not specified, or
  89. # specified with an empty list, no ip range blacklist will be enforced.
  90. #
  91. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  92. # listed here, since they correspond to unroutable addresses.)
  93. #
  94. federation_ip_range_blacklist:
  95. - '127.0.0.0/8'
  96. - '10.0.0.0/8'
  97. - '172.16.0.0/12'
  98. - '192.168.0.0/16'
  99. - '100.64.0.0/10'
  100. - '169.254.0.0/16'
  101. - '::1/128'
  102. - 'fe80::/64'
  103. - 'fc00::/7'
  104. # List of ports that Synapse should listen on, their purpose and their
  105. # configuration.
  106. #
  107. # Options for each listener include:
  108. #
  109. # port: the TCP port to bind to
  110. #
  111. # bind_addresses: a list of local addresses to listen on. The default is
  112. # 'all local interfaces'.
  113. #
  114. # type: the type of listener. Normally 'http', but other valid options are:
  115. # 'manhole' (see docs/manhole.md),
  116. # 'metrics' (see docs/metrics-howto.rst),
  117. # 'replication' (see docs/workers.rst).
  118. #
  119. # tls: set to true to enable TLS for this listener. Will use the TLS
  120. # key/cert specified in tls_private_key_path / tls_certificate_path.
  121. #
  122. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  123. # X-Forwarded-For header as the client IP. Useful when Synapse is
  124. # behind a reverse-proxy.
  125. #
  126. # resources: Only valid for an 'http' listener. A list of resources to host
  127. # on this port. Options for each resource are:
  128. #
  129. # names: a list of names of HTTP resources. See below for a list of
  130. # valid resource names.
  131. #
  132. # compress: set to true to enable HTTP comression for this resource.
  133. #
  134. # additional_resources: Only valid for an 'http' listener. A map of
  135. # additional endpoints which should be loaded via dynamic modules.
  136. #
  137. # Valid resource names are:
  138. #
  139. # client: the client-server API (/_matrix/client), and the synapse admin
  140. # API (/_synapse/admin). Also implies 'media' and 'static'.
  141. #
  142. # consent: user consent forms (/_matrix/consent). See
  143. # docs/consent_tracking.md.
  144. #
  145. # federation: the server-server API (/_matrix/federation). Also implies
  146. # 'media', 'keys', 'openid'
  147. #
  148. # keys: the key discovery API (/_matrix/keys).
  149. #
  150. # media: the media API (/_matrix/media).
  151. #
  152. # metrics: the metrics interface. See docs/metrics-howto.rst.
  153. #
  154. # openid: OpenID authentication.
  155. #
  156. # replication: the HTTP replication API (/_synapse/replication). See
  157. # docs/workers.rst.
  158. #
  159. # static: static resources under synapse/static (/_matrix/static). (Mostly
  160. # useful for 'fallback authentication'.)
  161. #
  162. # webclient: A web client. Requires web_client_location to be set.
  163. #
  164. listeners:
  165. {% if matrix_synapse_metrics_enabled %}
  166. - type: metrics
  167. port: {{ matrix_synapse_metrics_port }}
  168. bind_addresses:
  169. - '0.0.0.0'
  170. {% endif %}
  171. {% if matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled %}
  172. # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  173. - port: 8448
  174. tls: true
  175. bind_addresses: ['::']
  176. type: http
  177. x_forwarded: false
  178. resources:
  179. - names: [federation]
  180. compress: false
  181. {% endif %}
  182. # Unsecure HTTP listener (Client API): for when matrix traffic passes through a reverse proxy
  183. # that unwraps TLS.
  184. - port: 8008
  185. tls: false
  186. bind_addresses: ['::']
  187. type: http
  188. x_forwarded: true
  189. resources:
  190. - names: [client]
  191. compress: false
  192. {% if matrix_synapse_federation_enabled %}
  193. # Unsecure HTTP listener (Federation API): for when matrix traffic passes through a reverse proxy
  194. # that unwraps TLS.
  195. - port: 8048
  196. tls: false
  197. bind_addresses: ['::']
  198. type: http
  199. x_forwarded: true
  200. resources:
  201. - names: [federation]
  202. compress: false
  203. {% endif %}
  204. # Turn on the twisted ssh manhole service on localhost on the given
  205. # port.
  206. # - port: 9000
  207. # bind_addresses: ['::1', '127.0.0.1']
  208. # type: manhole
  209. ## Homeserver blocking ##
  210. # How to reach the server admin, used in ResourceLimitError
  211. #
  212. #admin_contact: 'mailto:admin@server.com'
  213. # Global blocking
  214. #
  215. #hs_disabled: False
  216. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  217. #hs_disabled_limit_type: 'error code(str), to help clients decode reason'
  218. # Monthly Active User Blocking
  219. #
  220. # Used in cases where the admin or server owner wants to limit to the
  221. # number of monthly active users.
  222. #
  223. # 'limit_usage_by_mau' disables/enables monthly active user blocking. When
  224. # anabled and a limit is reached the server returns a 'ResourceLimitError'
  225. # with error type Codes.RESOURCE_LIMIT_EXCEEDED
  226. #
  227. # 'max_mau_value' is the hard limit of monthly active users above which
  228. # the server will start blocking user actions.
  229. #
  230. # 'mau_trial_days' is a means to add a grace period for active users. It
  231. # means that users must be active for this number of days before they
  232. # can be considered active and guards against the case where lots of users
  233. # sign up in a short space of time never to return after their initial
  234. # session.
  235. #
  236. #limit_usage_by_mau: False
  237. #max_mau_value: 50
  238. #mau_trial_days: 2
  239. # If enabled, the metrics for the number of monthly active users will
  240. # be populated, however no one will be limited. If limit_usage_by_mau
  241. # is true, this is implied to be true.
  242. #
  243. #mau_stats_only: False
  244. # Sometimes the server admin will want to ensure certain accounts are
  245. # never blocked by mau checking. These accounts are specified here.
  246. #
  247. #mau_limit_reserved_threepids:
  248. # - medium: 'email'
  249. # address: 'reserved_user@example.com'
  250. # Whether to require a user to be in the room to add an alias to it.
  251. # Defaults to 'true'.
  252. #
  253. #require_membership_for_aliases: false
  254. # Whether to allow per-room membership profiles through the send of membership
  255. # events with profile information that differ from the target's global profile.
  256. # Defaults to 'true'.
  257. #
  258. #allow_per_room_profiles: false
  259. ## TLS ##
  260. # PEM-encoded X509 certificate for TLS.
  261. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  262. # certificate, signed by a recognised Certificate Authority.
  263. #
  264. # See 'ACME support' below to enable auto-provisioning this certificate via
  265. # Let's Encrypt.
  266. #
  267. # If supplying your own, be sure to use a `.pem` file that includes the
  268. # full certificate chain including any intermediate certificates (for
  269. # instance, if using certbot, use `fullchain.pem` as your certificate,
  270. # not `cert.pem`).
  271. #
  272. tls_certificate_path: {{ matrix_synapse_tls_certificate_path|to_json }}
  273. # PEM-encoded private key for TLS
  274. #
  275. tls_private_key_path: {{ matrix_synapse_tls_private_key_path|to_json }}
  276. # Whether to verify TLS server certificates for outbound federation requests.
  277. #
  278. # Defaults to `true`. To disable certificate verification, uncomment the
  279. # following line.
  280. #
  281. #federation_verify_certificates: false
  282. # The minimum TLS version that will be used for outbound federation requests.
  283. #
  284. # Defaults to `1`. Configurable to `1`, `1.1`, `1.2`, or `1.3`. Note
  285. # that setting this value higher than `1.2` will prevent federation to most
  286. # of the public Matrix network: only configure it to `1.3` if you have an
  287. # entirely private federation setup and you can ensure TLS 1.3 support.
  288. #
  289. #federation_client_minimum_tls_version: 1.2
  290. # Skip federation certificate verification on the following whitelist
  291. # of domains.
  292. #
  293. # This setting should only be used in very specific cases, such as
  294. # federation over Tor hidden services and similar. For private networks
  295. # of homeservers, you likely want to use a private CA instead.
  296. #
  297. # Only effective if federation_verify_certicates is `true`.
  298. #
  299. #federation_certificate_verification_whitelist:
  300. # - lon.example.com
  301. # - *.domain.com
  302. # - *.onion
  303. # List of custom certificate authorities for federation traffic.
  304. #
  305. # This setting should only normally be used within a private network of
  306. # homeservers.
  307. #
  308. # Note that this list will replace those that are provided by your
  309. # operating environment. Certificates must be in PEM format.
  310. #
  311. #federation_custom_ca_list:
  312. # - myCA1.pem
  313. # - myCA2.pem
  314. # - myCA3.pem
  315. # ACME support: This will configure Synapse to request a valid TLS certificate
  316. # for your configured `server_name` via Let's Encrypt.
  317. #
  318. # Note that provisioning a certificate in this way requires port 80 to be
  319. # routed to Synapse so that it can complete the http-01 ACME challenge.
  320. # By default, if you enable ACME support, Synapse will attempt to listen on
  321. # port 80 for incoming http-01 challenges - however, this will likely fail
  322. # with 'Permission denied' or a similar error.
  323. #
  324. # There are a couple of potential solutions to this:
  325. #
  326. # * If you already have an Apache, Nginx, or similar listening on port 80,
  327. # you can configure Synapse to use an alternate port, and have your web
  328. # server forward the requests. For example, assuming you set 'port: 8009'
  329. # below, on Apache, you would write:
  330. #
  331. # ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  332. #
  333. # * Alternatively, you can use something like `authbind` to give Synapse
  334. # permission to listen on port 80.
  335. #
  336. acme:
  337. # ACME support is disabled by default. Uncomment the following line
  338. # (and tls_certificate_path and tls_private_key_path above) to enable it.
  339. #
  340. #enabled: true
  341. # Endpoint to use to request certificates. If you only want to test,
  342. # use Let's Encrypt's staging url:
  343. # https://acme-staging.api.letsencrypt.org/directory
  344. #
  345. #url: https://acme-v01.api.letsencrypt.org/directory
  346. # Port number to listen on for the HTTP-01 challenge. Change this if
  347. # you are forwarding connections through Apache/Nginx/etc.
  348. #
  349. #port: 80
  350. # Local addresses to listen on for incoming connections.
  351. # Again, you may want to change this if you are forwarding connections
  352. # through Apache/Nginx/etc.
  353. #
  354. #bind_addresses: ['::', '0.0.0.0']
  355. # How many days remaining on a certificate before it is renewed.
  356. #
  357. #reprovision_threshold: 30
  358. # The domain that the certificate should be for. Normally this
  359. # should be the same as your Matrix domain (i.e., 'server_name'), but,
  360. # by putting a file at 'https://<server_name>/.well-known/matrix/server',
  361. # you can delegate incoming traffic to another server. If you do that,
  362. # you should give the target of the delegation here.
  363. #
  364. # For example: if your 'server_name' is 'example.com', but
  365. # 'https://example.com/.well-known/matrix/server' delegates to
  366. # 'matrix.example.com', you should put 'matrix.example.com' here.
  367. #
  368. # If not set, defaults to your 'server_name'.
  369. #
  370. #domain: matrix.example.com
  371. # file to use for the account key. This will be generated if it doesn't
  372. # exist.
  373. #
  374. # If unspecified, we will use CONFDIR/client.key.
  375. #
  376. account_key_file: /data/acme_account.key
  377. # List of allowed TLS fingerprints for this server to publish along
  378. # with the signing keys for this server. Other matrix servers that
  379. # make HTTPS requests to this server will check that the TLS
  380. # certificates returned by this server match one of the fingerprints.
  381. #
  382. # Synapse automatically adds the fingerprint of its own certificate
  383. # to the list. So if federation traffic is handled directly by synapse
  384. # then no modification to the list is required.
  385. #
  386. # If synapse is run behind a load balancer that handles the TLS then it
  387. # will be necessary to add the fingerprints of the certificates used by
  388. # the loadbalancers to this list if they are different to the one
  389. # synapse is using.
  390. #
  391. # Homeservers are permitted to cache the list of TLS fingerprints
  392. # returned in the key responses up to the "valid_until_ts" returned in
  393. # key. It may be necessary to publish the fingerprints of a new
  394. # certificate and wait until the "valid_until_ts" of the previous key
  395. # responses have passed before deploying it.
  396. #
  397. # You can calculate a fingerprint from a given TLS listener via:
  398. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  399. # openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  400. # or by checking matrix.org/federationtester/api/report?server_name=$host
  401. #
  402. #tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  403. ## Database ##
  404. database:
  405. # The database engine name
  406. name: "psycopg2"
  407. args:
  408. user: {{ matrix_synapse_database_user|string|to_json }}
  409. password: {{ matrix_synapse_database_password|string|to_json }}
  410. database: "{{ matrix_synapse_database_database }}"
  411. host: "{{ matrix_synapse_database_host }}"
  412. cp_min: 5
  413. cp_max: 10
  414. # Number of events to cache in memory.
  415. #
  416. event_cache_size: "{{ matrix_synapse_event_cache_size }}"
  417. ## Logging ##
  418. # A yaml python logging config file
  419. #
  420. log_config: "/data/{{ matrix_server_fqn_matrix }}.log.config"
  421. ## Ratelimiting ##
  422. # Ratelimiting settings for client actions (registration, login, messaging).
  423. #
  424. # Each ratelimiting configuration is made of two parameters:
  425. # - per_second: number of requests a client can send per second.
  426. # - burst_count: number of requests a client can send before being throttled.
  427. #
  428. # Synapse currently uses the following configurations:
  429. # - one for messages that ratelimits sending based on the account the client
  430. # is using
  431. # - one for registration that ratelimits registration requests based on the
  432. # client's IP address.
  433. # - one for login that ratelimits login requests based on the client's IP
  434. # address.
  435. # - one for login that ratelimits login requests based on the account the
  436. # client is attempting to log into.
  437. # - one for login that ratelimits login requests based on the account the
  438. # client is attempting to log into, based on the amount of failed login
  439. # attempts for this account.
  440. #
  441. # The defaults are as shown below.
  442. #
  443. #rc_message:
  444. # per_second: 0.2
  445. # burst_count: 10
  446. #
  447. rc_message: {{ matrix_synapse_rc_message|to_json }}
  448. #
  449. #rc_registration:
  450. # per_second: 0.17
  451. # burst_count: 3
  452. rc_registration: {{ matrix_synapse_rc_registration|to_json }}
  453. #
  454. #rc_login:
  455. # address:
  456. # per_second: 0.17
  457. # burst_count: 3
  458. # account:
  459. # per_second: 0.17
  460. # burst_count: 3
  461. # failed_attempts:
  462. # per_second: 0.17
  463. # burst_count: 3
  464. rc_login: {{ matrix_synapse_rc_login|to_json }}
  465. # Ratelimiting settings for incoming federation
  466. #
  467. # The rc_federation configuration is made up of the following settings:
  468. # - window_size: window size in milliseconds
  469. # - sleep_limit: number of federation requests from a single server in
  470. # a window before the server will delay processing the request.
  471. # - sleep_delay: duration in milliseconds to delay processing events
  472. # from remote servers by if they go over the sleep limit.
  473. # - reject_limit: maximum number of concurrent federation requests
  474. # allowed from a single server
  475. # - concurrent: number of federation requests to concurrently process
  476. # from a single server
  477. #
  478. # The defaults are as shown below.
  479. #
  480. #rc_federation:
  481. # window_size: 1000
  482. # sleep_limit: 10
  483. # sleep_delay: 500
  484. # reject_limit: 50
  485. # concurrent: 3
  486. rc_federation: {{ matrix_synapse_rc_federation|to_json }}
  487. # Target outgoing federation transaction frequency for sending read-receipts,
  488. # per-room.
  489. #
  490. # If we end up trying to send out more read-receipts, they will get buffered up
  491. # into fewer transactions.
  492. #
  493. #federation_rr_transactions_per_room_per_second: 50
  494. federation_rr_transactions_per_room_per_second: {{ matrix_synapse_federation_rr_transactions_per_room_per_second }}
  495. # Directory where uploaded images and attachments are stored.
  496. #
  497. media_store_path: "/matrix-media-store-parent/{{ matrix_synapse_media_store_directory_name }}"
  498. # Media storage providers allow media to be stored in different
  499. # locations.
  500. #
  501. #media_storage_providers:
  502. # - module: file_system
  503. # # Whether to write new local files.
  504. # store_local: false
  505. # # Whether to write new remote media
  506. # store_remote: false
  507. # # Whether to block upload requests waiting for write to this
  508. # # provider to complete
  509. # store_synchronous: false
  510. # config:
  511. # directory: /mnt/some/other/directory
  512. # Directory where in-progress uploads are stored.
  513. #
  514. uploads_path: "/matrix-run/uploads"
  515. # The largest allowed upload size in bytes
  516. #
  517. max_upload_size: "{{ matrix_synapse_max_upload_size_mb }}M"
  518. # Maximum number of pixels that will be thumbnailed
  519. #
  520. #max_image_pixels: 32M
  521. # Whether to generate new thumbnails on the fly to precisely match
  522. # the resolution requested by the client. If true then whenever
  523. # a new resolution is requested by the client the server will
  524. # generate a new thumbnail. If false the server will pick a thumbnail
  525. # from a precalculated list.
  526. #
  527. #dynamic_thumbnails: false
  528. # List of thumbnails to precalculate when an image is uploaded.
  529. #
  530. #thumbnail_sizes:
  531. # - width: 32
  532. # height: 32
  533. # method: crop
  534. # - width: 96
  535. # height: 96
  536. # method: crop
  537. # - width: 320
  538. # height: 240
  539. # method: scale
  540. # - width: 640
  541. # height: 480
  542. # method: scale
  543. # - width: 800
  544. # height: 600
  545. # method: scale
  546. # Is the preview URL API enabled?
  547. #
  548. # 'false' by default: uncomment the following to enable it (and specify a
  549. # url_preview_ip_range_blacklist blacklist).
  550. #
  551. url_preview_enabled: {{ matrix_synapse_url_preview_enabled|to_json }}
  552. # List of IP address CIDR ranges that the URL preview spider is denied
  553. # from accessing. There are no defaults: you must explicitly
  554. # specify a list for URL previewing to work. You should specify any
  555. # internal services in your network that you do not want synapse to try
  556. # to connect to, otherwise anyone in any Matrix room could cause your
  557. # synapse to issue arbitrary GET requests to your internal services,
  558. # causing serious security issues.
  559. #
  560. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  561. # listed here, since they correspond to unroutable addresses.)
  562. #
  563. # This must be specified if url_preview_enabled is set. It is recommended that
  564. # you uncomment the following list as a starting point.
  565. #
  566. url_preview_ip_range_blacklist:
  567. - '127.0.0.0/8'
  568. - '10.0.0.0/8'
  569. - '172.16.0.0/12'
  570. - '192.168.0.0/16'
  571. - '100.64.0.0/10'
  572. - '169.254.0.0/16'
  573. - '::1/128'
  574. - 'fe80::/64'
  575. - 'fc00::/7'
  576. # List of IP address CIDR ranges that the URL preview spider is allowed
  577. # to access even if they are specified in url_preview_ip_range_blacklist.
  578. # This is useful for specifying exceptions to wide-ranging blacklisted
  579. # target IP ranges - e.g. for enabling URL previews for a specific private
  580. # website only visible in your network.
  581. #
  582. #url_preview_ip_range_whitelist:
  583. # - '192.168.1.1'
  584. # Optional list of URL matches that the URL preview spider is
  585. # denied from accessing. You should use url_preview_ip_range_blacklist
  586. # in preference to this, otherwise someone could define a public DNS
  587. # entry that points to a private IP address and circumvent the blacklist.
  588. # This is more useful if you know there is an entire shape of URL that
  589. # you know that will never want synapse to try to spider.
  590. #
  591. # Each list entry is a dictionary of url component attributes as returned
  592. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  593. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  594. # The values of the dictionary are treated as an filename match pattern
  595. # applied to that component of URLs, unless they start with a ^ in which
  596. # case they are treated as a regular expression match. If all the
  597. # specified component matches for a given list item succeed, the URL is
  598. # blacklisted.
  599. #
  600. #url_preview_url_blacklist:
  601. # # blacklist any URL with a username in its URI
  602. # - username: '*'
  603. #
  604. # # blacklist all *.google.com URLs
  605. # - netloc: 'google.com'
  606. # - netloc: '*.google.com'
  607. #
  608. # # blacklist all plain HTTP URLs
  609. # - scheme: 'http'
  610. #
  611. # # blacklist http(s)://www.acme.com/foo
  612. # - netloc: 'www.acme.com'
  613. # path: '/foo'
  614. #
  615. # # blacklist any URL with a literal IPv4 address
  616. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  617. # The largest allowed URL preview spidering size in bytes
  618. #
  619. max_spider_size: 10M
  620. ## Captcha ##
  621. # See docs/CAPTCHA_SETUP for full details of configuring this.
  622. # This Home Server's ReCAPTCHA public key.
  623. #
  624. #recaptcha_public_key: "YOUR_PUBLIC_KEY"
  625. # This Home Server's ReCAPTCHA private key.
  626. #
  627. #recaptcha_private_key: "YOUR_PRIVATE_KEY"
  628. # Enables ReCaptcha checks when registering, preventing signup
  629. # unless a captcha is answered. Requires a valid ReCaptcha
  630. # public/private key.
  631. #
  632. #enable_registration_captcha: false
  633. # A secret key used to bypass the captcha test entirely.
  634. #
  635. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  636. # The API endpoint to use for verifying m.login.recaptcha responses.
  637. #
  638. #recaptcha_siteverify_api: "https://www.recaptcha.net/recaptcha/api/siteverify"
  639. ## TURN ##
  640. # The public URIs of the TURN server to give to clients
  641. #
  642. turn_uris: {{ matrix_synapse_turn_uris|to_json }}
  643. # The shared secret used to compute passwords for the TURN server
  644. #
  645. turn_shared_secret: {{ matrix_synapse_turn_shared_secret|string|to_json }}
  646. # The Username and password if the TURN server needs them and
  647. # does not use a token
  648. #
  649. #turn_username: "TURNSERVER_USERNAME"
  650. #turn_password: "TURNSERVER_PASSWORD"
  651. # How long generated TURN credentials last
  652. #
  653. #turn_user_lifetime: 1h
  654. # Whether guests should be allowed to use the TURN server.
  655. # This defaults to True, otherwise VoIP will be unreliable for guests.
  656. # However, it does introduce a slight security risk as it allows users to
  657. # connect to arbitrary endpoints without having first signed up for a
  658. # valid account (e.g. by passing a CAPTCHA).
  659. #
  660. turn_allow_guests: {{ matrix_synapse_turn_allow_guests|to_json }}
  661. ## Registration ##
  662. #
  663. # Registration can be rate-limited using the parameters in the "Ratelimiting"
  664. # section of this file.
  665. # Enable registration for new users.
  666. #
  667. enable_registration: {{ matrix_synapse_enable_registration|to_json }}
  668. # Optional account validity configuration. This allows for accounts to be denied
  669. # any request after a given period.
  670. #
  671. # ``enabled`` defines whether the account validity feature is enabled. Defaults
  672. # to False.
  673. #
  674. # ``period`` allows setting the period after which an account is valid
  675. # after its registration. When renewing the account, its validity period
  676. # will be extended by this amount of time. This parameter is required when using
  677. # the account validity feature.
  678. #
  679. # ``renew_at`` is the amount of time before an account's expiry date at which
  680. # Synapse will send an email to the account's email address with a renewal link.
  681. # This needs the ``email`` and ``public_baseurl`` configuration sections to be
  682. # filled.
  683. #
  684. # ``renew_email_subject`` is the subject of the email sent out with the renewal
  685. # link. ``%(app)s`` can be used as a placeholder for the ``app_name`` parameter
  686. # from the ``email`` section.
  687. #
  688. # Once this feature is enabled, Synapse will look for registered users without an
  689. # expiration date at startup and will add one to every account it found using the
  690. # current settings at that time.
  691. # This means that, if a validity period is set, and Synapse is restarted (it will
  692. # then derive an expiration date from the current validity period), and some time
  693. # after that the validity period changes and Synapse is restarted, the users'
  694. # expiration dates won't be updated unless their account is manually renewed. This
  695. # date will be randomly selected within a range [now + period - d ; now + period],
  696. # where d is equal to 10% of the validity period.
  697. #
  698. #account_validity:
  699. # enabled: True
  700. # period: 6w
  701. # renew_at: 1w
  702. # renew_email_subject: "Renew your %(app)s account"
  703. # Time that a user's session remains valid for, after they log in.
  704. #
  705. # Note that this is not currently compatible with guest logins.
  706. #
  707. # Note also that this is calculated at login time: changes are not applied
  708. # retrospectively to users who have already logged in.
  709. #
  710. # By default, this is infinite.
  711. #
  712. #session_lifetime: 24h
  713. # The user must provide all of the below types of 3PID when registering.
  714. #
  715. #registrations_require_3pid:
  716. # - email
  717. # - msisdn
  718. {% if matrix_synapse_registrations_require_3pid %}
  719. registrations_require_3pid: {{ matrix_synapse_registrations_require_3pid|to_json }}
  720. {% endif %}
  721. # Explicitly disable asking for MSISDNs from the registration
  722. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  723. #
  724. #disable_msisdn_registration: true
  725. # Mandate that users are only allowed to associate certain formats of
  726. # 3PIDs with accounts on this server.
  727. #
  728. #allowed_local_3pids:
  729. # - medium: email
  730. # pattern: '.*@matrix\.org'
  731. # - medium: email
  732. # pattern: '.*@vector\.im'
  733. # - medium: msisdn
  734. # pattern: '\+44'
  735. # Enable 3PIDs lookup requests to identity servers from this server.
  736. #
  737. #enable_3pid_lookup: true
  738. # If set, allows registration of standard or admin accounts by anyone who
  739. # has the shared secret, even if registration is otherwise disabled.
  740. #
  741. registration_shared_secret: {{ matrix_synapse_registration_shared_secret|string|to_json }}
  742. # Set the number of bcrypt rounds used to generate password hash.
  743. # Larger numbers increase the work factor needed to generate the hash.
  744. # The default number is 12 (which equates to 2^12 rounds).
  745. # N.B. that increasing this will exponentially increase the time required
  746. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  747. #
  748. #bcrypt_rounds: 12
  749. # Allows users to register as guests without a password/email/etc, and
  750. # participate in rooms hosted on this server which have been made
  751. # accessible to anonymous users.
  752. #
  753. allow_guest_access: {{ matrix_synapse_allow_guest_access|to_json }}
  754. # The identity server which we suggest that clients should use when users log
  755. # in on this server.
  756. #
  757. # (By default, no suggestion is made, so it is left up to the client.
  758. # This setting is ignored unless public_baseurl is also set.)
  759. #
  760. #default_identity_server: https://matrix.org
  761. # The list of identity servers trusted to verify third party
  762. # identifiers by this server.
  763. #
  764. # Also defines the ID server which will be called when an account is
  765. # deactivated (one will be picked arbitrarily).
  766. #
  767. {% if matrix_synapse_trusted_third_party_id_servers|length > 0 %}
  768. trusted_third_party_id_servers:
  769. {{ matrix_synapse_trusted_third_party_id_servers|to_nice_yaml }}
  770. {% endif %}
  771. # Users who register on this homeserver will automatically be joined
  772. # to these rooms
  773. #
  774. #auto_join_rooms:
  775. # - "#example:example.com"
  776. {% if matrix_synapse_auto_join_rooms|length > 0 %}
  777. auto_join_rooms:
  778. {{ matrix_synapse_auto_join_rooms|to_nice_yaml }}
  779. {% endif %}
  780. # Where auto_join_rooms are specified, setting this flag ensures that the
  781. # the rooms exist by creating them when the first user on the
  782. # homeserver registers.
  783. # Setting to false means that if the rooms are not manually created,
  784. # users cannot be auto-joined since they do not exist.
  785. #
  786. autocreate_auto_join_rooms: {{ matrix_synapse_autocreate_auto_join_rooms|to_json }}
  787. ## Metrics ###
  788. # Enable collection and rendering of performance metrics
  789. #
  790. enable_metrics: {{ matrix_synapse_metrics_enabled|to_json }}
  791. # Enable sentry integration
  792. # NOTE: While attempts are made to ensure that the logs don't contain
  793. # any sensitive information, this cannot be guaranteed. By enabling
  794. # this option the sentry server may therefore receive sensitive
  795. # information, and it in turn may then diseminate sensitive information
  796. # through insecure notification channels if so configured.
  797. #
  798. {% if matrix_synapse_sentry_dsn != "" %}
  799. sentry:
  800. dsn: {{ matrix_synapse_sentry_dsn|to_json }}
  801. {% endif %}
  802. # Whether or not to report anonymized homeserver usage statistics.
  803. report_stats: {{ matrix_synapse_report_stats|to_json }}
  804. ## API Configuration ##
  805. # A list of event types that will be included in the room_invite_state
  806. #
  807. #room_invite_state_types:
  808. # - "m.room.join_rules"
  809. # - "m.room.canonical_alias"
  810. # - "m.room.avatar"
  811. # - "m.room.encryption"
  812. # - "m.room.name"
  813. # A list of application service config files to use
  814. #
  815. app_service_config_files: {{ matrix_synapse_app_service_config_files|to_json }}
  816. # Uncomment to enable tracking of application service IP addresses. Implicitly
  817. # enables MAU tracking for application service users.
  818. #
  819. #track_appservice_user_ips: True
  820. # a secret which is used to sign access tokens. If none is specified,
  821. # the registration_shared_secret is used, if one is given; otherwise,
  822. # a secret key is derived from the signing key.
  823. #
  824. macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key|string|to_json }}
  825. # Used to enable access token expiration.
  826. #
  827. #expire_access_token: False
  828. # a secret which is used to calculate HMACs for form values, to stop
  829. # falsification of values. Must be specified for the User Consent
  830. # forms to work.
  831. #
  832. form_secret: {{ matrix_synapse_form_secret|string|to_json }}
  833. ## Signing Keys ##
  834. # Path to the signing key to sign messages with
  835. #
  836. signing_key_path: "/data/{{ matrix_server_fqn_matrix }}.signing.key"
  837. # The keys that the server used to sign messages with but won't use
  838. # to sign new messages. E.g. it has lost its private key
  839. #
  840. #old_signing_keys:
  841. # "ed25519:auto":
  842. # # Base64 encoded public key
  843. # key: "The public part of your old signing key."
  844. # # Millisecond POSIX timestamp when the key expired.
  845. # expired_ts: 123456789123
  846. # How long key response published by this server is valid for.
  847. # Used to set the valid_until_ts in /key/v2 APIs.
  848. # Determines how quickly servers will query to check which keys
  849. # are still valid.
  850. #
  851. #key_refresh_interval: 1d
  852. # The trusted servers to download signing keys from.
  853. #
  854. # When we need to fetch a signing key, each server is tried in parallel.
  855. #
  856. # Normally, the connection to the key server is validated via TLS certificates.
  857. # Additional security can be provided by configuring a `verify key`, which
  858. # will make synapse check that the response is signed by that key.
  859. #
  860. # This setting supercedes an older setting named `perspectives`. The old format
  861. # is still supported for backwards-compatibility, but it is deprecated.
  862. #
  863. # Options for each entry in the list include:
  864. #
  865. # server_name: the name of the server. required.
  866. #
  867. # verify_keys: an optional map from key id to base64-encoded public key.
  868. # If specified, we will check that the response is signed by at least
  869. # one of the given keys.
  870. #
  871. # accept_keys_insecurely: a boolean. Normally, if `verify_keys` is unset,
  872. # and federation_verify_certificates is not `true`, synapse will refuse
  873. # to start, because this would allow anyone who can spoof DNS responses
  874. # to masquerade as the trusted key server. If you know what you are doing
  875. # and are sure that your network environment provides a secure connection
  876. # to the key server, you can set this to `true` to override this
  877. # behaviour.
  878. #
  879. # An example configuration might look like:
  880. #
  881. #trusted_key_servers:
  882. # - server_name: "my_trusted_server.example.com"
  883. # verify_keys:
  884. # "ed25519:auto": "abcdefghijklmnopqrstuvwxyzabcdefghijklmopqr"
  885. # - server_name: "my_other_trusted_server.example.com"
  886. #
  887. # The default configuration is:
  888. #
  889. #trusted_key_servers:
  890. # - server_name: "matrix.org"
  891. # Enable SAML2 for registration and login. Uses pysaml2.
  892. #
  893. # `sp_config` is the configuration for the pysaml2 Service Provider.
  894. # See pysaml2 docs for format of config.
  895. #
  896. # Default values will be used for the 'entityid' and 'service' settings,
  897. # so it is not normally necessary to specify them unless you need to
  898. # override them.
  899. #
  900. # Once SAML support is enabled, a metadata file will be exposed at
  901. # https://<server>:<port>/_matrix/saml2/metadata.xml, which you may be able to
  902. # use to configure your SAML IdP with. Alternatively, you can manually configure
  903. # the IdP to use an ACS location of
  904. # https://<server>:<port>/_matrix/saml2/authn_response.
  905. #
  906. #saml2_config:
  907. # sp_config:
  908. # # point this to the IdP's metadata. You can use either a local file or
  909. # # (preferably) a URL.
  910. # metadata:
  911. # #local: ["saml2/idp.xml"]
  912. # remote:
  913. # - url: https://our_idp/metadata.xml
  914. #
  915. # # By default, the user has to go to our login page first. If you'd like to
  916. # # allow IdP-initiated login, set 'allow_unsolicited: True' in a
  917. # # 'service.sp' section:
  918. # #
  919. # #service:
  920. # # sp:
  921. # # allow_unsolicited: True
  922. #
  923. # # The examples below are just used to generate our metadata xml, and you
  924. # # may well not need it, depending on your setup. Alternatively you
  925. # # may need a whole lot more detail - see the pysaml2 docs!
  926. #
  927. # description: ["My awesome SP", "en"]
  928. # name: ["Test SP", "en"]
  929. #
  930. # organization:
  931. # name: Example com
  932. # display_name:
  933. # - ["Example co", "en"]
  934. # url: "http://example.com"
  935. #
  936. # contact_person:
  937. # - given_name: Bob
  938. # sur_name: "the Sysadmin"
  939. # email_address": ["admin@example.com"]
  940. # contact_type": technical
  941. #
  942. # # Instead of putting the config inline as above, you can specify a
  943. # # separate pysaml2 configuration file:
  944. # #
  945. # config_path: "/data/sp_conf.py"
  946. #
  947. # # the lifetime of a SAML session. This defines how long a user has to
  948. # # complete the authentication process, if allow_unsolicited is unset.
  949. # # The default is 5 minutes.
  950. # #
  951. # # saml_session_lifetime: 5m
  952. # Enable CAS for registration and login.
  953. #
  954. #cas_config:
  955. # enabled: true
  956. # server_url: "https://cas-server.com"
  957. # service_url: "https://homeserver.domain.com:8448"
  958. # #required_attributes:
  959. # # name: value
  960. # The JWT needs to contain a globally unique "sub" (subject) claim.
  961. #
  962. #jwt_config:
  963. # enabled: true
  964. # secret: "a secret"
  965. # algorithm: "HS256"
  966. password_config:
  967. # Uncomment to disable password login
  968. #
  969. #enabled: false
  970. # Uncomment to disable authentication against the local password
  971. # database. This is ignored if `enabled` is false, and is only useful
  972. # if you have other password_providers.
  973. #
  974. localdb_enabled: {{ matrix_synapse_password_config_localdb_enabled|to_json }}
  975. # Uncomment and change to a secret random string for extra security.
  976. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  977. #
  978. pepper: {{ matrix_synapse_password_config_pepper|string|to_json }}
  979. # Enable sending emails for password resets, notification events or
  980. # account expiry notices
  981. #
  982. # If your SMTP server requires authentication, the optional smtp_user &
  983. # smtp_pass variables should be used
  984. #
  985. #email:
  986. # enable_notifs: false
  987. # smtp_host: "localhost"
  988. # smtp_port: 25 # SSL: 465, STARTTLS: 587
  989. # smtp_user: "exampleusername"
  990. # smtp_pass: "examplepassword"
  991. # require_transport_security: False
  992. # notif_from: "Your Friendly %(app)s Home Server <noreply@example.com>"
  993. # app_name: Matrix
  994. #
  995. # # Enable email notifications by default
  996. # #
  997. # notif_for_new_users: True
  998. #
  999. # # Defining a custom URL for Riot is only needed if email notifications
  1000. # # should contain links to a self-hosted installation of Riot; when set
  1001. # # the "app_name" setting is ignored
  1002. # #
  1003. # riot_base_url: "http://localhost/riot"
  1004. #
  1005. # # Enable sending password reset emails via the configured, trusted
  1006. # # identity servers
  1007. # #
  1008. # # IMPORTANT! This will give a malicious or overtaken identity server
  1009. # # the ability to reset passwords for your users! Make absolutely sure
  1010. # # that you want to do this! It is strongly recommended that password
  1011. # # reset emails be sent by the homeserver instead
  1012. # #
  1013. # # If this option is set to false and SMTP options have not been
  1014. # # configured, resetting user passwords via email will be disabled
  1015. # #
  1016. # #trust_identity_server_for_password_resets: false
  1017. #
  1018. # # Configure the time that a validation email or text message code
  1019. # # will expire after sending
  1020. # #
  1021. # # This is currently used for password resets
  1022. # #
  1023. # #validation_token_lifetime: 1h
  1024. #
  1025. # # Template directory. All template files should be stored within this
  1026. # # directory. If not set, default templates from within the Synapse
  1027. # # package will be used
  1028. # #
  1029. # # For the list of default templates, please see
  1030. # # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1031. # #
  1032. # #template_dir: res/templates
  1033. #
  1034. # # Templates for email notifications
  1035. # #
  1036. # notif_template_html: notif_mail.html
  1037. # notif_template_text: notif_mail.txt
  1038. #
  1039. # # Templates for account expiry notices
  1040. # #
  1041. # expiry_template_html: notice_expiry.html
  1042. # expiry_template_text: notice_expiry.txt
  1043. #
  1044. # # Templates for password reset emails sent by the homeserver
  1045. # #
  1046. # #password_reset_template_html: password_reset.html
  1047. # #password_reset_template_text: password_reset.txt
  1048. #
  1049. # # Templates for password reset success and failure pages that a user
  1050. # # will see after attempting to reset their password
  1051. # #
  1052. # #password_reset_template_success_html: password_reset_success.html
  1053. # #password_reset_template_failure_html: password_reset_failure.html
  1054. {% if matrix_synapse_email_enabled %}
  1055. email:
  1056. enable_notifs: true
  1057. smtp_host: {{ matrix_synapse_email_smtp_host|string|to_json }}
  1058. smtp_port: {{ matrix_synapse_email_smtp_port|to_json }}
  1059. require_transport_security: {{ matrix_synapse_email_smtp_require_transport_security|to_json }}
  1060. notif_from: {{ matrix_synapse_email_notif_from|string|to_json }}
  1061. app_name: Matrix
  1062. notif_template_html: notif_mail.html
  1063. notif_template_text: notif_mail.txt
  1064. # Templates for account expiry notices.
  1065. expiry_template_html: notice_expiry.html
  1066. expiry_template_text: notice_expiry.txt
  1067. notif_for_new_users: True
  1068. riot_base_url: {{ matrix_synapse_email_riot_base_url|string|to_json }}
  1069. {% endif %}
  1070. #password_providers:
  1071. # - module: "ldap_auth_provider.LdapAuthProvider"
  1072. # config:
  1073. # enabled: true
  1074. # uri: "ldap://ldap.example.com:389"
  1075. # start_tls: true
  1076. # base: "ou=users,dc=example,dc=com"
  1077. # attributes:
  1078. # uid: "cn"
  1079. # mail: "email"
  1080. # name: "givenName"
  1081. # #bind_dn:
  1082. # #bind_password:
  1083. # #filter: "(objectClass=posixAccount)"
  1084. {% if matrix_synapse_password_providers_enabled %}
  1085. password_providers:
  1086. {% if matrix_synapse_ext_password_provider_shared_secret_auth_enabled %}
  1087. - module: "shared_secret_authenticator.SharedSecretAuthenticator"
  1088. config:
  1089. sharedSecret: {{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret|string|to_json }}
  1090. {% endif %}
  1091. {% if matrix_synapse_ext_password_provider_rest_auth_enabled %}
  1092. - module: "rest_auth_provider.RestAuthProvider"
  1093. config:
  1094. endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint|string|to_json }}
  1095. policy:
  1096. registration:
  1097. username:
  1098. enforceLowercase: {{ matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase }}
  1099. profile:
  1100. name: {{ matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill }}
  1101. login:
  1102. profile:
  1103. name: {{ matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill }}
  1104. {% endif %}
  1105. {% if matrix_synapse_ext_password_provider_ldap_enabled %}
  1106. - module: "ldap_auth_provider.LdapAuthProvider"
  1107. config:
  1108. enabled: true
  1109. uri: {{ matrix_synapse_ext_password_provider_ldap_uri|string|to_json }}
  1110. start_tls: {{ matrix_synapse_ext_password_provider_ldap_start_tls|to_json }}
  1111. base: {{ matrix_synapse_ext_password_provider_ldap_base|string|to_json }}
  1112. attributes:
  1113. uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid|string|to_json }}
  1114. mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail|string|to_json }}
  1115. name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name|string|to_json }}
  1116. bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn|string|to_json }}
  1117. bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password|string|to_json }}
  1118. filter: {{ matrix_synapse_ext_password_provider_ldap_filter|string|to_json }}
  1119. {% endif %}
  1120. {% endif %}
  1121. # Clients requesting push notifications can either have the body of
  1122. # the message sent in the notification poke along with other details
  1123. # like the sender, or just the event ID and room ID (`event_id_only`).
  1124. # If clients choose the former, this option controls whether the
  1125. # notification request includes the content of the event (other details
  1126. # like the sender are still included). For `event_id_only` push, it
  1127. # has no effect.
  1128. #
  1129. # For modern android devices the notification content will still appear
  1130. # because it is loaded by the app. iPhone, however will send a
  1131. # notification saying only that a message arrived and who it came from.
  1132. #
  1133. push:
  1134. include_content: {{ matrix_synapse_push_include_content|to_json }}
  1135. #spam_checker:
  1136. # module: "my_custom_project.SuperSpamChecker"
  1137. # config:
  1138. # example_option: 'things'
  1139. # Uncomment to allow non-server-admin users to create groups on this server
  1140. #
  1141. #enable_group_creation: true
  1142. # If enabled, non server admins can only create groups with local parts
  1143. # starting with this prefix
  1144. #
  1145. #group_creation_prefix: "unofficial/"
  1146. # User Directory configuration
  1147. #
  1148. # 'enabled' defines whether users can search the user directory. If
  1149. # false then empty responses are returned to all queries. Defaults to
  1150. # true.
  1151. #
  1152. # 'search_all_users' defines whether to search all users visible to your HS
  1153. # when searching the user directory, rather than limiting to users visible
  1154. # in public rooms. Defaults to false. If you set it True, you'll have to
  1155. # rebuild the user_directory search indexes, see
  1156. # https://github.com/matrix-org/synapse/blob/master/docs/user_directory.md
  1157. #
  1158. #user_directory:
  1159. # enabled: true
  1160. # search_all_users: false
  1161. # User Consent configuration
  1162. #
  1163. # for detailed instructions, see
  1164. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  1165. #
  1166. # Parts of this section are required if enabling the 'consent' resource under
  1167. # 'listeners', in particular 'template_dir' and 'version'.
  1168. #
  1169. # 'template_dir' gives the location of the templates for the HTML forms.
  1170. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  1171. # and each language directory should contain the policy document (named as
  1172. # '<version>.html') and a success page (success.html).
  1173. #
  1174. # 'version' specifies the 'current' version of the policy document. It defines
  1175. # the version to be served by the consent resource if there is no 'v'
  1176. # parameter.
  1177. #
  1178. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  1179. # asking them to consent to the privacy policy. The 'server_notices' section
  1180. # must also be configured for this to work. Notices will *not* be sent to
  1181. # guest users unless 'send_server_notice_to_guests' is set to true.
  1182. #
  1183. # 'block_events_error', if set, will block any attempts to send events
  1184. # until the user consents to the privacy policy. The value of the setting is
  1185. # used as the text of the error.
  1186. #
  1187. # 'require_at_registration', if enabled, will add a step to the registration
  1188. # process, similar to how captcha works. Users will be required to accept the
  1189. # policy before their account is created.
  1190. #
  1191. # 'policy_name' is the display name of the policy users will see when registering
  1192. # for an account. Has no effect unless `require_at_registration` is enabled.
  1193. # Defaults to "Privacy Policy".
  1194. #
  1195. #user_consent:
  1196. # template_dir: res/templates/privacy
  1197. # version: 1.0
  1198. # server_notice_content:
  1199. # msgtype: m.text
  1200. # body: >-
  1201. # To continue using this homeserver you must review and agree to the
  1202. # terms and conditions at %(consent_uri)s
  1203. # send_server_notice_to_guests: True
  1204. # block_events_error: >-
  1205. # To continue using this homeserver you must review and agree to the
  1206. # terms and conditions at %(consent_uri)s
  1207. # require_at_registration: False
  1208. # policy_name: Privacy Policy
  1209. #
  1210. # Local statistics collection. Used in populating the room directory.
  1211. #
  1212. # 'bucket_size' controls how large each statistics timeslice is. It can
  1213. # be defined in a human readable short form -- e.g. "1d", "1y".
  1214. #
  1215. # 'retention' controls how long historical statistics will be kept for.
  1216. # It can be defined in a human readable short form -- e.g. "1d", "1y".
  1217. #
  1218. #
  1219. #stats:
  1220. # enabled: true
  1221. # bucket_size: 1d
  1222. # retention: 1y
  1223. # Server Notices room configuration
  1224. #
  1225. # Uncomment this section to enable a room which can be used to send notices
  1226. # from the server to users. It is a special room which cannot be left; notices
  1227. # come from a special "notices" user id.
  1228. #
  1229. # If you uncomment this section, you *must* define the system_mxid_localpart
  1230. # setting, which defines the id of the user which will be used to send the
  1231. # notices.
  1232. #
  1233. # It's also possible to override the room name, the display name of the
  1234. # "notices" user, and the avatar for the user.
  1235. #
  1236. #server_notices:
  1237. # system_mxid_localpart: notices
  1238. # system_mxid_display_name: "Server Notices"
  1239. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  1240. # room_name: "Server Notices"
  1241. # Uncomment to disable searching the public room list. When disabled
  1242. # blocks searching local and remote room lists for local and remote
  1243. # users by always returning an empty list for all queries.
  1244. #
  1245. #enable_room_list_search: false
  1246. enable_room_list_search: {{ matrix_synapse_enable_room_list_search|to_json }}
  1247. # The `alias_creation` option controls who's allowed to create aliases
  1248. # on this server.
  1249. #
  1250. # The format of this option is a list of rules that contain globs that
  1251. # match against user_id, room_id and the new alias (fully qualified with
  1252. # server name). The action in the first rule that matches is taken,
  1253. # which can currently either be "allow" or "deny".
  1254. #
  1255. # Missing user_id/room_id/alias fields default to "*".
  1256. #
  1257. # If no rules match the request is denied. An empty list means no one
  1258. # can create aliases.
  1259. #
  1260. # Options for the rules include:
  1261. #
  1262. # user_id: Matches against the creator of the alias
  1263. # alias: Matches against the alias being created
  1264. # room_id: Matches against the room ID the alias is being pointed at
  1265. # action: Whether to "allow" or "deny" the request if the rule matches
  1266. #
  1267. # The default is:
  1268. #
  1269. #alias_creation_rules:
  1270. # - user_id: "*"
  1271. # alias: "*"
  1272. # room_id: "*"
  1273. # action: allow
  1274. alias_creation_rules: {{ matrix_synapse_alias_creation_rules|to_json }}
  1275. # The `room_list_publication_rules` option controls who can publish and
  1276. # which rooms can be published in the public room list.
  1277. #
  1278. # The format of this option is the same as that for
  1279. # `alias_creation_rules`.
  1280. #
  1281. # If the room has one or more aliases associated with it, only one of
  1282. # the aliases needs to match the alias rule. If there are no aliases
  1283. # then only rules with `alias: *` match.
  1284. #
  1285. # If no rules match the request is denied. An empty list means no one
  1286. # can publish rooms.
  1287. #
  1288. # Options for the rules include:
  1289. #
  1290. # user_id: Matches agaisnt the creator of the alias
  1291. # room_id: Matches against the room ID being published
  1292. # alias: Matches against any current local or canonical aliases
  1293. # associated with the room
  1294. # action: Whether to "allow" or "deny" the request if the rule matches
  1295. #
  1296. # The default is:
  1297. #
  1298. #room_list_publication_rules:
  1299. # - user_id: "*"
  1300. # alias: "*"
  1301. # room_id: "*"
  1302. # action: allow
  1303. room_list_publication_rules: {{ matrix_synapse_room_list_publication_rules|to_json }}
  1304. # Server admins can define a Python module that implements extra rules for
  1305. # allowing or denying incoming events. In order to work, this module needs to
  1306. # override the methods defined in synapse/events/third_party_rules.py.
  1307. #
  1308. # This feature is designed to be used in closed federations only, where each
  1309. # participating server enforces the same rules.
  1310. #
  1311. #third_party_event_rules:
  1312. # module: "my_custom_project.SuperRulesSet"
  1313. # config:
  1314. # example_option: 'things'
  1315. ## Opentracing ##
  1316. # These settings enable opentracing, which implements distributed tracing.
  1317. # This allows you to observe the causal chains of events across servers
  1318. # including requests, key lookups etc., across any server running
  1319. # synapse or any other other services which supports opentracing
  1320. # (specifically those implemented with Jaeger).
  1321. #
  1322. opentracing:
  1323. # tracing is disabled by default. Uncomment the following line to enable it.
  1324. #
  1325. #enabled: true
  1326. # The list of homeservers we wish to send and receive span contexts and span baggage.
  1327. # See docs/opentracing.rst
  1328. # This is a list of regexes which are matched against the server_name of the
  1329. # homeserver.
  1330. #
  1331. # By defult, it is empty, so no servers are matched.
  1332. #
  1333. #homeserver_whitelist:
  1334. # - ".*"