Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

365 строки
18 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.8.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. # List of IPv4/IPv6 CIDR ranges tuwunel refuses to send outbound requests to (SSRF protection).
  144. # This applies to push gateway delivery, URL previews, and remote media fetches.
  145. # Bridges/appservices use a separate resolver and are not affected.
  146. #
  147. # The default mirrors tuwunel's own upstream default, which denies RFC1918,
  148. # loopback, multicast, and other unroutable/testnet ranges.
  149. #
  150. # To deny additional ranges, append to `matrix_tuwunel_config_ip_range_denylist_custom`.
  151. # To permit a range that the default denies (e.g. if you run a push gateway like a
  152. # localhost Sygnal or a LAN ntfy/UnifiedPush server on a private/loopback address, to
  153. # which push delivery would otherwise be silently blocked), override
  154. # `matrix_tuwunel_config_ip_range_denylist_default` with a trimmed list.
  155. # Set the whole list to `[]` to disable denylisting entirely.
  156. matrix_tuwunel_config_ip_range_denylist: "{{ matrix_tuwunel_config_ip_range_denylist_default + matrix_tuwunel_config_ip_range_denylist_auto + matrix_tuwunel_config_ip_range_denylist_custom }}"
  157. matrix_tuwunel_config_ip_range_denylist_default:
  158. - '127.0.0.0/8'
  159. - '10.0.0.0/8'
  160. - '172.16.0.0/12'
  161. - '192.168.0.0/16'
  162. - '100.64.0.0/10'
  163. - '192.0.0.0/24'
  164. - '169.254.0.0/16'
  165. - '192.88.99.0/24'
  166. - '198.18.0.0/15'
  167. - '192.0.2.0/24'
  168. - '198.51.100.0/24'
  169. - '203.0.113.0/24'
  170. - '224.0.0.0/4'
  171. - '::1/128'
  172. - 'fe80::/10'
  173. - 'fc00::/7'
  174. - '2001:db8::/32'
  175. - 'ff00::/8'
  176. - 'fec0::/10'
  177. matrix_tuwunel_config_ip_range_denylist_auto: []
  178. matrix_tuwunel_config_ip_range_denylist_custom: []
  179. # MSC4284 policy server enforcement.
  180. # When enabled, rooms with a valid `m.room.policy` state event will have
  181. # outgoing events signed by the configured policy server before federation.
  182. # Refusal aborts the local request; transient network or timeout failures
  183. # fail open with a warn log so a policy-server outage does not silently
  184. # take the room offline.
  185. matrix_tuwunel_config_enable_policy_servers: false
  186. # Timeout (in seconds) for outbound `/sign` calls and inbound
  187. # signature-fetches against a room's policy server.
  188. matrix_tuwunel_config_policy_server_request_timeout: 5
  189. # Outgoing presence is heavy on CPU and network and almost no clients use it. Off by default.
  190. matrix_tuwunel_config_allow_outgoing_presence: false
  191. # URL preview gating
  192. matrix_tuwunel_config_url_preview_domain_contains_allowlist: []
  193. matrix_tuwunel_config_url_preview_domain_explicit_allowlist: []
  194. matrix_tuwunel_config_url_preview_check_root_domain: false
  195. # Well-known overrides
  196. # Maps to `[global.well_known] client = "..."` and `server = "host:port"`.
  197. matrix_tuwunel_config_well_known_client: ''
  198. matrix_tuwunel_config_well_known_server: ''
  199. matrix_tuwunel_config_well_known_support_page: ''
  200. matrix_tuwunel_config_well_known_support_email: ''
  201. matrix_tuwunel_config_well_known_support_mxid: ''
  202. # MatrixRTC foci served via /_matrix/client/v1/rtc/transports (MSC4143)
  203. matrix_tuwunel_config_well_known_livekit_url: ''
  204. # RocksDB tuning. Empty values let tuwunel auto-pick.
  205. matrix_tuwunel_config_rocksdb_compression_algo: 'zstd' # one of: zstd, lz4, bz2, none
  206. matrix_tuwunel_config_rocksdb_compression_level: ''
  207. matrix_tuwunel_config_rocksdb_bottommost_compression_level: ''
  208. matrix_tuwunel_config_rocksdb_direct_io: false
  209. matrix_tuwunel_config_rocksdb_parallelism_threads: 0
  210. matrix_tuwunel_config_rocksdb_max_log_file_size: ''
  211. matrix_tuwunel_config_rocksdb_log_time_to_roll: ''
  212. matrix_tuwunel_config_database_backup_path: ''
  213. matrix_tuwunel_config_database_backups_to_keep: 1
  214. # Cache sizing. Empty values let tuwunel auto-pick (scaled by CPU count).
  215. matrix_tuwunel_config_cache_capacity_modifier: ''
  216. matrix_tuwunel_config_db_cache_capacity_mb: ''
  217. matrix_tuwunel_config_db_write_buffer_capacity_mb: ''
  218. # Admin room
  219. matrix_tuwunel_config_create_admin_room: true
  220. matrix_tuwunel_config_federate_admin_room: false
  221. matrix_tuwunel_config_grant_admin_to_first_user: true
  222. # Sentry crash/error reporting (off by default)
  223. matrix_tuwunel_config_sentry_enabled: false
  224. matrix_tuwunel_config_sentry_endpoint: ''
  225. matrix_tuwunel_config_sentry_send_server_name: false
  226. matrix_tuwunel_config_sentry_traces_sample_rate: 0.15
  227. # Blurhashing for image previews
  228. matrix_tuwunel_config_blurhashing_enabled: true
  229. matrix_tuwunel_config_blurhashing_components_x: 4
  230. matrix_tuwunel_config_blurhashing_components_y: 3
  231. matrix_tuwunel_config_blurhashing_max_raw_size: 33554432
  232. # Native TLS (use only when reverse-proxying is not desired)
  233. matrix_tuwunel_config_tls_certs: ''
  234. matrix_tuwunel_config_tls_key: ''
  235. matrix_tuwunel_config_tls_dual_protocol: false
  236. # LDAP authentication ([global.ldap] in tuwunel.toml).
  237. # See: https://matrix-construct.github.io/tuwunel/authentication/providers.html
  238. matrix_tuwunel_config_ldap_enabled: false
  239. matrix_tuwunel_config_ldap_uri: ''
  240. matrix_tuwunel_config_ldap_base_dn: ''
  241. matrix_tuwunel_config_ldap_bind_dn: ''
  242. matrix_tuwunel_config_ldap_bind_password_file: ''
  243. matrix_tuwunel_config_ldap_filter: '(objectClass=*)'
  244. matrix_tuwunel_config_ldap_uid_attribute: 'uid'
  245. matrix_tuwunel_config_ldap_name_attribute: 'givenName'
  246. matrix_tuwunel_config_ldap_admin_base_dn: ''
  247. matrix_tuwunel_config_ldap_admin_filter: ''
  248. # JWT authentication ([global.jwt] in tuwunel.toml).
  249. matrix_tuwunel_config_jwt_enabled: false
  250. matrix_tuwunel_config_jwt_key: ''
  251. matrix_tuwunel_config_jwt_format: 'HMAC' # one of: HMAC, B64HMAC, ECDSA, EDDSA
  252. matrix_tuwunel_config_jwt_algorithm: 'HS256'
  253. matrix_tuwunel_config_jwt_register_user: true
  254. matrix_tuwunel_config_jwt_audience: []
  255. matrix_tuwunel_config_jwt_issuer: []
  256. matrix_tuwunel_config_jwt_require_exp: false
  257. matrix_tuwunel_config_jwt_require_nbf: false
  258. matrix_tuwunel_config_jwt_validate_exp: true
  259. matrix_tuwunel_config_jwt_validate_nbf: true
  260. # OAuth2/OIDC identity providers.
  261. #
  262. # Each entry becomes a `[[global.identity_provider]]` block. Only fields you set are emitted;
  263. # tuwunel applies brand-aware defaults for known providers (Google, GitHub, Keycloak, MAS, etc).
  264. #
  265. # Example:
  266. # matrix_tuwunel_config_identity_providers:
  267. # - brand: keycloak
  268. # client_id: matrix
  269. # client_secret: '...'
  270. # issuer_url: https://sso.example.com/realms/matrix
  271. # callback_url: https://matrix.example.com/_matrix/client/unstable/login/sso/callback/matrix
  272. # trusted: true
  273. # - brand: github
  274. # client_id: '...'
  275. # client_secret: '...'
  276. #
  277. # See: https://matrix-construct.github.io/tuwunel/authentication/providers.html
  278. matrix_tuwunel_config_identity_providers: []
  279. # Media storage providers.
  280. #
  281. # Each entry maps an ID to a backend. `kind` is `local` or `s3`; remaining keys map directly
  282. # to fields under `[global.storage_provider.<ID>.<kind>]`.
  283. #
  284. # Examples:
  285. # matrix_tuwunel_config_storage_providers:
  286. # - id: primary
  287. # kind: local
  288. # base_path: /var/lib/tuwunel/media
  289. # - id: archive
  290. # kind: s3
  291. # url: s3://my-bucket/media
  292. # region: us-east-1
  293. # key: AKIA...
  294. # secret: '...'
  295. #
  296. # See: https://matrix-construct.github.io/tuwunel/media/storage.html
  297. matrix_tuwunel_config_storage_providers: []
  298. # Additional environment variables to pass to the container, one per line.
  299. # Environment variables override the rendered config file.
  300. #
  301. # Example:
  302. # matrix_tuwunel_environment_variables_extension: |
  303. # TUWUNEL_REQUEST_TIMEOUT=60
  304. # TUWUNEL_DNS_CACHE_SIZE=131072
  305. matrix_tuwunel_environment_variables_extension: ''
  306. # matrix_tuwunel_restart_necessary controls whether the service will be restarted (when true)
  307. # or merely started (when false) by the systemd service-manager role when conditional restart
  308. # is enabled. Computed during installation based on whether config / unit / image changed.
  309. matrix_tuwunel_restart_necessary: false