Matrix Docker Ansible eploy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

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