Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

316 Zeilen
16 KiB

  1. # SPDX-FileCopyrightText: 2025 - 2026 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2025 - 2026 Slavi Pantaleev
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. # Tuwunel is a Matrix homeserver, the official successor to conduwuit.
  7. # Project source code URL: https://github.com/matrix-construct/tuwunel
  8. # See: https://matrix-construct.github.io/tuwunel/
  9. matrix_tuwunel_enabled: true
  10. matrix_tuwunel_hostname: ''
  11. # renovate: datasource=docker depName=ghcr.io/matrix-construct/tuwunel
  12. matrix_tuwunel_version: v1.6.1
  13. matrix_tuwunel_container_image: "{{ matrix_tuwunel_container_image_registry_prefix }}matrix-construct/tuwunel:{{ matrix_tuwunel_container_image_tag }}"
  14. matrix_tuwunel_container_image_tag: "{{ matrix_tuwunel_version }}"
  15. matrix_tuwunel_container_image_registry_prefix: "{{ matrix_tuwunel_container_image_registry_prefix_upstream }}"
  16. matrix_tuwunel_container_image_registry_prefix_upstream: "{{ matrix_tuwunel_container_image_registry_prefix_upstream_default }}"
  17. matrix_tuwunel_container_image_registry_prefix_upstream_default: ghcr.io/
  18. matrix_tuwunel_base_path: "{{ matrix_base_data_path }}/tuwunel"
  19. matrix_tuwunel_config_path: "{{ matrix_tuwunel_base_path }}/config"
  20. matrix_tuwunel_data_path: "{{ matrix_tuwunel_base_path }}/data"
  21. matrix_tuwunel_config_port_number: 6167
  22. matrix_tuwunel_tmp_directory_size_mb: 500
  23. # List of systemd services that matrix-tuwunel.service depends on
  24. matrix_tuwunel_systemd_required_services_list: "{{ matrix_tuwunel_systemd_required_services_list_default + matrix_tuwunel_systemd_required_services_list_auto + matrix_tuwunel_systemd_required_services_list_custom }}"
  25. matrix_tuwunel_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  26. matrix_tuwunel_systemd_required_services_list_auto: []
  27. matrix_tuwunel_systemd_required_services_list_custom: []
  28. # List of systemd services that matrix-tuwunel.service wants
  29. matrix_tuwunel_systemd_wanted_services_list: "{{ matrix_tuwunel_systemd_wanted_services_list_default + matrix_tuwunel_systemd_wanted_services_list_auto + matrix_tuwunel_systemd_wanted_services_list_custom }}"
  30. matrix_tuwunel_systemd_wanted_services_list_default: []
  31. matrix_tuwunel_systemd_wanted_services_list_auto: []
  32. matrix_tuwunel_systemd_wanted_services_list_custom: []
  33. # Controls how long to sleep for after starting the matrix-tuwunel container,
  34. # so that subsequent services that depend on it can start after the homeserver
  35. # is fully up.
  36. #
  37. # Set to 0 to remove the delay.
  38. matrix_tuwunel_systemd_service_post_start_delay_seconds: 3
  39. # The base container network. It will be auto-created by this role if it doesn't exist already.
  40. matrix_tuwunel_container_network: ""
  41. # A list of additional container networks that the container would be connected to.
  42. # The role does not create these networks, so make sure they already exist.
  43. # Use this to expose this container to another reverse proxy, which runs in a different container network.
  44. matrix_tuwunel_container_additional_networks: "{{ matrix_tuwunel_container_additional_networks_auto + matrix_tuwunel_container_additional_networks_custom }}"
  45. matrix_tuwunel_container_additional_networks_auto: []
  46. matrix_tuwunel_container_additional_networks_custom: []
  47. # matrix_tuwunel_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  48. # See `../templates/labels.j2` for details.
  49. #
  50. # To inject your own other container labels, see `matrix_tuwunel_container_labels_additional_labels`.
  51. matrix_tuwunel_container_labels_traefik_enabled: true
  52. matrix_tuwunel_container_labels_traefik_docker_network: "{{ matrix_tuwunel_container_network }}"
  53. matrix_tuwunel_container_labels_traefik_entrypoints: web-secure
  54. matrix_tuwunel_container_labels_traefik_tls_certResolver: default # noqa var-naming
  55. # Controls whether labels will be added for handling the root (/) path on a public Traefik entrypoint.
  56. matrix_tuwunel_container_labels_public_client_root_enabled: true
  57. matrix_tuwunel_container_labels_public_client_root_traefik_hostname: "{{ matrix_tuwunel_hostname }}"
  58. matrix_tuwunel_container_labels_public_client_root_traefik_rule: "Host(`{{ matrix_tuwunel_container_labels_public_client_root_traefik_hostname }}`) && Path(`/`)"
  59. matrix_tuwunel_container_labels_public_client_root_traefik_priority: 0
  60. matrix_tuwunel_container_labels_public_client_root_traefik_entrypoints: "{{ matrix_tuwunel_container_labels_traefik_entrypoints }}"
  61. matrix_tuwunel_container_labels_public_client_root_traefik_tls: "{{ matrix_tuwunel_container_labels_public_client_root_traefik_entrypoints != 'web' }}"
  62. matrix_tuwunel_container_labels_public_client_root_traefik_tls_certResolver: "{{ matrix_tuwunel_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  63. matrix_tuwunel_container_labels_public_client_root_redirection_enabled: false
  64. matrix_tuwunel_container_labels_public_client_root_redirection_url: ""
  65. # Controls whether labels will be added that expose the Client-Server API on a public Traefik entrypoint.
  66. matrix_tuwunel_container_labels_public_client_api_enabled: true
  67. matrix_tuwunel_container_labels_public_client_api_traefik_hostname: "{{ matrix_tuwunel_hostname }}"
  68. matrix_tuwunel_container_labels_public_client_api_traefik_path_prefix: /_matrix
  69. matrix_tuwunel_container_labels_public_client_api_traefik_rule: "Host(`{{ matrix_tuwunel_container_labels_public_client_api_traefik_hostname }}`) && PathPrefix(`{{ matrix_tuwunel_container_labels_public_client_api_traefik_path_prefix }}`)"
  70. matrix_tuwunel_container_labels_public_client_api_traefik_priority: 0
  71. matrix_tuwunel_container_labels_public_client_api_traefik_entrypoints: "{{ matrix_tuwunel_container_labels_traefik_entrypoints }}"
  72. matrix_tuwunel_container_labels_public_client_api_traefik_tls: "{{ matrix_tuwunel_container_labels_public_client_api_traefik_entrypoints != 'web' }}"
  73. matrix_tuwunel_container_labels_public_client_api_traefik_tls_certResolver: "{{ matrix_tuwunel_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  74. # Controls whether labels will be added that expose the Client-Server API on the internal Traefik entrypoint.
  75. matrix_tuwunel_container_labels_internal_client_api_enabled: false
  76. matrix_tuwunel_container_labels_internal_client_api_traefik_path_prefix: "{{ matrix_tuwunel_container_labels_public_client_api_traefik_path_prefix }}"
  77. matrix_tuwunel_container_labels_internal_client_api_traefik_rule: "PathPrefix(`{{ matrix_tuwunel_container_labels_internal_client_api_traefik_path_prefix }}`)"
  78. matrix_tuwunel_container_labels_internal_client_api_traefik_priority: "{{ matrix_tuwunel_container_labels_public_client_api_traefik_priority }}"
  79. matrix_tuwunel_container_labels_internal_client_api_traefik_entrypoints: ""
  80. # Controls whether labels will be added that expose the Server-Server (Federation) API on a public Traefik entrypoint.
  81. matrix_tuwunel_container_labels_public_federation_api_enabled: "{{ matrix_tuwunel_config_allow_federation }}"
  82. matrix_tuwunel_container_labels_public_federation_api_traefik_hostname: "{{ matrix_tuwunel_hostname }}"
  83. matrix_tuwunel_container_labels_public_federation_api_traefik_path_prefix: /_matrix
  84. matrix_tuwunel_container_labels_public_federation_api_traefik_rule: "Host(`{{ matrix_tuwunel_container_labels_public_federation_api_traefik_hostname }}`) && PathPrefix(`{{ matrix_tuwunel_container_labels_public_federation_api_traefik_path_prefix }}`)"
  85. matrix_tuwunel_container_labels_public_federation_api_traefik_priority: 0
  86. matrix_tuwunel_container_labels_public_federation_api_traefik_entrypoints: ''
  87. # TLS is force-enabled because the spec (https://spec.matrix.org/latest/server-server-api/#tls) requires the federation API use HTTPS.
  88. matrix_tuwunel_container_labels_public_federation_api_traefik_tls: true
  89. matrix_tuwunel_container_labels_public_federation_api_traefik_tls_certResolver: "{{ matrix_tuwunel_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  90. # Additional Docker container labels (multiline string) appended verbatim to the label file.
  91. # See `../templates/labels.j2`.
  92. matrix_tuwunel_container_labels_additional_labels: ''
  93. # Extra arguments for the Docker container
  94. matrix_tuwunel_container_extra_arguments: []
  95. # Specifies which template files to use when configuring tuwunel.
  96. # To override the rendered config wholesale, copy the template into your inventory and point this at it:
  97. # matrix_tuwunel_template_tuwunel_config: "{{ playbook_dir }}/inventory/host_vars/matrix.example.com/tuwunel.toml.j2"
  98. matrix_tuwunel_template_tuwunel_config: "{{ role_path }}/templates/tuwunel.toml.j2"
  99. # The pretty server name used as a suffix on user/room IDs. Cannot be changed after first start without a database wipe.
  100. matrix_tuwunel_config_server_name: "{{ matrix_domain }}"
  101. # Max size for uploads, in bytes
  102. matrix_tuwunel_config_max_request_size: 20000000
  103. # Enables open registration. If false, no users can register on this server.
  104. matrix_tuwunel_config_allow_registration: false
  105. # When registration is enabled, set a strong token to protect the endpoint from abuse.
  106. # Generate one with e.g. `pwgen -s 64 1`. If left empty AND `allow_registration` is true,
  107. # you must explicitly opt in via the open-registration acknowledgement variable below.
  108. matrix_tuwunel_config_registration_token: ''
  109. # Acknowledgement required to allow registration with no token.
  110. # Maps to tuwunel's `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse`.
  111. matrix_tuwunel_config_yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse: false
  112. # Suffix appended to new-user displaynames upon registration. Empty disables it.
  113. # Upstream defaults to a flag glyph; we keep MDAD homeserver behavior consistent and leave this empty.
  114. matrix_tuwunel_config_new_user_displayname_suffix: ""
  115. # Emergency password to grant access to the admin user when locked out. Empty disables.
  116. matrix_tuwunel_config_emergency_password: ''
  117. # Trusted notary servers used for key verification.
  118. matrix_tuwunel_config_trusted_servers:
  119. - "matrix.org"
  120. # Logging directives in `tracing-subscriber` env-filter syntax.
  121. matrix_tuwunel_config_log: "info,state_res=warn"
  122. # TURN integration
  123. matrix_tuwunel_config_turn_uris: []
  124. matrix_tuwunel_config_turn_secret: ''
  125. matrix_tuwunel_config_turn_username: ''
  126. matrix_tuwunel_config_turn_password: ''
  127. # Self-check toggles
  128. matrix_tuwunel_self_check_validate_certificates: true
  129. # Encryption / room creation policy
  130. matrix_tuwunel_config_allow_encryption: true
  131. matrix_tuwunel_config_allow_room_creation: true
  132. # Default room version newly created rooms will use.
  133. matrix_tuwunel_config_default_room_version: '12'
  134. # Rooms newly registered users will be auto-joined to.
  135. # Must be rooms this server has joined at least once and that are public.
  136. matrix_tuwunel_config_auto_join_rooms: []
  137. # (De)federation toggles
  138. matrix_tuwunel_config_allow_federation: true
  139. matrix_tuwunel_config_allowed_remote_server_names: []
  140. matrix_tuwunel_config_forbidden_remote_server_names: []
  141. matrix_tuwunel_config_forbidden_remote_room_directory_server_names: []
  142. matrix_tuwunel_config_prevent_media_downloads_from: []
  143. # Outgoing presence is heavy on CPU and network and almost no clients use it. Off by default.
  144. matrix_tuwunel_config_allow_outgoing_presence: false
  145. # URL preview gating
  146. matrix_tuwunel_config_url_preview_domain_contains_allowlist: []
  147. matrix_tuwunel_config_url_preview_domain_explicit_allowlist: []
  148. matrix_tuwunel_config_url_preview_check_root_domain: false
  149. # Well-known overrides
  150. # Maps to `[global.well_known] client = "..."` and `server = "host:port"`.
  151. matrix_tuwunel_config_well_known_client: ''
  152. matrix_tuwunel_config_well_known_server: ''
  153. matrix_tuwunel_config_well_known_support_page: ''
  154. matrix_tuwunel_config_well_known_support_email: ''
  155. matrix_tuwunel_config_well_known_support_mxid: ''
  156. # MatrixRTC foci served via /_matrix/client/v1/rtc/transports (MSC4143)
  157. matrix_tuwunel_config_well_known_livekit_url: ''
  158. # RocksDB tuning. Empty values let tuwunel auto-pick.
  159. matrix_tuwunel_config_rocksdb_compression_algo: 'zstd' # one of: zstd, lz4, bz2, none
  160. matrix_tuwunel_config_rocksdb_compression_level: ''
  161. matrix_tuwunel_config_rocksdb_bottommost_compression_level: ''
  162. matrix_tuwunel_config_rocksdb_direct_io: false
  163. matrix_tuwunel_config_rocksdb_parallelism_threads: 0
  164. matrix_tuwunel_config_rocksdb_max_log_file_size: ''
  165. matrix_tuwunel_config_rocksdb_log_time_to_roll: ''
  166. matrix_tuwunel_config_database_backup_path: ''
  167. matrix_tuwunel_config_database_backups_to_keep: 1
  168. # Cache sizing. Empty values let tuwunel auto-pick (scaled by CPU count).
  169. matrix_tuwunel_config_cache_capacity_modifier: ''
  170. matrix_tuwunel_config_db_cache_capacity_mb: ''
  171. matrix_tuwunel_config_db_write_buffer_capacity_mb: ''
  172. # Admin room
  173. matrix_tuwunel_config_create_admin_room: true
  174. matrix_tuwunel_config_federate_admin_room: false
  175. matrix_tuwunel_config_grant_admin_to_first_user: true
  176. # Sentry crash/error reporting (off by default)
  177. matrix_tuwunel_config_sentry_enabled: false
  178. matrix_tuwunel_config_sentry_endpoint: ''
  179. matrix_tuwunel_config_sentry_send_server_name: false
  180. matrix_tuwunel_config_sentry_traces_sample_rate: 0.15
  181. # Blurhashing for image previews
  182. matrix_tuwunel_config_blurhashing_enabled: true
  183. matrix_tuwunel_config_blurhashing_components_x: 4
  184. matrix_tuwunel_config_blurhashing_components_y: 3
  185. matrix_tuwunel_config_blurhashing_max_raw_size: 33554432
  186. # Native TLS (use only when reverse-proxying is not desired)
  187. matrix_tuwunel_config_tls_certs: ''
  188. matrix_tuwunel_config_tls_key: ''
  189. matrix_tuwunel_config_tls_dual_protocol: false
  190. # LDAP authentication ([global.ldap] in tuwunel.toml).
  191. # See: https://matrix-construct.github.io/tuwunel/authentication/providers.html
  192. matrix_tuwunel_config_ldap_enabled: false
  193. matrix_tuwunel_config_ldap_uri: ''
  194. matrix_tuwunel_config_ldap_base_dn: ''
  195. matrix_tuwunel_config_ldap_bind_dn: ''
  196. matrix_tuwunel_config_ldap_bind_password_file: ''
  197. matrix_tuwunel_config_ldap_filter: '(objectClass=*)'
  198. matrix_tuwunel_config_ldap_uid_attribute: 'uid'
  199. matrix_tuwunel_config_ldap_name_attribute: 'givenName'
  200. matrix_tuwunel_config_ldap_admin_base_dn: ''
  201. matrix_tuwunel_config_ldap_admin_filter: ''
  202. # JWT authentication ([global.jwt] in tuwunel.toml).
  203. matrix_tuwunel_config_jwt_enabled: false
  204. matrix_tuwunel_config_jwt_key: ''
  205. matrix_tuwunel_config_jwt_format: 'HMAC' # one of: HMAC, B64HMAC, ECDSA, EDDSA
  206. matrix_tuwunel_config_jwt_algorithm: 'HS256'
  207. matrix_tuwunel_config_jwt_register_user: true
  208. matrix_tuwunel_config_jwt_audience: []
  209. matrix_tuwunel_config_jwt_issuer: []
  210. matrix_tuwunel_config_jwt_require_exp: false
  211. matrix_tuwunel_config_jwt_require_nbf: false
  212. matrix_tuwunel_config_jwt_validate_exp: true
  213. matrix_tuwunel_config_jwt_validate_nbf: true
  214. # OAuth2/OIDC identity providers.
  215. #
  216. # Each entry becomes a `[[global.identity_provider]]` block. Only fields you set are emitted;
  217. # tuwunel applies brand-aware defaults for known providers (Google, GitHub, Keycloak, MAS, etc).
  218. #
  219. # Example:
  220. # matrix_tuwunel_config_identity_providers:
  221. # - brand: keycloak
  222. # client_id: matrix
  223. # client_secret: '...'
  224. # issuer_url: https://sso.example.com/realms/matrix
  225. # callback_url: https://matrix.example.com/_matrix/client/unstable/login/sso/callback/matrix
  226. # trusted: true
  227. # - brand: github
  228. # client_id: '...'
  229. # client_secret: '...'
  230. #
  231. # See: https://matrix-construct.github.io/tuwunel/authentication/providers.html
  232. matrix_tuwunel_config_identity_providers: []
  233. # Media storage providers.
  234. #
  235. # Each entry maps an ID to a backend. `kind` is `local` or `s3`; remaining keys map directly
  236. # to fields under `[global.storage_provider.<ID>.<kind>]`.
  237. #
  238. # Examples:
  239. # matrix_tuwunel_config_storage_providers:
  240. # - id: primary
  241. # kind: local
  242. # base_path: /var/lib/tuwunel/media
  243. # - id: archive
  244. # kind: s3
  245. # url: s3://my-bucket/media
  246. # region: us-east-1
  247. # key: AKIA...
  248. # secret: '...'
  249. #
  250. # See: https://matrix-construct.github.io/tuwunel/media/storage.html
  251. matrix_tuwunel_config_storage_providers: []
  252. # Additional environment variables to pass to the container, one per line.
  253. # Environment variables override the rendered config file.
  254. #
  255. # Example:
  256. # matrix_tuwunel_environment_variables_extension: |
  257. # TUWUNEL_REQUEST_TIMEOUT=60
  258. # TUWUNEL_DNS_CACHE_SIZE=131072
  259. matrix_tuwunel_environment_variables_extension: ''
  260. # matrix_tuwunel_restart_necessary controls whether the service will be restarted (when true)
  261. # or merely started (when false) by the systemd service-manager role when conditional restart
  262. # is enabled. Computed during installation based on whether config / unit / image changed.
  263. matrix_tuwunel_restart_necessary: false