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.
 
 

1184 regels
39 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. # CPU affinity mask. Setting this restricts the CPUs on which the
  14. # process will be scheduled. It is represented as a bitmask, with the
  15. # lowest order bit corresponding to the first logical CPU and the
  16. # highest order bit corresponding to the last logical CPU. Not all CPUs
  17. # may exist on a given system but a mask may specify more CPUs than are
  18. # present.
  19. #
  20. # For example:
  21. # 0x00000001 is processor #0,
  22. # 0x00000003 is processors #0 and #1,
  23. # 0xFFFFFFFF is all processors (#0 through #31).
  24. #
  25. # Pinning a Python process to a single CPU is desirable, because Python
  26. # is inherently single-threaded due to the GIL, and can suffer a
  27. # 30-40% slowdown due to cache blow-out and thread context switching
  28. # if the scheduler happens to schedule the underlying threads across
  29. # different cores. See
  30. # https://www.mirantis.com/blog/improve-performance-python-programs-restricting-single-cpu/.
  31. #
  32. # This setting requires the affinity package to be installed!
  33. #
  34. #cpu_affinity: 0xFFFFFFFF
  35. # The path to the web client which will be served at /_matrix/client/
  36. # if 'webclient' is configured under the 'listeners' configuration.
  37. #
  38. #web_client_location: "/path/to/web/root"
  39. # The public-facing base URL that clients use to access this HS
  40. # (not including _matrix/...). This is the same URL a user would
  41. # enter into the 'custom HS URL' field on their client. If you
  42. # use synapse with a reverse proxy, this should be the URL to reach
  43. # synapse via the proxy.
  44. #
  45. public_baseurl: https://{{ matrix_server_fqn_matrix }}/
  46. # Set the soft limit on the number of file descriptors synapse can use
  47. # Zero is used to indicate synapse should set the soft limit to the
  48. # hard limit.
  49. #
  50. #soft_file_limit: 0
  51. # Set to false to disable presence tracking on this homeserver.
  52. #
  53. use_presence: {{ matrix_synapse_use_presence|to_json }}
  54. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  55. #
  56. #gc_thresholds: [700, 10, 10]
  57. # Set the limit on the returned events in the timeline in the get
  58. # and sync operations. The default value is -1, means no upper limit.
  59. #
  60. #filter_timeline_limit: 5000
  61. # Whether room invites to users on this server should be blocked
  62. # (except those sent by local server admins). The default is False.
  63. #
  64. #block_non_admin_invites: True
  65. # Room searching
  66. #
  67. # If disabled, new messages will not be indexed for searching and users
  68. # will receive errors when searching for messages. Defaults to enabled.
  69. #
  70. #enable_search: false
  71. # Restrict federation to the following whitelist of domains.
  72. # N.B. we recommend also firewalling your federation listener to limit
  73. # inbound federation traffic as early as possible, rather than relying
  74. # purely on this application-layer restriction. If not specified, the
  75. # default is to whitelist everything.
  76. #
  77. #federation_domain_whitelist:
  78. # - lon.example.com
  79. # - nyc.example.com
  80. # - syd.example.com
  81. {% if matrix_synapse_federation_domain_whitelist is not none %}
  82. {# Cannot use `|to_nice_yaml` here, as an empty list does not get serialized properly by it. #}
  83. federation_domain_whitelist: {{ matrix_synapse_federation_domain_whitelist|to_json }}
  84. {% endif %}
  85. # List of ports that Synapse should listen on, their purpose and their
  86. # configuration.
  87. #
  88. # Options for each listener include:
  89. #
  90. # port: the TCP port to bind to
  91. #
  92. # bind_addresses: a list of local addresses to listen on. The default is
  93. # 'all local interfaces'.
  94. #
  95. # type: the type of listener. Normally 'http', but other valid options are:
  96. # 'manhole' (see docs/manhole.md),
  97. # 'metrics' (see docs/metrics-howto.rst),
  98. # 'replication' (see docs/workers.rst).
  99. #
  100. # tls: set to true to enable TLS for this listener. Will use the TLS
  101. # key/cert specified in tls_private_key_path / tls_certificate_path.
  102. #
  103. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  104. # X-Forwarded-For header as the client IP. Useful when Synapse is
  105. # behind a reverse-proxy.
  106. #
  107. # resources: Only valid for an 'http' listener. A list of resources to host
  108. # on this port. Options for each resource are:
  109. #
  110. # names: a list of names of HTTP resources. See below for a list of
  111. # valid resource names.
  112. #
  113. # compress: set to true to enable HTTP comression for this resource.
  114. #
  115. # additional_resources: Only valid for an 'http' listener. A map of
  116. # additional endpoints which should be loaded via dynamic modules.
  117. #
  118. # Valid resource names are:
  119. #
  120. # client: the client-server API (/_matrix/client). Also implies 'media' and
  121. # 'static'.
  122. #
  123. # consent: user consent forms (/_matrix/consent). See
  124. # docs/consent_tracking.md.
  125. #
  126. # federation: the server-server API (/_matrix/federation). Also implies
  127. # 'media', 'keys', 'openid'
  128. #
  129. # keys: the key discovery API (/_matrix/keys).
  130. #
  131. # media: the media API (/_matrix/media).
  132. #
  133. # metrics: the metrics interface. See docs/metrics-howto.rst.
  134. #
  135. # openid: OpenID authentication.
  136. #
  137. # replication: the HTTP replication API (/_synapse/replication). See
  138. # docs/workers.rst.
  139. #
  140. # static: static resources under synapse/static (/_matrix/static). (Mostly
  141. # useful for 'fallback authentication'.)
  142. #
  143. # webclient: A web client. Requires web_client_location to be set.
  144. #
  145. listeners:
  146. {% if matrix_synapse_metrics_enabled %}
  147. - type: metrics
  148. port: {{ matrix_synapse_metrics_port }}
  149. bind_addresses:
  150. - '0.0.0.0'
  151. {% endif %}
  152. {% if matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled %}
  153. # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  154. - port: 8448
  155. tls: true
  156. bind_addresses: ['::']
  157. type: http
  158. x_forwarded: false
  159. resources:
  160. - names: [federation]
  161. compress: false
  162. {% endif %}
  163. # Unsecure HTTP listener (Client API): for when matrix traffic passes through a reverse proxy
  164. # that unwraps TLS.
  165. - port: 8008
  166. tls: false
  167. bind_addresses: ['::']
  168. type: http
  169. x_forwarded: true
  170. resources:
  171. - names: [client]
  172. compress: false
  173. {% if matrix_synapse_federation_enabled %}
  174. # Unsecure HTTP listener (Federation API): for when matrix traffic passes through a reverse proxy
  175. # that unwraps TLS.
  176. - port: 8048
  177. tls: false
  178. bind_addresses: ['::']
  179. type: http
  180. x_forwarded: true
  181. resources:
  182. - names: [federation]
  183. compress: false
  184. {% endif %}
  185. # Turn on the twisted ssh manhole service on localhost on the given
  186. # port.
  187. # - port: 9000
  188. # bind_addresses: ['::1', '127.0.0.1']
  189. # type: manhole
  190. ## Homeserver blocking ##
  191. # How to reach the server admin, used in ResourceLimitError
  192. #
  193. #admin_contact: 'mailto:admin@server.com'
  194. # Global blocking
  195. #
  196. #hs_disabled: False
  197. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  198. #hs_disabled_limit_type: 'error code(str), to help clients decode reason'
  199. # Monthly Active User Blocking
  200. #
  201. #limit_usage_by_mau: False
  202. #max_mau_value: 50
  203. #mau_trial_days: 2
  204. # If enabled, the metrics for the number of monthly active users will
  205. # be populated, however no one will be limited. If limit_usage_by_mau
  206. # is true, this is implied to be true.
  207. #
  208. #mau_stats_only: False
  209. # Sometimes the server admin will want to ensure certain accounts are
  210. # never blocked by mau checking. These accounts are specified here.
  211. #
  212. #mau_limit_reserved_threepids:
  213. # - medium: 'email'
  214. # address: 'reserved_user@example.com'
  215. ## TLS ##
  216. # PEM-encoded X509 certificate for TLS.
  217. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  218. # certificate, signed by a recognised Certificate Authority.
  219. #
  220. # See 'ACME support' below to enable auto-provisioning this certificate via
  221. # Let's Encrypt.
  222. #
  223. # If supplying your own, be sure to use a `.pem` file that includes the
  224. # full certificate chain including any intermediate certificates (for
  225. # instance, if using certbot, use `fullchain.pem` as your certificate,
  226. # not `cert.pem`).
  227. #
  228. tls_certificate_path: {{ matrix_synapse_tls_certificate_path|to_json }}
  229. # PEM-encoded private key for TLS
  230. #
  231. tls_private_key_path: {{ matrix_synapse_tls_private_key_path|to_json }}
  232. # ACME support: This will configure Synapse to request a valid TLS certificate
  233. # for your configured `server_name` via Let's Encrypt.
  234. #
  235. # Note that provisioning a certificate in this way requires port 80 to be
  236. # routed to Synapse so that it can complete the http-01 ACME challenge.
  237. # By default, if you enable ACME support, Synapse will attempt to listen on
  238. # port 80 for incoming http-01 challenges - however, this will likely fail
  239. # with 'Permission denied' or a similar error.
  240. #
  241. # There are a couple of potential solutions to this:
  242. #
  243. # * If you already have an Apache, Nginx, or similar listening on port 80,
  244. # you can configure Synapse to use an alternate port, and have your web
  245. # server forward the requests. For example, assuming you set 'port: 8009'
  246. # below, on Apache, you would write:
  247. #
  248. # ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  249. #
  250. # * Alternatively, you can use something like `authbind` to give Synapse
  251. # permission to listen on port 80.
  252. #
  253. acme:
  254. # ACME support is disabled by default. Uncomment the following line
  255. # (and tls_certificate_path and tls_private_key_path above) to enable it.
  256. #
  257. #enabled: true
  258. # Endpoint to use to request certificates. If you only want to test,
  259. # use Let's Encrypt's staging url:
  260. # https://acme-staging.api.letsencrypt.org/directory
  261. #
  262. #url: https://acme-v01.api.letsencrypt.org/directory
  263. # Port number to listen on for the HTTP-01 challenge. Change this if
  264. # you are forwarding connections through Apache/Nginx/etc.
  265. #
  266. #port: 80
  267. # Local addresses to listen on for incoming connections.
  268. # Again, you may want to change this if you are forwarding connections
  269. # through Apache/Nginx/etc.
  270. #
  271. #bind_addresses: ['::', '0.0.0.0']
  272. # How many days remaining on a certificate before it is renewed.
  273. #
  274. #reprovision_threshold: 30
  275. # The domain that the certificate should be for. Normally this
  276. # should be the same as your Matrix domain (i.e., 'server_name'), but,
  277. # by putting a file at 'https://<server_name>/.well-known/matrix/server',
  278. # you can delegate incoming traffic to another server. If you do that,
  279. # you should give the target of the delegation here.
  280. #
  281. # For example: if your 'server_name' is 'example.com', but
  282. # 'https://example.com/.well-known/matrix/server' delegates to
  283. # 'matrix.example.com', you should put 'matrix.example.com' here.
  284. #
  285. # If not set, defaults to your 'server_name'.
  286. #
  287. #domain: matrix.example.com
  288. # List of allowed TLS fingerprints for this server to publish along
  289. # with the signing keys for this server. Other matrix servers that
  290. # make HTTPS requests to this server will check that the TLS
  291. # certificates returned by this server match one of the fingerprints.
  292. #
  293. # Synapse automatically adds the fingerprint of its own certificate
  294. # to the list. So if federation traffic is handled directly by synapse
  295. # then no modification to the list is required.
  296. #
  297. # If synapse is run behind a load balancer that handles the TLS then it
  298. # will be necessary to add the fingerprints of the certificates used by
  299. # the loadbalancers to this list if they are different to the one
  300. # synapse is using.
  301. #
  302. # Homeservers are permitted to cache the list of TLS fingerprints
  303. # returned in the key responses up to the "valid_until_ts" returned in
  304. # key. It may be necessary to publish the fingerprints of a new
  305. # certificate and wait until the "valid_until_ts" of the previous key
  306. # responses have passed before deploying it.
  307. #
  308. # You can calculate a fingerprint from a given TLS listener via:
  309. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  310. # openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  311. # or by checking matrix.org/federationtester/api/report?server_name=$host
  312. #
  313. #tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  314. ## Database ##
  315. database:
  316. # The database engine name
  317. name: "psycopg2"
  318. args:
  319. user: {{ matrix_synapse_database_user|string|to_json }}
  320. password: {{ matrix_synapse_database_password|string|to_json }}
  321. database: "{{ matrix_synapse_database_database }}"
  322. host: "{{ matrix_synapse_database_host }}"
  323. cp_min: 5
  324. cp_max: 10
  325. # Number of events to cache in memory.
  326. #
  327. event_cache_size: "{{ matrix_synapse_event_cache_size }}"
  328. ## Logging ##
  329. # A yaml python logging config file
  330. #
  331. log_config: "/data/{{ matrix_server_fqn_matrix }}.log.config"
  332. ## Ratelimiting ##
  333. # Number of messages a client can send per second
  334. #
  335. rc_messages_per_second: {{ matrix_synapse_rc_messages_per_second }}
  336. # Number of message a client can send before being throttled
  337. #
  338. rc_message_burst_count: {{ matrix_synapse_rc_message_burst_count }}
  339. # Ratelimiting settings for registration and login.
  340. #
  341. # Each ratelimiting configuration is made of two parameters:
  342. # - per_second: number of requests a client can send per second.
  343. # - burst_count: number of requests a client can send before being throttled.
  344. #
  345. # Synapse currently uses the following configurations:
  346. # - one for registration that ratelimits registration requests based on the
  347. # client's IP address.
  348. # - one for login that ratelimits login requests based on the client's IP
  349. # address.
  350. # - one for login that ratelimits login requests based on the account the
  351. # client is attempting to log into.
  352. # - one for login that ratelimits login requests based on the account the
  353. # client is attempting to log into, based on the amount of failed login
  354. # attempts for this account.
  355. #
  356. # The defaults are as shown below.
  357. #
  358. #rc_registration:
  359. # per_second: 0.17
  360. # burst_count: 3
  361. rc_registration: {{ matrix_synapse_rc_registration|to_json }}
  362. #
  363. #rc_login:
  364. # address:
  365. # per_second: 0.17
  366. # burst_count: 3
  367. # account:
  368. # per_second: 0.17
  369. # burst_count: 3
  370. # failed_attempts:
  371. # per_second: 0.17
  372. # burst_count: 3
  373. rc_login: {{ matrix_synapse_rc_login|to_json }}
  374. # The federation window size in milliseconds
  375. #
  376. #federation_rc_window_size: 1000
  377. federation_rc_window_size: {{ matrix_synapse_federation_rc_window_size }}
  378. # The number of federation requests from a single server in a window
  379. # before the server will delay processing the request.
  380. #
  381. #federation_rc_sleep_limit: 10
  382. federation_rc_sleep_limit: {{ matrix_synapse_federation_rc_sleep_limit }}
  383. # The duration in milliseconds to delay processing events from
  384. # remote servers by if they go over the sleep limit.
  385. #
  386. #federation_rc_sleep_delay: 500
  387. federation_rc_sleep_delay: {{ matrix_synapse_federation_rc_sleep_delay }}
  388. # The maximum number of concurrent federation requests allowed
  389. # from a single server
  390. #
  391. #federation_rc_reject_limit: 50
  392. federation_rc_reject_limit: {{ matrix_synapse_federation_rc_reject_limit }}
  393. # The number of federation requests to concurrently process from a
  394. # single server
  395. #
  396. #federation_rc_concurrent: 3
  397. federation_rc_concurrent: {{ matrix_synapse_federation_rc_concurrent }}
  398. # Target outgoing federation transaction frequency for sending read-receipts,
  399. # per-room.
  400. #
  401. # If we end up trying to send out more read-receipts, they will get buffered up
  402. # into fewer transactions.
  403. #
  404. #federation_rr_transactions_per_room_per_second: 50
  405. federation_rr_transactions_per_room_per_second: {{ matrix_synapse_federation_rr_transactions_per_room_per_second }}
  406. # Directory where uploaded images and attachments are stored.
  407. #
  408. media_store_path: "/matrix-media-store-parent/{{ matrix_synapse_media_store_directory_name }}"
  409. # Media storage providers allow media to be stored in different
  410. # locations.
  411. #
  412. #media_storage_providers:
  413. # - module: file_system
  414. # # Whether to write new local files.
  415. # store_local: false
  416. # # Whether to write new remote media
  417. # store_remote: false
  418. # # Whether to block upload requests waiting for write to this
  419. # # provider to complete
  420. # store_synchronous: false
  421. # config:
  422. # directory: /mnt/some/other/directory
  423. # Directory where in-progress uploads are stored.
  424. #
  425. uploads_path: "/matrix-run/uploads"
  426. # The largest allowed upload size in bytes
  427. #
  428. max_upload_size: "{{ matrix_synapse_max_upload_size_mb }}M"
  429. # Maximum number of pixels that will be thumbnailed
  430. #
  431. #max_image_pixels: 32M
  432. # Whether to generate new thumbnails on the fly to precisely match
  433. # the resolution requested by the client. If true then whenever
  434. # a new resolution is requested by the client the server will
  435. # generate a new thumbnail. If false the server will pick a thumbnail
  436. # from a precalculated list.
  437. #
  438. #dynamic_thumbnails: false
  439. # List of thumbnails to precalculate when an image is uploaded.
  440. #
  441. #thumbnail_sizes:
  442. # - width: 32
  443. # height: 32
  444. # method: crop
  445. # - width: 96
  446. # height: 96
  447. # method: crop
  448. # - width: 320
  449. # height: 240
  450. # method: scale
  451. # - width: 640
  452. # height: 480
  453. # method: scale
  454. # - width: 800
  455. # height: 600
  456. # method: scale
  457. # Is the preview URL API enabled?
  458. #
  459. # 'false' by default: uncomment the following to enable it (and specify a
  460. # url_preview_ip_range_blacklist blacklist).
  461. #
  462. url_preview_enabled: {{ matrix_synapse_url_preview_enabled|to_json }}
  463. # List of IP address CIDR ranges that the URL preview spider is denied
  464. # from accessing. There are no defaults: you must explicitly
  465. # specify a list for URL previewing to work. You should specify any
  466. # internal services in your network that you do not want synapse to try
  467. # to connect to, otherwise anyone in any Matrix room could cause your
  468. # synapse to issue arbitrary GET requests to your internal services,
  469. # causing serious security issues.
  470. #
  471. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  472. # listed here, since they correspond to unroutable addresses.)
  473. #
  474. # This must be specified if url_preview_enabled is set. It is recommended that
  475. # you uncomment the following list as a starting point.
  476. #
  477. url_preview_ip_range_blacklist:
  478. - '127.0.0.0/8'
  479. - '10.0.0.0/8'
  480. - '172.16.0.0/12'
  481. - '192.168.0.0/16'
  482. - '100.64.0.0/10'
  483. - '169.254.0.0/16'
  484. - '::1/128'
  485. - 'fe80::/64'
  486. - 'fc00::/7'
  487. # List of IP address CIDR ranges that the URL preview spider is allowed
  488. # to access even if they are specified in url_preview_ip_range_blacklist.
  489. # This is useful for specifying exceptions to wide-ranging blacklisted
  490. # target IP ranges - e.g. for enabling URL previews for a specific private
  491. # website only visible in your network.
  492. #
  493. #url_preview_ip_range_whitelist:
  494. # - '192.168.1.1'
  495. # Optional list of URL matches that the URL preview spider is
  496. # denied from accessing. You should use url_preview_ip_range_blacklist
  497. # in preference to this, otherwise someone could define a public DNS
  498. # entry that points to a private IP address and circumvent the blacklist.
  499. # This is more useful if you know there is an entire shape of URL that
  500. # you know that will never want synapse to try to spider.
  501. #
  502. # Each list entry is a dictionary of url component attributes as returned
  503. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  504. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  505. # The values of the dictionary are treated as an filename match pattern
  506. # applied to that component of URLs, unless they start with a ^ in which
  507. # case they are treated as a regular expression match. If all the
  508. # specified component matches for a given list item succeed, the URL is
  509. # blacklisted.
  510. #
  511. #url_preview_url_blacklist:
  512. # # blacklist any URL with a username in its URI
  513. # - username: '*'
  514. #
  515. # # blacklist all *.google.com URLs
  516. # - netloc: 'google.com'
  517. # - netloc: '*.google.com'
  518. #
  519. # # blacklist all plain HTTP URLs
  520. # - scheme: 'http'
  521. #
  522. # # blacklist http(s)://www.acme.com/foo
  523. # - netloc: 'www.acme.com'
  524. # path: '/foo'
  525. #
  526. # # blacklist any URL with a literal IPv4 address
  527. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  528. # The largest allowed URL preview spidering size in bytes
  529. max_spider_size: 10M
  530. ## Captcha ##
  531. # See docs/CAPTCHA_SETUP for full details of configuring this.
  532. # This Home Server's ReCAPTCHA public key.
  533. #
  534. #recaptcha_public_key: "YOUR_PUBLIC_KEY"
  535. # This Home Server's ReCAPTCHA private key.
  536. #
  537. #recaptcha_private_key: "YOUR_PRIVATE_KEY"
  538. # Enables ReCaptcha checks when registering, preventing signup
  539. # unless a captcha is answered. Requires a valid ReCaptcha
  540. # public/private key.
  541. #
  542. #enable_registration_captcha: false
  543. # A secret key used to bypass the captcha test entirely.
  544. #
  545. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  546. # The API endpoint to use for verifying m.login.recaptcha responses.
  547. #
  548. #recaptcha_siteverify_api: "https://www.recaptcha.net/recaptcha/api/siteverify"
  549. ## TURN ##
  550. # The public URIs of the TURN server to give to clients
  551. #
  552. turn_uris: {{ matrix_synapse_turn_uris|to_json }}
  553. # The shared secret used to compute passwords for the TURN server
  554. #
  555. turn_shared_secret: {{ matrix_synapse_turn_shared_secret|string|to_json }}
  556. # The Username and password if the TURN server needs them and
  557. # does not use a token
  558. #
  559. #turn_username: "TURNSERVER_USERNAME"
  560. #turn_password: "TURNSERVER_PASSWORD"
  561. # How long generated TURN credentials last
  562. #
  563. #turn_user_lifetime: 1h
  564. # Whether guests should be allowed to use the TURN server.
  565. # This defaults to True, otherwise VoIP will be unreliable for guests.
  566. # However, it does introduce a slight security risk as it allows users to
  567. # connect to arbitrary endpoints without having first signed up for a
  568. # valid account (e.g. by passing a CAPTCHA).
  569. #
  570. turn_allow_guests: False
  571. ## Registration ##
  572. #
  573. # Registration can be rate-limited using the parameters in the "Ratelimiting"
  574. # section of this file.
  575. # Enable registration for new users.
  576. #
  577. enable_registration: {{ matrix_synapse_enable_registration|to_json }}
  578. # The user must provide all of the below types of 3PID when registering.
  579. #
  580. #registrations_require_3pid:
  581. # - email
  582. # - msisdn
  583. {% if matrix_synapse_registrations_require_3pid %}
  584. registrations_require_3pid: {{ matrix_synapse_registrations_require_3pid|to_json }}
  585. {% endif %}
  586. # Explicitly disable asking for MSISDNs from the registration
  587. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  588. #
  589. #disable_msisdn_registration: true
  590. # Mandate that users are only allowed to associate certain formats of
  591. # 3PIDs with accounts on this server.
  592. #
  593. #allowed_local_3pids:
  594. # - medium: email
  595. # pattern: '.*@matrix\.org'
  596. # - medium: email
  597. # pattern: '.*@vector\.im'
  598. # - medium: msisdn
  599. # pattern: '\+44'
  600. # If set, allows registration of standard or admin accounts by anyone who
  601. # has the shared secret, even if registration is otherwise disabled.
  602. #
  603. registration_shared_secret: {{ matrix_synapse_registration_shared_secret|string|to_json }}
  604. # Set the number of bcrypt rounds used to generate password hash.
  605. # Larger numbers increase the work factor needed to generate the hash.
  606. # The default number is 12 (which equates to 2^12 rounds).
  607. # N.B. that increasing this will exponentially increase the time required
  608. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  609. #
  610. #bcrypt_rounds: 12
  611. # Allows users to register as guests without a password/email/etc, and
  612. # participate in rooms hosted on this server which have been made
  613. # accessible to anonymous users.
  614. #
  615. #allow_guest_access: false
  616. # The identity server which we suggest that clients should use when users log
  617. # in on this server.
  618. #
  619. # (By default, no suggestion is made, so it is left up to the client.
  620. # This setting is ignored unless public_baseurl is also set.)
  621. #
  622. #default_identity_server: https://matrix.org
  623. # The list of identity servers trusted to verify third party
  624. # identifiers by this server.
  625. #
  626. # Also defines the ID server which will be called when an account is
  627. # deactivated (one will be picked arbitrarily).
  628. #
  629. {% if matrix_synapse_trusted_third_party_id_servers|length > 0 %}
  630. trusted_third_party_id_servers:
  631. {{ matrix_synapse_trusted_third_party_id_servers|to_nice_yaml }}
  632. {% endif %}
  633. # Users who register on this homeserver will automatically be joined
  634. # to these rooms
  635. #
  636. #auto_join_rooms:
  637. # - "#example:example.com"
  638. {% if matrix_synapse_auto_join_rooms|length > 0 %}
  639. auto_join_rooms:
  640. {{ matrix_synapse_auto_join_rooms|to_nice_yaml }}
  641. {% endif %}
  642. # Where auto_join_rooms are specified, setting this flag ensures that the
  643. # the rooms exist by creating them when the first user on the
  644. # homeserver registers.
  645. # Setting to false means that if the rooms are not manually created,
  646. # users cannot be auto-joined since they do not exist.
  647. #
  648. autocreate_auto_join_rooms: {{ matrix_synapse_autocreate_auto_join_rooms|to_json }}
  649. ## Metrics ###
  650. # Enable collection and rendering of performance metrics
  651. #
  652. enable_metrics: {{ matrix_synapse_metrics_enabled|to_json }}
  653. # Enable sentry integration
  654. # NOTE: While attempts are made to ensure that the logs don't contain
  655. # any sensitive information, this cannot be guaranteed. By enabling
  656. # this option the sentry server may therefore receive sensitive
  657. # information, and it in turn may then diseminate sensitive information
  658. # through insecure notification channels if so configured.
  659. #
  660. #sentry:
  661. # dsn: "..."
  662. # Whether or not to report anonymized homeserver usage statistics.
  663. report_stats: {{ matrix_synapse_report_stats|to_json }}
  664. ## API Configuration ##
  665. # A list of event types that will be included in the room_invite_state
  666. #
  667. #room_invite_state_types:
  668. # - "m.room.join_rules"
  669. # - "m.room.canonical_alias"
  670. # - "m.room.avatar"
  671. # - "m.room.encryption"
  672. # - "m.room.name"
  673. # A list of application service config files to use
  674. #
  675. app_service_config_files: {{ matrix_synapse_app_service_config_files }}
  676. # Uncomment to enable tracking of application service IP addresses. Implicitly
  677. # enables MAU tracking for application service users.
  678. #
  679. #track_appservice_user_ips: True
  680. # a secret which is used to sign access tokens. If none is specified,
  681. # the registration_shared_secret is used, if one is given; otherwise,
  682. # a secret key is derived from the signing key.
  683. #
  684. macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key|string|to_json }}
  685. # Used to enable access token expiration.
  686. #
  687. #expire_access_token: False
  688. # a secret which is used to calculate HMACs for form values, to stop
  689. # falsification of values. Must be specified for the User Consent
  690. # forms to work.
  691. #
  692. form_secret: {{ matrix_synapse_form_secret|string|to_json }}
  693. ## Signing Keys ##
  694. # Path to the signing key to sign messages with
  695. #
  696. signing_key_path: "/data/{{ matrix_server_fqn_matrix }}.signing.key"
  697. # The keys that the server used to sign messages with but won't use
  698. # to sign new messages. E.g. it has lost its private key
  699. #
  700. #old_signing_keys:
  701. # "ed25519:auto":
  702. # # Base64 encoded public key
  703. # key: "The public part of your old signing key."
  704. # # Millisecond POSIX timestamp when the key expired.
  705. # expired_ts: 123456789123
  706. # How long key response published by this server is valid for.
  707. # Used to set the valid_until_ts in /key/v2 APIs.
  708. # Determines how quickly servers will query to check which keys
  709. # are still valid.
  710. #
  711. #key_refresh_interval: 1d
  712. # The trusted servers to download signing keys from.
  713. #
  714. #perspectives:
  715. # servers:
  716. # "matrix.org":
  717. # verify_keys:
  718. # "ed25519:auto":
  719. # key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
  720. # Enable SAML2 for registration and login. Uses pysaml2.
  721. #
  722. # `sp_config` is the configuration for the pysaml2 Service Provider.
  723. # See pysaml2 docs for format of config.
  724. #
  725. # Default values will be used for the 'entityid' and 'service' settings,
  726. # so it is not normally necessary to specify them unless you need to
  727. # override them.
  728. #
  729. #saml2_config:
  730. # sp_config:
  731. # # point this to the IdP's metadata. You can use either a local file or
  732. # # (preferably) a URL.
  733. # metadata:
  734. # #local: ["saml2/idp.xml"]
  735. # remote:
  736. # - url: https://our_idp/metadata.xml
  737. #
  738. # # The rest of sp_config is just used to generate our metadata xml, and you
  739. # # may well not need it, depending on your setup. Alternatively you
  740. # # may need a whole lot more detail - see the pysaml2 docs!
  741. #
  742. # description: ["My awesome SP", "en"]
  743. # name: ["Test SP", "en"]
  744. #
  745. # organization:
  746. # name: Example com
  747. # display_name:
  748. # - ["Example co", "en"]
  749. # url: "http://example.com"
  750. #
  751. # contact_person:
  752. # - given_name: Bob
  753. # sur_name: "the Sysadmin"
  754. # email_address": ["admin@example.com"]
  755. # contact_type": technical
  756. #
  757. # # Instead of putting the config inline as above, you can specify a
  758. # # separate pysaml2 configuration file:
  759. # #
  760. # config_path: "/data/sp_conf.py"
  761. # Enable CAS for registration and login.
  762. #
  763. #cas_config:
  764. # enabled: true
  765. # server_url: "https://cas-server.com"
  766. # service_url: "https://homeserver.domain.com:8448"
  767. # #required_attributes:
  768. # # name: value
  769. # The JWT needs to contain a globally unique "sub" (subject) claim.
  770. #
  771. #jwt_config:
  772. # enabled: true
  773. # secret: "a secret"
  774. # algorithm: "HS256"
  775. password_config:
  776. # Uncomment to disable password login
  777. #
  778. #enabled: false
  779. # Uncomment and change to a secret random string for extra security.
  780. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  781. #
  782. pepper: {{ matrix_synapse_password_config_pepper|string|to_json }}
  783. # Enable sending emails for notification events
  784. # Defining a custom URL for Riot is only needed if email notifications
  785. # should contain links to a self-hosted installation of Riot; when set
  786. # the "app_name" setting is ignored.
  787. #
  788. # If your SMTP server requires authentication, the optional smtp_user &
  789. # smtp_pass variables should be used
  790. #
  791. {% if matrix_synapse_email_enabled %}
  792. email:
  793. enable_notifs: true
  794. smtp_host: {{ matrix_synapse_email_smtp_host|string|to_json }}
  795. smtp_port: {{ matrix_synapse_email_smtp_port|to_json }}
  796. require_transport_security: {{ matrix_synapse_email_smtp_require_transport_security|to_json }}
  797. notif_from: {{ matrix_synapse_email_notif_from|string|to_json }}
  798. app_name: Matrix
  799. notif_template_html: notif_mail.html
  800. notif_template_text: notif_mail.txt
  801. notif_for_new_users: True
  802. riot_base_url: {{ matrix_synapse_email_riot_base_url|string|to_json }}
  803. {% endif %}
  804. #password_providers:
  805. # - module: "ldap_auth_provider.LdapAuthProvider"
  806. # config:
  807. # enabled: true
  808. # uri: "ldap://ldap.example.com:389"
  809. # start_tls: true
  810. # base: "ou=users,dc=example,dc=com"
  811. # attributes:
  812. # uid: "cn"
  813. # mail: "email"
  814. # name: "givenName"
  815. # #bind_dn:
  816. # #bind_password:
  817. # #filter: "(objectClass=posixAccount)"
  818. {% if matrix_synapse_password_providers_enabled %}
  819. password_providers:
  820. {% if matrix_synapse_ext_password_provider_shared_secret_auth_enabled %}
  821. - module: "shared_secret_authenticator.SharedSecretAuthenticator"
  822. config:
  823. sharedSecret: {{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret|string|to_json }}
  824. {% endif %}
  825. {% if matrix_synapse_ext_password_provider_rest_auth_enabled %}
  826. - module: "rest_auth_provider.RestAuthProvider"
  827. config:
  828. endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint|string|to_json }}
  829. policy:
  830. registration:
  831. username:
  832. enforceLowercase: {{ matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase }}
  833. profile:
  834. name: {{ matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill }}
  835. login:
  836. profile:
  837. name: {{ matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill }}
  838. {% endif %}
  839. {% if matrix_synapse_ext_password_provider_ldap_enabled %}
  840. - module: "ldap_auth_provider.LdapAuthProvider"
  841. config:
  842. enabled: true
  843. uri: {{ matrix_synapse_ext_password_provider_ldap_uri|string|to_json }}
  844. start_tls: {{ matrix_synapse_ext_password_provider_ldap_start_tls|string|to_json }}
  845. base: {{ matrix_synapse_ext_password_provider_ldap_base|string|to_json }}
  846. attributes:
  847. uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid|string|to_json }}
  848. mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail|string|to_json }}
  849. name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name|string|to_json }}
  850. bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn|string|to_json }}
  851. bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password|string|to_json }}
  852. filter: {{ matrix_synapse_ext_password_provider_ldap_filter|string|to_json }}
  853. {% endif %}
  854. {% endif %}
  855. # Clients requesting push notifications can either have the body of
  856. # the message sent in the notification poke along with other details
  857. # like the sender, or just the event ID and room ID (`event_id_only`).
  858. # If clients choose the former, this option controls whether the
  859. # notification request includes the content of the event (other details
  860. # like the sender are still included). For `event_id_only` push, it
  861. # has no effect.
  862. #
  863. # For modern android devices the notification content will still appear
  864. # because it is loaded by the app. iPhone, however will send a
  865. # notification saying only that a message arrived and who it came from.
  866. #
  867. push:
  868. include_content: {{ matrix_synapse_push_include_content|to_json }}
  869. #spam_checker:
  870. # module: "my_custom_project.SuperSpamChecker"
  871. # config:
  872. # example_option: 'things'
  873. # Uncomment to allow non-server-admin users to create groups on this server
  874. #
  875. #enable_group_creation: true
  876. # If enabled, non server admins can only create groups with local parts
  877. # starting with this prefix
  878. #
  879. #group_creation_prefix: "unofficial/"
  880. # User Directory configuration
  881. #
  882. # 'enabled' defines whether users can search the user directory. If
  883. # false then empty responses are returned to all queries. Defaults to
  884. # true.
  885. #
  886. # 'search_all_users' defines whether to search all users visible to your HS
  887. # when searching the user directory, rather than limiting to users visible
  888. # in public rooms. Defaults to false. If you set it True, you'll have to run
  889. # UPDATE user_directory_stream_pos SET stream_id = NULL;
  890. # on your database to tell it to rebuild the user_directory search indexes.
  891. #
  892. #user_directory:
  893. # enabled: true
  894. # search_all_users: false
  895. # User Consent configuration
  896. #
  897. # for detailed instructions, see
  898. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  899. #
  900. # Parts of this section are required if enabling the 'consent' resource under
  901. # 'listeners', in particular 'template_dir' and 'version'.
  902. #
  903. # 'template_dir' gives the location of the templates for the HTML forms.
  904. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  905. # and each language directory should contain the policy document (named as
  906. # '<version>.html') and a success page (success.html).
  907. #
  908. # 'version' specifies the 'current' version of the policy document. It defines
  909. # the version to be served by the consent resource if there is no 'v'
  910. # parameter.
  911. #
  912. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  913. # asking them to consent to the privacy policy. The 'server_notices' section
  914. # must also be configured for this to work. Notices will *not* be sent to
  915. # guest users unless 'send_server_notice_to_guests' is set to true.
  916. #
  917. # 'block_events_error', if set, will block any attempts to send events
  918. # until the user consents to the privacy policy. The value of the setting is
  919. # used as the text of the error.
  920. #
  921. # 'require_at_registration', if enabled, will add a step to the registration
  922. # process, similar to how captcha works. Users will be required to accept the
  923. # policy before their account is created.
  924. #
  925. # 'policy_name' is the display name of the policy users will see when registering
  926. # for an account. Has no effect unless `require_at_registration` is enabled.
  927. # Defaults to "Privacy Policy".
  928. #
  929. #user_consent:
  930. # template_dir: res/templates/privacy
  931. # version: 1.0
  932. # server_notice_content:
  933. # msgtype: m.text
  934. # body: >-
  935. # To continue using this homeserver you must review and agree to the
  936. # terms and conditions at %(consent_uri)s
  937. # send_server_notice_to_guests: True
  938. # block_events_error: >-
  939. # To continue using this homeserver you must review and agree to the
  940. # terms and conditions at %(consent_uri)s
  941. # require_at_registration: False
  942. # policy_name: Privacy Policy
  943. #
  944. # Server Notices room configuration
  945. #
  946. # Uncomment this section to enable a room which can be used to send notices
  947. # from the server to users. It is a special room which cannot be left; notices
  948. # come from a special "notices" user id.
  949. #
  950. # If you uncomment this section, you *must* define the system_mxid_localpart
  951. # setting, which defines the id of the user which will be used to send the
  952. # notices.
  953. #
  954. # It's also possible to override the room name, the display name of the
  955. # "notices" user, and the avatar for the user.
  956. #
  957. #server_notices:
  958. # system_mxid_localpart: notices
  959. # system_mxid_display_name: "Server Notices"
  960. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  961. # room_name: "Server Notices"
  962. # Uncomment to disable searching the public room list. When disabled
  963. # blocks searching local and remote room lists for local and remote
  964. # users by always returning an empty list for all queries.
  965. #
  966. #enable_room_list_search: false
  967. enable_room_list_search: {{ matrix_enable_room_list_search|to_json }}
  968. # The `alias_creation` option controls who's allowed to create aliases
  969. # on this server.
  970. #
  971. # The format of this option is a list of rules that contain globs that
  972. # match against user_id, room_id and the new alias (fully qualified with
  973. # server name). The action in the first rule that matches is taken,
  974. # which can currently either be "allow" or "deny".
  975. #
  976. # Missing user_id/room_id/alias fields default to "*".
  977. #
  978. # If no rules match the request is denied. An empty list means no one
  979. # can create aliases.
  980. #
  981. # Options for the rules include:
  982. #
  983. # user_id: Matches against the creator of the alias
  984. # alias: Matches against the alias being created
  985. # room_id: Matches against the room ID the alias is being pointed at
  986. # action: Whether to "allow" or "deny" the request if the rule matches
  987. #
  988. # The default is:
  989. #
  990. #alias_creation_rules:
  991. # - user_id: "*"
  992. # alias: "*"
  993. # room_id: "*"
  994. # action: allow
  995. alias_creation_rules: {{ matrix_alias_creation_rules|to_json }}
  996. # The `room_list_publication_rules` option controls who can publish and
  997. # which rooms can be published in the public room list.
  998. #
  999. # The format of this option is the same as that for
  1000. # `alias_creation_rules`.
  1001. #
  1002. # If the room has one or more aliases associated with it, only one of
  1003. # the aliases needs to match the alias rule. If there are no aliases
  1004. # then only rules with `alias: *` match.
  1005. #
  1006. # If no rules match the request is denied. An empty list means no one
  1007. # can publish rooms.
  1008. #
  1009. # Options for the rules include:
  1010. #
  1011. # user_id: Matches agaisnt the creator of the alias
  1012. # room_id: Matches against the room ID being published
  1013. # alias: Matches against any current local or canonical aliases
  1014. # associated with the room
  1015. # action: Whether to "allow" or "deny" the request if the rule matches
  1016. #
  1017. # The default is:
  1018. #
  1019. #room_list_publication_rules:
  1020. # - user_id: "*"
  1021. # alias: "*"
  1022. # room_id: "*"
  1023. # action: allow
  1024. room_list_publication_rules: {{ matrix_room_list_publication_rules|to_json }}