Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

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