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.
 
 

1167 lines
38 KiB

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