Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

238 lignes
13 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2019 Stuart Mumford
  3. # SPDX-FileCopyrightText: 2019 Sylvia van Os
  4. # SPDX-FileCopyrightText: 2020 - 2021 Dan Arnfield
  5. # SPDX-FileCopyrightText: 2020 Horvath Gergely
  6. # SPDX-FileCopyrightText: 2021 - 2022 MDAD project contributors
  7. # SPDX-FileCopyrightText: 2021 Ahmad Haghighi
  8. # SPDX-FileCopyrightText: 2022 - 2023 Nikita Chernyi
  9. # SPDX-FileCopyrightText: 2022 Hefty Zauk
  10. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  11. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  12. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  13. #
  14. # SPDX-License-Identifier: AGPL-3.0-or-later
  15. ---
  16. # Project source code URL: https://github.com/coturn/coturn
  17. matrix_coturn_enabled: true
  18. matrix_coturn_hostname: ""
  19. matrix_coturn_container_image_self_build: false
  20. matrix_coturn_container_image_self_build_repo: "https://github.com/coturn/coturn"
  21. matrix_coturn_container_image_self_build_repo_version: "docker/{{ matrix_coturn_version }}"
  22. matrix_coturn_container_image_self_build_repo_dockerfile_path: "docker/coturn/alpine/Dockerfile"
  23. # renovate: datasource=docker depName=coturn/coturn versioning=loose
  24. matrix_coturn_version: 4.8.0
  25. matrix_coturn_docker_image: "{{ matrix_coturn_docker_image_registry_prefix }}coturn/coturn:{{ matrix_coturn_version }}-alpine"
  26. matrix_coturn_docker_image_registry_prefix: "{{ 'localhost/' if matrix_coturn_container_image_self_build else matrix_coturn_docker_image_registry_prefix_upstream }}"
  27. matrix_coturn_docker_image_registry_prefix_upstream: "{{ matrix_coturn_docker_image_registry_prefix_upstream_default }}"
  28. matrix_coturn_docker_image_registry_prefix_upstream_default: docker.io/
  29. matrix_coturn_docker_image_force_pull: "{{ matrix_coturn_docker_image.endswith(':latest') }}"
  30. # The Docker network that coturn would be put into.
  31. #
  32. # Because coturn relays traffic to unvalidated IP addresses,
  33. # using a dedicated network, isolated from other Docker (and local) services is preferable.
  34. #
  35. # Setting up deny/allow rules with `matrix_coturn_allowed_peer_ips`/`matrix_coturn_denied_peer_ips` is also
  36. # possible for achieving such isolation, but is more complicated due to the dynamic nature of Docker networking.
  37. #
  38. # Setting `matrix_coturn_container_network` to 'host' will run the container with host networking,
  39. # which will drastically improve performance when thousands of ports are opened due to Docker not having to set up forwarding rules for each port.
  40. # Running with host networking can be dangerous, as it potentially exposes your local network and its services to coturn peers.
  41. # Regardless of the networking mode, we apply a deny list which via `matrix_coturn_denied_peer_ips`,
  42. # which hopefully prevents access to such private network ranges.
  43. # When running in host-networking mode, you need to adjust the firewall yourself, so that ports are opened.
  44. matrix_coturn_container_network: "matrix-coturn"
  45. matrix_coturn_container_additional_networks: "{{ matrix_coturn_container_additional_networks_auto + matrix_coturn_container_additional_networks_custom }}"
  46. matrix_coturn_container_additional_networks_auto: []
  47. matrix_coturn_container_additional_networks_custom: []
  48. matrix_coturn_base_path: "{{ matrix_base_data_path }}/coturn"
  49. matrix_coturn_docker_src_files_path: "{{ matrix_coturn_base_path }}/docker-src"
  50. matrix_coturn_config_path: "{{ matrix_coturn_base_path }}/turnserver.conf"
  51. # List of systemd services that matrix-coturn.service depends on
  52. matrix_coturn_systemd_required_services_list: "{{ matrix_coturn_systemd_required_services_list_default + matrix_coturn_systemd_required_services_list_auto + matrix_coturn_systemd_required_services_list_custom }}"
  53. matrix_coturn_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  54. matrix_coturn_systemd_required_services_list_auto: []
  55. matrix_coturn_systemd_required_services_list_custom: []
  56. # A list of additional "volumes" to mount in the container.
  57. # This list gets populated dynamically at runtime. You can provide a different default value,
  58. # if you wish to mount your own files into the container.
  59. # Contains definition objects like this: `{"type": "bind", "src": "/outside", "dst": "/inside", "options": "readonly"}.
  60. # See the `--mount` documentation for the `docker run` command.
  61. matrix_coturn_container_additional_volumes: []
  62. # A list of extra arguments to pass to the container
  63. matrix_coturn_container_extra_arguments: []
  64. # Controls whether the coturn container exposes its plain STUN port (tcp/3478 in the container) over TCP.
  65. #
  66. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:3478"), or empty string to not expose.
  67. matrix_coturn_container_stun_plain_host_bind_port_tcp: "{{ '3478' if matrix_coturn_container_network != 'host' else '' }}"
  68. # Controls whether the coturn container exposes its plain STUN port (udp/3478 in the container) over UDP.
  69. #
  70. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:3478"), or empty string to not expose.
  71. #
  72. # Ideally, we'd like to set this to "" to avoid exposing this port and decrease the risk of DDoS amplification attacks.
  73. # See: https://stormwall.network/resources/blog/protect-against-ddos-based-on-stun-exploit
  74. # In practice, old Element clients only support talking to the STUN port over UDP, not TCP, so we need to keep this enabled for now.
  75. matrix_coturn_container_stun_plain_host_bind_port_udp: "{{ '3478' if matrix_coturn_container_network != 'host' else '' }}"
  76. # Controls whether the coturn container exposes its TLS STUN port (tcp/5349 in the container) over TCP.
  77. #
  78. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:5349"), or empty string to not expose.
  79. matrix_coturn_container_stun_tls_host_bind_port_tcp: "{{ '5349' if matrix_coturn_container_network != 'host' else '' }}"
  80. # Controls whether the coturn container exposes its TLS STUN port (udp/5349 in the container) over UDP.
  81. #
  82. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:5349"), or empty string to not expose.
  83. #
  84. # This is enabled by default, unlike `matrix_coturn_container_stun_plain_host_bind_port_udp`,
  85. # because the risk of DDoS amplification attacks is lower for TLS
  86. # due to the handshake requiring two-way authentication and being generally more expensive.
  87. matrix_coturn_container_stun_tls_host_bind_port_udp: "{{ '5349' if matrix_coturn_container_network != 'host' else '' }}"
  88. # Controls whether the coturn container exposes its TURN UDP port range and which interface to do it on.
  89. #
  90. # Takes an interface "<ip address>" (e.g. "127.0.0.1"), or empty string to listen on all interfaces.
  91. # Takes a null/none value (`~`) or 'none' (as a string) to prevent listening.
  92. #
  93. # The UDP port-range itself is specified using `matrix_coturn_turn_udp_min_port` and `matrix_coturn_turn_udp_max_port`.
  94. matrix_coturn_container_turn_range_listen_interface: "{{ '' if matrix_coturn_container_network != 'host' else 'none' }}"
  95. # UDP port-range to use for TURN
  96. matrix_coturn_turn_udp_min_port: 49152
  97. matrix_coturn_turn_udp_max_port: 49172
  98. # Controls the `realm` configuration option
  99. matrix_coturn_realm: "turn.{{ matrix_coturn_hostname }}"
  100. # Controls which authentication method to enable.
  101. #
  102. # lt-cred-mech likely provides better compatibility,
  103. # as described here: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3191
  104. # but those claims are unverified.
  105. #
  106. # For now, we still default to `auth-secret` like we've always done.
  107. #
  108. # Known values: auth-secret, lt-cred-mech
  109. matrix_coturn_authentication_method: auth-secret
  110. # A shared secret used for authentication when `matrix_coturn_authentication_method` is `auth-secret`.
  111. # You can put any string here, but generating a strong one is preferred. You can create one with a command like `pwgen -s 64 1`.
  112. matrix_coturn_turn_static_auth_secret: ""
  113. # A username used authentication when `matrix_coturn_authentication_method` is `lt-cred-mech`.
  114. matrix_coturn_lt_cred_mech_username: ""
  115. # A password used authentication when `matrix_coturn_authentication_method` is `lt-cred-mech`.
  116. matrix_coturn_lt_cred_mech_password: ""
  117. # The external IP address of the machine where coturn is.
  118. # If do not define an IP address here or in `matrix_coturn_turn_external_ip_addresses`, auto-detection via an EchoIP service will be done.
  119. # See `matrix_coturn_turn_external_ip_address_auto_detection_enabled`
  120. matrix_coturn_turn_external_ip_address: ""
  121. matrix_coturn_turn_external_ip_addresses: "{{ [matrix_coturn_turn_external_ip_address] if matrix_coturn_turn_external_ip_address != '' else [] }}"
  122. # Controls whether external IP address auto-detection should be attempted.
  123. # We try to do this if there is no external IP address explicitly configured and if an EchoIP service URL is specified.
  124. # See matrix_coturn_turn_external_ip_address_auto_detection_echoip_service_url
  125. matrix_coturn_turn_external_ip_address_auto_detection_enabled: "{{ matrix_coturn_turn_external_ip_addresses | length == 0 and matrix_coturn_turn_external_ip_address_auto_detection_echoip_service_url != '' }}"
  126. # Specifies the address of the EchoIP service (https://github.com/mpolden/echoip) to use for detecting the external IP address.
  127. # By default, we use the official public instance.
  128. matrix_coturn_turn_external_ip_address_auto_detection_echoip_service_url: https://ifconfig.co/json
  129. # Controls whether SSL certificates will be validated when contacting the EchoIP service (matrix_coturn_turn_external_ip_address_auto_detection_echoip_service_url)
  130. matrix_coturn_turn_external_ip_address_auto_detection_echoip_validate_certs: true
  131. matrix_coturn_turn_external_ip_address_auto_detection_echoip_service_retries_count: "{{ devture_playbook_help_geturl_retries_count }}"
  132. matrix_coturn_turn_external_ip_address_auto_detection_echoip_service_retries_delay: "{{ devture_playbook_help_geturl_retries_delay }}"
  133. matrix_coturn_allowed_peer_ips: []
  134. # We block loopback interfaces and private networks by default to prevent private resources from being accessible.
  135. # This is especially important when coturn does not run within a container network (e.g. `matrix_coturn_container_network: host`).
  136. #
  137. # Learn more: https://www.rtcsec.com/article/cve-2020-26262-bypass-of-coturns-access-control-protection/
  138. #
  139. # If you're running coturn for local network peers, you may wish to override these rules.
  140. matrix_coturn_denied_peer_ips:
  141. - 0.0.0.0-0.255.255.255
  142. - 10.0.0.0-10.255.255.255
  143. - 100.64.0.0-100.127.255.255
  144. - 127.0.0.0-127.255.255.255
  145. - 169.254.0.0-169.254.255.255
  146. - 172.16.0.0-172.31.255.255
  147. - 192.0.0.0-192.0.0.255
  148. - 192.0.2.0-192.0.2.255
  149. - 192.88.99.0-192.88.99.255
  150. - 192.168.0.0-192.168.255.255
  151. - 198.18.0.0-198.19.255.255
  152. - 198.51.100.0-198.51.100.255
  153. - 203.0.113.0-203.0.113.255
  154. - 240.0.0.0-255.255.255.255
  155. - ::1
  156. - 64:ff9b::-64:ff9b::ffff:ffff
  157. - ::ffff:0.0.0.0-::ffff:255.255.255.255
  158. - 100::-100::ffff:ffff:ffff:ffff
  159. - 2001::-2001:1ff:ffff:ffff:ffff:ffff:ffff:ffff
  160. - 2002::-2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  161. - fc00::-fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  162. - fe80::-febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  163. matrix_coturn_user_quota: null
  164. matrix_coturn_total_quota: null
  165. # Controls whether `no-tcp-relay` is added to the configuration
  166. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L419-L422
  167. matrix_coturn_no_tcp_relay_enabled: true
  168. # Controls whether `no-multicast-peers` is added to the configuration
  169. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L629-L632
  170. matrix_coturn_no_multicast_peers_enabled: true
  171. # Controls whether `no-rfc5780` is added to the configuration
  172. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L770-L781
  173. matrix_coturn_no_rfc5780_enabled: true
  174. # Controls whether `no-stun-backward-compatibility` is added to the configuration
  175. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L783-L789
  176. matrix_coturn_no_stun_backward_compatibility_enabled: true
  177. # Controls whether `response-origin-only-with-rfc5780` is added to the configuration
  178. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L791-L796
  179. matrix_coturn_response_origin_only_with_rfc5780_enabled: true
  180. # Additional configuration to be passed to turnserver.conf
  181. # Example:
  182. # matrix_coturn_additional_configuration: |
  183. # simple-log
  184. # aux-server=1.2.3.4
  185. # relay-ip=4.3.2.1
  186. matrix_coturn_additional_configuration: ""
  187. # To enable TLS, you need to provide paths to certificates.
  188. # Paths defined in `matrix_coturn_tls_cert_path` and `matrix_coturn_tls_key_path` are in-container paths.
  189. # Files on the host can be mounted into the container using `matrix_coturn_container_additional_volumes`.
  190. matrix_coturn_tls_enabled: false
  191. matrix_coturn_tls_cert_path: ~
  192. matrix_coturn_tls_key_path: ~
  193. matrix_coturn_tls_v1_enabled: false
  194. matrix_coturn_tls_v1_1_enabled: false
  195. # systemd calendar configuration for the reload job
  196. # the actual job may run with a delay (see matrix_coturn_reload_schedule_randomized_delay_sec)
  197. matrix_coturn_reload_schedule: "*-*-* 06:30:00"
  198. # the delay with which the systemd timer may run in relation to the `matrix_coturn_reload_schedule` schedule
  199. matrix_coturn_reload_schedule_randomized_delay_sec: 1h