Matrix Docker Ansible eploy
Não pode escolher mais do que 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.
 
 

343 linhas
12 KiB

  1. # This is the Dendrite configuration file.
  2. #
  3. # The configuration is split up into sections - each Dendrite component has a
  4. # configuration section, in addition to the "global" section which applies to
  5. # all components.
  6. #
  7. # At a minimum, to get started, you will need to update the settings in the
  8. # "global" section for your deployment, and you will need to check that the
  9. # database "connection_string" line in each component section is correct.
  10. #
  11. # Each component with a "database" section can accept the following formats
  12. # for "connection_string":
  13. # SQLite: file:filename.db
  14. # file:///path/to/filename.db
  15. # PostgreSQL: postgresql://user:pass@hostname/database?params=...
  16. #
  17. # SQLite is embedded into Dendrite and therefore no further prerequisites are
  18. # needed for the database when using SQLite mode. However, performance with
  19. # PostgreSQL is significantly better and recommended for multi-user deployments.
  20. # SQLite is typically around 20-30% slower than PostgreSQL when tested with a
  21. # small number of users and likely will perform worse still with a higher volume
  22. # of users.
  23. #
  24. # The "max_open_conns" and "max_idle_conns" settings configure the maximum
  25. # number of open/idle database connections. The value 0 will use the database
  26. # engine default, and a negative value will use unlimited connections. The
  27. # "conn_max_lifetime" option controls the maximum length of time a database
  28. # connection can be idle in seconds - a negative value is unlimited.
  29. # The version of the configuration file.
  30. version: 1
  31. # Global Matrix configuration. This configuration applies to all components.
  32. global:
  33. # The domain name of this homeserver.
  34. server_name: {{ matrix_domain }}
  35. # The path to the signing private key file, used to sign requests and events.
  36. private_key: "/data/{{ matrix_server_fqn_matrix }}.signing.pem"
  37. # The paths and expiry timestamps (as a UNIX timestamp in millisecond precision)
  38. # to old signing private keys that were formerly in use on this domain. These
  39. # keys will not be used for federation request or event signing, but will be
  40. # provided to any other homeserver that asks when trying to verify old events.
  41. # old_private_keys:
  42. # - private_key: old_matrix_key.pem
  43. # expired_at: 1601024554498
  44. # How long a remote server can cache our server signing key before requesting it
  45. # again. Increasing this number will reduce the number of requests made by other
  46. # servers for our key but increases the period that a compromised key will be
  47. # considered valid by other homeservers.
  48. key_validity_period: 168h0m0s
  49. # Lists of domains that the server will trust as identity servers to verify third
  50. # party identifiers such as phone numbers and email addresses.
  51. trusted_third_party_id_servers: {{ matrix_dendrite_trusted_id_servers|to_json }}
  52. # Configuration for Kafka/Naffka.
  53. kafka:
  54. # List of Kafka broker addresses to connect to. This is not needed if using
  55. # Naffka in monolith mode.
  56. addresses:
  57. - kafka:9092
  58. # The prefix to use for Kafka topic names for this homeserver. Change this only if
  59. # you are running more than one Dendrite homeserver on the same Kafka deployment.
  60. topic_prefix: Dendrite
  61. # Whether to use Naffka instead of Kafka. This is only available in monolith
  62. # mode, but means that you can run a single-process server without requiring
  63. # Kafka.
  64. use_naffka: true
  65. # Naffka database options. Not required when using Kafka.
  66. naffka_database:
  67. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_naffka_database }}?sslmode=disable
  68. max_open_conns: 10
  69. max_idle_conns: 2
  70. conn_max_lifetime: -1
  71. # Configuration for Prometheus metric collection.
  72. metrics:
  73. # Whether or not Prometheus metrics are enabled.
  74. enabled: {{ matrix_dendrite_metrics_enabled }}
  75. # HTTP basic authentication to protect access to monitoring.
  76. basic_auth:
  77. username: {{ matrix_dendrite_metrics_username }}
  78. password: {{ matrix_dendrite_metrics_password }}
  79. # DNS cache options. The DNS cache may reduce the load on DNS servers
  80. # if there is no local caching resolver available for use.
  81. dns_cache:
  82. # Whether or not the DNS cache is enabled.
  83. enabled: false
  84. # Maximum number of entries to hold in the DNS cache, and
  85. # for how long those items should be considered valid in seconds.
  86. cache_size: 256
  87. cache_lifetime: 300
  88. # Configuration for the Appservice API.
  89. app_service_api:
  90. internal_api:
  91. listen: http://0.0.0.0:7777
  92. connect: http://appservice_api:7777
  93. database:
  94. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_appservice_database }}?sslmode=disable
  95. max_open_conns: 10
  96. max_idle_conns: 2
  97. conn_max_lifetime: -1
  98. # Appservice configuration files to load into this homeserver.
  99. config_files: {{ matrix_dendrite_app_service_config_files|to_json }}
  100. # Configuration for the Client API.
  101. client_api:
  102. internal_api:
  103. listen: http://0.0.0.0:7771
  104. connect: http://client_api:7771
  105. external_api:
  106. listen: http://0.0.0.0:8071
  107. # Prevents new users from being able to register on this homeserver, except when
  108. # using the registration shared secret below.
  109. registration_disabled: {{ matrix_dendrite_registration_disabled|to_json }}
  110. # If set, allows registration by anyone who knows the shared secret, regardless of
  111. # whether registration is otherwise disabled.
  112. registration_shared_secret: {{ matrix_dendrite_registration_shared_secret|string|to_json }}
  113. # Whether to require reCAPTCHA for registration.
  114. enable_registration_captcha: {{ matrix_dendrite_enable_registration_captcha|to_json }}
  115. # Settings for ReCAPTCHA.
  116. recaptcha_public_key: {{ matrix_dendrite_recaptcha_public_key|to_json }}
  117. recaptcha_private_key: {{ matrix_dendrite_recaptcha_private_key|to_json }}
  118. recaptcha_bypass_secret: ""
  119. recaptcha_siteverify_api: ""
  120. # TURN server information that this homeserver should send to clients.
  121. turn:
  122. turn_user_lifetime: ""
  123. turn_uris: {{ matrix_dendrite_turn_uris|to_json }}
  124. turn_shared_secret: {{ matrix_dendrite_turn_shared_secret|to_json }}
  125. turn_username: ""
  126. turn_password: ""
  127. # Settings for rate-limited endpoints. Rate limiting will kick in after the
  128. # threshold number of "slots" have been taken by requests from a specific
  129. # host. Each "slot" will be released after the cooloff time in milliseconds.
  130. rate_limiting:
  131. enabled: {{ matrix_dendrite_rate_limiting_enabled|to_json }}
  132. threshold: {{ matrix_dendrite_rate_limiting_threshold|to_json }}
  133. cooloff_ms: {{ matrix_dendrite_rate_limiting_cooloff_ms|to_json }}
  134. # Configuration for the EDU server.
  135. edu_server:
  136. internal_api:
  137. listen: http://0.0.0.0:7778
  138. connect: http://edu_server:7778
  139. # Configuration for the Federation API.
  140. federation_api:
  141. internal_api:
  142. listen: http://0.0.0.0:7772
  143. connect: http://federation_api:7772
  144. external_api:
  145. listen: http://0.0.0.0:8072
  146. # List of paths to X.509 certificates to be used by the external federation listeners.
  147. # These certificates will be used to calculate the TLS fingerprints and other servers
  148. # will expect the certificate to match these fingerprints. Certificates must be in PEM
  149. # format.
  150. federation_certificates: []
  151. # Configuration for the Federation Sender.
  152. federation_sender:
  153. internal_api:
  154. listen: http://0.0.0.0:7775
  155. connect: http://federation_sender:7775
  156. database:
  157. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_federationsender_database }}?sslmode=disable
  158. max_open_conns: 10
  159. max_idle_conns: 2
  160. conn_max_lifetime: -1
  161. # How many times we will try to resend a failed transaction to a specific server. The
  162. # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc.
  163. send_max_retries: 16
  164. # Disable the validation of TLS certificates of remote federated homeservers. Do not
  165. # enable this option in production as it presents a security risk!
  166. disable_tls_validation: {{ matrix_dendrite_disable_tls_validation }}
  167. # Use the following proxy server for outbound federation traffic.
  168. proxy_outbound:
  169. enabled: false
  170. protocol: http
  171. host: localhost
  172. port: 8080
  173. # Configuration for the Key Server (for end-to-end encryption).
  174. key_server:
  175. internal_api:
  176. listen: http://0.0.0.0:7779
  177. connect: http://key_server:7779
  178. database:
  179. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_keyserver_database }}?sslmode=disable
  180. max_open_conns: 10
  181. max_idle_conns: 2
  182. conn_max_lifetime: -1
  183. # Configuration for the Media API.
  184. media_api:
  185. internal_api:
  186. listen: http://0.0.0.0:7774
  187. connect: http://media_api:7774
  188. external_api:
  189. listen: http://0.0.0.0:8074
  190. database:
  191. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_mediaapi_database }}?sslmode=disable
  192. max_open_conns: 10
  193. max_idle_conns: 2
  194. conn_max_lifetime: -1
  195. # Storage path for uploaded media. May be relative or absolute.
  196. base_path: "/matrix-media-store-parent/{{ matrix_dendrite_media_store_directory_name }}"
  197. # The maximum allowed file size (in bytes) for media uploads to this homeserver
  198. # (0 = unlimited).
  199. max_file_size_bytes: {{ matrix_dendrite_max_file_size_bytes }}
  200. # Whether to dynamically generate thumbnails if needed.
  201. dynamic_thumbnails: false
  202. # The maximum number of simultaneous thumbnail generators to run.
  203. max_thumbnail_generators: 10
  204. # A list of thumbnail sizes to be generated for media content.
  205. thumbnail_sizes:
  206. - width: 32
  207. height: 32
  208. method: crop
  209. - width: 96
  210. height: 96
  211. method: crop
  212. - width: 640
  213. height: 480
  214. method: scale
  215. # Configuration for the Room Server.
  216. room_server:
  217. internal_api:
  218. listen: http://0.0.0.0:7770
  219. connect: http://room_server:7770
  220. database:
  221. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_room_database }}?sslmode=disable
  222. max_open_conns: 10
  223. max_idle_conns: 2
  224. conn_max_lifetime: -1
  225. # Configuration for the Server Key API (for server signing keys).
  226. signing_key_server:
  227. internal_api:
  228. listen: http://0.0.0.0:7780
  229. connect: http://signing_key_server:7780
  230. database:
  231. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_singingkeyserver_database }}?sslmode=disable
  232. max_open_conns: 10
  233. max_idle_conns: 2
  234. conn_max_lifetime: -1
  235. # Perspective keyservers to use as a backup when direct key fetches fail. This may
  236. # be required to satisfy key requests for servers that are no longer online when
  237. # joining some rooms.
  238. key_perspectives:
  239. - server_name: matrix.org
  240. keys:
  241. - key_id: ed25519:auto
  242. public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
  243. - key_id: ed25519:a_RXGa
  244. public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
  245. # This option will control whether Dendrite will prefer to look up keys directly
  246. # or whether it should try perspective servers first, using direct fetches as a
  247. # last resort.
  248. prefer_direct_fetch: false
  249. # Configuration for the Sync API.
  250. sync_api:
  251. internal_api:
  252. listen: http://0.0.0.0:7773
  253. connect: http://sync_api:7773
  254. external_api:
  255. listen: http://0.0.0.0:8073
  256. database:
  257. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_syncapi_database }}?sslmode=disable
  258. max_open_conns: 10
  259. max_idle_conns: 2
  260. conn_max_lifetime: -1
  261. # Configuration for the User API.
  262. user_api:
  263. internal_api:
  264. listen: http://0.0.0.0:7781
  265. connect: http://user_api:7781
  266. account_database:
  267. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_account_database }}?sslmode=disable
  268. max_open_conns: 10
  269. max_idle_conns: 2
  270. conn_max_lifetime: -1
  271. device_database:
  272. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_device_database }}?sslmode=disable
  273. max_open_conns: 10
  274. max_idle_conns: 2
  275. conn_max_lifetime: -1
  276. # Configuration for Opentracing.
  277. # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on
  278. # how this works and how to set it up.
  279. tracing:
  280. enabled: false
  281. jaeger:
  282. serviceName: ""
  283. disabled: false
  284. rpc_metrics: false
  285. tags: []
  286. sampler: null
  287. reporter: null
  288. headers: null
  289. baggage_restrictions: null
  290. throttler: null
  291. # Logging configuration, in addition to the standard logging that is sent to
  292. # stdout by Dendrite.
  293. logging:
  294. - type: file
  295. level: {{ matrix_dendrite_log_level }}
  296. params:
  297. path: /var/log/dendrite