Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

237 lines
12 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. coturn_enabled: true
  18. coturn_hostname: ""
  19. coturn_container_image_self_build: false
  20. coturn_container_image_self_build_repo: "https://github.com/coturn/coturn"
  21. coturn_container_image_self_build_repo_version: "docker/{{ coturn_version }}"
  22. coturn_container_image_self_build_repo_dockerfile_path: "docker/coturn/alpine/Dockerfile"
  23. # renovate: datasource=docker depName=coturn/coturn versioning=loose
  24. coturn_version: 4.8.0
  25. coturn_container_image: "{{ coturn_container_image_registry_prefix }}coturn/coturn:{{ coturn_version }}-alpine"
  26. coturn_container_image_registry_prefix: "{{ 'localhost/' if coturn_container_image_self_build else coturn_container_image_registry_prefix_upstream }}"
  27. coturn_container_image_registry_prefix_upstream: "{{ coturn_container_image_registry_prefix_upstream_default }}"
  28. coturn_container_image_registry_prefix_upstream_default: docker.io/
  29. coturn_container_image_force_pull: "{{ coturn_container_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 `coturn_allowed_peer_ips`/`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 `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 `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. coturn_container_network: "matrix-coturn"
  45. coturn_container_additional_networks: "{{ coturn_container_additional_networks_auto + coturn_container_additional_networks_custom }}"
  46. coturn_container_additional_networks_auto: []
  47. coturn_container_additional_networks_custom: []
  48. coturn_docker_src_files_path: "{{ coturn_base_path }}/docker-src"
  49. coturn_config_path: "{{ coturn_base_path }}/turnserver.conf"
  50. # List of systemd services that matrix-coturn.service depends on
  51. coturn_systemd_required_services_list: "{{ coturn_systemd_required_services_list_default + coturn_systemd_required_services_list_auto + coturn_systemd_required_services_list_custom }}"
  52. coturn_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  53. coturn_systemd_required_services_list_auto: []
  54. 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. coturn_container_additional_volumes: []
  61. # A list of extra arguments to pass to the container
  62. 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. coturn_container_stun_plain_host_bind_port_tcp: "{{ '3478' if 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. coturn_container_stun_plain_host_bind_port_udp: "{{ '3478' if 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. coturn_container_stun_tls_host_bind_port_tcp: "{{ '5349' if 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 `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. coturn_container_stun_tls_host_bind_port_udp: "{{ '5349' if 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 `coturn_turn_udp_min_port` and `coturn_turn_udp_max_port`.
  93. coturn_container_turn_range_listen_interface: "{{ '' if coturn_container_network != 'host' else 'none' }}"
  94. # UDP port-range to use for TURN
  95. coturn_turn_udp_min_port: 49152
  96. coturn_turn_udp_max_port: 49172
  97. # Controls the `realm` configuration option
  98. coturn_realm: "turn.{{ coturn_hostname }}"
  99. # Controls which authentication method to enable.
  100. #
  101. # lt-cred-mech likely provides better compatibility,
  102. # as described here: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3191
  103. # but those claims are unverified.
  104. #
  105. # For now, we still default to `auth-secret` like we've always done.
  106. #
  107. # Known values: auth-secret, lt-cred-mech
  108. coturn_authentication_method: auth-secret
  109. # A shared secret used for authentication when `coturn_authentication_method` is `auth-secret`.
  110. # 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`.
  111. coturn_turn_static_auth_secret: ""
  112. # A username used authentication when `coturn_authentication_method` is `lt-cred-mech`.
  113. coturn_lt_cred_mech_username: ""
  114. # A password used authentication when `coturn_authentication_method` is `lt-cred-mech`.
  115. coturn_lt_cred_mech_password: ""
  116. # The external IP address of the machine where coturn is.
  117. # If do not define an IP address here or in `coturn_turn_external_ip_addresses`, auto-detection via an EchoIP service will be done.
  118. # See `coturn_turn_external_ip_address_auto_detection_enabled`
  119. coturn_turn_external_ip_address: ""
  120. coturn_turn_external_ip_addresses: "{{ [coturn_turn_external_ip_address] if coturn_turn_external_ip_address != '' else [] }}"
  121. # Controls whether external IP address auto-detection should be attempted.
  122. # We try to do this if there is no external IP address explicitly configured and if an EchoIP service URL is specified.
  123. # See coturn_turn_external_ip_address_auto_detection_echoip_service_url
  124. coturn_turn_external_ip_address_auto_detection_enabled: "{{ coturn_turn_external_ip_addresses | length == 0 and coturn_turn_external_ip_address_auto_detection_echoip_service_url != '' }}"
  125. # Specifies the address of the EchoIP service (https://github.com/mpolden/echoip) to use for detecting the external IP address.
  126. # Example: https://ifconfig.co/json
  127. coturn_turn_external_ip_address_auto_detection_echoip_service_url: ""
  128. # Controls whether SSL certificates will be validated when contacting the EchoIP service (coturn_turn_external_ip_address_auto_detection_echoip_service_url)
  129. coturn_turn_external_ip_address_auto_detection_echoip_validate_certs: true
  130. coturn_turn_external_ip_address_auto_detection_echoip_service_retries_count: "{{ devture_playbook_help_geturl_retries_count }}"
  131. coturn_turn_external_ip_address_auto_detection_echoip_service_retries_delay: "{{ devture_playbook_help_geturl_retries_delay }}"
  132. coturn_allowed_peer_ips: []
  133. # We block loopback interfaces and private networks by default to prevent private resources from being accessible.
  134. # This is especially important when coturn does not run within a container network (e.g. `coturn_container_network: host`).
  135. #
  136. # Learn more: https://www.rtcsec.com/article/cve-2020-26262-bypass-of-coturns-access-control-protection/
  137. #
  138. # If you're running coturn for local network peers, you may wish to override these rules.
  139. coturn_denied_peer_ips:
  140. - 0.0.0.0-0.255.255.255
  141. - 10.0.0.0-10.255.255.255
  142. - 100.64.0.0-100.127.255.255
  143. - 127.0.0.0-127.255.255.255
  144. - 169.254.0.0-169.254.255.255
  145. - 172.16.0.0-172.31.255.255
  146. - 192.0.0.0-192.0.0.255
  147. - 192.0.2.0-192.0.2.255
  148. - 192.88.99.0-192.88.99.255
  149. - 192.168.0.0-192.168.255.255
  150. - 198.18.0.0-198.19.255.255
  151. - 198.51.100.0-198.51.100.255
  152. - 203.0.113.0-203.0.113.255
  153. - 240.0.0.0-255.255.255.255
  154. - ::1
  155. - 64:ff9b::-64:ff9b::ffff:ffff
  156. - ::ffff:0.0.0.0-::ffff:255.255.255.255
  157. - 100::-100::ffff:ffff:ffff:ffff
  158. - 2001::-2001:1ff:ffff:ffff:ffff:ffff:ffff:ffff
  159. - 2002::-2002:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  160. - fc00::-fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  161. - fe80::-febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  162. coturn_user_quota: null
  163. coturn_total_quota: null
  164. # Controls whether `no-tcp-relay` is added to the configuration
  165. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L419-L422
  166. coturn_no_tcp_relay_enabled: true
  167. # Controls whether `no-multicast-peers` is added to the configuration
  168. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L629-L632
  169. coturn_no_multicast_peers_enabled: true
  170. # Controls whether `no-rfc5780` is added to the configuration
  171. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L770-L781
  172. coturn_no_rfc5780_enabled: true
  173. # Controls whether `no-stun-backward-compatibility` is added to the configuration
  174. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L783-L789
  175. coturn_no_stun_backward_compatibility_enabled: true
  176. # Controls whether `response-origin-only-with-rfc5780` is added to the configuration
  177. # Learn more here: https://github.com/coturn/coturn/blob/242eb78227f66442ba1573c00ec4552faae23eed/examples/etc/turnserver.conf#L791-L796
  178. coturn_response_origin_only_with_rfc5780_enabled: true
  179. # Additional configuration to be passed to turnserver.conf
  180. # Example:
  181. # coturn_additional_configuration: |
  182. # simple-log
  183. # aux-server=1.2.3.4
  184. # relay-ip=4.3.2.1
  185. coturn_additional_configuration: ""
  186. # To enable TLS, you need to provide paths to certificates.
  187. # Paths defined in `coturn_tls_cert_path` and `coturn_tls_key_path` are in-container paths.
  188. # Files on the host can be mounted into the container using `coturn_container_additional_volumes`.
  189. coturn_tls_enabled: false
  190. coturn_tls_cert_path: ~
  191. coturn_tls_key_path: ~
  192. coturn_tls_v1_enabled: false
  193. coturn_tls_v1_1_enabled: false
  194. # systemd calendar configuration for the reload job
  195. # the actual job may run with a delay (see coturn_reload_schedule_randomized_delay_sec)
  196. coturn_reload_schedule: "*-*-* 06:30:00"
  197. # the delay with which the systemd timer may run in relation to the `coturn_reload_schedule` schedule
  198. coturn_reload_schedule_randomized_delay_sec: 1h