Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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