Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

361 lines
14 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: 2
  31. # Global Matrix configuration. This configuration applies to all components.
  32. global:
  33. # The domain name of this homeserver.
  34. server_name: {{ matrix_domain|to_json }}
  35. # The path to the signing private key file, used to sign requests and events.
  36. # Note that this is NOT the same private key as used for TLS! To generate a
  37. # signing key, use "./bin/generate-keys --private-key matrix_key.pem".
  38. private_key: "/data/{{ matrix_server_fqn_matrix }}.signing.pem"
  39. # The paths and expiry timestamps (as a UNIX timestamp in millisecond precision)
  40. # to old signing private keys that were formerly in use on this domain. These
  41. # keys will not be used for federation request or event signing, but will be
  42. # provided to any other homeserver that asks when trying to verify old events.
  43. # old_private_keys:
  44. # - private_key: old_matrix_key.pem
  45. # expired_at: 1601024554498
  46. # How long a remote server can cache our server signing key before requesting it
  47. # again. Increasing this number will reduce the number of requests made by other
  48. # servers for our key but increases the period that a compromised key will be
  49. # considered valid by other homeservers.
  50. key_validity_period: 168h0m0s
  51. # The server name to delegate server-server communications to, with optional port
  52. # e.g. localhost:443
  53. well_known_server_name: ""
  54. # Lists of domains that the server will trust as identity servers to verify third
  55. # party identifiers such as phone numbers and email addresses.
  56. trusted_third_party_id_servers: {{ matrix_dendrite_trusted_id_servers|to_json }}
  57. # Disables federation. Dendrite will not be able to make any outbound HTTP requests
  58. # to other servers and the federation API will not be exposed.
  59. disable_federation: {{ (not matrix_dendrite_federation_enabled)|to_json }}
  60. # Server notices allows server admins to send messages to all users.
  61. server_notices:
  62. enabled: false
  63. # The server localpart to be used when sending notices, ensure this is not yet taken
  64. local_part: "_server"
  65. # The displayname to be used when sending notices
  66. display_name: "Server alerts"
  67. # The mxid of the avatar to use
  68. avatar_url: ""
  69. # The roomname to be used when creating messages
  70. room_name: "Server Alerts"
  71. # Configuration for NATS JetStream
  72. jetstream:
  73. # A list of NATS Server addresses to connect to. If none are specified, an
  74. # internal NATS server will be started automatically when running Dendrite
  75. # in monolith mode. It is required to specify the address of at least one
  76. # NATS Server node if running in polylith mode.
  77. addresses:
  78. # - jetstream:4222
  79. # Keep all NATS streams in memory, rather than persisting it to the storage
  80. # path below. This option is present primarily for integration testing and
  81. # should not be used on a real world Dendrite deployment.
  82. in_memory: false
  83. # Persistent directory to store JetStream streams in. This directory
  84. # should be preserved across Dendrite restarts.
  85. storage_path: "/matrix-nats-store"
  86. # The prefix to use for stream names for this homeserver - really only
  87. # useful if running more than one Dendrite on the same NATS deployment.
  88. topic_prefix: Dendrite
  89. # Configuration for Prometheus metric collection.
  90. metrics:
  91. # Whether or not Prometheus metrics are enabled.
  92. enabled: {{ matrix_dendrite_metrics_enabled|to_json }}
  93. # HTTP basic authentication to protect access to monitoring.
  94. basic_auth:
  95. username: {{ matrix_dendrite_metrics_username|to_json }}
  96. password: {{ matrix_dendrite_metrics_password|to_json }}
  97. # DNS cache options. The DNS cache may reduce the load on DNS servers
  98. # if there is no local caching resolver available for use.
  99. dns_cache:
  100. # Whether or not the DNS cache is enabled.
  101. enabled: false
  102. # Maximum number of entries to hold in the DNS cache, and
  103. # for how long those items should be considered valid in seconds.
  104. cache_size: 256
  105. cache_lifetime: "5m" # 5minutes; see https://pkg.go.dev/time@master#ParseDuration for more
  106. # Configuration for the Appservice API.
  107. app_service_api:
  108. internal_api:
  109. listen: http://0.0.0.0:7777
  110. connect: http://appservice_api:7777
  111. database:
  112. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_appservice_database }}?sslmode=disable
  113. max_open_conns: 10
  114. max_idle_conns: 2
  115. conn_max_lifetime: -1
  116. # Appservice configuration files to load into this homeserver.
  117. config_files: {{ matrix_dendrite_app_service_config_files|to_json }}
  118. # Configuration for the Client API.
  119. client_api:
  120. internal_api:
  121. listen: http://0.0.0.0:7771
  122. connect: http://client_api:7771
  123. external_api:
  124. listen: http://0.0.0.0:8071
  125. # Prevents new users from being able to register on this homeserver, except when
  126. # using the registration shared secret below.
  127. registration_disabled: {{ matrix_dendrite_registration_disabled|to_json }}
  128. # Prevents new guest accounts from being created. Guest registration is also
  129. # disabled implicitly by setting 'registration_disabled' above.
  130. guests_disabled: true
  131. # If set, allows registration by anyone who knows the shared secret, regardless of
  132. # whether registration is otherwise disabled.
  133. registration_shared_secret: {{ matrix_dendrite_registration_shared_secret|string|to_json }}
  134. # Whether to require reCAPTCHA for registration.
  135. enable_registration_captcha: {{ matrix_dendrite_enable_registration_captcha|to_json }}
  136. # Settings for ReCAPTCHA.
  137. recaptcha_public_key: {{ matrix_dendrite_recaptcha_public_key|to_json }}
  138. recaptcha_private_key: {{ matrix_dendrite_recaptcha_private_key|to_json }}
  139. recaptcha_bypass_secret: ""
  140. recaptcha_siteverify_api: ""
  141. # TURN server information that this homeserver should send to clients.
  142. turn:
  143. turn_user_lifetime: ""
  144. turn_uris: {{ matrix_dendrite_turn_uris|to_json }}
  145. turn_shared_secret: {{ matrix_dendrite_turn_shared_secret|to_json }}
  146. turn_username: ""
  147. turn_password: ""
  148. # Settings for rate-limited endpoints. Rate limiting will kick in after the
  149. # threshold number of "slots" have been taken by requests from a specific
  150. # host. Each "slot" will be released after the cooloff time in milliseconds.
  151. rate_limiting:
  152. enabled: {{ matrix_dendrite_rate_limiting_enabled|to_json }}
  153. threshold: {{ matrix_dendrite_rate_limiting_threshold|to_json }}
  154. cooloff_ms: {{ matrix_dendrite_rate_limiting_cooloff_ms|to_json }}
  155. # Configuration for the Federation API.
  156. federation_api:
  157. internal_api:
  158. listen: http://0.0.0.0:7772
  159. connect: http://federation_api:7772
  160. external_api:
  161. listen: http://0.0.0.0:8072
  162. database:
  163. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_federationapi_database }}?sslmode=disable
  164. max_open_conns: 10
  165. max_idle_conns: 2
  166. conn_max_lifetime: -1
  167. # How many times we will try to resend a failed transaction to a specific server. The
  168. # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc.
  169. send_max_retries: 16
  170. # Disable the validation of TLS certificates of remote federated homeservers. Do not
  171. # enable this option in production as it presents a security risk!
  172. disable_tls_validation: {{ matrix_dendrite_disable_tls_validation|to_json }}
  173. # Use the following proxy server for outbound federation traffic.
  174. proxy_outbound:
  175. enabled: false
  176. protocol: http
  177. host: localhost
  178. port: 8080
  179. # Perspective keyservers to use as a backup when direct key fetches fail. This may
  180. # be required to satisfy key requests for servers that are no longer online when
  181. # joining some rooms.
  182. key_perspectives:
  183. - server_name: matrix.org
  184. keys:
  185. - key_id: ed25519:auto
  186. public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
  187. - key_id: ed25519:a_RXGa
  188. public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
  189. # This option will control whether Dendrite will prefer to look up keys directly
  190. # or whether it should try perspective servers first, using direct fetches as a
  191. # last resort.
  192. prefer_direct_fetch: false
  193. # Configuration for the Key Server (for end-to-end encryption).
  194. key_server:
  195. internal_api:
  196. listen: http://0.0.0.0:7779
  197. connect: http://key_server:7779
  198. database:
  199. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_keyserver_database }}?sslmode=disable
  200. max_open_conns: 10
  201. max_idle_conns: 2
  202. conn_max_lifetime: -1
  203. # Configuration for the Media API.
  204. media_api:
  205. internal_api:
  206. listen: http://0.0.0.0:7774
  207. connect: http://media_api:7774
  208. external_api:
  209. listen: http://0.0.0.0:8074
  210. database:
  211. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_mediaapi_database }}?sslmode=disable
  212. max_open_conns: 10
  213. max_idle_conns: 2
  214. conn_max_lifetime: -1
  215. # Storage path for uploaded media. May be relative or absolute.
  216. base_path: "/matrix-media-store-parent/{{ matrix_dendrite_media_store_directory_name }}"
  217. # The maximum allowed file size (in bytes) for media uploads to this homeserver
  218. # (0 = unlimited). If using a reverse proxy, ensure it allows requests at
  219. # least this large (e.g. client_max_body_size in nginx.)
  220. max_file_size_bytes: {{ matrix_dendrite_max_file_size_bytes|to_json }}
  221. # Whether to dynamically generate thumbnails if needed.
  222. dynamic_thumbnails: false
  223. # The maximum number of simultaneous thumbnail generators to run.
  224. max_thumbnail_generators: 10
  225. # A list of thumbnail sizes to be generated for media content.
  226. thumbnail_sizes:
  227. - width: 32
  228. height: 32
  229. method: crop
  230. - width: 96
  231. height: 96
  232. method: crop
  233. - width: 640
  234. height: 480
  235. method: scale
  236. # Configuration for experimental MSC's
  237. mscs:
  238. # A list of enabled MSC's
  239. # Currently valid values are:
  240. # - msc2836 (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
  241. # - msc2946 (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946)
  242. mscs: []
  243. database:
  244. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_mscs_database }}?sslmode=disable
  245. max_open_conns: 5
  246. max_idle_conns: 2
  247. conn_max_lifetime: -1
  248. # Configuration for the Room Server.
  249. room_server:
  250. internal_api:
  251. listen: http://0.0.0.0:7770
  252. connect: http://room_server:7770
  253. database:
  254. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_room_database }}?sslmode=disable
  255. max_open_conns: 10
  256. max_idle_conns: 2
  257. conn_max_lifetime: -1
  258. # Configuration for the Sync API.
  259. sync_api:
  260. internal_api:
  261. listen: http://0.0.0.0:7773
  262. connect: http://sync_api:7773
  263. external_api:
  264. listen: http://0.0.0.0:8073
  265. database:
  266. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_syncapi_database }}?sslmode=disable
  267. max_open_conns: 10
  268. max_idle_conns: 2
  269. conn_max_lifetime: -1
  270. # This option controls which HTTP header to inspect to find the real remote IP
  271. # address of the client. This is likely required if Dendrite is running behind
  272. # a reverse proxy server.
  273. # real_ip_header: X-Real-IP
  274. real_ip_header: {{ matrix_dendrite_sync_api_real_ip_header|to_json }}
  275. # Configuration for the User API.
  276. user_api:
  277. internal_api:
  278. listen: http://0.0.0.0:7781
  279. connect: http://user_api:7781
  280. account_database:
  281. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_userapi_database }}?sslmode=disable
  282. max_open_conns: 10
  283. max_idle_conns: 2
  284. conn_max_lifetime: -1
  285. # Configuration for the Push Server API.
  286. push_server:
  287. internal_api:
  288. listen: http://localhost:7782
  289. connect: http://localhost:7782
  290. database:
  291. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_pushserver_database }}?sslmode=disable
  292. max_open_conns: 10
  293. max_idle_conns: 2
  294. conn_max_lifetime: -1
  295. # Configuration for Opentracing.
  296. # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on
  297. # how this works and how to set it up.
  298. tracing:
  299. enabled: false
  300. jaeger:
  301. serviceName: ""
  302. disabled: false
  303. rpc_metrics: false
  304. tags: []
  305. sampler: null
  306. reporter: null
  307. headers: null
  308. baggage_restrictions: null
  309. throttler: null
  310. # Logging configuration, in addition to the standard logging that is sent to
  311. # stdout by Dendrite.
  312. logging: []