Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

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