Matrix Docker Ansible eploy
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

431 rinda
18 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. # The server name to delegate client-server communications to, with optional port
  55. # e.g. localhost:443
  56. well_known_client_name: ""
  57. # Lists of domains that the server will trust as identity servers to verify third
  58. # party identifiers such as phone numbers and email addresses.
  59. trusted_third_party_id_servers: {{ matrix_dendrite_trusted_id_servers|to_json }}
  60. # Disables federation. Dendrite will not be able to make any outbound HTTP requests
  61. # to other servers and the federation API will not be exposed.
  62. disable_federation: {{ (not matrix_dendrite_federation_enabled)|to_json }}
  63. # Configures the handling of presence events.
  64. presence:
  65. # Whether inbound presence events are allowed, e.g. receiving presence events from other servers
  66. enable_inbound: false
  67. # Whether outbound presence events are allowed, e.g. sending presence events to other servers
  68. enable_outbound: false
  69. # Configuration for in-memory caches. Caches can often improve performance by
  70. # keeping frequently accessed items (like events, identifiers etc.) in memory
  71. # rather than having to read them from the database.
  72. cache:
  73. # The estimated maximum size for the global cache in bytes, or in terabytes,
  74. # gigabytes, megabytes or kilobytes when the appropriate 'tb', 'gb', 'mb' or
  75. # 'kb' suffix is specified. Note that this is not a hard limit, nor is it a
  76. # memory limit for the entire process. A cache that is too small may ultimately
  77. # provide little or no benefit.
  78. max_size_estimated: 1gb
  79. # The maximum amount of time that a cache entry can live for in memory before
  80. # it will be evicted and/or refreshed from the database. Lower values result in
  81. # easier admission of new cache entries but may also increase database load in
  82. # comparison to higher values, so adjust conservatively. Higher values may make
  83. # it harder for new items to make it into the cache, e.g. if new rooms suddenly
  84. # become popular.
  85. max_age: 1h
  86. # Server notices allows server admins to send messages to all users.
  87. server_notices:
  88. enabled: false
  89. # The server localpart to be used when sending notices, ensure this is not yet taken
  90. local_part: "_server"
  91. # The displayname to be used when sending notices
  92. display_name: "Server alerts"
  93. # The mxid of the avatar to use
  94. avatar_url: ""
  95. # The roomname to be used when creating messages
  96. room_name: "Server Alerts"
  97. # Configuration for NATS JetStream
  98. jetstream:
  99. # A list of NATS Server addresses to connect to. If none are specified, an
  100. # internal NATS server will be started automatically when running Dendrite
  101. # in monolith mode. It is required to specify the address of at least one
  102. # NATS Server node if running in polylith mode.
  103. addresses:
  104. # - jetstream:4222
  105. # Keep all NATS streams in memory, rather than persisting it to the storage
  106. # path below. This option is present primarily for integration testing and
  107. # should not be used on a real world Dendrite deployment.
  108. in_memory: false
  109. # Persistent directory to store JetStream streams in. This directory
  110. # should be preserved across Dendrite restarts.
  111. storage_path: "/matrix-nats-store"
  112. # The prefix to use for stream names for this homeserver - really only
  113. # useful if running more than one Dendrite on the same NATS deployment.
  114. topic_prefix: Dendrite
  115. # Configuration for Prometheus metric collection.
  116. metrics:
  117. # Whether or not Prometheus metrics are enabled.
  118. enabled: {{ matrix_dendrite_metrics_enabled|to_json }}
  119. # HTTP basic authentication to protect access to monitoring.
  120. basic_auth:
  121. username: {{ matrix_dendrite_metrics_username|to_json }}
  122. password: {{ matrix_dendrite_metrics_password|to_json }}
  123. # DNS cache options. The DNS cache may reduce the load on DNS servers
  124. # if there is no local caching resolver available for use.
  125. dns_cache:
  126. # Whether or not the DNS cache is enabled.
  127. enabled: false
  128. # Maximum number of entries to hold in the DNS cache, and
  129. # for how long those items should be considered valid in seconds.
  130. cache_size: 256
  131. cache_lifetime: "5m" # 5minutes; see https://pkg.go.dev/time@master#ParseDuration for more
  132. # Configuration for the Appservice API.
  133. app_service_api:
  134. internal_api:
  135. listen: http://0.0.0.0:7777
  136. connect: http://appservice_api:7777
  137. # Disable the validation of TLS certificates of appservices. This is
  138. # not recommended in production since it may allow appservice traffic
  139. # to be sent to an unverified endpoint.
  140. disable_tls_validation: {{ matrix_dendrite_disable_tls_validation|to_json }}
  141. # Appservice configuration files to load into this homeserver.
  142. config_files: {{ matrix_dendrite_app_service_config_files_final|to_json }}
  143. # Configuration for the Client API.
  144. client_api:
  145. internal_api:
  146. listen: http://0.0.0.0:7771
  147. connect: http://client_api:7771
  148. external_api:
  149. listen: http://0.0.0.0:8071
  150. # Prevents new users from being able to register on this homeserver, except when
  151. # using the registration shared secret below.
  152. registration_disabled: {{ matrix_dendrite_client_api_registration_disabled | to_json }}
  153. # Prevents new guest accounts from being created. Guest registration is also
  154. # disabled implicitly by setting 'registration_disabled' above.
  155. guests_disabled: true
  156. # If set, allows registration by anyone who knows the shared secret, regardless of
  157. # whether registration is otherwise disabled.
  158. registration_shared_secret: {{ matrix_dendrite_client_api_registration_shared_secret | string | to_json }}
  159. # Whether to require reCAPTCHA for registration.
  160. enable_registration_captcha: {{ matrix_dendrite_client_api_enable_registration_captcha | to_json }}
  161. # Settings for ReCAPTCHA.
  162. recaptcha_public_key: {{ matrix_dendrite_client_api_recaptcha_public_key | to_json }}
  163. recaptcha_private_key: {{ matrix_dendrite_client_api_recaptcha_private_key | to_json }}
  164. recaptcha_bypass_secret: ""
  165. recaptcha_siteverify_api: {{ matrix_dendrite_client_api_recaptcha_siteverify_api | to_json }}
  166. recaptcha_api_js_url: {{ matrix_dendrite_client_api_recaptcha_api_js_url | to_json }}
  167. recaptcha_form_field: {{ matrix_dendrite_client_api_recaptcha_form_field | to_json }}
  168. recaptcha_sitekey_class: {{ matrix_dendrite_client_api_recaptcha_sitekey_class | to_json }}
  169. # TURN server information that this homeserver should send to clients.
  170. turn:
  171. turn_user_lifetime: ""
  172. turn_uris: {{ matrix_dendrite_client_api_turn_uris | to_json }}
  173. turn_shared_secret: {{ matrix_dendrite_client_api_turn_shared_secret | to_json }}
  174. turn_username: ""
  175. turn_password: ""
  176. # Settings for rate-limited endpoints. Rate limiting will kick in after the
  177. # threshold number of "slots" have been taken by requests from a specific
  178. # host. Each "slot" will be released after the cooloff time in milliseconds.
  179. rate_limiting:
  180. enabled: {{ matrix_dendrite_client_api_rate_limiting_enabled | to_json }}
  181. threshold: {{ matrix_dendrite_client_api_rate_limiting_threshold | to_json }}
  182. cooloff_ms: {{ matrix_dendrite_client_api_rate_limiting_cooloff_ms | to_json }}
  183. exempt_user_ids:
  184. # - "@user:domain.com"
  185. # Configuration for the Federation API.
  186. federation_api:
  187. internal_api:
  188. listen: http://0.0.0.0:7772
  189. connect: http://federation_api:7772
  190. external_api:
  191. listen: http://0.0.0.0:8072
  192. database:
  193. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_federation_api_database }}?sslmode=disable
  194. max_open_conns: 10
  195. max_idle_conns: 2
  196. conn_max_lifetime: -1
  197. # How many times we will try to resend a failed transaction to a specific server. The
  198. # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc.
  199. send_max_retries: 16
  200. # Disable the validation of TLS certificates of remote federated homeservers. Do not
  201. # enable this option in production as it presents a security risk!
  202. disable_tls_validation: {{ matrix_dendrite_disable_tls_validation|to_json }}
  203. # Not in dendrite-config.yaml, but is in build/docker/config/dendrite.yaml
  204. # Use the following proxy server for outbound federation traffic.
  205. #proxy_outbound:
  206. # enabled: false
  207. # protocol: http
  208. # host: localhost
  209. # port: 8080
  210. # Perspective keyservers to use as a backup when direct key fetches fail. This may
  211. # be required to satisfy key requests for servers that are no longer online when
  212. # joining some rooms.
  213. key_perspectives:
  214. - server_name: matrix.org
  215. keys:
  216. - key_id: ed25519:auto
  217. public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
  218. - key_id: ed25519:a_RXGa
  219. public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
  220. # This option will control whether Dendrite will prefer to look up keys directly
  221. # or whether it should try perspective servers first, using direct fetches as a
  222. # last resort.
  223. prefer_direct_fetch: false
  224. # Configuration for the Key Server (for end-to-end encryption).
  225. key_server:
  226. internal_api:
  227. listen: http://0.0.0.0:7779
  228. connect: http://key_server:7779
  229. database:
  230. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_key_server_database }}?sslmode=disable
  231. max_open_conns: 10
  232. max_idle_conns: 2
  233. conn_max_lifetime: -1
  234. # Configuration for the Media API.
  235. media_api:
  236. internal_api:
  237. listen: http://0.0.0.0:7774
  238. connect: http://media_api:7774
  239. external_api:
  240. listen: http://0.0.0.0:8074
  241. database:
  242. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_media_api_database }}?sslmode=disable
  243. max_open_conns: 10
  244. max_idle_conns: 2
  245. conn_max_lifetime: -1
  246. # Storage path for uploaded media. May be relative or absolute.
  247. base_path: "/matrix-media-store-parent/{{ matrix_dendrite_media_store_directory_name }}"
  248. # The maximum allowed file size (in bytes) for media uploads to this homeserver
  249. # (0 = unlimited). If using a reverse proxy, ensure it allows requests at
  250. # least this large (e.g. client_max_body_size in nginx.)
  251. max_file_size_bytes: {{ matrix_dendrite_max_file_size_bytes|to_json }}
  252. # Whether to dynamically generate thumbnails if needed.
  253. dynamic_thumbnails: {{ matrix_dendrite_media_api_dynamic_thumbnails|to_json }}
  254. # The maximum number of simultaneous thumbnail generators to run.
  255. max_thumbnail_generators: {{ matrix_dendrite_media_api_max_thumbnail_generators|to_json }}
  256. # A list of thumbnail sizes to be generated for media content.
  257. thumbnail_sizes:
  258. - width: 32
  259. height: 32
  260. method: crop
  261. - width: 96
  262. height: 96
  263. method: crop
  264. - width: 640
  265. height: 480
  266. method: scale
  267. # Configuration for experimental MSC's
  268. mscs:
  269. # A list of enabled MSC's
  270. # Currently valid values are:
  271. # - msc2836 (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
  272. # - msc2946 (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946)
  273. mscs: []
  274. database:
  275. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_mscs_database }}?sslmode=disable
  276. max_open_conns: 5
  277. max_idle_conns: 2
  278. conn_max_lifetime: -1
  279. # Configuration for the Room Server.
  280. room_server:
  281. internal_api:
  282. listen: http://0.0.0.0:7770
  283. connect: http://room_server:7770
  284. database:
  285. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_room_database }}?sslmode=disable
  286. max_open_conns: 10
  287. max_idle_conns: 2
  288. conn_max_lifetime: -1
  289. # Configuration for the Sync API.
  290. sync_api:
  291. internal_api:
  292. listen: http://0.0.0.0:7773
  293. connect: http://sync_api:7773
  294. external_api:
  295. listen: http://0.0.0.0:8073
  296. database:
  297. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_sync_api_database }}?sslmode=disable
  298. max_open_conns: 10
  299. max_idle_conns: 2
  300. conn_max_lifetime: -1
  301. # This option controls which HTTP header to inspect to find the real remote IP
  302. # address of the client. This is likely required if Dendrite is running behind
  303. # a reverse proxy server.
  304. # real_ip_header: X-Real-IP
  305. real_ip_header: {{ matrix_dendrite_sync_api_real_ip_header|to_json }}
  306. # Configuration for the full-text search engine.
  307. search:
  308. # Whether or not search is enabled.
  309. enabled: {{ matrix_dendrite_sync_api_search_enabled|to_json }}
  310. # The path where the search index will be created in.
  311. index_path: "/matrix-media-store-parent/searchindex"
  312. # The language most likely to be used on the server - used when indexing, to
  313. # ensure the returned results match expectations. A full list of possible languages
  314. # can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
  315. language: "en"
  316. # Configuration for the User API.
  317. user_api:
  318. # The cost when hashing passwords on registration/login. Default: 10. Min: 4, Max: 31
  319. # See https://pkg.go.dev/golang.org/x/crypto/bcrypt for more information.
  320. # Setting this lower makes registration/login consume less CPU resources at the cost of security
  321. # should the database be compromised. Setting this higher makes registration/login consume more
  322. # CPU resources but makes it harder to brute force password hashes.
  323. # This value can be low if performing tests or on embedded Dendrite instances (e.g WASM builds)
  324. # bcrypt_cost: 10
  325. internal_api:
  326. listen: http://0.0.0.0:7781
  327. connect: http://user_api:7781
  328. account_database:
  329. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_user_api_database }}?sslmode=disable
  330. max_open_conns: 10
  331. max_idle_conns: 2
  332. conn_max_lifetime: -1
  333. # The length of time that a token issued for a relying party from
  334. # /_matrix/client/r0/user/{userId}/openid/request_token endpoint
  335. # is considered to be valid in milliseconds.
  336. # The default lifetime is 3600000ms (60 minutes).
  337. # openid_token_lifetime_ms: 3600000
  338. auto_join_rooms: {{ matrix_dendrite_user_api_auto_join_rooms | to_json }}
  339. # Not in dendrite-config.yaml, but is in build/docker/config/dendrite.yaml
  340. # Configuration for the Push Server API.
  341. push_server:
  342. internal_api:
  343. listen: http://localhost:7782
  344. connect: http://localhost:7782
  345. database:
  346. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_push_server_database }}?sslmode=disable
  347. max_open_conns: 10
  348. max_idle_conns: 2
  349. conn_max_lifetime: -1
  350. #
  351. #
  352. relay_api:
  353. database:
  354. connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_relay_api_database }}?sslmode=disable
  355. # Configuration for Opentracing.
  356. # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on
  357. # how this works and how to set it up.
  358. tracing:
  359. enabled: false
  360. jaeger:
  361. serviceName: ""
  362. disabled: false
  363. rpc_metrics: false
  364. tags: []
  365. sampler: null
  366. reporter: null
  367. headers: null
  368. baggage_restrictions: null
  369. throttler: null
  370. # Logging configuration, in addition to the standard logging that is sent to
  371. # stdout by Dendrite.
  372. logging: []
  373. # statistics reporting configuration. These statistics contain the server
  374. # name, number of active users and some information on your deployment config.
  375. report_stats: {{ matrix_dendrite_report_stats|to_json }}