Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

242 líneas
11 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2025 - 2026 MDAD project contributors
  3. SPDX-FileCopyrightText: 2025 - 2026 Slavi Pantaleev
  4. SPDX-License-Identifier: AGPL-3.0-or-later
  5. #}
  6. ### Tuwunel configuration rendered by matrix-docker-ansible-deploy.
  7. ###
  8. ### This file only emits options exposed as Ansible variables. All other knobs
  9. ### keep tuwunel's upstream defaults. To override anything not surfaced here,
  10. ### use `matrix_tuwunel_environment_variables_extension` (env vars override TOML)
  11. ### or replace the template via `matrix_tuwunel_template_tuwunel_config`.
  12. ###
  13. ### Reference: https://matrix-construct.github.io/tuwunel/configuration.html
  14. [global]
  15. server_name = {{ matrix_tuwunel_config_server_name | to_json }}
  16. address = "0.0.0.0"
  17. port = {{ matrix_tuwunel_config_port_number }}
  18. database_path = "/var/lib/tuwunel"
  19. max_request_size = {{ matrix_tuwunel_config_max_request_size }}
  20. new_user_displayname_suffix = {{ matrix_tuwunel_config_new_user_displayname_suffix | to_json }}
  21. allow_registration = {{ matrix_tuwunel_config_allow_registration | to_json }}
  22. {% if matrix_tuwunel_config_registration_token | length > 0 %}
  23. registration_token = {{ matrix_tuwunel_config_registration_token | to_json }}
  24. {% endif %}
  25. {% if matrix_tuwunel_config_yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse | bool %}
  26. yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse = true
  27. {% endif %}
  28. {% if matrix_tuwunel_config_emergency_password | length > 0 %}
  29. emergency_password = {{ matrix_tuwunel_config_emergency_password | to_json }}
  30. {% endif %}
  31. allow_encryption = {{ matrix_tuwunel_config_allow_encryption | to_json }}
  32. allow_room_creation = {{ matrix_tuwunel_config_allow_room_creation | to_json }}
  33. default_room_version = {{ matrix_tuwunel_config_default_room_version | to_json }}
  34. {% if matrix_tuwunel_config_auto_join_rooms | length > 0 %}
  35. auto_join_rooms = {{ matrix_tuwunel_config_auto_join_rooms | to_json }}
  36. {% endif %}
  37. allow_federation = {{ matrix_tuwunel_config_allow_federation | to_json }}
  38. trusted_servers = {{ matrix_tuwunel_config_trusted_servers | to_json }}
  39. {% if matrix_tuwunel_config_allowed_remote_server_names | length > 0 %}
  40. allowed_remote_server_names_experimental = {{ matrix_tuwunel_config_allowed_remote_server_names | to_json }}
  41. {% endif %}
  42. {% if matrix_tuwunel_config_forbidden_remote_server_names | length > 0 %}
  43. forbidden_remote_server_names = {{ matrix_tuwunel_config_forbidden_remote_server_names | to_json }}
  44. {% endif %}
  45. {% if matrix_tuwunel_config_forbidden_remote_room_directory_server_names | length > 0 %}
  46. forbidden_remote_room_directory_server_names = {{ matrix_tuwunel_config_forbidden_remote_room_directory_server_names | to_json }}
  47. {% endif %}
  48. {% if matrix_tuwunel_config_prevent_media_downloads_from | length > 0 %}
  49. prevent_media_downloads_from = {{ matrix_tuwunel_config_prevent_media_downloads_from | to_json }}
  50. {% endif %}
  51. enable_policy_servers = {{ matrix_tuwunel_config_enable_policy_servers | to_json }}
  52. policy_server_request_timeout = {{ matrix_tuwunel_config_policy_server_request_timeout }}
  53. allow_outgoing_presence = {{ matrix_tuwunel_config_allow_outgoing_presence | to_json }}
  54. {% if matrix_tuwunel_config_url_preview_domain_contains_allowlist | length > 0 %}
  55. url_preview_domain_contains_allowlist = {{ matrix_tuwunel_config_url_preview_domain_contains_allowlist | to_json }}
  56. {% endif %}
  57. {% if matrix_tuwunel_config_url_preview_domain_explicit_allowlist | length > 0 %}
  58. url_preview_domain_explicit_allowlist = {{ matrix_tuwunel_config_url_preview_domain_explicit_allowlist | to_json }}
  59. {% endif %}
  60. url_preview_check_root_domain = {{ matrix_tuwunel_config_url_preview_check_root_domain | to_json }}
  61. create_admin_room = {{ matrix_tuwunel_config_create_admin_room | to_json }}
  62. federate_admin_room = {{ matrix_tuwunel_config_federate_admin_room | to_json }}
  63. grant_admin_to_first_user = {{ matrix_tuwunel_config_grant_admin_to_first_user | to_json }}
  64. log = {{ matrix_tuwunel_config_log | to_json }}
  65. {% if matrix_tuwunel_config_turn_uris | length > 0 %}
  66. turn_uris = {{ matrix_tuwunel_config_turn_uris | to_json }}
  67. {% endif %}
  68. {% if matrix_tuwunel_config_turn_secret | length > 0 %}
  69. turn_secret = {{ matrix_tuwunel_config_turn_secret | to_json }}
  70. {% endif %}
  71. {% if matrix_tuwunel_config_turn_username | length > 0 %}
  72. turn_username = {{ matrix_tuwunel_config_turn_username | to_json }}
  73. {% endif %}
  74. {% if matrix_tuwunel_config_turn_password | length > 0 %}
  75. turn_password = {{ matrix_tuwunel_config_turn_password | to_json }}
  76. {% endif %}
  77. {% if matrix_tuwunel_config_rocksdb_compression_algo | length > 0 %}
  78. rocksdb_compression_algo = {{ matrix_tuwunel_config_rocksdb_compression_algo | to_json }}
  79. {% endif %}
  80. {% if matrix_tuwunel_config_rocksdb_compression_level | string | length > 0 %}
  81. rocksdb_compression_level = {{ matrix_tuwunel_config_rocksdb_compression_level }}
  82. {% endif %}
  83. {% if matrix_tuwunel_config_rocksdb_bottommost_compression_level | string | length > 0 %}
  84. rocksdb_bottommost_compression_level = {{ matrix_tuwunel_config_rocksdb_bottommost_compression_level }}
  85. {% endif %}
  86. rocksdb_direct_io = {{ matrix_tuwunel_config_rocksdb_direct_io | to_json }}
  87. {% if matrix_tuwunel_config_rocksdb_parallelism_threads | int > 0 %}
  88. rocksdb_parallelism_threads = {{ matrix_tuwunel_config_rocksdb_parallelism_threads }}
  89. {% endif %}
  90. {% if matrix_tuwunel_config_rocksdb_max_log_file_size | string | length > 0 %}
  91. rocksdb_max_log_file_size = {{ matrix_tuwunel_config_rocksdb_max_log_file_size }}
  92. {% endif %}
  93. {% if matrix_tuwunel_config_rocksdb_log_time_to_roll | string | length > 0 %}
  94. rocksdb_log_time_to_roll = {{ matrix_tuwunel_config_rocksdb_log_time_to_roll }}
  95. {% endif %}
  96. {% if matrix_tuwunel_config_database_backup_path | length > 0 %}
  97. database_backup_path = {{ matrix_tuwunel_config_database_backup_path | to_json }}
  98. database_backups_to_keep = {{ matrix_tuwunel_config_database_backups_to_keep }}
  99. {% endif %}
  100. {% if matrix_tuwunel_config_cache_capacity_modifier | string | length > 0 %}
  101. cache_capacity_modifier = {{ matrix_tuwunel_config_cache_capacity_modifier }}
  102. {% endif %}
  103. {% if matrix_tuwunel_config_db_cache_capacity_mb | string | length > 0 %}
  104. db_cache_capacity_mb = {{ matrix_tuwunel_config_db_cache_capacity_mb }}
  105. {% endif %}
  106. {% if matrix_tuwunel_config_db_write_buffer_capacity_mb | string | length > 0 %}
  107. db_write_buffer_capacity_mb = {{ matrix_tuwunel_config_db_write_buffer_capacity_mb }}
  108. {% endif %}
  109. {% if matrix_tuwunel_config_sentry_enabled | bool %}
  110. sentry = true
  111. {% if matrix_tuwunel_config_sentry_endpoint | length > 0 %}
  112. sentry_endpoint = {{ matrix_tuwunel_config_sentry_endpoint | to_json }}
  113. {% endif %}
  114. sentry_send_server_name = {{ matrix_tuwunel_config_sentry_send_server_name | to_json }}
  115. sentry_traces_sample_rate = {{ matrix_tuwunel_config_sentry_traces_sample_rate }}
  116. {% endif %}
  117. {% if (matrix_tuwunel_config_tls_certs | length > 0) and (matrix_tuwunel_config_tls_key | length > 0) %}
  118. [global.tls]
  119. certs = {{ matrix_tuwunel_config_tls_certs | to_json }}
  120. key = {{ matrix_tuwunel_config_tls_key | to_json }}
  121. dual_protocol = {{ matrix_tuwunel_config_tls_dual_protocol | to_json }}
  122. {% endif %}
  123. {% set well_known_keys = [
  124. matrix_tuwunel_config_well_known_client,
  125. matrix_tuwunel_config_well_known_server,
  126. matrix_tuwunel_config_well_known_support_page,
  127. matrix_tuwunel_config_well_known_support_email,
  128. matrix_tuwunel_config_well_known_support_mxid,
  129. matrix_tuwunel_config_well_known_livekit_url,
  130. ] %}
  131. {% if well_known_keys | select | list | length > 0 %}
  132. [global.well_known]
  133. {% if matrix_tuwunel_config_well_known_client | length > 0 %}
  134. client = {{ matrix_tuwunel_config_well_known_client | to_json }}
  135. {% endif %}
  136. {% if matrix_tuwunel_config_well_known_server | length > 0 %}
  137. server = {{ matrix_tuwunel_config_well_known_server | to_json }}
  138. {% endif %}
  139. {% if matrix_tuwunel_config_well_known_support_page | length > 0 %}
  140. support_page = {{ matrix_tuwunel_config_well_known_support_page | to_json }}
  141. {% endif %}
  142. {% if matrix_tuwunel_config_well_known_support_email | length > 0 %}
  143. support_email = {{ matrix_tuwunel_config_well_known_support_email | to_json }}
  144. {% endif %}
  145. {% if matrix_tuwunel_config_well_known_support_mxid | length > 0 %}
  146. support_mxid = {{ matrix_tuwunel_config_well_known_support_mxid | to_json }}
  147. {% endif %}
  148. {% if matrix_tuwunel_config_well_known_livekit_url | length > 0 %}
  149. livekit_url = {{ matrix_tuwunel_config_well_known_livekit_url | to_json }}
  150. {% endif %}
  151. {% endif %}
  152. {% if matrix_tuwunel_config_blurhashing_enabled | bool %}
  153. [global.blurhashing]
  154. components_x = {{ matrix_tuwunel_config_blurhashing_components_x }}
  155. components_y = {{ matrix_tuwunel_config_blurhashing_components_y }}
  156. blurhash_max_raw_size = {{ matrix_tuwunel_config_blurhashing_max_raw_size }}
  157. {% endif %}
  158. {% if matrix_tuwunel_config_ldap_enabled | bool %}
  159. [global.ldap]
  160. enable = true
  161. uri = {{ matrix_tuwunel_config_ldap_uri | to_json }}
  162. base_dn = {{ matrix_tuwunel_config_ldap_base_dn | to_json }}
  163. {% if matrix_tuwunel_config_ldap_bind_dn | length > 0 %}
  164. bind_dn = {{ matrix_tuwunel_config_ldap_bind_dn | to_json }}
  165. {% endif %}
  166. {% if matrix_tuwunel_config_ldap_bind_password_file | length > 0 %}
  167. bind_password_file = {{ matrix_tuwunel_config_ldap_bind_password_file | to_json }}
  168. {% endif %}
  169. filter = {{ matrix_tuwunel_config_ldap_filter | to_json }}
  170. uid_attribute = {{ matrix_tuwunel_config_ldap_uid_attribute | to_json }}
  171. name_attribute = {{ matrix_tuwunel_config_ldap_name_attribute | to_json }}
  172. {% if matrix_tuwunel_config_ldap_admin_base_dn | length > 0 %}
  173. admin_base_dn = {{ matrix_tuwunel_config_ldap_admin_base_dn | to_json }}
  174. {% endif %}
  175. {% if matrix_tuwunel_config_ldap_admin_filter | length > 0 %}
  176. admin_filter = {{ matrix_tuwunel_config_ldap_admin_filter | to_json }}
  177. {% endif %}
  178. {% endif %}
  179. {% if matrix_tuwunel_config_jwt_enabled | bool %}
  180. [global.jwt]
  181. enable = true
  182. {% if matrix_tuwunel_config_jwt_key | length > 0 %}
  183. key = {{ matrix_tuwunel_config_jwt_key | to_json }}
  184. {% endif %}
  185. format = {{ matrix_tuwunel_config_jwt_format | to_json }}
  186. algorithm = {{ matrix_tuwunel_config_jwt_algorithm | to_json }}
  187. register_user = {{ matrix_tuwunel_config_jwt_register_user | to_json }}
  188. {% if matrix_tuwunel_config_jwt_audience | length > 0 %}
  189. audience = {{ matrix_tuwunel_config_jwt_audience | to_json }}
  190. {% endif %}
  191. {% if matrix_tuwunel_config_jwt_issuer | length > 0 %}
  192. issuer = {{ matrix_tuwunel_config_jwt_issuer | to_json }}
  193. {% endif %}
  194. require_exp = {{ matrix_tuwunel_config_jwt_require_exp | to_json }}
  195. require_nbf = {{ matrix_tuwunel_config_jwt_require_nbf | to_json }}
  196. validate_exp = {{ matrix_tuwunel_config_jwt_validate_exp | to_json }}
  197. validate_nbf = {{ matrix_tuwunel_config_jwt_validate_nbf | to_json }}
  198. {% endif %}
  199. {% for idp in matrix_tuwunel_config_identity_providers %}
  200. [[global.identity_provider]]
  201. {% for key, value in idp.items() %}
  202. {{ key }} = {{ value | to_json }}
  203. {% endfor %}
  204. {% endfor %}
  205. {% for sp in matrix_tuwunel_config_storage_providers %}
  206. [global.storage_provider.{{ sp.id }}.{{ sp.kind }}]
  207. {% for key, value in sp.items() if key not in ['id', 'kind'] %}
  208. {{ key }} = {{ value | to_json }}
  209. {% endfor %}
  210. {% endfor %}