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

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