Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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