Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

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