Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

5853 líneas
322 KiB

  1. ---
  2. # This variables file wires together the various components (roles) used by the playbook.
  3. #
  4. # Roles used by playbook are pretty minimal and kept independent of one another as much as possible.
  5. # To deliver a turnkey fully-featured Matrix server, this playbook needs
  6. # to connect them all together. It does so by overriding role variables.
  7. #
  8. # You can also override ANY variable (seen here or in any given role),
  9. # by re-defining it in your own configuration file (`inventory/host_vars/matrix.example.com`).
  10. ########################################################################
  11. # #
  12. # Playbook #
  13. # #
  14. ########################################################################
  15. # Controls whether to install Docker or not
  16. # Also see `devture_docker_sdk_for_python_installation_enabled`.
  17. matrix_playbook_docker_installation_enabled: true
  18. matrix_playbook_docker_installation_daemon_options: "{{ matrix_playbook_docker_installation_daemon_options_auto | combine(matrix_playbook_docker_installation_daemon_options_custom, recursive=True) }}"
  19. # Since Docker 27.0.1, Docker daemon options do not need to be changed to enable IPv6 support on the daemon side.
  20. # See: https://docs.docker.com/engine/release-notes/27/#ipv6
  21. # We only enable `ip6tables` and `experimental` for people who explicitly request it (perhaps due to running an old Docker version).
  22. #
  23. # Despite IPv6-enablement at the Docker level being a thing, for IPv6 to work for containers
  24. # networks need to be created with IPv6 explicitly enabled.
  25. # This is controlled by the `devture_systemd_docker_base_ipv6_enabled` variable and it's up to the various roles to
  26. # respect this variable when creating their networks.
  27. matrix_playbook_docker_installation_daemon_options_auto: |
  28. {{
  29. ({'experimental': true, 'ip6tables': true} if devture_systemd_docker_base_ipv6_daemon_options_changing_enabled else {})
  30. }}
  31. matrix_playbook_docker_installation_daemon_options_custom: {}
  32. matrix_playbook_docker_installation_daemon_options_file_path: /etc/docker/daemon.json
  33. # Controls whether to attach Traefik labels to services.
  34. # This is separate from `traefik_enabled`, because you may wish to disable Traefik installation by the playbook,
  35. # yet still use Traefik installed in another way.
  36. matrix_playbook_traefik_labels_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  37. matrix_playbook_reverse_proxy_container_network: "{{ traefik_container_network if traefik_enabled else 'traefik' if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] else '' }}"
  38. matrix_playbook_reverse_proxy_hostname: "{{ traefik_identifier if traefik_enabled else 'traefik' }}"
  39. matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled: "{{ traefik_config_http_middlewares_compression_enabled if (traefik_enabled and traefik_config_http_middlewares_compression_enabled) else false }}"
  40. matrix_playbook_reverse_proxy_traefik_middleware_compression_name: "{{ (traefik_config_http_middlewares_compression_middleware_name + '@file') if traefik_enabled else '' }}"
  41. # A separate Matrix Federation entrypoint is always enabled, unless the federation port matches one of the ports for existing (default) entrypoints
  42. matrix_playbook_public_matrix_federation_api_traefik_entrypoint_enabled: "{{ matrix_federation_public_port not in [traefik_config_entrypoint_web_port, traefik_config_entrypoint_web_secure_port] }}"
  43. # We only enable HTTP/3 on the federation entrypoint if the main web-secure entrypoint has it enabled.
  44. matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_enabled: "{{ traefik_config_entrypoint_web_secure_http3_enabled }}"
  45. # `traefik_config_entrypoint_web_secure_enabled` is the variable we currently follow to determine if SSL is enabled or not.
  46. # `matrix_playbook_ssl_enabled` is merely an indicator if (when looked at it publicly), the server supports SSL or not,
  47. # and affects how services configure their public URLs.
  48. matrix_federation_traefik_entrypoint_tls: "{{ traefik_config_entrypoint_web_secure_enabled }}"
  49. ########################################################################
  50. # #
  51. # /Playbook #
  52. # #
  53. ########################################################################
  54. ########################################################################
  55. # #
  56. # aux #
  57. # #
  58. ########################################################################
  59. aux_directory_default_owner: "{{ matrix_user_name }}"
  60. aux_directory_default_group: "{{ matrix_group_name }}"
  61. aux_file_default_owner: "{{ matrix_user_name }}"
  62. aux_file_default_group: "{{ matrix_group_name }}"
  63. ########################################################################
  64. # #
  65. # /aux #
  66. # #
  67. ########################################################################
  68. ########################################################################
  69. # #
  70. # base #
  71. # #
  72. ########################################################################
  73. matrix_homeserver_container_extra_arguments_auto: |
  74. {{
  75. (['--mount type=bind,src=' + matrix_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_appservice_discord_enabled else [])
  76. +
  77. (['--mount type=bind,src=' + matrix_appservice_draupnir_for_all_config_path + '/draupnir-for-all-registration.yaml,dst=/matrix-appservice-draupnir-for-all-registration.yaml,ro'] if matrix_appservice_draupnir_for_all_enabled else [])
  78. +
  79. (['--mount type=bind,src=' + matrix_appservice_double_puppet_config_path + '/registration.yaml,dst=/matrix-appservice-double-puppet-registration.yaml,ro'] if matrix_appservice_double_puppet_enabled else [])
  80. +
  81. (['--mount type=bind,src=' + matrix_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_appservice_irc_enabled else [])
  82. +
  83. (['--mount type=bind,src=' + matrix_appservice_kakaotalk_config_path + '/registration.yaml,dst=/matrix-appservice-kakaotalk-registration.yaml,ro'] if matrix_appservice_kakaotalk_enabled else [])
  84. +
  85. (['--mount type=bind,src=' + matrix_appservice_slack_config_path + '/slack-registration.yaml,dst=/matrix-appservice-slack-registration.yaml,ro'] if matrix_appservice_slack_enabled else [])
  86. +
  87. (['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else [])
  88. +
  89. (['--mount type=bind,src=' + matrix_wechat_config_path + '/registration.yaml,dst=/matrix-wechat-registration.yaml,ro'] if matrix_wechat_enabled else [])
  90. +
  91. (['--mount type=bind,src=' + matrix_heisenbridge_base_path + '/registration.yaml,dst=/heisenbridge-registration.yaml,ro'] if matrix_heisenbridge_enabled else [])
  92. +
  93. (['--mount type=bind,src=' + matrix_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_hookshot_enabled else [])
  94. +
  95. (['--mount type=bind,src=' + matrix_mautrix_bluesky_config_path + '/registration.yaml,dst=/matrix-mautrix-bluesky-registration.yaml,ro'] if matrix_mautrix_bluesky_enabled else [])
  96. +
  97. (['--mount type=bind,src=' + matrix_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_mautrix_discord_enabled else [])
  98. +
  99. (['--mount type=bind,src=' + matrix_mautrix_slack_config_path + '/registration.yaml,dst=/matrix-mautrix-slack-registration.yaml,ro'] if matrix_mautrix_slack_enabled else [])
  100. +
  101. (['--mount type=bind,src=' + matrix_mautrix_googlechat_config_path + '/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro'] if matrix_mautrix_googlechat_enabled else [])
  102. +
  103. (['--mount type=bind,src=' + matrix_mautrix_signal_config_path + '/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro'] if matrix_mautrix_signal_enabled else [])
  104. +
  105. (['--mount type=bind,src=' + matrix_mautrix_meta_messenger_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-messenger-registration.yaml,ro'] if matrix_mautrix_meta_messenger_enabled else [])
  106. +
  107. (['--mount type=bind,src=' + matrix_mautrix_meta_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-instagram-registration.yaml,ro'] if matrix_mautrix_meta_instagram_enabled else [])
  108. +
  109. (['--mount type=bind,src=' + matrix_mautrix_telegram_config_path + '/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro'] if matrix_mautrix_telegram_enabled else [])
  110. +
  111. (['--mount type=bind,src=' + matrix_mautrix_twitter_config_path + '/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro'] if matrix_mautrix_twitter_enabled else [])
  112. +
  113. (['--mount type=bind,src=' + matrix_mautrix_gmessages_config_path + '/registration.yaml,dst=/matrix-mautrix-gmessages-registration.yaml,ro'] if matrix_mautrix_gmessages_enabled else [])
  114. +
  115. (['--mount type=bind,src=' + matrix_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_mautrix_whatsapp_enabled else [])
  116. +
  117. (['--mount type=bind,src=' + matrix_mautrix_wsproxy_config_path + '/androidsms-registration.yaml,dst=/matrix-mautrix-androidsms-registration.yaml,ro'] if matrix_mautrix_wsproxy_enabled else [])
  118. +
  119. (['--mount type=bind,src=' + matrix_mautrix_wsproxy_config_path + '/imessage-registration.yaml,dst=/matrix-mautrix-imessage-registration.yaml,ro'] if matrix_mautrix_wsproxy_enabled else [])
  120. +
  121. (['--mount type=bind,src=' + matrix_mx_puppet_groupme_config_path + '/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro'] if matrix_mx_puppet_groupme_enabled else [])
  122. +
  123. (['--mount type=bind,src=' + matrix_mx_puppet_steam_config_path + '/registration.yaml,dst=/matrix-mx-puppet-steam-registration.yaml,ro'] if matrix_mx_puppet_steam_enabled else [])
  124. +
  125. (['--mount type=bind,src=' + matrix_sms_bridge_config_path + '/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro'] if matrix_sms_bridge_enabled else [])
  126. +
  127. (['--mount type=bind,src=' + matrix_steam_bridge_config_path + '/registration.yaml,dst=/matrix-steam-bridge-registration.yaml,ro'] if matrix_steam_bridge_enabled else [])
  128. +
  129. (['--mount type=bind,src=' + matrix_cactus_comments_app_service_config_file + ',dst=/matrix-cactus-comments.yaml,ro'] if matrix_cactus_comments_enabled else [])
  130. }}
  131. matrix_homeserver_app_service_config_files_auto: |
  132. {{
  133. (['/matrix-appservice-discord-registration.yaml'] if matrix_appservice_discord_enabled else [])
  134. +
  135. (['/matrix-appservice-draupnir-for-all-registration.yaml'] if matrix_appservice_draupnir_for_all_enabled else [])
  136. +
  137. (['/matrix-appservice-double-puppet-registration.yaml'] if matrix_appservice_double_puppet_enabled else [])
  138. +
  139. (['/matrix-appservice-irc-registration.yaml'] if matrix_appservice_irc_enabled else [])
  140. +
  141. (['/matrix-appservice-kakaotalk-registration.yaml'] if matrix_appservice_kakaotalk_enabled else [])
  142. +
  143. (['/matrix-appservice-slack-registration.yaml'] if matrix_appservice_slack_enabled else [])
  144. +
  145. (['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else [])
  146. +
  147. (['/matrix-wechat-registration.yaml'] if matrix_wechat_enabled else [])
  148. +
  149. (['/heisenbridge-registration.yaml'] if matrix_heisenbridge_enabled else [])
  150. +
  151. (['/hookshot-registration.yml'] if matrix_hookshot_enabled else [])
  152. +
  153. (['/matrix-mautrix-bluesky-registration.yaml'] if matrix_mautrix_bluesky_enabled else [])
  154. +
  155. (['/matrix-mautrix-discord-registration.yaml'] if matrix_mautrix_discord_enabled else [])
  156. +
  157. (['/matrix-mautrix-slack-registration.yaml'] if matrix_mautrix_slack_enabled else [])
  158. +
  159. (['/matrix-mautrix-googlechat-registration.yaml'] if matrix_mautrix_googlechat_enabled else [])
  160. +
  161. (['/matrix-mautrix-signal-registration.yaml'] if matrix_mautrix_signal_enabled else [])
  162. +
  163. (['/matrix-mautrix-meta-messenger-registration.yaml'] if matrix_mautrix_meta_messenger_enabled else [])
  164. +
  165. (['/matrix-mautrix-meta-instagram-registration.yaml'] if matrix_mautrix_meta_instagram_enabled else [])
  166. +
  167. (['/matrix-mautrix-telegram-registration.yaml'] if matrix_mautrix_telegram_enabled else [])
  168. +
  169. (['/matrix-mautrix-twitter-registration.yaml'] if matrix_mautrix_twitter_enabled else [])
  170. +
  171. (['/matrix-mautrix-gmessages-registration.yaml'] if matrix_mautrix_gmessages_enabled else [])
  172. +
  173. (['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_mautrix_whatsapp_enabled else [])
  174. +
  175. (['/matrix-mautrix-androidsms-registration.yaml'] if matrix_mautrix_wsproxy_enabled else [])
  176. +
  177. (['/matrix-mautrix-imessage-registration.yaml'] if matrix_mautrix_wsproxy_enabled else [])
  178. +
  179. (['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_mx_puppet_groupme_enabled else [])
  180. +
  181. (['/matrix-mx-puppet-steam-registration.yaml'] if matrix_mx_puppet_steam_enabled else [])
  182. +
  183. (['/matrix-sms-bridge-registration.yaml'] if matrix_sms_bridge_enabled else [])
  184. +
  185. (['/matrix-cactus-comments.yaml'] if matrix_cactus_comments_enabled else [])
  186. +
  187. (['/matrix-steam-bridge-registration.yaml'] if matrix_steam_bridge_enabled else [])
  188. }}
  189. matrix_addons_homeserver_container_network: "{{ matrix_playbook_reverse_proxy_container_network if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else matrix_homeserver_container_network }}"
  190. matrix_addons_homeserver_client_api_url: "{{ ('http://' + matrix_playbook_reverse_proxy_hostname + ':' + matrix_playbook_internal_matrix_client_api_traefik_entrypoint_port | string) if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else matrix_homeserver_container_url }}"
  191. matrix_addons_homeserver_systemd_services_list: |
  192. {{
  193. (
  194. matrix_homeserver_systemd_services_list
  195. +
  196. (
  197. [traefik_identifier + '.service']
  198. if matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik'
  199. else []
  200. )
  201. )
  202. if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled
  203. else matrix_homeserver_systemd_services_list
  204. }}
  205. ########################################################################
  206. # #
  207. # /base #
  208. # #
  209. ########################################################################
  210. ########################################################################
  211. # #
  212. # com.devture.ansible.role.systemd_service_manager #
  213. # #
  214. ########################################################################
  215. # This list is not exhaustive and final.
  216. # Synapse workers are still injected into the list at runtime.
  217. # Additional JVB workers (jitsi_jvb.yml — roles/galaxy/jitsi/tasks/init_additional_jvb.yml) override this variable at runtime as well.
  218. #
  219. # Priority levels are like this:
  220. # - Traefik starts first with a level of 250, so that:
  221. # - it can get an early start on obtaining SSL certificates and routing to other services as soon as they start (later)
  222. # - so that addon services (starting later) can communicte with the homeserver via Traefik's internal entrypoint
  223. # (see `matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled`)
  224. # - core services (the homeserver) get a level of ~1000
  225. # - services that the homeserver depends on (database, Redis, ntfy, coturn, etc.) get a lower level — between 500 and 1000
  226. # - coturn gets a higher priority level (= starts later) if `devture_systemd_service_manager_service_restart_mode == 'one-by-one'` to intentionally delay it, because:
  227. # - starting services one by one means that the service manager role waits for each service to fully start before proceeding to the next one
  228. # - if coturn has a lower priority than the homeserver, it would be started before it
  229. # - since coturn is started before the homeserver, there's no container label telling Traefik to get a `matrix.example.com` certificate
  230. # - thus, coturn would spin and wait for a certificate until it fails. We'd get a playbook failure due to it, but service manager will proceed to start all other services anyway.
  231. # - only later, when the homeserver actually starts, would that certificate be fetched and dumped
  232. # - this is not a problem with `all-at-once` (default) or `priority-batched` (services start concurrently),
  233. # or with `clean-stop-start` (everything stops first, then starts in priority order — coturn at 900 is fine)
  234. # - reverse-proxying services get level 3000
  235. # - Matrix utility services (bridges, bots) get a level of 2000/2200, so that:
  236. # - they can start before the reverse-proxy
  237. # - so that, when the reverse-proxy is up (Matrix is up), all bots and bridges can be interacted with
  238. # - monitoring services (Prometheus, Grafana, …) get a level of 4000 — they can start later than all-of-Matrix
  239. # - services which aren't time-sensitive (various crons and timers) get a level of 5000 — they can start later than all-of-Matrix
  240. devture_systemd_service_manager_services_list_auto: |
  241. {{
  242. ([{'name': (backup_borg_identifier + '.timer'), 'priority': 5000, 'groups': ['matrix', 'backup', 'borg']}] if backup_borg_enabled else [])
  243. +
  244. ([{'name': 'matrix-alertmanager-receiver.service', 'priority': 2200, 'groups': ['matrix', 'alertmanager-receiver']}] if matrix_alertmanager_receiver_enabled else [])
  245. +
  246. ([{'name': 'matrix-authentication-service.service', 'priority': 2200, 'groups': ['matrix', 'matrix-authentication-service']}] if matrix_authentication_service_enabled else [])
  247. +
  248. ([{'name': 'matrix-bot-buscarron.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'buscarron', 'bot-buscarron']}] if matrix_bot_buscarron_enabled else [])
  249. +
  250. ([{'name': 'matrix-bot-baibot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'baibot', 'bot-baibot']}] if matrix_bot_baibot_enabled else [])
  251. +
  252. ([{'name': 'matrix-bot-go-neb.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'go-neb', 'bot-go-neb']}] if matrix_bot_go_neb_enabled else [])
  253. +
  254. ([{'name': 'matrix-bot-honoroit.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'honoroit', 'bot-honoroit']}] if matrix_bot_honoroit_enabled else [])
  255. +
  256. ([{'name': 'matrix-bot-matrix-registration-bot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'registration-bot', 'bot-matrix-registration-bot']}] if matrix_bot_matrix_registration_bot_enabled else [])
  257. +
  258. ([{'name': 'matrix-bot-matrix-reminder-bot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'reminder-bot', 'bot-matrix-reminder-bot']}] if matrix_bot_matrix_reminder_bot_enabled else [])
  259. +
  260. ([{'name': 'matrix-bot-maubot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'maubot', 'bot-maubot']}] if matrix_bot_maubot_enabled else [])
  261. +
  262. ([{'name': 'matrix-bot-mjolnir.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'mjolnir', 'bot-mjolnir']}] if matrix_bot_mjolnir_enabled else [])
  263. +
  264. ([{'name': 'matrix-bot-draupnir.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'draupnir', 'bot-draupnir']}] if matrix_bot_draupnir_enabled else [])
  265. +
  266. ([{'name': 'matrix-appservice-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-discord']}] if matrix_appservice_discord_enabled else [])
  267. +
  268. ([{'name': 'matrix-appservice-draupnir-for-all.service', 'priority': 4000, 'groups': ['matrix', 'bridges', 'draupnir-for-all', 'appservice-draupnir-for-all']}] if matrix_appservice_draupnir_for_all_enabled else [])
  269. +
  270. ([{'name': 'matrix-appservice-irc.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-irc']}] if matrix_appservice_irc_enabled else [])
  271. +
  272. ([{'name': 'matrix-appservice-kakaotalk.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-kakaotalk']}] if matrix_appservice_kakaotalk_enabled else [])
  273. +
  274. ([{'name': 'matrix-appservice-kakaotalk-node.service', 'priority': 1900, 'groups': ['matrix', 'bridges', 'appservice-kakaotalk', 'appservice-kakaotalk-node']}] if matrix_appservice_kakaotalk_enabled else [])
  275. +
  276. ([{'name': 'matrix-appservice-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-slack']}] if matrix_appservice_slack_enabled else [])
  277. +
  278. ([{'name': 'matrix-beeper-linkedin.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'beeper-linkedin']}] if matrix_beeper_linkedin_enabled else [])
  279. +
  280. ([{'name': 'matrix-wechat.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'wechat']}] if matrix_wechat_enabled else [])
  281. +
  282. ([{'name': 'matrix-wechat-agent.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'wechat']}] if matrix_wechat_enabled else [])
  283. +
  284. ([{'name': 'matrix-heisenbridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'heisenbridge']}] if matrix_heisenbridge_enabled else [])
  285. +
  286. ([{'name': 'matrix-hookshot.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'hookshot', 'bridge-hookshot']}] if matrix_hookshot_enabled else [])
  287. +
  288. ([{'name': 'matrix-mautrix-bluesky.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-bluesky']}] if matrix_mautrix_bluesky_enabled else [])
  289. +
  290. ([{'name': 'matrix-mautrix-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-discord']}] if matrix_mautrix_discord_enabled else [])
  291. +
  292. ([{'name': 'matrix-mautrix-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-slack']}] if matrix_mautrix_slack_enabled else [])
  293. +
  294. ([{'name': 'matrix-mautrix-googlechat.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-googlechat']}] if matrix_mautrix_googlechat_enabled else [])
  295. +
  296. ([{'name': 'matrix-mautrix-signal.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-signal', 'mautrix-signal']}] if matrix_mautrix_signal_enabled else [])
  297. +
  298. ([{'name': (matrix_mautrix_meta_messenger_identifier + '.service'), 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-messenger']}] if matrix_mautrix_meta_messenger_enabled else [])
  299. +
  300. ([{'name': (matrix_mautrix_meta_instagram_identifier + '.service'), 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-instagram']}] if matrix_mautrix_meta_instagram_enabled else [])
  301. +
  302. ([{'name': 'matrix-mautrix-telegram.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-telegram']}] if matrix_mautrix_telegram_enabled else [])
  303. +
  304. ([{'name': 'matrix-mautrix-twitter.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-twitter']}] if matrix_mautrix_twitter_enabled else [])
  305. +
  306. ([{'name': 'matrix-mautrix-gmessages.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-gmessages']}] if matrix_mautrix_gmessages_enabled else [])
  307. +
  308. ([{'name': 'matrix-mautrix-whatsapp.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-whatsapp']}] if matrix_mautrix_whatsapp_enabled else [])
  309. +
  310. ([{'name': 'matrix-mautrix-wsproxy.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-wsproxy']}] if matrix_mautrix_wsproxy_enabled else [])
  311. +
  312. ([{'name': 'matrix-mautrix-wsproxy-syncproxy.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-wsproxy-syncproxy']}] if matrix_mautrix_wsproxy_enabled else [])
  313. +
  314. ([{'name': 'matrix-mx-puppet-groupme.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-groupme']}] if matrix_mx_puppet_groupme_enabled else [])
  315. +
  316. ([{'name': 'matrix-mx-puppet-steam.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-steam']}] if matrix_mx_puppet_steam_enabled else [])
  317. +
  318. ([{'name': 'matrix-postmoogle.service', 'priority': 2200, 'groups': ['matrix', 'bridges', 'postmoogle']}] if matrix_postmoogle_enabled else [])
  319. +
  320. ([{'name': 'matrix-sms-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'sms']}] if matrix_sms_bridge_enabled else [])
  321. +
  322. ([{'name': 'matrix-steam-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'matrix-steam-bridge']}] if matrix_steam_bridge_enabled else [])
  323. +
  324. ([{'name': 'matrix-cactus-comments.service', 'priority': 2000, 'groups': ['matrix', 'cactus-comments']}] if matrix_cactus_comments_enabled else [])
  325. +
  326. ([{'name': 'matrix-cactus-comments-client.service', 'priority': 2000, 'groups': ['matrix', 'cactus-comments-client']}] if matrix_cactus_comments_client_enabled else [])
  327. +
  328. ([{'name': (cinny_identifier + '.service'), 'priority': 2000, 'groups': ['matrix', 'clients', 'cinny', 'client-cinny']}] if cinny_enabled else [])
  329. +
  330. ([{'name': 'matrix-client-element.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'element', 'client-element']}] if matrix_client_element_enabled else [])
  331. +
  332. ([{'name': (hydrogen_identifier + '.service'), 'priority': 2000, 'groups': ['matrix', 'clients', 'hydrogen', 'client-hydrogen']}] if hydrogen_enabled else [])
  333. +
  334. ([{'name': 'matrix-client-schildichat.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'schildichat', 'client-schildichat']}] if matrix_client_schildichat_enabled else [])
  335. +
  336. ([{'name': 'matrix-client-fluffychat.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'fluffychat', 'client-fluffychat']}] if matrix_client_fluffychat_enabled else [])
  337. +
  338. ([{'name': ('matrix-' + matrix_homeserver_implementation + '.service'), 'priority': 1000, 'groups': ['matrix', 'homeservers', matrix_homeserver_implementation]}] if matrix_homeserver_enabled else [])
  339. +
  340. ([{'name': 'matrix-corporal.service', 'priority': 1500, 'groups': ['matrix', 'corporal']}] if matrix_corporal_enabled else [])
  341. +
  342. ([{'name': (coturn_identifier + '.service'), 'priority': (1500 if devture_systemd_service_manager_service_restart_mode == 'one-by-one' else 900), 'groups': ['matrix', 'coturn']}] if coturn_enabled else [])
  343. +
  344. ([{'name': 'matrix-matrixto.service', 'priority': 4000, 'groups': ['matrix', 'matrixto']}] if matrix_matrixto_enabled else [])
  345. +
  346. ([{'name': 'matrix-rageshake.service', 'priority': 4000, 'groups': ['matrix', 'rageshake']}] if matrix_rageshake_enabled else [])
  347. +
  348. ([{'name': (coturn_identifier + '-reload.timer'), 'priority': 5000, 'groups': ['matrix', 'coturn']}] if (coturn_enabled and coturn_tls_enabled) else [])
  349. +
  350. ([{'name': (ddclient_identifier + '.service'), 'priority': 5000, 'groups': ['matrix', 'ddclient', 'dynamic-dns']}] if ddclient_enabled else [])
  351. +
  352. ([{'name': (etherpad_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'etherpad']}] if etherpad_enabled else [])
  353. +
  354. ([{'name': (grafana_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'monitoring', 'grafana']}] if grafana_enabled else [])
  355. +
  356. ([{'name': (jitsi_identifier + '-web.service'), 'priority': 4200, 'groups': ['matrix', 'jitsi', 'jitsi-web']}] if jitsi_enabled else [])
  357. +
  358. ([{'name': (jitsi_identifier + '-prosody.service'), 'priority': 4000, 'groups': ['matrix', 'jitsi', 'jitsi-prosody']}] if jitsi_enabled else [])
  359. +
  360. ([{'name': (jitsi_identifier + '-jicofo.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jicofo']}] if jitsi_enabled else [])
  361. +
  362. ([{'name': (jitsi_identifier + '-jvb.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jvb']}] if jitsi_enabled else [])
  363. +
  364. ([{'name': 'matrix-ldap-registration-proxy.service', 'priority': 2000, 'groups': ['matrix', 'ldap-registration-proxy']}] if matrix_ldap_registration_proxy_enabled else [])
  365. +
  366. ([{'name': (matrix_media_repo_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'matrix-media-repo']}] if matrix_media_repo_enabled else [])
  367. +
  368. ([{'name': (exim_relay_identifier ~ '.service'), 'priority': 800, 'groups': ['matrix', 'mailer', 'exim-relay']}] if exim_relay_enabled else [])
  369. +
  370. ([{'name': (ntfy_identifier + '.service'), 'priority': 800, 'groups': ['matrix', 'ntfy']}] if ntfy_enabled else [])
  371. +
  372. ([{'name': (postgres_identifier + '.service'), 'priority': 500, 'groups': ['matrix', 'postgres']}] if postgres_enabled else [])
  373. +
  374. ([{'name': (postgres_backup_identifier + '.service'), 'priority': 5000, 'groups': ['matrix', 'backup', 'postgres-backup']}] if postgres_backup_enabled else [])
  375. +
  376. ([{'name': (prometheus_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'monitoring', 'prometheus']}] if prometheus_enabled else [])
  377. +
  378. ([{'name': (prometheus_node_exporter_identifier + '.service'), 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-node-exporter']}] if prometheus_node_exporter_enabled else [])
  379. +
  380. ([{'name': (prometheus_postgres_exporter_identifier + '.service'), 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-postgres-exporter']}] if prometheus_postgres_exporter_enabled else [])
  381. +
  382. ([{'name': 'matrix-prometheus-nginxlog-exporter.service', 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-nginxlog-exporter']}] if matrix_prometheus_nginxlog_exporter_enabled else [])
  383. +
  384. ([{'name': (valkey_identifier + '.service'), 'priority': 750, 'groups': ['matrix', 'valkey']}] if valkey_enabled else [])
  385. +
  386. ([{'name': 'matrix-pantalaimon.service', 'priority': 4000, 'groups': ['matrix', 'pantalaimon']}] if matrix_pantalaimon_enabled else [])
  387. +
  388. ([{'name': 'matrix-element-admin.service', 'priority': 4000, 'groups': ['matrix', 'element-admin']}] if matrix_element_admin_enabled else [])
  389. +
  390. ([{'name': 'matrix-element-call.service', 'priority': 4000, 'groups': ['matrix', 'element-call']}] if matrix_element_call_enabled else [])
  391. +
  392. ([{'name': 'matrix-livekit-jwt-service.service', 'priority': 3500, 'groups': ['matrix', 'livekit-jwt-service']}] if matrix_livekit_jwt_service_enabled else [])
  393. +
  394. ([{'name': (livekit_server_identifier + '.service'), 'priority': 3000, 'groups': ['matrix', 'livekit-server']}] if livekit_server_enabled else [])
  395. +
  396. ([{'name': 'matrix-registration.service', 'priority': 4000, 'groups': ['matrix', 'registration', 'matrix-registration']}] if matrix_registration_enabled else [])
  397. +
  398. ([{'name': 'matrix-sygnal.service', 'priority': 800, 'groups': ['matrix', 'sygnal']}] if matrix_sygnal_enabled else [])
  399. +
  400. ([{'name': 'matrix-goofys.service', 'priority': 800, 'groups': ['matrix', 'goofys']}] if matrix_s3_media_store_enabled else [])
  401. +
  402. ([{'name': 'matrix-synapse-s3-storage-provider-migrate.timer', 'priority': 5000, 'groups': ['matrix']}] if matrix_synapse_ext_synapse_s3_storage_provider_enabled else [])
  403. +
  404. ([{'name': 'matrix-synapse-auto-compressor.timer', 'priority': 5000, 'groups': ['matrix', 'synapse-auto-compressor']}] if matrix_synapse_auto_compressor_enabled else [])
  405. +
  406. ([{'name': 'matrix-synapse-admin.service', 'priority': 4000, 'groups': ['matrix', 'synapse-admin']}] if matrix_synapse_admin_enabled else [])
  407. +
  408. ([{'name': (matrix_synapse_usage_exporter_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'synapse-usage-exporter']}] if matrix_synapse_usage_exporter_enabled else [])
  409. +
  410. ([{'name': 'matrix-synapse-reverse-proxy-companion.service', 'priority': 1500, 'groups': ['matrix', 'homeservers', 'synapse', 'synapse-reverse-proxy-companion', 'reverse-proxies']}] if matrix_synapse_reverse_proxy_companion_enabled else [])
  411. +
  412. ([{'name': 'matrix-user-verification-service.service', 'priority': 800, 'groups': ['matrix', 'matrix-user-verification-service']}] if matrix_user_verification_service_enabled else [])
  413. +
  414. ([{'name': (matrix_static_files_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'matrix-static-files']}] if matrix_static_files_enabled else [])
  415. +
  416. ([{'name': (container_socket_proxy_identifier + '.service'), 'priority': 200, 'groups': ['matrix', 'reverse-proxies', 'container-socket-proxy']}] if container_socket_proxy_enabled else [])
  417. +
  418. ([{'name': (traefik_identifier + '.service'), 'priority': 250, 'groups': ['matrix', 'traefik', 'reverse-proxies']}] if traefik_enabled else [])
  419. +
  420. ([{'name': (traefik_certs_dumper_identifier + '.service'), 'priority': 300, 'groups': ['matrix', 'traefik-certs-dumper']}] if traefik_certs_dumper_enabled else [])
  421. }}
  422. ########################################################################
  423. # #
  424. # /com.devture.ansible.role.systemd_service_manager #
  425. # #
  426. ########################################################################
  427. ########################################################################
  428. # #
  429. # com.devture.ansible.role.timesync #
  430. # #
  431. ########################################################################
  432. # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.
  433. ########################################################################
  434. # #
  435. # /com.devture.ansible.role.timesync #
  436. # #
  437. ########################################################################
  438. ######################################################################
  439. #
  440. # com.devture.ansible.role.playbook_state_preserver
  441. #
  442. ######################################################################
  443. # To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
  444. devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
  445. devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
  446. devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
  447. devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
  448. ######################################################################
  449. #
  450. # /com.devture.ansible.role.playbook_state_preserver
  451. #
  452. ######################################################################
  453. ########################################################################
  454. # #
  455. # geerlingguy/ansible-role-docker #
  456. # #
  457. ########################################################################
  458. docker_daemon_options: "{{ matrix_playbook_docker_installation_daemon_options }}"
  459. ########################################################################
  460. # #
  461. # /geerlingguy/ansible-role-docker #
  462. # #
  463. ########################################################################
  464. ######################################################################
  465. #
  466. # matrix-base
  467. #
  468. ######################################################################
  469. matrix_homeserver_systemd_services_list: |-
  470. {{
  471. (
  472. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation != 'synapse' else [])
  473. +
  474. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation == 'synapse' and not matrix_synapse_reverse_proxy_companion_enabled else [])
  475. +
  476. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  477. ) | unique
  478. }}
  479. matrix_homeserver_container_client_api_endpoint: |-
  480. {{
  481. {
  482. 'synapse': ('matrix-synapse-reverse-proxy-companion:8008' if matrix_synapse_reverse_proxy_companion_enabled | default(false) else ('matrix-synapse:'+ matrix_synapse_container_client_api_port | default('8008') | string)),
  483. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  484. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  485. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  486. }[matrix_homeserver_implementation]
  487. }}
  488. matrix_homeserver_container_federation_api_endpoint: |-
  489. {{
  490. {
  491. 'synapse': ('matrix-synapse-reverse-proxy-companion:8048' if matrix_synapse_reverse_proxy_companion_enabled else ('matrix-synapse:'+ matrix_synapse_container_federation_api_plain_port | default('8008') | string)),
  492. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  493. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  494. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  495. }[matrix_homeserver_implementation]
  496. }}
  497. matrix_integration_manager_rest_url: ""
  498. matrix_integration_manager_ui_url: ""
  499. ######################################################################
  500. #
  501. # /matrix-base
  502. #
  503. ######################################################################
  504. ######################################################################
  505. #
  506. # matrix-alertmanager-receiver
  507. #
  508. ######################################################################
  509. # We don't enable this by default.
  510. matrix_alertmanager_receiver_enabled: false
  511. matrix_alertmanager_receiver_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_alertmanager_receiver_container_image_registry_prefix_upstream_default }}"
  512. matrix_alertmanager_receiver_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  513. matrix_alertmanager_receiver_container_network: "{{ matrix_addons_container_network }}"
  514. matrix_alertmanager_receiver_container_additional_networks_auto: |-
  515. {{
  516. (
  517. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  518. +
  519. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_alertmanager_receiver_container_labels_traefik_enabled) else [])
  520. ) | unique
  521. }}
  522. matrix_alertmanager_receiver_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  523. matrix_alertmanager_receiver_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  524. matrix_alertmanager_receiver_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  525. matrix_alertmanager_receiver_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  526. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  527. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  528. matrix_alertmanager_receiver_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  529. matrix_alertmanager_receiver_config_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  530. matrix_alertmanager_receiver_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  531. matrix_alertmanager_receiver_metrics_proxying_enabled: "{{ matrix_alertmanager_receiver_config_http_metrics_enabled and matrix_metrics_exposure_enabled }}"
  532. matrix_alertmanager_receiver_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  533. matrix_alertmanager_receiver_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-alertmanager-receiver"
  534. ######################################################################
  535. #
  536. # /matrix-alertmanager-receiver
  537. #
  538. ######################################################################
  539. ######################################################################
  540. #
  541. # matrix-authentication-service
  542. #
  543. ######################################################################
  544. matrix_authentication_service_enabled: false
  545. matrix_authentication_service_hostname: "{{ matrix_server_fqn_matrix }}"
  546. matrix_authentication_service_path_prefix: /auth
  547. matrix_authentication_service_config_database_host: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  548. matrix_authentication_service_config_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mas.db') | hash('sha512') | to_uuid }}"
  549. matrix_authentication_service_config_matrix_homeserver: "{{ matrix_domain }}"
  550. matrix_authentication_service_config_matrix_secret: "{{ (matrix_homeserver_generic_secret_key + ':mas.hs.secret') | hash('sha512') | to_uuid }}"
  551. matrix_authentication_service_config_matrix_endpoint: "{{ matrix_homeserver_container_url }}"
  552. # We're using a non-default configuration which:
  553. # - allows passwords from Synapse (hashed with bcrypt) to be imported with scheme version 1 so existing users will be able to login
  554. # - as soon as they do one login, the hash will be 'upgraded' to argon2id
  555. matrix_authentication_service_config_passwords_schemes:
  556. - version: 1
  557. secret: "{{ matrix_synapse_password_config_pepper }}"
  558. algorithm: bcrypt
  559. unicode_normalization: true
  560. - version: 2
  561. algorithm: argon2id
  562. matrix_authentication_service_config_email_transport: "{{ 'smtp' if exim_relay_enabled else 'blackhole' }}"
  563. matrix_authentication_service_config_email_hostname: "{{ exim_relay_identifier if exim_relay_enabled else '' }}"
  564. matrix_authentication_service_config_email_port: "{{ 8025 if exim_relay_enabled else 587 }}"
  565. matrix_authentication_service_config_email_mode: "{{ 'plain' if exim_relay_enabled else 'starttls' }}"
  566. matrix_authentication_service_config_email_from_address: "{{ exim_relay_sender_address }}"
  567. matrix_authentication_service_admin_api_enabled: "{{ matrix_element_admin_enabled }}"
  568. matrix_authentication_service_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_authentication_service_container_image_registry_prefix_upstream_default }}"
  569. matrix_authentication_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  570. matrix_authentication_service_container_network: "{{ matrix_homeserver_container_network }}"
  571. matrix_authentication_service_container_additional_networks_auto: |-
  572. {{
  573. (
  574. ([postgres_container_network] if postgres_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname else [])
  575. +
  576. ([exim_relay_container_network] if (exim_relay_enabled and matrix_authentication_service_config_email_transport == 'smtp' and matrix_authentication_service_config_email_hostname == exim_relay_identifier and matrix_authentication_service_container_network != exim_relay_container_network) else [])
  577. +
  578. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_authentication_service_container_labels_traefik_enabled else [])
  579. ) | unique
  580. }}
  581. matrix_authentication_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  582. matrix_authentication_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  583. matrix_authentication_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  584. matrix_authentication_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  585. matrix_authentication_service_container_labels_public_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  586. matrix_authentication_service_container_labels_public_compatibility_layer_hostname: "{{ matrix_server_fqn_matrix }}"
  587. matrix_authentication_service_container_labels_internal_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  588. matrix_authentication_service_container_labels_internal_compatibility_layer_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  589. # MAS somewhat depends on the homeserver service, but the homeserver also depends on MAS.
  590. # To avoid a circular dependency, we make MAS not depend on the homeserver here.
  591. # The homeserver is more lost without MAS than MAS is without the homeserver, so we'll define the dependency on the homeserver side.
  592. # We'll put our dependency on the homeserver as a "want", rather than a requirement.
  593. matrix_authentication_service_systemd_required_services_list_auto: |
  594. {{
  595. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname else [])
  596. }}
  597. # See more information about this homeserver "want" in the comment for `matrix_authentication_service_systemd_required_services_list_auto` above.
  598. matrix_authentication_service_systemd_wanted_services_list_auto: |
  599. {{
  600. ['matrix-' + matrix_homeserver_implementation + '.service']
  601. +
  602. ([exim_relay_identifier ~ '.service'] if (exim_relay_enabled and matrix_authentication_service_config_email_transport == 'smtp' and matrix_authentication_service_config_email_hostname == exim_relay_identifier and matrix_authentication_service_container_network != exim_relay_container_network) else [])
  603. }}
  604. matrix_authentication_service_syn2mas_container_network: "{{ postgres_container_network if postgres_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname else matrix_authentication_service_container_network }}"
  605. matrix_authentication_service_syn2mas_synapse_homeserver_config_path: "{{ matrix_synapse_config_dir_path + '/homeserver.yaml' if matrix_synapse_enabled else '' }}"
  606. ######################################################################
  607. #
  608. # /matrix-authentication-service
  609. #
  610. ######################################################################
  611. ######################################################################
  612. #
  613. # matrix-bridge-appservice-discord
  614. #
  615. ######################################################################
  616. # We don't enable bridges by default.
  617. matrix_appservice_discord_enabled: false
  618. matrix_appservice_discord_systemd_required_services_list_auto: |
  619. {{
  620. matrix_addons_homeserver_systemd_services_list
  621. +
  622. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  623. }}
  624. matrix_appservice_discord_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_discord_docker_image_registry_prefix_upstream_default }}"
  625. matrix_appservice_discord_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9005') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  626. matrix_appservice_discord_container_network: "{{ matrix_addons_container_network }}"
  627. matrix_appservice_discord_container_additional_networks_auto: |-
  628. {{
  629. (
  630. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  631. +
  632. ([postgres_container_network] if (postgres_enabled and matrix_appservice_discord_database_hostname == postgres_connection_hostname and matrix_appservice_discord_container_network != postgres_container_network) else [])
  633. ) | unique
  634. }}
  635. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  636. matrix_appservice_discord_bridge_disablePresence: "{{ (not matrix_synapse_presence_enabled) if matrix_homeserver_implementation == 'synapse' else false }}"
  637. matrix_appservice_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.as.token') | hash('sha512') | to_uuid }}"
  638. matrix_appservice_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.hs.token') | hash('sha512') | to_uuid }}"
  639. # We only make this use Postgres if our own Postgres server is enabled.
  640. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  641. matrix_appservice_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  642. matrix_appservice_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  643. matrix_appservice_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.discord.db') | hash('sha512') | to_uuid }}"
  644. ######################################################################
  645. #
  646. # /matrix-bridge-appservice-discord
  647. #
  648. ######################################################################
  649. ######################################################################
  650. #
  651. # matrix-appservice-slack
  652. #
  653. ######################################################################
  654. # We don't enable bridges by default.
  655. matrix_appservice_slack_enabled: false
  656. matrix_appservice_slack_hostname: "{{ matrix_server_fqn_matrix }}"
  657. matrix_appservice_slack_systemd_required_services_list_auto: |
  658. {{
  659. matrix_addons_homeserver_systemd_services_list
  660. +
  661. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_slack_database_hostname == postgres_connection_hostname) else [])
  662. }}
  663. matrix_appservice_slack_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_slack_docker_image_registry_prefix_upstream_default }}"
  664. matrix_appservice_slack_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  665. matrix_appservice_slack_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ matrix_appservice_slack_slack_port) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  666. matrix_appservice_slack_container_network: "{{ matrix_addons_container_network }}"
  667. matrix_appservice_slack_container_additional_networks_auto: |-
  668. {{
  669. (
  670. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  671. +
  672. ([postgres_container_network] if (postgres_enabled and matrix_appservice_slack_database_hostname == postgres_connection_hostname and matrix_appservice_slack_container_network != postgres_container_network) else [])
  673. +
  674. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_appservice_slack_container_labels_traefik_enabled) else [])
  675. ) | unique
  676. }}
  677. matrix_appservice_slack_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  678. matrix_appservice_slack_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  679. matrix_appservice_slack_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  680. matrix_appservice_slack_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  681. matrix_appservice_slack_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':slack.as.token') | hash('sha512') | to_uuid }}"
  682. matrix_appservice_slack_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  683. matrix_appservice_slack_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':slack.hs.token') | hash('sha512') | to_uuid }}"
  684. matrix_appservice_slack_id_token: "{{ (matrix_homeserver_generic_secret_key + ':slack.id.token') | hash('sha512') | to_uuid }}"
  685. # Postgres is the default, except if not using internal Postgres server
  686. matrix_appservice_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
  687. matrix_appservice_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  688. matrix_appservice_slack_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.slack.db') | hash('sha512') | to_uuid }}"
  689. matrix_appservice_slack_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
  690. ######################################################################
  691. #
  692. # /matrix-bridge-appservice-slack
  693. #
  694. ######################################################################
  695. ######################################################################
  696. #
  697. # matrix-bridge-appservice-irc
  698. #
  699. ######################################################################
  700. # We don't enable bridges by default.
  701. matrix_appservice_irc_enabled: false
  702. matrix_appservice_irc_systemd_required_services_list_auto: |
  703. {{
  704. matrix_addons_homeserver_systemd_services_list
  705. +
  706. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  707. }}
  708. matrix_appservice_irc_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_irc_docker_image_registry_prefix_upstream_default }}"
  709. matrix_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  710. matrix_appservice_irc_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9999') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  711. matrix_appservice_irc_container_network: "{{ matrix_addons_container_network }}"
  712. matrix_appservice_irc_container_additional_networks_auto: |-
  713. {{
  714. (
  715. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  716. +
  717. ([postgres_container_network] if (postgres_enabled and matrix_appservice_irc_database_hostname == postgres_connection_hostname and matrix_appservice_irc_container_network != postgres_container_network) else [])
  718. +
  719. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_appservice_irc_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  720. ) | unique
  721. }}
  722. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  723. # IRC bridge presence, for performance reasons.
  724. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled if matrix_homeserver_implementation == 'synapse' else true }}"
  725. matrix_appservice_irc_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.as.token') | hash('sha512') | to_uuid }}"
  726. matrix_appservice_irc_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  727. matrix_appservice_irc_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.hs.token') | hash('sha512') | to_uuid }}"
  728. matrix_appservice_irc_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
  729. matrix_appservice_irc_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  730. matrix_appservice_irc_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.irc.db') | hash('sha512') | to_uuid }}"
  731. matrix_appservice_irc_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
  732. matrix_appservice_irc_ircService_mediaProxy_publicUrl_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}" # noqa var-naming
  733. matrix_appservice_irc_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  734. matrix_appservice_irc_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  735. matrix_appservice_irc_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  736. matrix_appservice_irc_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
  737. ######################################################################
  738. #
  739. # /matrix-bridge-appservice-irc
  740. #
  741. ######################################################################
  742. ######################################################################
  743. #
  744. # matrix-bridge-appservice-kakaotalk
  745. #
  746. ######################################################################
  747. # We don't enable bridges by default.
  748. matrix_appservice_kakaotalk_enabled: false
  749. matrix_appservice_kakaotalk_systemd_required_services_list_auto: |
  750. {{
  751. matrix_addons_homeserver_systemd_services_list
  752. +
  753. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_kakaotalk_database_hostname == postgres_connection_hostname) else [])
  754. }}
  755. matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream_default }}"
  756. matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream_default }}"
  757. matrix_appservice_kakaotalk_container_network: "{{ matrix_addons_container_network }}"
  758. matrix_appservice_kakaotalk_container_additional_networks_auto: |-
  759. {{
  760. (
  761. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  762. +
  763. ([postgres_container_network] if (postgres_enabled and matrix_appservice_kakaotalk_database_hostname == postgres_connection_hostname and matrix_appservice_kakaotalk_container_network != postgres_container_network) else [])
  764. ) | unique
  765. }}
  766. matrix_appservice_kakaotalk_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':as.kakao.hs') | hash('sha512') | to_uuid }}"
  767. matrix_appservice_kakaotalk_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  768. matrix_appservice_kakaotalk_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':as.kakao.hs') | hash('sha512') | to_uuid }}"
  769. matrix_appservice_kakaotalk_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  770. matrix_appservice_kakaotalk_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  771. matrix_appservice_kakaotalk_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  772. matrix_appservice_kakaotalk_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  773. matrix_appservice_kakaotalk_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.kakao.db') | hash('sha512') | to_uuid }}"
  774. ######################################################################
  775. #
  776. # /matrix-bridge-appservice-kakaotalk
  777. #
  778. ######################################################################
  779. ######################################################################
  780. #
  781. # matrix-bridge-beeper-linkedin
  782. #
  783. ######################################################################
  784. # We don't enable bridges by default.
  785. matrix_beeper_linkedin_enabled: false
  786. matrix_beeper_linkedin_systemd_required_services_list_auto: |
  787. {{
  788. matrix_addons_homeserver_systemd_services_list
  789. +
  790. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  791. }}
  792. matrix_beeper_linkedin_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_beeper_linkedin_docker_image_registry_prefix_upstream_default }}"
  793. matrix_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  794. matrix_beeper_linkedin_container_network: "{{ matrix_addons_container_network }}"
  795. matrix_beeper_linkedin_container_additional_networks_auto: |-
  796. {{
  797. (
  798. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  799. +
  800. ([postgres_container_network] if (postgres_enabled and matrix_beeper_linkedin_database_hostname == postgres_connection_hostname and matrix_beeper_linkedin_container_network != postgres_container_network) else [])
  801. ) | unique
  802. }}
  803. matrix_beeper_linkedin_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':linked.as.token') | hash('sha512') | to_uuid }}"
  804. matrix_beeper_linkedin_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  805. matrix_beeper_linkedin_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':linked.hs.token') | hash('sha512') | to_uuid }}"
  806. matrix_beeper_linkedin_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  807. matrix_beeper_linkedin_bridge_login_shared_secret_map_auto: |-
  808. {{
  809. ({
  810. matrix_beeper_linkedin_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  811. })
  812. if matrix_appservice_double_puppet_enabled
  813. else (
  814. {matrix_beeper_linkedin_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  815. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  816. else {}
  817. )
  818. }}
  819. matrix_beeper_linkedin_bridge_presence: "{{ (matrix_synapse_presence_enabled if matrix_synapse_enabled else true) if matrix_homeserver_implementation == 'synapse' else true }}"
  820. matrix_beeper_linkedin_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  821. matrix_beeper_linkedin_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maulinkedin.db') | hash('sha512') | to_uuid }}"
  822. ######################################################################
  823. #
  824. # /matrix-bridge-beeper-linkedin
  825. #
  826. ######################################################################
  827. ######################################################################
  828. #
  829. # matrix-bridge-mautrix-bluesky
  830. #
  831. ######################################################################
  832. # We don't enable bridges by default.
  833. matrix_mautrix_bluesky_enabled: false
  834. matrix_mautrix_bluesky_systemd_required_services_list_auto: |
  835. {{
  836. matrix_addons_homeserver_systemd_services_list
  837. +
  838. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  839. }}
  840. matrix_mautrix_bluesky_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_bluesky_docker_image_registry_prefix_upstream_default }}"
  841. matrix_mautrix_bluesky_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  842. matrix_mautrix_bluesky_container_network: "{{ matrix_addons_container_network }}"
  843. matrix_mautrix_bluesky_container_additional_networks_auto: |-
  844. {{
  845. (
  846. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  847. +
  848. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_bluesky_database_hostname == postgres_connection_hostname and matrix_mautrix_bluesky_container_network != postgres_container_network) else [])
  849. +
  850. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_bluesky_container_labels_traefik_enabled else [])
  851. ) | unique
  852. }}
  853. matrix_mautrix_bluesky_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  854. matrix_mautrix_bluesky_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  855. matrix_mautrix_bluesky_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  856. matrix_mautrix_bluesky_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  857. matrix_mautrix_bluesky_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  858. matrix_mautrix_bluesky_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  859. matrix_mautrix_bluesky_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':bsky.as.token') | hash('sha512') | to_uuid }}"
  860. matrix_mautrix_bluesky_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  861. matrix_mautrix_bluesky_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':bsky.hs.token') | hash('sha512') | to_uuid }}"
  862. matrix_mautrix_bluesky_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  863. matrix_mautrix_bluesky_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.bsky.prov') | hash('sha512') | to_uuid }}"
  864. matrix_mautrix_bluesky_double_puppet_secrets_auto: |-
  865. {{
  866. ({
  867. matrix_mautrix_bluesky_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  868. })
  869. if matrix_appservice_double_puppet_enabled
  870. else {}
  871. }}
  872. matrix_mautrix_bluesky_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  873. matrix_mautrix_bluesky_metrics_proxying_enabled: "{{ matrix_mautrix_bluesky_metrics_enabled and matrix_metrics_exposure_enabled }}"
  874. matrix_mautrix_bluesky_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  875. matrix_mautrix_bluesky_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-bluesky"
  876. matrix_mautrix_bluesky_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  877. matrix_mautrix_bluesky_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  878. ######################################################################
  879. #
  880. # /matrix-bridge-mautrix-bluesky
  881. #
  882. ######################################################################
  883. ######################################################################
  884. #
  885. # matrix-bridge-mautrix-discord
  886. #
  887. ######################################################################
  888. # We don't enable bridges by default.
  889. matrix_mautrix_discord_enabled: false
  890. matrix_mautrix_discord_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_discord_docker_image_registry_prefix_upstream_default }}"
  891. matrix_mautrix_discord_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  892. matrix_mautrix_discord_container_network: "{{ matrix_addons_container_network }}"
  893. matrix_mautrix_discord_container_additional_networks_auto: |-
  894. {{
  895. (
  896. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  897. +
  898. ([postgres_container_network] if postgres_enabled and matrix_mautrix_discord_database_hostname == postgres_connection_hostname else [])
  899. +
  900. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_discord_container_labels_traefik_enabled) else [])
  901. ) | unique
  902. }}
  903. matrix_mautrix_discord_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  904. matrix_mautrix_discord_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  905. matrix_mautrix_discord_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  906. matrix_mautrix_discord_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  907. matrix_mautrix_discord_systemd_required_services_list_auto: |
  908. {{
  909. matrix_addons_homeserver_systemd_services_list
  910. +
  911. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  912. }}
  913. matrix_mautrix_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.as.tok') | hash('sha512') | to_uuid }}"
  914. matrix_mautrix_discord_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  915. matrix_mautrix_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.hs.tok') | hash('sha512') | to_uuid }}"
  916. matrix_mautrix_discord_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  917. matrix_mautrix_discord_bridge_avatar_proxy_key: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.avatar') | hash('sha512') | to_uuid }}"
  918. matrix_mautrix_discord_hostname: "{{ matrix_server_fqn_matrix }}"
  919. matrix_mautrix_discord_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  920. matrix_mautrix_discord_bridge_login_shared_secret_map_auto: |-
  921. {{
  922. ({
  923. matrix_mautrix_discord_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  924. })
  925. if matrix_appservice_double_puppet_enabled
  926. else (
  927. {matrix_mautrix_discord_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  928. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  929. else {}
  930. )
  931. }}
  932. # Postgres is the default, except if not using internal Postgres server
  933. matrix_mautrix_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  934. matrix_mautrix_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  935. matrix_mautrix_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maudiscord.db') | hash('sha512') | to_uuid }}"
  936. ######################################################################
  937. #
  938. # /matrix-bridge-mautrix-discord
  939. #
  940. ######################################################################
  941. ######################################################################
  942. #
  943. # matrix-bridge-mautrix-slack
  944. #
  945. ######################################################################
  946. # We don't enable bridges by default.
  947. matrix_mautrix_slack_enabled: false
  948. matrix_mautrix_slack_systemd_required_services_list_auto: |
  949. {{
  950. matrix_addons_homeserver_systemd_services_list
  951. +
  952. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  953. }}
  954. matrix_mautrix_slack_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_slack_docker_image_registry_prefix_upstream_default }}"
  955. matrix_mautrix_slack_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  956. matrix_mautrix_slack_container_network: "{{ matrix_addons_container_network }}"
  957. matrix_mautrix_slack_container_additional_networks_auto: |-
  958. {{
  959. (
  960. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  961. +
  962. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_slack_database_hostname == postgres_connection_hostname and matrix_mautrix_slack_container_network != postgres_container_network) else [])
  963. ) | unique
  964. }}
  965. matrix_mautrix_slack_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.as.tok') | hash('sha512') | to_uuid }}"
  966. matrix_mautrix_slack_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  967. matrix_mautrix_slack_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.hs.tok') | hash('sha512') | to_uuid }}"
  968. matrix_mautrix_slack_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  969. matrix_mautrix_slack_double_puppet_secrets_auto: |-
  970. {{
  971. {
  972. matrix_mautrix_slack_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  973. }
  974. if matrix_appservice_double_puppet_enabled
  975. else {}
  976. }}
  977. # Postgres is the default, except if not using internal Postgres server
  978. matrix_mautrix_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  979. matrix_mautrix_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  980. matrix_mautrix_slack_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.db') | hash('sha512') | to_uuid }}"
  981. matrix_mautrix_slack_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.slack.prov') | hash('sha512') | to_uuid }}"
  982. matrix_mautrix_slack_public_media_signing_key: "{{ (matrix_homeserver_generic_secret_key + ':mau.slack.pmed') | hash('sha512') | to_uuid }}"
  983. ######################################################################
  984. #
  985. # /matrix-bridge-mautrix-slack
  986. #
  987. ######################################################################
  988. ######################################################################
  989. #
  990. # matrix-bridge-mautrix-googlechat
  991. #
  992. ######################################################################
  993. # We don't enable bridges by default.
  994. matrix_mautrix_googlechat_enabled: false
  995. matrix_mautrix_googlechat_systemd_required_services_list_auto: |
  996. {{
  997. matrix_addons_homeserver_systemd_services_list
  998. +
  999. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  1000. }}
  1001. matrix_mautrix_googlechat_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_googlechat_docker_image_registry_prefix_upstream_default }}"
  1002. matrix_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1003. matrix_mautrix_googlechat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9007') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1004. matrix_mautrix_googlechat_container_network: "{{ matrix_addons_container_network }}"
  1005. matrix_mautrix_googlechat_container_additional_networks_auto: |-
  1006. {{
  1007. (
  1008. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1009. +
  1010. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_googlechat_database_hostname == postgres_connection_hostname and matrix_mautrix_googlechat_container_network != postgres_container_network) else [])
  1011. +
  1012. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1013. ) | unique
  1014. }}
  1015. matrix_mautrix_googlechat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1016. matrix_mautrix_googlechat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1017. matrix_mautrix_googlechat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1018. matrix_mautrix_googlechat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1019. matrix_mautrix_googlechat_container_labels_public_endpoint_hostname: "{{ matrix_server_fqn_matrix }}"
  1020. matrix_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1021. matrix_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1022. matrix_mautrix_googlechat_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gc.as.token') | hash('sha512') | to_uuid }}"
  1023. matrix_mautrix_googlechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1024. matrix_mautrix_googlechat_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gc.hs.token') | hash('sha512') | to_uuid }}"
  1025. matrix_mautrix_googlechat_login_shared_secret: |-
  1026. {{
  1027. ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1028. if matrix_appservice_double_puppet_enabled
  1029. else (
  1030. matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1031. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1032. else ""
  1033. )
  1034. }}
  1035. matrix_mautrix_googlechat_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1036. matrix_mautrix_googlechat_metrics_proxying_enabled: "{{ matrix_mautrix_googlechat_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1037. matrix_mautrix_googlechat_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1038. matrix_mautrix_googlechat_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-googlechat"
  1039. # Postgres is the default, except if not using internal Postgres server
  1040. matrix_mautrix_googlechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1041. matrix_mautrix_googlechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1042. matrix_mautrix_googlechat_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.gc.db') | hash('sha512') | to_uuid }}"
  1043. ######################################################################
  1044. #
  1045. # /matrix-bridge-mautrix-googlechat
  1046. #
  1047. ######################################################################
  1048. ######################################################################
  1049. #
  1050. # matrix-bridge-mautrix-signal
  1051. #
  1052. ######################################################################
  1053. # We don't enable bridges by default.
  1054. matrix_mautrix_signal_enabled: false
  1055. matrix_mautrix_signal_systemd_required_services_list_auto: |
  1056. {{
  1057. matrix_addons_homeserver_systemd_services_list
  1058. +
  1059. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  1060. }}
  1061. matrix_mautrix_signal_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_signal_docker_image_registry_prefix_upstream_default }}"
  1062. matrix_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1063. matrix_mautrix_signal_container_network: "{{ matrix_addons_container_network }}"
  1064. matrix_mautrix_signal_container_additional_networks_auto: |-
  1065. {{
  1066. (
  1067. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1068. +
  1069. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_signal_database_hostname == postgres_connection_hostname and matrix_mautrix_signal_container_network != postgres_container_network) else [])
  1070. +
  1071. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_signal_container_labels_traefik_enabled else [])
  1072. ) | unique
  1073. }}
  1074. matrix_mautrix_signal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1075. matrix_mautrix_signal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1076. matrix_mautrix_signal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1077. matrix_mautrix_signal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1078. matrix_mautrix_signal_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1079. matrix_mautrix_signal_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1080. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  1081. matrix_mautrix_signal_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1082. matrix_mautrix_signal_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':si.hs.token') | hash('sha512') | to_uuid }}"
  1083. matrix_mautrix_signal_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1084. matrix_mautrix_signal_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':si.as.token') | hash('sha512') | to_uuid }}"
  1085. matrix_mautrix_signal_double_puppet_secrets_auto: |-
  1086. {{
  1087. {
  1088. matrix_mautrix_signal_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1089. }
  1090. if matrix_appservice_double_puppet_enabled
  1091. else {}
  1092. }}
  1093. matrix_mautrix_signal_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1094. matrix_mautrix_signal_metrics_proxying_enabled: "{{ matrix_mautrix_signal_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1095. matrix_mautrix_signal_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1096. matrix_mautrix_signal_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-signal"
  1097. matrix_mautrix_signal_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1098. matrix_mautrix_signal_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1099. matrix_mautrix_signal_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.db') | hash('sha512') | to_uuid }}"
  1100. matrix_mautrix_signal_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.prov') | hash('sha512') | to_uuid }}"
  1101. matrix_mautrix_signal_public_media_signing_key: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.pmed') | hash('sha512') | to_uuid }}"
  1102. ######################################################################
  1103. #
  1104. # /matrix-bridge-mautrix-signal
  1105. #
  1106. ######################################################################
  1107. ######################################################################
  1108. #
  1109. # matrix-bridge-mautrix-meta-messenger
  1110. #
  1111. ######################################################################
  1112. # We don't enable bridges by default.
  1113. matrix_mautrix_meta_messenger_enabled: false
  1114. matrix_mautrix_meta_messenger_systemd_required_services_list_auto: |
  1115. {{
  1116. matrix_addons_homeserver_systemd_services_list
  1117. +
  1118. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  1119. }}
  1120. matrix_mautrix_meta_messenger_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_meta_messenger_container_image_registry_prefix_upstream_default }}"
  1121. matrix_mautrix_meta_messenger_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1122. matrix_mautrix_meta_messenger_container_network: "{{ matrix_addons_container_network }}"
  1123. matrix_mautrix_meta_messenger_container_additional_networks_auto: |-
  1124. {{
  1125. (
  1126. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1127. +
  1128. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_meta_messenger_database_hostname == postgres_connection_hostname and matrix_mautrix_meta_messenger_container_network != postgres_container_network) else [])
  1129. +
  1130. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_meta_messenger_container_labels_traefik_enabled) else [])
  1131. ) | unique
  1132. }}
  1133. matrix_mautrix_meta_messenger_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1134. matrix_mautrix_meta_messenger_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1135. matrix_mautrix_meta_messenger_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1136. matrix_mautrix_meta_messenger_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1137. matrix_mautrix_meta_messenger_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1138. matrix_mautrix_meta_messenger_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1139. matrix_mautrix_meta_messenger_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.as') | hash('sha512') | to_uuid }}"
  1140. matrix_mautrix_meta_messenger_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1141. matrix_mautrix_meta_messenger_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.hs') | hash('sha512') | to_uuid }}"
  1142. matrix_mautrix_meta_messenger_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1143. matrix_mautrix_meta_messenger_double_puppet_secrets_auto: |-
  1144. {{
  1145. {
  1146. matrix_mautrix_meta_messenger_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1147. }
  1148. if matrix_appservice_double_puppet_enabled
  1149. else {}
  1150. }}
  1151. matrix_mautrix_meta_messenger_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1152. matrix_mautrix_meta_messenger_metrics_proxying_enabled: "{{ matrix_mautrix_meta_messenger_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1153. matrix_mautrix_meta_messenger_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1154. matrix_mautrix_meta_messenger_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-meta-messenger"
  1155. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1156. # and point them to a migration path.
  1157. matrix_mautrix_meta_messenger_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1158. matrix_mautrix_meta_messenger_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1159. matrix_mautrix_meta_messenger_database_password: "{{ ((matrix_homeserver_generic_secret_key + ':mau.fb.db') | hash('sha512') | to_uuid) if (postgres_enabled and matrix_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1160. ######################################################################
  1161. #
  1162. # /matrix-bridge-mautrix-meta-messenger
  1163. #
  1164. ######################################################################
  1165. ######################################################################
  1166. #
  1167. # matrix-bridge-mautrix-meta-instagram
  1168. #
  1169. ######################################################################
  1170. # We don't enable bridges by default.
  1171. matrix_mautrix_meta_instagram_enabled: false
  1172. matrix_mautrix_meta_instagram_systemd_required_services_list_auto: |
  1173. {{
  1174. matrix_addons_homeserver_systemd_services_list
  1175. +
  1176. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  1177. }}
  1178. matrix_mautrix_meta_instagram_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_meta_instagram_container_image_registry_prefix_upstream_default }}"
  1179. matrix_mautrix_meta_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1180. matrix_mautrix_meta_instagram_container_network: "{{ matrix_addons_container_network }}"
  1181. matrix_mautrix_meta_instagram_container_additional_networks_auto: |-
  1182. {{
  1183. (
  1184. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1185. +
  1186. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname and matrix_mautrix_meta_instagram_container_network != postgres_container_network) else [])
  1187. +
  1188. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_meta_instagram_container_labels_traefik_enabled) else [])
  1189. ) | unique
  1190. }}
  1191. matrix_mautrix_meta_instagram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1192. matrix_mautrix_meta_instagram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1193. matrix_mautrix_meta_instagram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1194. matrix_mautrix_meta_instagram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1195. matrix_mautrix_meta_instagram_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1196. matrix_mautrix_meta_instagram_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1197. matrix_mautrix_meta_instagram_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.as') | hash('sha512') | to_uuid }}"
  1198. matrix_mautrix_meta_instagram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1199. matrix_mautrix_meta_instagram_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.hs') | hash('sha512') | to_uuid }}"
  1200. matrix_mautrix_meta_instagram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1201. matrix_mautrix_meta_instagram_double_puppet_secrets_auto: |-
  1202. {{
  1203. {
  1204. matrix_mautrix_meta_instagram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1205. }
  1206. if matrix_appservice_double_puppet_enabled
  1207. else {}
  1208. }}
  1209. matrix_mautrix_meta_instagram_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1210. matrix_mautrix_meta_instagram_metrics_proxying_enabled: "{{ matrix_mautrix_meta_instagram_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1211. matrix_mautrix_meta_instagram_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1212. matrix_mautrix_meta_instagram_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-meta-instagram"
  1213. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1214. # and point them to a migration path.
  1215. matrix_mautrix_meta_instagram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1216. matrix_mautrix_meta_instagram_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1217. matrix_mautrix_meta_instagram_database_password: "{{ ((matrix_homeserver_generic_secret_key + ':mau.fb.db') | hash('sha512') | to_uuid) if (postgres_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1218. ######################################################################
  1219. #
  1220. # /matrix-bridge-mautrix-meta-instagram
  1221. #
  1222. ######################################################################
  1223. ######################################################################
  1224. #
  1225. # matrix-bridge-mautrix-telegram
  1226. #
  1227. ######################################################################
  1228. # We don't enable bridges by default.
  1229. matrix_mautrix_telegram_enabled: false
  1230. matrix_mautrix_telegram_hostname: "{{ matrix_server_fqn_matrix }}"
  1231. matrix_mautrix_telegram_path_prefix: "/{{ (matrix_homeserver_generic_secret_key + ':telegram') | hash('sha512') | to_uuid }}"
  1232. matrix_mautrix_telegram_systemd_required_services_list_auto: |
  1233. {{
  1234. matrix_addons_homeserver_systemd_services_list
  1235. +
  1236. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  1237. }}
  1238. matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream_default }}"
  1239. matrix_mautrix_telegram_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_telegram_docker_image_registry_prefix_upstream_default }}"
  1240. # Images are multi-arch (amd64 and arm64, but not arm32).
  1241. matrix_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1242. matrix_mautrix_telegram_lottieconverter_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1243. matrix_mautrix_telegram_lottieconverter_container_image_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}"
  1244. matrix_mautrix_telegram_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9006') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1245. matrix_mautrix_telegram_container_network: "{{ matrix_addons_container_network }}"
  1246. matrix_mautrix_telegram_container_additional_networks_auto: |-
  1247. {{
  1248. (
  1249. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1250. +
  1251. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_telegram_database_hostname == postgres_connection_hostname and matrix_mautrix_telegram_container_network != postgres_container_network) else [])
  1252. +
  1253. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_telegram_container_labels_traefik_enabled) else [])
  1254. ) | unique
  1255. }}
  1256. matrix_mautrix_telegram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1257. matrix_mautrix_telegram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1258. matrix_mautrix_telegram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1259. matrix_mautrix_telegram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1260. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1261. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1262. matrix_mautrix_telegram_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':telegr.as.token') | hash('sha512') | to_uuid }}"
  1263. matrix_mautrix_telegram_homeserver_domain: "{{ matrix_domain }}"
  1264. matrix_mautrix_telegram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1265. matrix_mautrix_telegram_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':telegr.hs.token') | hash('sha512') | to_uuid }}"
  1266. matrix_mautrix_telegram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1267. matrix_mautrix_telegram_bridge_login_shared_secret_map_auto: |-
  1268. {{
  1269. ({
  1270. matrix_mautrix_telegram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1271. })
  1272. if matrix_appservice_double_puppet_enabled
  1273. else (
  1274. {matrix_mautrix_telegram_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  1275. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1276. else {}
  1277. )
  1278. }}
  1279. matrix_mautrix_telegram_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1280. matrix_mautrix_telegram_metrics_proxying_enabled: "{{ matrix_mautrix_telegram_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1281. matrix_mautrix_telegram_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1282. matrix_mautrix_telegram_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-telegram"
  1283. # Postgres is the default, except if not using internal Postgres server
  1284. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1285. matrix_mautrix_telegram_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1286. matrix_mautrix_telegram_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.telegram.db') | hash('sha512') | to_uuid }}"
  1287. ######################################################################
  1288. #
  1289. # /matrix-bridge-mautrix-telegram
  1290. #
  1291. ######################################################################
  1292. ######################################################################
  1293. #
  1294. # matrix-bridge-mautrix-twitter
  1295. #
  1296. ######################################################################
  1297. # We don't enable bridges by default.
  1298. matrix_mautrix_twitter_enabled: false
  1299. matrix_mautrix_twitter_systemd_required_services_list_auto: |
  1300. {{
  1301. matrix_addons_homeserver_systemd_services_list
  1302. +
  1303. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  1304. }}
  1305. matrix_mautrix_twitter_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_twitter_docker_image_registry_prefix_upstream_default }}"
  1306. matrix_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1307. matrix_mautrix_twitter_container_network: "{{ matrix_addons_container_network }}"
  1308. matrix_mautrix_twitter_container_additional_networks_auto: |-
  1309. {{
  1310. (
  1311. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1312. +
  1313. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_twitter_database_hostname == postgres_connection_hostname and matrix_mautrix_twitter_container_network != postgres_container_network) else [])
  1314. +
  1315. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_twitter_container_labels_traefik_enabled else [])
  1316. ) | unique
  1317. }}
  1318. matrix_mautrix_twitter_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1319. matrix_mautrix_twitter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1320. matrix_mautrix_twitter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1321. matrix_mautrix_twitter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1322. matrix_mautrix_twitter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1323. matrix_mautrix_twitter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1324. matrix_mautrix_twitter_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':twt.as.token') | hash('sha512') | to_uuid }}"
  1325. matrix_mautrix_twitter_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1326. matrix_mautrix_twitter_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':twt.hs.token') | hash('sha512') | to_uuid }}"
  1327. matrix_mautrix_twitter_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1328. matrix_mautrix_twitter_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.twit.prov') | hash('sha512') | to_uuid }}"
  1329. matrix_mautrix_twitter_double_puppet_secrets_auto: |-
  1330. {{
  1331. ({
  1332. matrix_mautrix_twitter_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1333. })
  1334. if matrix_appservice_double_puppet_enabled
  1335. else {}
  1336. }}
  1337. matrix_mautrix_twitter_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1338. matrix_mautrix_twitter_metrics_proxying_enabled: "{{ matrix_mautrix_twitter_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1339. matrix_mautrix_twitter_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1340. matrix_mautrix_twitter_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-twitter"
  1341. matrix_mautrix_twitter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1342. matrix_mautrix_twitter_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1343. ######################################################################
  1344. #
  1345. # /matrix-bridge-mautrix-twitter
  1346. #
  1347. ######################################################################
  1348. ######################################################################
  1349. #
  1350. # matrix-bridge-mautrix-gmessages
  1351. #
  1352. ######################################################################
  1353. # We don't enable bridges by default.
  1354. matrix_mautrix_gmessages_enabled: false
  1355. matrix_mautrix_gmessages_systemd_required_services_list_auto: |
  1356. {{
  1357. matrix_addons_homeserver_systemd_services_list
  1358. +
  1359. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  1360. }}
  1361. matrix_mautrix_gmessages_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_gmessages_docker_image_registry_prefix_upstream_default }}"
  1362. matrix_mautrix_gmessages_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1363. matrix_mautrix_gmessages_container_network: "{{ matrix_addons_container_network }}"
  1364. matrix_mautrix_gmessages_container_additional_networks_auto: |-
  1365. {{
  1366. (
  1367. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1368. +
  1369. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_gmessages_database_hostname == postgres_connection_hostname and matrix_mautrix_gmessages_container_network != postgres_container_network) else [])
  1370. +
  1371. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1372. ) | unique
  1373. }}
  1374. matrix_mautrix_gmessages_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1375. matrix_mautrix_gmessages_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1376. matrix_mautrix_gmessages_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1377. matrix_mautrix_gmessages_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1378. matrix_mautrix_gmessages_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1379. matrix_mautrix_gmessages_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1380. matrix_mautrix_gmessages_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.as.token') | hash('sha512') | to_uuid }}"
  1381. matrix_mautrix_gmessages_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1382. matrix_mautrix_gmessages_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.hs.token') | hash('sha512') | to_uuid }}"
  1383. matrix_mautrix_gmessages_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1384. matrix_mautrix_gmessages_double_puppet_secrets_auto: |-
  1385. {{
  1386. {
  1387. matrix_mautrix_gmessages_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1388. }
  1389. if matrix_appservice_double_puppet_enabled
  1390. else {}
  1391. }}
  1392. matrix_mautrix_gmessages_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1393. matrix_mautrix_gmessages_metrics_proxying_enabled: "{{ matrix_mautrix_gmessages_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1394. matrix_mautrix_gmessages_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1395. matrix_mautrix_gmessages_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-gmessages"
  1396. # Postgres is the default, except if not using internal Postgres server
  1397. matrix_mautrix_gmessages_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1398. matrix_mautrix_gmessages_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1399. matrix_mautrix_gmessages_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maugmessages.db') | hash('sha512') | to_uuid }}"
  1400. ######################################################################
  1401. #
  1402. # /matrix-bridge-mautrix-gmessages
  1403. #
  1404. ######################################################################
  1405. ######################################################################
  1406. #
  1407. # matrix-bridge-mautrix-wsproxy
  1408. #
  1409. ######################################################################
  1410. # We don't enable bridges by default.
  1411. matrix_mautrix_wsproxy_enabled: false
  1412. matrix_mautrix_wsproxy_systemd_required_services_list_default: |
  1413. {{
  1414. matrix_addons_homeserver_systemd_services_list
  1415. +
  1416. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname) else [])
  1417. }}
  1418. matrix_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}"
  1419. matrix_mautrix_wsproxy_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1420. matrix_mautrix_wsproxy_hostname: "wsproxy.{{ matrix_mautrix_wsproxy_homeserver_domain }}"
  1421. matrix_mautrix_wsproxy_syncproxy_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1422. matrix_mautrix_wsproxy_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_wsproxy_docker_image_registry_prefix_upstream_default }}"
  1423. matrix_mautrix_wsproxy_container_network: "{{ matrix_addons_container_network }}"
  1424. matrix_mautrix_wsproxy_container_additional_networks: |
  1425. {{
  1426. (
  1427. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1428. +
  1429. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1430. +
  1431. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_mautrix_wsproxy_container_network) else [])
  1432. ) | unique
  1433. }}
  1434. matrix_mautrix_wsproxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1435. matrix_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1436. matrix_mautrix_wsproxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1437. matrix_mautrix_wsproxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1438. matrix_mautrix_wsproxy_syncproxy_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1439. matrix_mautrix_wsproxy_syncproxy_database_password: "{{ (matrix_homeserver_generic_secret_key + ':wsproxy.db') | hash('sha512') | to_uuid }}"
  1440. ######################################################################
  1441. #
  1442. # /matrix-bridge-mautrix-wsproxy
  1443. #
  1444. ######################################################################
  1445. ######################################################################
  1446. #
  1447. # matrix-bridge-wechat
  1448. #
  1449. ######################################################################
  1450. # We don't enable bridges by default.
  1451. matrix_wechat_enabled: false
  1452. matrix_wechat_systemd_required_services_list_auto: |
  1453. {{
  1454. matrix_addons_homeserver_systemd_services_list
  1455. +
  1456. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_wechat_database_hostname == postgres_connection_hostname) else [])
  1457. }}
  1458. matrix_wechat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_wechat_container_image_registry_prefix_upstream_default }}"
  1459. matrix_wechat_agent_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_wechat_agent_container_image_registry_prefix_upstream_default }}"
  1460. matrix_wechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1461. matrix_wechat_agent_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1462. matrix_wechat_container_network: "{{ matrix_addons_container_network }}"
  1463. matrix_wechat_container_additional_networks_auto: |-
  1464. {{
  1465. (
  1466. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1467. +
  1468. ([postgres_container_network] if (postgres_enabled and matrix_wechat_database_hostname == postgres_connection_hostname and matrix_wechat_container_network != postgres_container_network) else [])
  1469. ) | unique
  1470. }}
  1471. matrix_wechat_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':wechat.as.token') | hash('sha512') | to_uuid }}"
  1472. matrix_wechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1473. matrix_wechat_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':wechat.hs.token') | hash('sha512') | to_uuid }}"
  1474. matrix_wechat_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1475. matrix_wechat_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1476. matrix_wechat_bridge_listen_secret: "{{ (matrix_homeserver_generic_secret_key + ':wechat.lstn') | hash('sha512') | to_uuid }}"
  1477. # Postgres is the default, except if not using internal Postgres server
  1478. matrix_wechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1479. matrix_wechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1480. matrix_wechat_database_password: "{{ (matrix_homeserver_generic_secret_key + ':gowechat.db') | hash('sha512') | to_uuid }}"
  1481. ######################################################################
  1482. #
  1483. # /matrix-bridge-wechat
  1484. #
  1485. ######################################################################
  1486. ######################################################################
  1487. #
  1488. # matrix-bridge-mautrix-whatsapp
  1489. #
  1490. ######################################################################
  1491. # We don't enable bridges by default.
  1492. matrix_mautrix_whatsapp_enabled: false
  1493. matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream_default }}"
  1494. matrix_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1495. matrix_mautrix_whatsapp_container_network: "{{ matrix_addons_container_network }}"
  1496. matrix_mautrix_whatsapp_container_additional_networks_auto: |-
  1497. {{
  1498. (
  1499. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1500. +
  1501. ([postgres_container_network] if postgres_enabled and matrix_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  1502. +
  1503. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_whatsapp_container_labels_traefik_enabled else [])
  1504. ) | unique
  1505. }}
  1506. matrix_mautrix_whatsapp_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1507. matrix_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1508. matrix_mautrix_whatsapp_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1509. matrix_mautrix_whatsapp_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1510. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1511. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1512. matrix_mautrix_whatsapp_systemd_required_services_list_auto: |
  1513. {{
  1514. matrix_addons_homeserver_systemd_services_list
  1515. +
  1516. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  1517. }}
  1518. matrix_mautrix_whatsapp_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':wa.as.token') | hash('sha512') | to_uuid }}"
  1519. matrix_mautrix_whatsapp_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1520. matrix_mautrix_whatsapp_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':wa.hs.token') | hash('sha512') | to_uuid }}"
  1521. matrix_mautrix_whatsapp_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1522. matrix_mautrix_whatsapp_double_puppet_secrets_auto: |-
  1523. {{
  1524. {
  1525. matrix_mautrix_whatsapp_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1526. }
  1527. if matrix_appservice_double_puppet_enabled
  1528. else {}
  1529. }}
  1530. matrix_mautrix_whatsapp_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1531. matrix_mautrix_whatsapp_metrics_proxying_enabled: "{{ matrix_mautrix_whatsapp_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1532. matrix_mautrix_whatsapp_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1533. matrix_mautrix_whatsapp_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-whatsapp"
  1534. # Postgres is the default, except if not using internal Postgres server
  1535. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1536. matrix_mautrix_whatsapp_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1537. matrix_mautrix_whatsapp_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mauwhatsapp.db') | hash('sha512') | to_uuid }}"
  1538. ######################################################################
  1539. #
  1540. # /matrix-bridge-mautrix-whatsapp
  1541. #
  1542. ######################################################################
  1543. ######################################################################
  1544. #
  1545. # matrix-sms-bridge
  1546. #
  1547. ######################################################################
  1548. # We don't enable bridges by default.
  1549. matrix_sms_bridge_enabled: false
  1550. matrix_sms_bridge_systemd_required_services_list_auto: |
  1551. {{
  1552. matrix_addons_homeserver_systemd_services_list
  1553. }}
  1554. matrix_sms_bridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_sms_bridge_docker_image_registry_prefix_upstream_default }}"
  1555. matrix_sms_bridge_container_network: "{{ matrix_addons_container_network }}"
  1556. matrix_sms_bridge_container_additional_networks_auto: |-
  1557. {{
  1558. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1559. }}
  1560. matrix_sms_bridge_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':sms.as.token') | hash('sha512') | to_uuid }}"
  1561. matrix_sms_bridge_homeserver_hostname: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[0] }}"
  1562. matrix_sms_bridge_homeserver_port: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[1] }}"
  1563. matrix_sms_bridge_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':sms.hs.token') | hash('sha512') | to_uuid }}"
  1564. ######################################################################
  1565. #
  1566. # /matrix-sms-bridge
  1567. #
  1568. ######################################################################
  1569. ######################################################################
  1570. #
  1571. # matrix-bridge-heisenbridge
  1572. #
  1573. ######################################################################
  1574. # We don't enable bridges by default.
  1575. matrix_heisenbridge_enabled: false
  1576. matrix_heisenbridge_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1577. matrix_heisenbridge_systemd_required_services_list_auto: |
  1578. {{
  1579. matrix_addons_homeserver_systemd_services_list
  1580. }}
  1581. matrix_heisenbridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_heisenbridge_docker_image_registry_prefix_upstream_default }}"
  1582. matrix_heisenbridge_container_network: "{{ matrix_addons_container_network }}"
  1583. matrix_heisenbridge_container_additional_networks_auto: |-
  1584. {{
  1585. (
  1586. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1587. +
  1588. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_heisenbridge_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  1589. ) | unique
  1590. }}
  1591. matrix_heisenbridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1592. matrix_heisenbridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1593. matrix_heisenbridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1594. matrix_heisenbridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1595. matrix_heisenbridge_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':heisen.as.tok') | hash('sha512') | to_uuid }}"
  1596. matrix_heisenbridge_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':heisen.hs.tok') | hash('sha512') | to_uuid }}"
  1597. matrix_heisenbridge_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1598. ######################################################################
  1599. #
  1600. # /matrix-bridge-heisenbridge
  1601. #
  1602. ######################################################################
  1603. ######################################################################
  1604. #
  1605. # matrix-bridge-hookshot
  1606. #
  1607. ######################################################################
  1608. # We don't enable bridges by default.
  1609. matrix_hookshot_enabled: false
  1610. matrix_hookshot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_hookshot_docker_image_registry_prefix_upstream_default }}"
  1611. matrix_hookshot_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1612. matrix_hookshot_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':hookshot.as.tok') | hash('sha512') | to_uuid }}"
  1613. matrix_hookshot_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':hookshot.hs.tok') | hash('sha512') | to_uuid }}"
  1614. matrix_hookshot_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1615. matrix_hookshot_systemd_wanted_services_list: |
  1616. {{
  1617. matrix_addons_homeserver_systemd_services_list
  1618. +
  1619. ([(valkey_identifier + '.service')] if valkey_enabled and matrix_hookshot_cache_redis_host == valkey_identifier else [])
  1620. }}
  1621. # Hookshot's experimental encryption feature (and possibly others) may benefit from Redis, if available.
  1622. # We only connect to Redis if encryption is enabled (not for everyone who has Redis enabled),
  1623. # because connectivity is still potentially troublesome and is to be investigated.
  1624. matrix_hookshot_cache_redis_host: "{{ valkey_identifier if valkey_enabled else '' }}"
  1625. matrix_hookshot_container_network: "{{ matrix_addons_container_network }}"
  1626. matrix_hookshot_container_additional_networks_auto: |
  1627. {{
  1628. (
  1629. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1630. +
  1631. ([valkey_container_network] if valkey_enabled and matrix_hookshot_cache_redis_host == valkey_identifier else [])
  1632. +
  1633. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_hookshot_container_labels_traefik_enabled else [])
  1634. ) | unique
  1635. }}
  1636. matrix_hookshot_container_http_host_bind_ports_defaultmapping:
  1637. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_appservice_port }}:{{ matrix_hookshot_appservice_port }}"
  1638. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_metrics_port }}:{{ matrix_hookshot_metrics_port }}"
  1639. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_webhook_port }}:{{ matrix_hookshot_webhook_port }}"
  1640. matrix_hookshot_container_http_host_bind_ports: "{{ matrix_hookshot_container_http_host_bind_ports_defaultmapping if matrix_playbook_service_host_bind_interface_prefix else [] }}"
  1641. matrix_hookshot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1642. matrix_hookshot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1643. matrix_hookshot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1644. matrix_hookshot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1645. matrix_hookshot_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1646. matrix_hookshot_metrics_proxying_enabled: "{{ matrix_hookshot_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1647. matrix_hookshot_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1648. matrix_hookshot_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/hookshot"
  1649. matrix_hookshot_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1650. matrix_hookshot_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1651. matrix_hookshot_public_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1652. matrix_hookshot_public_hostname: "{{ matrix_server_fqn_matrix }}"
  1653. ######################################################################
  1654. #
  1655. # /matrix-bridge-hookshot
  1656. #
  1657. ######################################################################
  1658. ######################################################################
  1659. #
  1660. # matrix-bridge-mx-puppet-steam
  1661. #
  1662. ######################################################################
  1663. # We don't enable bridges by default.
  1664. matrix_mx_puppet_steam_enabled: false
  1665. matrix_mx_puppet_steam_systemd_required_services_list_auto: |
  1666. {{
  1667. matrix_addons_homeserver_systemd_services_list
  1668. +
  1669. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  1670. }}
  1671. matrix_mx_puppet_steam_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_steam_docker_image_registry_prefix_upstream_default }}"
  1672. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1673. matrix_mx_puppet_steam_container_network: "{{ matrix_addons_container_network }}"
  1674. matrix_mx_puppet_steam_container_additional_networks_auto: |-
  1675. {{
  1676. (
  1677. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1678. +
  1679. ([postgres_container_network] if (postgres_enabled and matrix_mx_puppet_steam_database_hostname == postgres_connection_hostname and matrix_mx_puppet_steam_container_network != postgres_container_network) else [])
  1680. ) | unique
  1681. }}
  1682. matrix_mx_puppet_steam_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mxste.as.tok') | hash('sha512') | to_uuid }}"
  1683. matrix_mx_puppet_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1684. matrix_mx_puppet_steam_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mxste.hs.tok') | hash('sha512') | to_uuid }}"
  1685. matrix_mx_puppet_steam_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1686. matrix_mx_puppet_steam_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  1687. # Postgres is the default, except if not using internal Postgres server
  1688. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1689. matrix_mx_puppet_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1690. matrix_mx_puppet_steam_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.steam.db') | hash('sha512') | to_uuid }}"
  1691. ######################################################################
  1692. #
  1693. # /matrix-bridge-mx-puppet-steam
  1694. #
  1695. ######################################################################
  1696. ######################################################################
  1697. #
  1698. # matrix-bridge-mx-puppet-groupme
  1699. #
  1700. ######################################################################
  1701. # We don't enable bridges by default.
  1702. matrix_mx_puppet_groupme_enabled: false
  1703. matrix_mx_puppet_groupme_systemd_required_services_list_auto: |
  1704. {{
  1705. matrix_addons_homeserver_systemd_services_list
  1706. +
  1707. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  1708. }}
  1709. matrix_mx_puppet_groupme_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_groupme_docker_image_registry_prefix_upstream_default }}"
  1710. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1711. matrix_mx_puppet_groupme_container_network: "{{ matrix_addons_container_network }}"
  1712. matrix_mx_puppet_groupme_container_additional_networks_auto: |-
  1713. {{
  1714. (
  1715. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1716. +
  1717. ([postgres_container_network] if (postgres_enabled and matrix_mx_puppet_groupme_database_hostname == postgres_connection_hostname and matrix_mx_puppet_groupme_container_network != postgres_container_network) else [])
  1718. ) | unique
  1719. }}
  1720. matrix_mx_puppet_groupme_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mxgro.as.tok') | hash('sha512') | to_uuid }}"
  1721. matrix_mx_puppet_groupme_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1722. matrix_mx_puppet_groupme_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mxgro.hs.tok') | hash('sha512') | to_uuid }}"
  1723. matrix_mx_puppet_groupme_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1724. matrix_mx_puppet_groupme_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  1725. # Postgres is the default, except if not using internal Postgres server
  1726. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1727. matrix_mx_puppet_groupme_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1728. matrix_mx_puppet_groupme_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.groupme.db') | hash('sha512') | to_uuid }}"
  1729. ######################################################################
  1730. #
  1731. # /matrix-bridge-mx-puppet-groupme
  1732. #
  1733. ######################################################################
  1734. ######################################################################
  1735. #
  1736. # matrix-bridge-postmoogle
  1737. #
  1738. ######################################################################
  1739. # We don't enable bridges by default.
  1740. matrix_postmoogle_enabled: false
  1741. matrix_postmoogle_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_postmoogle_docker_image_registry_prefix_upstream_default }}"
  1742. matrix_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1743. matrix_postmoogle_ssl_path: |-
  1744. {{
  1745. {
  1746. 'playbook-managed-traefik': (traefik_certs_dumper_dumped_certificates_path if traefik_certs_dumper_enabled else ''),
  1747. 'other-traefik-container': (traefik_certs_dumper_dumped_certificates_path if traefik_certs_dumper_enabled else ''),
  1748. 'none': '',
  1749. }[matrix_playbook_reverse_proxy_type]
  1750. }}
  1751. matrix_playbook_bridge_postmoogle_traefik_tls_cert: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
  1752. matrix_playbook_bridge_postmoogle_traefik_key: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
  1753. matrix_postmoogle_tls_cert: |-
  1754. {{
  1755. {
  1756. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  1757. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  1758. 'none': '',
  1759. }[matrix_playbook_reverse_proxy_type]
  1760. }}
  1761. matrix_postmoogle_tls_key: |-
  1762. {{
  1763. {
  1764. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  1765. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  1766. 'none': '',
  1767. }[matrix_playbook_reverse_proxy_type]
  1768. }}
  1769. matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services: "{% for domain in matrix_postmoogle_domains %}{{ traefik_certs_dumper_identifier }}-wait-for-domain@{{ domain }}.service {% endfor %}"
  1770. matrix_postmoogle_systemd_required_services_list_auto: |
  1771. {{
  1772. matrix_addons_homeserver_systemd_services_list
  1773. +
  1774. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_postmoogle_database_hostname == matrix_postmoogle_database_hostname else [])
  1775. +
  1776. (matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services | trim | split(' ') if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled else [])
  1777. }}
  1778. # Postgres is the default, except if not using internal Postgres server
  1779. matrix_postmoogle_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1780. matrix_postmoogle_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1781. matrix_postmoogle_database_password: "{{ (matrix_homeserver_generic_secret_key + ':postmoogle.db') | hash('sha512') | to_uuid }}"
  1782. matrix_postmoogle_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  1783. matrix_postmoogle_container_network: "{{ matrix_addons_container_network }}"
  1784. matrix_postmoogle_container_additional_networks_auto: |-
  1785. {{
  1786. (
  1787. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1788. +
  1789. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  1790. ) | unique
  1791. }}
  1792. ######################################################################
  1793. #
  1794. # /matrix-bridge-postmoogle
  1795. #
  1796. ######################################################################
  1797. ######################################################################
  1798. #
  1799. # matrix-bridge-steam
  1800. #
  1801. ######################################################################
  1802. # We don't enable bridges by default.
  1803. matrix_steam_bridge_enabled: false
  1804. matrix_steam_bridge_systemd_required_services_list_auto: |
  1805. {{
  1806. matrix_addons_homeserver_systemd_services_list
  1807. +
  1808. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_steam_bridge_database_hostname == postgres_connection_hostname) else [])
  1809. }}
  1810. matrix_steam_bridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_steam_bridge_docker_image_registry_prefix_upstream_default }}"
  1811. matrix_steam_bridge_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1812. matrix_steam_bridge_container_network: "{{ matrix_addons_container_network }}"
  1813. matrix_steam_bridge_container_additional_networks_auto: |-
  1814. {{
  1815. (
  1816. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1817. +
  1818. ([postgres_container_network] if (postgres_enabled and matrix_steam_bridge_database_hostname == postgres_connection_hostname and matrix_steam_bridge_container_network != postgres_container_network) else [])
  1819. +
  1820. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_steam_bridge_container_labels_traefik_enabled else [])
  1821. ) | unique
  1822. }}
  1823. matrix_steam_bridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1824. matrix_steam_bridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1825. matrix_steam_bridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1826. matrix_steam_bridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1827. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1828. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1829. matrix_steam_bridge_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':steam.as.token') | hash('sha512') | to_uuid }}"
  1830. matrix_steam_bridge_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1831. matrix_steam_bridge_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':steam.hs.token') | hash('sha512') | to_uuid }}"
  1832. matrix_steam_bridge_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1833. matrix_steam_bridge_public_media_signing_key: "{{ ((matrix_homeserver_generic_secret_key + ':steam.pub.key') | hash('sha512') | to_uuid) if matrix_steam_bridge_public_media_enabled else '' }}"
  1834. matrix_steam_bridge_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':steam.prov') | hash('sha512') | to_uuid }}"
  1835. matrix_steam_bridge_double_puppet_secrets_auto: |-
  1836. {{
  1837. ({
  1838. matrix_steam_bridge_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1839. })
  1840. if matrix_appservice_double_puppet_enabled
  1841. else {}
  1842. }}
  1843. matrix_steam_bridge_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1844. matrix_steam_bridge_metrics_proxying_enabled: "{{ matrix_steam_bridge_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1845. matrix_steam_bridge_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1846. matrix_steam_bridge_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/matrix-steam-bridge"
  1847. matrix_steam_bridge_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1848. matrix_steam_bridge_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1849. ######################################################################
  1850. #
  1851. # /matrix-bridge-steam
  1852. #
  1853. ######################################################################
  1854. ######################################################################
  1855. #
  1856. # matrix-bot-matrix-reminder-bot
  1857. #
  1858. ######################################################################
  1859. # We don't enable bots by default.
  1860. matrix_bot_matrix_reminder_bot_enabled: false
  1861. matrix_bot_matrix_reminder_bot_systemd_required_services_list_auto: |
  1862. {{
  1863. matrix_addons_homeserver_systemd_services_list
  1864. +
  1865. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  1866. }}
  1867. matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream_default }}"
  1868. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1869. matrix_bot_matrix_reminder_bot_container_network: "{{ matrix_addons_container_network }}"
  1870. matrix_bot_matrix_reminder_bot_container_additional_networks_auto: |-
  1871. {{
  1872. (
  1873. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1874. +
  1875. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  1876. ) | unique
  1877. }}
  1878. matrix_bot_matrix_reminder_bot_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1879. # Postgres is the default, except if not using internal Postgres server
  1880. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1881. matrix_bot_matrix_reminder_bot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1882. matrix_bot_matrix_reminder_bot_database_password: "{{ (matrix_homeserver_generic_secret_key + ':reminder.bot.db') | hash('sha512') | to_uuid }}"
  1883. matrix_bot_matrix_reminder_bot_allowlist_enabled: true
  1884. matrix_bot_matrix_reminder_bot_allowlist_regexes_auto:
  1885. - "@[a-z0-9-_.]+:{{ matrix_domain }}"
  1886. ######################################################################
  1887. #
  1888. # /matrix-bot-matrix-reminder-bot
  1889. #
  1890. ######################################################################
  1891. ######################################################################
  1892. #
  1893. # matrix-bot-matrix-registration-bot
  1894. #
  1895. ######################################################################
  1896. # We don't enable bots by default.
  1897. matrix_bot_matrix_registration_bot_enabled: false
  1898. matrix_bot_matrix_registration_bot_systemd_required_services_list_auto: |
  1899. {{
  1900. matrix_addons_homeserver_systemd_services_list
  1901. }}
  1902. matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default }}"
  1903. matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1904. matrix_bot_matrix_registration_bot_container_network: "{{ matrix_addons_container_network }}"
  1905. matrix_bot_matrix_registration_bot_container_additional_networks_auto: |-
  1906. {{
  1907. ([matrix_homeserver_container_network] if matrix_bot_matrix_registration_bot_container_network != matrix_homeserver_container_network else [])
  1908. }}
  1909. # Using `matrix_addons_homeserver_client_api_url` would not work here,
  1910. # because `matrix-traefik:8008` (matrix-internal-client-api) does not expose any `/_synapse` paths.
  1911. matrix_bot_matrix_registration_bot_api_base_url: "{{ matrix_homeserver_container_url }}"
  1912. ######################################################################
  1913. #
  1914. # /matrix-bot-matrix-registration-bot
  1915. #
  1916. ######################################################################
  1917. ######################################################################
  1918. #
  1919. # matrix-bot-maubot
  1920. #
  1921. ######################################################################
  1922. # We don't enable bots by default.
  1923. matrix_bot_maubot_enabled: false
  1924. matrix_bot_maubot_systemd_required_services_list_auto: |
  1925. {{
  1926. matrix_addons_homeserver_systemd_services_list
  1927. +
  1928. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  1929. }}
  1930. matrix_bot_maubot_hostname: "{{ matrix_server_fqn_matrix }}"
  1931. matrix_bot_maubot_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1932. matrix_bot_maubot_homeserver_secret: |-
  1933. {{
  1934. {
  1935. 'synapse': matrix_synapse_registration_shared_secret | default(''),
  1936. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default(''),
  1937. }[matrix_homeserver_implementation] | default('')
  1938. }}
  1939. matrix_bot_maubot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_maubot_docker_image_registry_prefix_upstream_default }}"
  1940. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1941. matrix_bot_maubot_container_management_interface_http_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '' ~ matrix_bot_maubot_server_port | string) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1942. matrix_bot_maubot_container_network: "{{ matrix_addons_container_network }}"
  1943. matrix_bot_maubot_container_additional_networks_auto: |-
  1944. {{
  1945. (
  1946. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1947. +
  1948. ([postgres_container_network] if (postgres_enabled and matrix_bot_maubot_database_hostname == postgres_connection_hostname and matrix_bot_maubot_container_network != postgres_container_network) else [])
  1949. +
  1950. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_maubot_container_labels_traefik_enabled else [])
  1951. ) | unique
  1952. }}
  1953. matrix_bot_maubot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1954. matrix_bot_maubot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1955. matrix_bot_maubot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1956. matrix_bot_maubot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1957. matrix_bot_maubot_container_labels_management_hostname: "{{ matrix_server_fqn_matrix }}"
  1958. # Postgres is the default, except if not using internal Postgres server
  1959. matrix_bot_maubot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1960. matrix_bot_maubot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1961. matrix_bot_maubot_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.dsc.db') | hash('sha512') | to_uuid }}"
  1962. ######################################################################
  1963. #
  1964. # /matrix-bot-maubot
  1965. #
  1966. ######################################################################
  1967. ######################################################################
  1968. #
  1969. # matrix-bot-honoroit
  1970. #
  1971. ######################################################################
  1972. # We don't enable bots by default.
  1973. matrix_bot_honoroit_enabled: false
  1974. matrix_bot_honoroit_hostname: "{{ matrix_server_fqn_matrix }}"
  1975. matrix_bot_honoroit_path_prefix: /honoroit
  1976. matrix_bot_honoroit_systemd_required_services_list_auto: |
  1977. {{
  1978. matrix_addons_homeserver_systemd_services_list
  1979. +
  1980. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname else [])
  1981. }}
  1982. matrix_bot_honoroit_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_honoroit_docker_image_registry_prefix_upstream_default }}"
  1983. matrix_bot_honoroit_container_network: "{{ matrix_addons_container_network }}"
  1984. matrix_bot_honoroit_container_additional_networks: |
  1985. {{
  1986. (
  1987. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1988. +
  1989. ([postgres_container_network] if (postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname and matrix_bot_honoroit_container_network != postgres_container_network) else [])
  1990. +
  1991. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_honoroit_container_labels_traefik_enabled else [])
  1992. ) | unique
  1993. }}
  1994. matrix_bot_honoroit_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  1995. matrix_bot_honoroit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1996. matrix_bot_honoroit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1997. matrix_bot_honoroit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1998. # For consistency with other things hosted at the Matrix FQN, we adjust the metrics endpoint
  1999. # so that metrics would be served at something like `/metrics/SERVICE_NAME`, and not at the default path for the role (`PREFIX/metrics`).
  2000. matrix_bot_honoroit_container_labels_traefik_metrics_path: "{{ matrix_metrics_exposure_path_prefix }}/honoroit"
  2001. matrix_bot_honoroit_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2002. # Postgres is the default, except if not using internal Postgres server
  2003. matrix_bot_honoroit_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2004. matrix_bot_honoroit_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2005. matrix_bot_honoroit_database_password: "{{ (matrix_homeserver_generic_secret_key + ':honoroit.bot.db') | hash('sha512') | to_uuid }}"
  2006. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2007. ######################################################################
  2008. #
  2009. # /matrix-bot-honoroit
  2010. #
  2011. ######################################################################
  2012. ######################################################################
  2013. #
  2014. # matrix-bot-buscarron
  2015. #
  2016. ######################################################################
  2017. # We don't enable bots by default.
  2018. matrix_bot_buscarron_enabled: false
  2019. matrix_bot_buscarron_hostname: "{{ matrix_server_fqn_buscarron }}"
  2020. matrix_bot_buscarron_systemd_required_services_list_auto: |
  2021. {{
  2022. matrix_addons_homeserver_systemd_services_list
  2023. +
  2024. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  2025. }}
  2026. matrix_bot_buscarron_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_buscarron_docker_image_registry_prefix_upstream_default }}"
  2027. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2028. matrix_bot_buscarron_container_network: "{{ matrix_addons_container_network }}"
  2029. matrix_bot_buscarron_container_additional_networks_auto: |-
  2030. {{
  2031. (
  2032. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2033. +
  2034. ([postgres_container_network] if (postgres_enabled and matrix_bot_buscarron_database_hostname == postgres_connection_hostname and matrix_bot_buscarron_container_network != postgres_container_network) else [])
  2035. +
  2036. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_buscarron_container_labels_traefik_enabled else [])
  2037. ) | unique
  2038. }}
  2039. matrix_bot_buscarron_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2040. matrix_bot_buscarron_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2041. matrix_bot_buscarron_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2042. matrix_bot_buscarron_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2043. matrix_bot_buscarron_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2044. # Postgres is the default, except if not using internal Postgres server
  2045. matrix_bot_buscarron_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2046. matrix_bot_buscarron_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2047. matrix_bot_buscarron_database_password: "{{ (matrix_homeserver_generic_secret_key + ':buscarron.bot.db') | hash('sha512') | to_uuid }}"
  2048. ######################################################################
  2049. #
  2050. # /matrix-bot-buscarron
  2051. #
  2052. ######################################################################
  2053. ######################################################################
  2054. #
  2055. # matrix-bot-baibot
  2056. #
  2057. ######################################################################
  2058. # We don't enable bots by default.
  2059. matrix_bot_baibot_enabled: false
  2060. matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"
  2061. matrix_bot_baibot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2062. matrix_bot_baibot_systemd_required_services_list_auto: |
  2063. {{
  2064. matrix_addons_homeserver_systemd_services_list
  2065. }}
  2066. matrix_bot_baibot_config_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2067. matrix_bot_baibot_container_network: "{{ matrix_addons_container_network }}"
  2068. matrix_bot_baibot_container_additional_networks_auto: |-
  2069. {{
  2070. (
  2071. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2072. ) | unique
  2073. }}
  2074. ######################################################################
  2075. #
  2076. # /matrix-bot-baibot
  2077. #
  2078. ######################################################################
  2079. ######################################################################
  2080. #
  2081. # matrix-bot-go-neb
  2082. #
  2083. ######################################################################
  2084. # We don't enable bots by default.
  2085. matrix_bot_go_neb_enabled: false
  2086. matrix_bot_go_neb_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2087. matrix_bot_go_neb_hostname: "{{ matrix_server_fqn_bot_go_neb }}"
  2088. matrix_bot_go_neb_systemd_required_services_list_auto: |
  2089. {{
  2090. matrix_addons_homeserver_systemd_services_list
  2091. }}
  2092. matrix_bot_go_neb_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_go_neb_container_image_registry_prefix_upstream_default }}"
  2093. matrix_bot_go_neb_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '4050') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2094. matrix_bot_go_neb_container_network: "{{ matrix_addons_container_network }}"
  2095. matrix_bot_go_neb_container_additional_networks: |
  2096. {{
  2097. (
  2098. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2099. +
  2100. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_go_neb_container_labels_traefik_enabled else [])
  2101. ) | unique
  2102. }}
  2103. matrix_bot_go_neb_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2104. matrix_bot_go_neb_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2105. matrix_bot_go_neb_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2106. matrix_bot_go_neb_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2107. ######################################################################
  2108. #
  2109. # /matrix-bot-go-neb
  2110. #
  2111. ######################################################################
  2112. ######################################################################
  2113. #
  2114. # matrix-bot-mjolnir
  2115. #
  2116. ######################################################################
  2117. # We don't enable bots by default.
  2118. matrix_bot_mjolnir_enabled: false
  2119. matrix_bot_mjolnir_systemd_required_services_list_auto: |
  2120. {{
  2121. matrix_addons_homeserver_systemd_services_list
  2122. +
  2123. (['matrix-pantalaimon.service'] if matrix_bot_mjolnir_pantalaimon_use else [])
  2124. }}
  2125. matrix_bot_mjolnir_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_mjolnir_docker_image_registry_prefix_upstream_default }}"
  2126. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2127. matrix_bot_mjolnir_container_network: "{{ matrix_addons_container_network }}"
  2128. matrix_bot_mjolnir_container_additional_networks_auto: |-
  2129. {{
  2130. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2131. }}
  2132. matrix_bot_mjolnir_homeserver_url: "{{ 'http://matrix-pantalaimon:8009' if matrix_bot_mjolnir_pantalaimon_use else matrix_addons_homeserver_client_api_url }}"
  2133. matrix_bot_mjolnir_raw_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2134. ######################################################################
  2135. #
  2136. # /matrix-bot-mjolnir
  2137. #
  2138. ######################################################################
  2139. ######################################################################
  2140. #
  2141. # matrix-bot-draupnir
  2142. #
  2143. ######################################################################
  2144. # We don't enable bots by default.
  2145. matrix_bot_draupnir_enabled: false
  2146. matrix_bot_draupnir_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8769') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2147. matrix_bot_draupnir_systemd_required_services_list_auto: |
  2148. {{
  2149. matrix_addons_homeserver_systemd_services_list
  2150. +
  2151. (['matrix-pantalaimon.service'] if matrix_bot_draupnir_pantalaimon_use else [])
  2152. }}
  2153. matrix_bot_draupnir_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_draupnir_docker_image_registry_prefix_upstream_default }}"
  2154. matrix_bot_draupnir_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2155. matrix_bot_draupnir_container_network: "{{ matrix_addons_container_network }}"
  2156. matrix_bot_draupnir_container_additional_networks_auto: |-
  2157. {{
  2158. (
  2159. ([] if matrix_addons_homeserver_container_network == '' else
  2160. [matrix_addons_homeserver_container_network])
  2161. +
  2162. ([matrix_playbook_reverse_proxyable_services_additional_network] if
  2163. (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_draupnir_container_labels_traefik_enabled) else [])
  2164. +
  2165. ([matrix_pantalaimon_container_network] if (matrix_bot_draupnir_pantalaimon_use and matrix_pantalaimon_container_network != matrix_bot_draupnir_container_network) else [])
  2166. ) | unique
  2167. }}
  2168. matrix_bot_draupnir_config_homeserverUrl: "{{ 'http://matrix-pantalaimon:8009' if matrix_bot_draupnir_pantalaimon_use else matrix_addons_homeserver_client_api_url }}" # noqa var-naming
  2169. matrix_bot_draupnir_config_rawHomeserverUrl: "{{ matrix_addons_homeserver_client_api_url }}" # noqa var-naming
  2170. matrix_bot_draupnir_container_labels_traefik_enabled: "{{ matrix_bot_draupnir_config_web_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2171. matrix_bot_draupnir_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2172. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2173. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2174. #The salt is size restricted here as a maximum salt size of 16 characters exists due to the functions used.
  2175. matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization: "{{ (matrix_homeserver_generic_secret_key + ':draupnir.httpmod') | hash('sha512') | to_uuid }}" # noqa var-naming
  2176. ######################################################################
  2177. #
  2178. # /matrix-bot-draupnir
  2179. #
  2180. ######################################################################
  2181. ######################################################################
  2182. #
  2183. # matrix-appservice-draupnir-for-all
  2184. #
  2185. ######################################################################
  2186. # We don't enable bots by default.
  2187. matrix_appservice_draupnir_for_all_enabled: false
  2188. matrix_appservice_draupnir_for_all_systemd_required_services_list_auto: |
  2189. {{
  2190. matrix_addons_homeserver_systemd_services_list
  2191. +
  2192. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  2193. }}
  2194. matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream_default }}"
  2195. matrix_appservice_draupnir_for_all_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2196. matrix_appservice_draupnir_for_all_container_network: "{{ matrix_addons_container_network }}"
  2197. matrix_appservice_draupnir_for_all_container_additional_networks_auto: |-
  2198. {{
  2199. (
  2200. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2201. +
  2202. ([postgres_container_network] if (postgres_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname and matrix_appservice_draupnir_for_all_container_network != postgres_container_network) else [])
  2203. ) | unique
  2204. }}
  2205. matrix_appservice_draupnir_for_all_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':d4a.as.token') | hash('sha512') | to_uuid }}"
  2206. matrix_appservice_draupnir_for_all_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':d4a.hs.token') | hash('sha512') | to_uuid }}"
  2207. matrix_appservice_draupnir_for_all_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2208. matrix_appservice_draupnir_for_all_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.d4a.db') | hash('sha512') | to_uuid }}"
  2209. ######################################################################
  2210. #
  2211. # /matrix-appservice-draupnir-for-all
  2212. #
  2213. ######################################################################
  2214. ######################################################################
  2215. #
  2216. # matrix-appservice-double-puppet
  2217. #
  2218. ######################################################################
  2219. matrix_appservice_double_puppet_enabled: false
  2220. matrix_appservice_double_puppet_registration_as_token: "{{ (matrix_homeserver_generic_secret_key + ':as.doub.pup') | hash('sha512') | to_uuid }}"
  2221. matrix_appservice_double_puppet_registration_hs_token: "{{ (matrix_homeserver_generic_secret_key + ':hs.doub.pup') | hash('sha512') | to_uuid }}"
  2222. ######################################################################
  2223. #
  2224. # /matrix-appservice-double-puppet
  2225. #
  2226. ######################################################################
  2227. ######################################################################
  2228. #
  2229. # matrix-pantalaimon
  2230. #
  2231. ######################################################################
  2232. matrix_pantalaimon_enabled: false
  2233. matrix_pantalaimon_systemd_required_services_list_auto: |
  2234. {{
  2235. matrix_addons_homeserver_systemd_services_list
  2236. }}
  2237. matrix_pantalaimon_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_pantalaimon_docker_image_registry_prefix_upstream_default }}"
  2238. matrix_pantalaimon_container_network: "{{ matrix_homeserver_container_network }}"
  2239. matrix_pantalaimon_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2240. matrix_pantalaimon_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2241. ######################################################################
  2242. #
  2243. # /matrix-pantalaimon
  2244. #
  2245. ######################################################################
  2246. ######################################################################
  2247. #
  2248. # etke/backup_borg
  2249. #
  2250. ######################################################################
  2251. backup_borg_enabled: false
  2252. backup_borg_identifier: matrix-backup-borg
  2253. backup_borg_storage_archive_name_format: matrix-{now:%Y-%m-%d-%H%M%S}
  2254. backup_borg_base_path: "{{ matrix_base_data_path }}/backup-borg"
  2255. backup_borg_username: "{{ matrix_user_name }}"
  2256. backup_borg_uid: "{{ matrix_user_uid }}"
  2257. backup_borg_gid: "{{ matrix_user_gid }}"
  2258. backup_borg_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else backup_borg_docker_image_registry_prefix_upstream_default }}"
  2259. backup_borg_container_network: "{{ postgres_container_network if postgres_enabled else backup_borg_identifier }}"
  2260. backup_borg_postgresql_version_detection_postgres_role_name: "{{ 'galaxy/postgres' if postgres_enabled else '' }}"
  2261. backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2262. backup_borg_postgresql_enabled: "{{ postgres_enabled }}"
  2263. backup_borg_postgresql_databases_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2264. backup_borg_postgresql_databases_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  2265. backup_borg_postgresql_databases_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  2266. backup_borg_postgresql_databases_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  2267. backup_borg_postgresql_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  2268. backup_borg_location_source_directories:
  2269. - "{{ matrix_base_data_path }}"
  2270. backup_borg_location_exclude_patterns: |
  2271. {{
  2272. ([matrix_synapse_media_store_path + '/remote_content', matrix_synapse_media_store_path + '/local_thumbnails', matrix_synapse_media_store_path + '/remote_thumbnail', matrix_synapse_media_store_path + '/url_cache', matrix_synapse_media_store_path + '/url_cache_thumbnails'] if matrix_homeserver_implementation == 'synapse' else [])
  2273. +
  2274. ([postgres_data_path] if postgres_enabled else [])
  2275. }}
  2276. backup_borg_systemd_required_services_list: |
  2277. {{
  2278. [devture_systemd_docker_base_docker_service_name]
  2279. +
  2280. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2281. }}
  2282. ######################################################################
  2283. #
  2284. # /etke/backup_borg
  2285. #
  2286. ######################################################################
  2287. ######################################################################
  2288. #
  2289. # matrix-cactus-comments
  2290. #
  2291. ######################################################################
  2292. matrix_cactus_comments_enabled: false
  2293. matrix_cactus_comments_systemd_required_services_list_auto: |
  2294. {{
  2295. matrix_addons_homeserver_systemd_services_list
  2296. }}
  2297. matrix_cactus_comments_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_cactus_comments_docker_image_registry_prefix_upstream_default }}"
  2298. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2299. matrix_cactus_comments_container_network: "{{ matrix_addons_container_network }}"
  2300. matrix_cactus_comments_container_additional_networks_auto: |-
  2301. {{
  2302. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2303. }}
  2304. matrix_cactus_comments_as_token: "{{ (matrix_homeserver_generic_secret_key + ':cactus.as.token') | hash('sha512') | to_uuid }}"
  2305. matrix_cactus_comments_hs_token: "{{ (matrix_homeserver_generic_secret_key + ':cactus.hs.token') | hash('sha512') | to_uuid }}"
  2306. matrix_cactus_comments_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2307. ######################################################################
  2308. #
  2309. # /matrix-cactus-comments
  2310. #
  2311. ######################################################################
  2312. ######################################################################
  2313. #
  2314. # matrix-cactus-comments-client
  2315. #
  2316. ######################################################################
  2317. matrix_cactus_comments_client_enabled: "{{ matrix_cactus_comments_enabled }}"
  2318. matrix_cactus_comments_client_hostname: "{{ matrix_server_fqn_matrix }}"
  2319. matrix_cactus_comments_client_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_cactus_comments_client_container_image_registry_prefix_upstream_default }}"
  2320. matrix_cactus_comments_client_container_network: "{{ matrix_addons_container_network }}"
  2321. matrix_cactus_comments_client_container_additional_networks_auto: |-
  2322. {{
  2323. (
  2324. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_cactus_comments_client_container_labels_traefik_enabled) else [])
  2325. ) | unique
  2326. }}
  2327. matrix_cactus_comments_client_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2328. matrix_cactus_comments_client_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2329. matrix_cactus_comments_client_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2330. matrix_cactus_comments_client_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2331. ######################################################################
  2332. #
  2333. # /matrix-cactus-comments-client
  2334. #
  2335. ######################################################################
  2336. ######################################################################
  2337. #
  2338. # matrix-corporal
  2339. #
  2340. ######################################################################
  2341. matrix_corporal_enabled: false
  2342. matrix_corporal_systemd_required_services_list_auto: |
  2343. {{
  2344. (['matrix-' + matrix_homeserver_implementation + '.service'])
  2345. }}
  2346. matrix_corporal_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_corporal_docker_image_registry_prefix_upstream_default }}"
  2347. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2348. matrix_corporal_container_http_gateway_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '41080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2349. matrix_corporal_container_http_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '41081') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2350. matrix_corporal_container_network: matrix-corporal
  2351. matrix_corporal_container_additional_networks: |
  2352. {{
  2353. (
  2354. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2355. +
  2356. ([matrix_homeserver_container_network] if matrix_corporal_container_network != matrix_homeserver_container_network else [])
  2357. ) | unique
  2358. }}
  2359. matrix_corporal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2360. matrix_corporal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2361. matrix_corporal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2362. matrix_corporal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2363. matrix_corporal_matrix_homeserver_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2364. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  2365. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  2366. # This is only useful if there's REST auth provider to make use of it.
  2367. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  2368. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  2369. ######################################################################
  2370. #
  2371. # /matrix-corporal
  2372. #
  2373. ######################################################################
  2374. ######################################################################
  2375. #
  2376. # matrix-matrixto
  2377. #
  2378. ######################################################################
  2379. # We don't enable matrixto by default.
  2380. matrix_matrixto_enabled: false
  2381. matrix_matrixto_base_path: "{{ matrix_base_data_path }}/matrixto"
  2382. # The container image is not provided at https://github.com/matrix-org/matrix.to
  2383. matrix_matrixto_container_image_self_build: true
  2384. matrix_matrixto_hostname: "{{ matrix_server_fqn_matrixto }}"
  2385. matrix_matrixto_container_network: matrix-matrixto
  2386. matrix_matrixto_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2387. matrix_matrixto_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2388. matrix_matrixto_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2389. matrix_matrixto_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2390. matrix_matrixto_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2391. matrix_matrixto_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2392. ######################################################################
  2393. #
  2394. # /matrix-matrixto
  2395. #
  2396. ######################################################################
  2397. ######################################################################
  2398. #
  2399. # matrix-rageshake
  2400. #
  2401. ######################################################################
  2402. # We don't enable rageshake by default.
  2403. matrix_rageshake_enabled: false
  2404. matrix_rageshake_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2405. matrix_rageshake_hostname: "{{ matrix_server_fqn_rageshake }}"
  2406. matrix_rageshake_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_rageshake_container_image_registry_prefix_upstream_default }}"
  2407. matrix_rageshake_container_network: matrix-rageshake
  2408. matrix_rageshake_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2409. matrix_rageshake_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9110') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2410. matrix_rageshake_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2411. matrix_rageshake_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2412. matrix_rageshake_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2413. matrix_rageshake_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2414. ######################################################################
  2415. #
  2416. # /matrix-rageshake
  2417. #
  2418. ######################################################################
  2419. ######################################################################
  2420. #
  2421. # coturn
  2422. #
  2423. ######################################################################
  2424. coturn_enabled: true
  2425. coturn_identifier: matrix-coturn
  2426. coturn_base_path: "{{ matrix_base_data_path }}/coturn"
  2427. coturn_uid: "{{ matrix_user_uid }}"
  2428. coturn_gid: "{{ matrix_user_gid }}"
  2429. coturn_hostname: "{{ matrix_server_fqn_matrix }}"
  2430. coturn_container_image_registry_prefix: "{{ 'localhost/' if coturn_container_image_self_build else coturn_container_image_registry_prefix_upstream }}"
  2431. coturn_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else coturn_container_image_registry_prefix_upstream_default }}"
  2432. coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2433. # We make the assumption that `ansible_host` points to an external IP address, which may not always be the case.
  2434. # Users are free to set `coturn_turn_external_ip_address` to an empty string
  2435. # to allow auto-detection (via an echoip service) to happen at runtime.
  2436. coturn_turn_external_ip_address: "{{ ansible_host }}"
  2437. # By default, we use the official public instance.
  2438. coturn_turn_external_ip_address_auto_detection_echoip_service_url: https://ifconfig.co/json
  2439. coturn_turn_static_auth_secret: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.sas') | hash('sha512') | to_uuid) if coturn_authentication_method == 'auth-secret' else '' }}"
  2440. coturn_lt_cred_mech_username: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.user') | hash('sha512') | to_uuid) if coturn_authentication_method == 'lt-cred-mech' else '' }}"
  2441. coturn_lt_cred_mech_password: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.pass') | hash('sha512') | to_uuid) if coturn_authentication_method == 'lt-cred-mech' else '' }}"
  2442. coturn_tls_enabled: "{{ matrix_playbook_ssl_enabled }}"
  2443. coturn_tls_cert_path: |-
  2444. {{
  2445. {
  2446. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  2447. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  2448. 'none': '',
  2449. }[matrix_playbook_reverse_proxy_type]
  2450. }}
  2451. coturn_tls_key_path: |-
  2452. {{
  2453. {
  2454. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  2455. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  2456. 'none': '',
  2457. }[matrix_playbook_reverse_proxy_type]
  2458. }}
  2459. coturn_container_additional_volumes: |
  2460. {{
  2461. (
  2462. [
  2463. {
  2464. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + coturn_hostname + '/certificate.crt'),
  2465. 'dst': '/certificate.crt',
  2466. 'options': 'ro',
  2467. },
  2468. {
  2469. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + coturn_hostname + '/privatekey.key'),
  2470. 'dst': '/privatekey.key',
  2471. 'options': 'ro',
  2472. },
  2473. ] if (matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and coturn_tls_enabled and (coturn_tls_cert_path and coturn_tls_key_path)) else []
  2474. )
  2475. }}
  2476. coturn_systemd_required_services_list_auto: |
  2477. {{
  2478. ([traefik_certs_dumper_identifier + '-wait-for-domain@' + coturn_hostname + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and coturn_tls_enabled else [])
  2479. }}
  2480. ######################################################################
  2481. #
  2482. # /coturn
  2483. #
  2484. ######################################################################
  2485. ######################################################################
  2486. #
  2487. # etherpad
  2488. #
  2489. ######################################################################
  2490. etherpad_enabled: false
  2491. etherpad_identifier: matrix-etherpad
  2492. etherpad_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2493. etherpad_base_path: "{{ matrix_base_data_path }}/etherpad"
  2494. etherpad_framing_enabled: "{{ jitsi_enabled }}"
  2495. etherpad_hostname: "{{ matrix_server_fqn_etherpad }}"
  2496. etherpad_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else etherpad_container_image_registry_prefix_upstream_default }}"
  2497. etherpad_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2498. etherpad_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9001') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2499. etherpad_container_network: "{{ matrix_addons_container_network }}"
  2500. etherpad_container_additional_networks_auto: |
  2501. {{
  2502. (
  2503. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2504. +
  2505. ([postgres_container_network] if postgres_enabled and postgres_container_network != etherpad_container_network else [])
  2506. ) | unique
  2507. }}
  2508. etherpad_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2509. etherpad_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2510. etherpad_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2511. etherpad_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2512. etherpad_systemd_required_services_list_auto: |
  2513. {{
  2514. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2515. }}
  2516. etherpad_database_postgres_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2517. etherpad_database_name: matrix_etherpad
  2518. etherpad_database_postgres_username: matrix_etherpad
  2519. etherpad_database_postgres_password: "{{ (matrix_homeserver_generic_secret_key + ':etherpad.db') | hash('sha512') | to_uuid }}"
  2520. ######################################################################
  2521. #
  2522. # /etherpad
  2523. #
  2524. ######################################################################
  2525. ######################################################################
  2526. #
  2527. # ddclient
  2528. #
  2529. ######################################################################
  2530. ddclient_enabled: false
  2531. ddclient_identifier: matrix-dynamic-dns
  2532. ddclient_base_path: "{{ matrix_base_data_path }}/dynamic-dns"
  2533. ddclient_uid: "{{ matrix_user_uid }}"
  2534. ddclient_gid: "{{ matrix_user_gid }}"
  2535. ddclient_container_image_registry_prefix: "{{ 'localhost/' if ddclient_container_image_self_build else ddclient_container_image_registry_prefix_upstream }}"
  2536. ddclient_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else ddclient_docker_image_registry_prefix_upstream_default }}"
  2537. ddclient_web: "https://cloudflare.com/cdn-cgi/trace"
  2538. ddclient_web_skip: "ip="
  2539. ######################################################################
  2540. #
  2541. # /ddclient
  2542. #
  2543. ######################################################################
  2544. ######################################################################
  2545. #
  2546. # jitsi
  2547. #
  2548. ######################################################################
  2549. jitsi_enabled: false
  2550. jitsi_architecture: "{{ matrix_architecture }}"
  2551. jitsi_hostname: "{{ matrix_server_fqn_jitsi }}"
  2552. jitsi_identifier: matrix-jitsi
  2553. jitsi_base_path: "{{ matrix_base_data_path }}/jitsi"
  2554. jitsi_uid: "{{ matrix_user_uid }}"
  2555. jitsi_gid: "{{ matrix_user_gid }}"
  2556. jitsi_user_username: "{{ matrix_user_name }}"
  2557. jitsi_web_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_web_container_image_registry_prefix_upstream_default }}"
  2558. jitsi_web_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '13080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2559. jitsi_web_container_additional_networks_auto: |
  2560. {{
  2561. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2562. }}
  2563. jitsi_jvb_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_jvb_container_image_registry_prefix_upstream_default }}"
  2564. jitsi_jvb_container_colibri_ws_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '13090') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2565. jitsi_jvb_container_additional_networks_auto: |
  2566. {{
  2567. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2568. }}
  2569. jitsi_prosody_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_prosody_container_image_registry_prefix_upstream_default }}"
  2570. jitsi_prosody_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5280') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2571. jitsi_prosody_container_additional_networks_auto: |
  2572. {{
  2573. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2574. }}
  2575. jitsi_jicofo_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_jicofo_container_image_registry_prefix_upstream_default }}"
  2576. jitsi_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2577. jitsi_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2578. jitsi_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2579. jitsi_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2580. jitsi_jibri_xmpp_password: "{{ (matrix_homeserver_generic_secret_key + ':jibri') | hash('sha512') | to_uuid }}"
  2581. jitsi_jicofo_auth_password: "{{ (matrix_homeserver_generic_secret_key + ':jicofo') | hash('sha512') | to_uuid }}"
  2582. jitsi_jvb_auth_password: "{{ (matrix_homeserver_generic_secret_key + ':jvb') | hash('sha512') | to_uuid }}"
  2583. jitsi_web_stun_servers: |
  2584. {{
  2585. [
  2586. 'stun:' + matrix_server_fqn_matrix + ':5349',
  2587. 'stun:' + matrix_server_fqn_matrix + ':3478',
  2588. ]
  2589. if coturn_enabled
  2590. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  2591. }}
  2592. # The Jitsi instance installed by this playbook is meant for embedding into Matrix clients, so framing is allowed.
  2593. jitsi_web_framing_enabled: true
  2594. # Jitsi (Prosody) only seems to support authenticating with coturn using `auth-secret`, not `lt-cred-mech`.
  2595. # See: https://prosody.im/doc/coturn
  2596. jitsi_turn_credentials: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  2597. jitsi_turn_host: "{{ ('turn.' + matrix_server_fqn_matrix) if coturn_enabled else '' }}"
  2598. jitsi_turns_host: "{{ ('turn.' + matrix_server_fqn_matrix) if coturn_enabled else '' }}"
  2599. jitsi_turn_port: "{{ coturn_container_stun_plain_host_bind_port_tcp.split(':')[-1] if coturn_enabled else '' }}"
  2600. jitsi_turns_port: "{{ coturn_container_stun_tls_host_bind_port_tcp.split(':')[-1] if coturn_enabled else '' }}"
  2601. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  2602. # unless explicitly disabled by setting `jitsi_etherpad_enabled` to false.
  2603. # Falls back to the scalar.vector.im etherpad in case someone sets `jitsi_etherpad_enabled` to true,
  2604. # while also setting `etherpad_enabled` to false.
  2605. jitsi_etherpad_enabled: "{{ etherpad_enabled }}"
  2606. jitsi_etherpad_base: "{{ etherpad_base_url if etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  2607. # Allow verification using JWT and matrix-UVS
  2608. jitsi_prosody_auth_matrix_uvs_sync_power_levels: "{{ matrix_user_verification_service_enabled }}"
  2609. jitsi_prosody_auth_matrix_uvs_auth_token: "{{ matrix_user_verification_service_uvs_auth_token }}"
  2610. jitsi_prosody_auth_matrix_uvs_location: "{{ matrix_user_verification_service_container_url }}"
  2611. jitsi_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  2612. # Gravatar is enabled by default upstream, but there's no need to leak data there needlessly
  2613. # when embedding Jitsi in Matrix rooms.
  2614. jitsi_disable_gravatar: true
  2615. ######################################################################
  2616. #
  2617. # /jitsi
  2618. #
  2619. ######################################################################
  2620. ######################################################################
  2621. #
  2622. # matrix-ldap-registration-proxy
  2623. #
  2624. ######################################################################
  2625. # This is only for users with a specific LDAP setup
  2626. matrix_ldap_registration_proxy_enabled: false
  2627. matrix_ldap_registration_proxy_hostname: "{{ matrix_server_fqn_matrix }}"
  2628. matrix_ldap_registration_proxy_matrix_server_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2629. matrix_ldap_registration_proxy_systemd_required_services_list_auto: |
  2630. {{
  2631. matrix_addons_homeserver_systemd_services_list
  2632. }}
  2633. matrix_ldap_registration_proxy_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_ldap_registration_proxy_docker_image_registry_prefix_upstream_default }}"
  2634. matrix_ldap_registration_proxy_container_network: "{{ matrix_addons_container_network }}"
  2635. matrix_ldap_registration_proxy_container_additional_networks_auto: |-
  2636. {{
  2637. (
  2638. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2639. +
  2640. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_ldap_registration_proxy_container_labels_traefik_enabled) else [])
  2641. ) | unique
  2642. }}
  2643. matrix_ldap_registration_proxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2644. matrix_ldap_registration_proxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2645. matrix_ldap_registration_proxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2646. matrix_ldap_registration_proxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2647. ######################################################################
  2648. #
  2649. # /matrix-ldap-registration-proxy
  2650. #
  2651. ######################################################################
  2652. ########################################################################
  2653. # #
  2654. # exim-relay #
  2655. # #
  2656. ########################################################################
  2657. # We set up an Exim email relay by default.
  2658. # This is so that the homeserver and various other services can send emails through it.
  2659. # To completely disable this service, use: `exim_relay_enabled: false`
  2660. exim_relay_identifier: "matrix-exim-relay"
  2661. exim_relay_base_path: "{{ matrix_base_data_path }}/exim-relay"
  2662. exim_relay_uid: "{{ matrix_user_uid }}"
  2663. exim_relay_gid: "{{ matrix_user_gid }}"
  2664. exim_relay_hostname: "{{ matrix_server_fqn_matrix }}"
  2665. exim_relay_sender_address: "matrix@{{ exim_relay_hostname }}"
  2666. exim_relay_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else exim_relay_container_image_registry_prefix_upstream_default }}"
  2667. exim_relay_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2668. ########################################################################
  2669. # #
  2670. # /exim-relay #
  2671. # #
  2672. ########################################################################
  2673. ######################################################################
  2674. #
  2675. # matrix-media-repo
  2676. #
  2677. ######################################################################
  2678. matrix_media_repo_enabled: false
  2679. matrix_media_repo_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_media_repo_docker_image_registry_prefix_upstream_default }}"
  2680. matrix_media_repo_container_network: "{{ matrix_homeserver_container_network }}"
  2681. matrix_media_repo_container_additional_networks: |
  2682. {{
  2683. (
  2684. ([matrix_homeserver_container_network] if (matrix_media_repo_container_network != matrix_homeserver_container_network) else [])
  2685. +
  2686. ([postgres_container_network] if (postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_media_repo_container_network) else [])
  2687. +
  2688. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_media_repo_container_labels_traefik_enabled) else [])
  2689. +
  2690. ([valkey_container_network] if valkey_enabled and matrix_media_repo_redis_enabled else [])
  2691. ) | unique
  2692. }}
  2693. matrix_media_repo_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2694. matrix_media_repo_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2695. matrix_media_repo_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2696. matrix_media_repo_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2697. matrix_media_repo_container_labels_traefik_internal_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  2698. matrix_media_repo_container_labels_traefik_internal_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  2699. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  2700. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  2701. matrix_media_repo_metrics_proxying_enabled: "{{ matrix_media_repo_metrics_enabled and matrix_metrics_exposure_enabled }}"
  2702. matrix_media_repo_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  2703. matrix_media_repo_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-media-repo"
  2704. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  2705. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  2706. matrix_media_repo_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2707. matrix_media_repo_database_username: matrix_media_repo
  2708. matrix_media_repo_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mediarepo.db') | hash('sha512') | to_uuid }}"
  2709. matrix_media_repo_database_name: matrix_media_repo
  2710. matrix_media_repo_systemd_required_services_list_auto: |
  2711. {{
  2712. matrix_addons_homeserver_systemd_services_list
  2713. +
  2714. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname else [])
  2715. }}
  2716. matrix_media_repo_generate_signing_key: "{{ matrix_homeserver_implementation == 'synapse' or matrix_homeserver_implementation == 'dendrite'}}"
  2717. matrix_media_repo_homeserver_signing_key: "{{ matrix_media_repo_synapse_signing_key if matrix_homeserver_implementation == 'synapse' else (matrix_media_repo_dendrite_signing_key if matrix_homeserver_implementation == 'dendrite' else '') }}"
  2718. matrix_media_repo_synapse_signing_key: "{{ matrix_synapse_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.key"
  2719. matrix_media_repo_dendrite_signing_key: "{{ matrix_dendrite_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.pem"
  2720. # Auto configured server setup by the playbook
  2721. matrix_media_repo_homeservers_auto:
  2722. - # Keep the dash from this line.
  2723. # This should match the server_name of your homeserver, and the Host header
  2724. # provided to the media repo.
  2725. name: "{{ matrix_domain }}"
  2726. # The base URL to where the homeserver can actually be reached by MMR.
  2727. csApi: "{{ matrix_homeserver_container_url }}"
  2728. # The number of consecutive failures in calling this homeserver before the
  2729. # media repository will start backing off. This defaults to 10 if not given.
  2730. backoffAt: 10
  2731. # The admin API interface supported by the homeserver. MMR uses a subset of the admin API
  2732. # during certain operations, like attempting to purge media from a room or validating server
  2733. # admin status. This should be set to one of "synapse", "dendrite", or "matrix". When set
  2734. # to "matrix", most functionality requiring the admin API will not work.
  2735. adminApiKind: "{{ 'synapse' if matrix_homeserver_implementation == 'synapse' else ('dendrite' if matrix_homeserver_implementation == 'dendrite' else 'matrix') }}"
  2736. # The signing key to use for authorizing outbound federation requests. If not specified,
  2737. # requests will not be authorized. See https://docs.t2bot.io/matrix-media-repo/v1.3.5/installation/signing-key/
  2738. # for details.
  2739. signingKeyPath: "{{ '/config/' + matrix_media_repo_identifier + '.signing.key' if matrix_media_repo_generate_signing_key else '' }}"
  2740. matrix_media_repo_homeserver_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  2741. matrix_media_repo_redis_enabled: "{{ valkey_enabled }}"
  2742. # Use next redis index since Synapse is on 0. You can chose between index 0 and 15.
  2743. matrix_media_repo_redis_database_number: 1
  2744. matrix_media_repo_redis_shards: |
  2745. {{
  2746. ([{
  2747. 'name': 'valkey',
  2748. 'addr': (valkey_identifier + ':' + valkey_container_tcp_port | string),
  2749. }])
  2750. if valkey_enabled and matrix_media_repo_redis_enabled
  2751. else []
  2752. }}
  2753. ######################################################################
  2754. #
  2755. # /matrix-media-repo
  2756. #
  2757. ######################################################################
  2758. ########################################################################
  2759. # #
  2760. # postgres #
  2761. # #
  2762. ########################################################################
  2763. # To completely disable installing Postgres, use `postgres_enabled: false`.
  2764. postgres_identifier: matrix-postgres
  2765. postgres_architecture: "{{ matrix_architecture }}"
  2766. postgres_base_path: "{{ matrix_base_data_path }}/postgres"
  2767. postgres_uid: "{{ matrix_user_uid }}"
  2768. postgres_gid: "{{ matrix_user_gid }}"
  2769. postgres_allowed_versions_auto: "{{ backup_borg_supported_postgres_versions | map('int') if backup_borg_enabled | default(false) and backup_borg_postgresql_enabled | default(false) else [] }}"
  2770. postgres_connection_username: matrix
  2771. postgres_db_name: matrix
  2772. postgres_systemd_services_to_stop_for_maintenance_list_auto: "{{ devture_systemd_service_manager_services_list_auto | map(attribute='name') | reject('equalto', (postgres_identifier + '.service')) }}"
  2773. postgres_max_connections: "{{ 500 if matrix_synapse_workers_enabled else 200 }}"
  2774. postgres_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else postgres_container_image_registry_prefix_upstream_default }}"
  2775. postgres_pgloader_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else postgres_pgloader_container_image_registry_prefix_upstream_default }}"
  2776. postgres_managed_databases_auto: |
  2777. {{
  2778. ([{
  2779. 'name': matrix_synapse_database_database,
  2780. 'username': matrix_synapse_database_user,
  2781. 'password': matrix_synapse_database_password,
  2782. }] if (matrix_synapse_enabled and matrix_synapse_database_host == postgres_connection_hostname) else [])
  2783. +
  2784. ([{
  2785. 'name': matrix_dendrite_federation_api_database,
  2786. 'username': matrix_dendrite_database_user,
  2787. 'password': matrix_dendrite_database_password,
  2788. },{
  2789. 'name': matrix_dendrite_key_server_database,
  2790. 'username': matrix_dendrite_database_user,
  2791. 'password': matrix_dendrite_database_password,
  2792. },{
  2793. 'name': matrix_dendrite_media_api_database,
  2794. 'username': matrix_dendrite_database_user,
  2795. 'password': matrix_dendrite_database_password,
  2796. },{
  2797. 'name': matrix_dendrite_room_database,
  2798. 'username': matrix_dendrite_database_user,
  2799. 'password': matrix_dendrite_database_password,
  2800. },{
  2801. 'name': matrix_dendrite_sync_api_database,
  2802. 'username': matrix_dendrite_database_user,
  2803. 'password': matrix_dendrite_database_password,
  2804. },{
  2805. 'name': matrix_dendrite_user_api_database,
  2806. 'username': matrix_dendrite_database_user,
  2807. 'password': matrix_dendrite_database_password,
  2808. },{
  2809. 'name': matrix_dendrite_relay_api_database,
  2810. 'username': matrix_dendrite_database_user,
  2811. 'password': matrix_dendrite_database_password,
  2812. },{
  2813. 'name': matrix_dendrite_push_server_database,
  2814. 'username': matrix_dendrite_database_user,
  2815. 'password': matrix_dendrite_database_password,
  2816. },{
  2817. 'name': matrix_dendrite_mscs_database,
  2818. 'username': matrix_dendrite_database_user,
  2819. 'password': matrix_dendrite_database_password,
  2820. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  2821. +
  2822. ([{
  2823. 'name': matrix_authentication_service_config_database_database,
  2824. 'username': matrix_authentication_service_config_database_username,
  2825. 'password': matrix_authentication_service_config_database_password,
  2826. }] if (matrix_authentication_service_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname) else [])
  2827. +
  2828. ([{
  2829. 'name': matrix_bot_matrix_reminder_bot_database_name,
  2830. 'username': matrix_bot_matrix_reminder_bot_database_username,
  2831. 'password': matrix_bot_matrix_reminder_bot_database_password,
  2832. }] if (matrix_bot_matrix_reminder_bot_enabled and matrix_bot_matrix_reminder_bot_database_engine == 'postgres' and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname) else [])
  2833. +
  2834. ([{
  2835. 'name': matrix_bot_honoroit_database_name,
  2836. 'username': matrix_bot_honoroit_database_username,
  2837. 'password': matrix_bot_honoroit_database_password,
  2838. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == postgres_connection_hostname) else [])
  2839. +
  2840. ([{
  2841. 'name': matrix_postmoogle_database_name,
  2842. 'username': matrix_postmoogle_database_username,
  2843. 'password': matrix_postmoogle_database_password,
  2844. }] if (matrix_postmoogle_enabled and matrix_postmoogle_database_engine == 'postgres' and matrix_postmoogle_database_hostname == postgres_connection_hostname) else [])
  2845. +
  2846. ([{
  2847. 'name': matrix_bot_maubot_database_name,
  2848. 'username': matrix_bot_maubot_database_username,
  2849. 'password': matrix_bot_maubot_database_password,
  2850. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  2851. +
  2852. ([{
  2853. 'name': matrix_bot_buscarron_database_name,
  2854. 'username': matrix_bot_buscarron_database_username,
  2855. 'password': matrix_bot_buscarron_database_password,
  2856. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  2857. +
  2858. ([{
  2859. 'name': matrix_registration_database_name,
  2860. 'username': matrix_registration_database_username,
  2861. 'password': matrix_registration_database_password,
  2862. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == postgres_connection_hostname) else [])
  2863. +
  2864. ([{
  2865. 'name': matrix_appservice_discord_database_name,
  2866. 'username': matrix_appservice_discord_database_username,
  2867. 'password': matrix_appservice_discord_database_password,
  2868. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  2869. +
  2870. ([{
  2871. 'name': matrix_appservice_draupnir_for_all_database_name,
  2872. 'username': matrix_appservice_draupnir_for_all_database_username,
  2873. 'password': matrix_appservice_draupnir_for_all_database_password,
  2874. }] if (matrix_appservice_draupnir_for_all_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  2875. +
  2876. ([{
  2877. 'name': matrix_appservice_slack_database_name,
  2878. 'username': matrix_appservice_slack_database_username,
  2879. 'password': matrix_appservice_slack_database_password,
  2880. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == postgres_connection_hostname) else [])
  2881. +
  2882. ([{
  2883. 'name': matrix_appservice_irc_database_name,
  2884. 'username': matrix_appservice_irc_database_username,
  2885. 'password': matrix_appservice_irc_database_password,
  2886. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  2887. +
  2888. ([{
  2889. 'name': matrix_appservice_kakaotalk_database_name,
  2890. 'username': matrix_appservice_kakaotalk_database_username,
  2891. 'password': matrix_appservice_kakaotalk_database_password,
  2892. }] if (matrix_appservice_kakaotalk_enabled and matrix_appservice_kakaotalk_database_engine == 'postgres' and matrix_appservice_kakaotalk_database_hostname == postgres_connection_hostname) else [])
  2893. +
  2894. ([{
  2895. 'name': matrix_beeper_linkedin_database_name,
  2896. 'username': matrix_beeper_linkedin_database_username,
  2897. 'password': matrix_beeper_linkedin_database_password,
  2898. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  2899. +
  2900. ([{
  2901. 'name': matrix_wechat_database_name,
  2902. 'username': matrix_wechat_database_username,
  2903. 'password': matrix_wechat_database_password,
  2904. }] if (matrix_wechat_enabled and matrix_wechat_database_engine == 'postgres' and matrix_wechat_database_hostname == postgres_connection_hostname) else [])
  2905. +
  2906. ([{
  2907. 'name': matrix_mautrix_bluesky_database_name,
  2908. 'username': matrix_mautrix_bluesky_database_username,
  2909. 'password': matrix_mautrix_bluesky_database_password,
  2910. }] if (matrix_mautrix_bluesky_enabled and matrix_mautrix_bluesky_database_engine == 'postgres' and matrix_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  2911. +
  2912. ([{
  2913. 'name': matrix_mautrix_googlechat_database_name,
  2914. 'username': matrix_mautrix_googlechat_database_username,
  2915. 'password': matrix_mautrix_googlechat_database_password,
  2916. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  2917. +
  2918. ([{
  2919. 'name': matrix_mautrix_signal_database_name,
  2920. 'username': matrix_mautrix_signal_database_username,
  2921. 'password': matrix_mautrix_signal_database_password,
  2922. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  2923. +
  2924. ([{
  2925. 'name': matrix_mautrix_meta_messenger_database_name,
  2926. 'username': matrix_mautrix_meta_messenger_database_username,
  2927. 'password': matrix_mautrix_meta_messenger_database_password,
  2928. }] if (matrix_mautrix_meta_messenger_enabled and matrix_mautrix_meta_messenger_database_engine == 'postgres' and matrix_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  2929. +
  2930. ([{
  2931. 'name': matrix_mautrix_meta_instagram_database_name,
  2932. 'username': matrix_mautrix_meta_instagram_database_username,
  2933. 'password': matrix_mautrix_meta_instagram_database_password,
  2934. }] if (matrix_mautrix_meta_instagram_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres' and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  2935. +
  2936. ([{
  2937. 'name': matrix_mautrix_wsproxy_syncproxy_database_name,
  2938. 'username': matrix_mautrix_wsproxy_syncproxy_database_username,
  2939. 'password': matrix_mautrix_wsproxy_syncproxy_database_password,
  2940. }] if (matrix_mautrix_wsproxy_enabled and matrix_mautrix_wsproxy_syncproxy_database_engine == 'postgres' and matrix_mautrix_wsproxy_syncproxy_database_hostname == 'matrix-postgres') else [])
  2941. +
  2942. ([{
  2943. 'name': matrix_mautrix_telegram_database_name,
  2944. 'username': matrix_mautrix_telegram_database_username,
  2945. 'password': matrix_mautrix_telegram_database_password,
  2946. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  2947. +
  2948. ([{
  2949. 'name': matrix_mautrix_twitter_database_name,
  2950. 'username': matrix_mautrix_twitter_database_username,
  2951. 'password': matrix_mautrix_twitter_database_password,
  2952. }] if (matrix_mautrix_twitter_enabled and matrix_mautrix_twitter_database_engine == 'postgres' and matrix_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  2953. +
  2954. ([{
  2955. 'name': matrix_mautrix_gmessages_database_name,
  2956. 'username': matrix_mautrix_gmessages_database_username,
  2957. 'password': matrix_mautrix_gmessages_database_password,
  2958. }] if (matrix_mautrix_gmessages_enabled and matrix_mautrix_gmessages_database_engine == 'postgres' and matrix_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  2959. +
  2960. ([{
  2961. 'name': matrix_mautrix_whatsapp_database_name,
  2962. 'username': matrix_mautrix_whatsapp_database_username,
  2963. 'password': matrix_mautrix_whatsapp_database_password,
  2964. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == postgres_connection_hostname) else [])
  2965. +
  2966. ([{
  2967. 'name': matrix_mautrix_discord_database_name,
  2968. 'username': matrix_mautrix_discord_database_username,
  2969. 'password': matrix_mautrix_discord_database_password,
  2970. }] if (matrix_mautrix_discord_enabled and matrix_mautrix_discord_database_engine == 'postgres' and matrix_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  2971. +
  2972. ([{
  2973. 'name': matrix_mautrix_slack_database_name,
  2974. 'username': matrix_mautrix_slack_database_username,
  2975. 'password': matrix_mautrix_slack_database_password,
  2976. }] if (matrix_mautrix_slack_enabled and matrix_mautrix_slack_database_engine == 'postgres' and matrix_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  2977. +
  2978. ([{
  2979. 'name': matrix_mx_puppet_steam_database_name,
  2980. 'username': matrix_mx_puppet_steam_database_username,
  2981. 'password': matrix_mx_puppet_steam_database_password,
  2982. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  2983. +
  2984. ([{
  2985. 'name': matrix_mx_puppet_groupme_database_name,
  2986. 'username': matrix_mx_puppet_groupme_database_username,
  2987. 'password': matrix_mx_puppet_groupme_database_password,
  2988. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  2989. +
  2990. ([{
  2991. 'name': matrix_steam_bridge_database_name,
  2992. 'username': matrix_steam_bridge_database_username,
  2993. 'password': matrix_steam_bridge_database_password,
  2994. }] if (matrix_steam_bridge_enabled and matrix_steam_bridge_database_engine == 'postgres' and matrix_steam_bridge_database_hostname == postgres_connection_hostname) else [])
  2995. +
  2996. ([{
  2997. 'name': etherpad_database_name,
  2998. 'username': etherpad_database_postgres_username,
  2999. 'password': etherpad_database_postgres_password,
  3000. }] if (etherpad_enabled and etherpad_database_type == 'postgres' and etherpad_database_postgres_hostname == postgres_connection_hostname) else [])
  3001. +
  3002. ([{
  3003. 'name': prometheus_postgres_exporter_database_name,
  3004. 'username': prometheus_postgres_exporter_database_username,
  3005. 'password': prometheus_postgres_exporter_database_password,
  3006. }] if (prometheus_postgres_exporter_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  3007. +
  3008. ([{
  3009. 'name': matrix_media_repo_database_name,
  3010. 'username': matrix_media_repo_database_username,
  3011. 'password': matrix_media_repo_database_password,
  3012. }] if (matrix_media_repo_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname) else [])
  3013. }}
  3014. ########################################################################
  3015. # #
  3016. # /postgres #
  3017. # #
  3018. ########################################################################
  3019. ########################################################################
  3020. # #
  3021. # postgres_backup #
  3022. # #
  3023. ########################################################################
  3024. postgres_backup_enabled: false
  3025. postgres_backup_identifier: matrix-postgres-backup
  3026. postgres_backup_architecture: "{{ matrix_architecture }}"
  3027. postgres_backup_base_path: "{{ matrix_base_data_path }}/postgres-backup"
  3028. postgres_backup_systemd_required_services_list_auto: |
  3029. {{
  3030. ([(postgres_identifier + '.service')] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else [])
  3031. }}
  3032. postgres_backup_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else postgres_backup_container_image_registry_prefix_upstream_default }}"
  3033. postgres_backup_container_network: "{{ (postgres_container_network if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else postgres_backup_identifier) }}"
  3034. postgres_backup_container_additional_networks_auto: |-
  3035. {{
  3036. ([postgres_container_network] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname and postgres_backup_container_network != postgres_container_network) else [])
  3037. }}
  3038. postgres_backup_uid: "{{ matrix_user_uid }}"
  3039. postgres_backup_gid: "{{ matrix_user_gid }}"
  3040. postgres_backup_connection_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3041. postgres_backup_connection_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  3042. postgres_backup_connection_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  3043. postgres_backup_connection_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  3044. postgres_backup_postgres_data_path: "{{ postgres_data_path if postgres_enabled else '' }}"
  3045. postgres_backup_postgres_role_include_name: galaxy/postgres
  3046. postgres_backup_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  3047. ########################################################################
  3048. # #
  3049. # /postgres_backup #
  3050. # #
  3051. ########################################################################
  3052. ######################################################################
  3053. #
  3054. # matrix-sygnal
  3055. #
  3056. ######################################################################
  3057. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  3058. matrix_sygnal_enabled: false
  3059. matrix_sygnal_metrics_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3060. matrix_sygnal_hostname: "{{ matrix_server_fqn_sygnal }}"
  3061. matrix_sygnal_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_sygnal_docker_image_registry_prefix_upstream_default }}"
  3062. matrix_sygnal_container_network: "{{ matrix_homeserver_container_network }}"
  3063. matrix_sygnal_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3064. matrix_sygnal_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '6000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3065. matrix_sygnal_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3066. matrix_sygnal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3067. matrix_sygnal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3068. matrix_sygnal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3069. ######################################################################
  3070. #
  3071. # /matrix-sygnal
  3072. #
  3073. ######################################################################
  3074. ######################################################################
  3075. #
  3076. # ntfy
  3077. #
  3078. ######################################################################
  3079. ntfy_enabled: false
  3080. ntfy_identifier: matrix-ntfy
  3081. ntfy_base_path: "{{ matrix_base_data_path }}/ntfy"
  3082. ntfy_uid: "{{ matrix_user_uid }}"
  3083. ntfy_gid: "{{ matrix_user_gid }}"
  3084. ntfy_hostname: "{{ matrix_server_fqn_ntfy }}"
  3085. ntfy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else ntfy_container_image_registry_prefix_upstream_default }}"
  3086. ntfy_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3087. ntfy_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '2586') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3088. ntfy_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3089. ntfy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3090. ntfy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3091. ntfy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3092. ntfy_visitor_request_limit_exempt_hosts_hostnames_auto: |
  3093. {{
  3094. [matrix_server_fqn_matrix]
  3095. }}
  3096. ######################################################################
  3097. #
  3098. # /ntfy
  3099. #
  3100. ######################################################################
  3101. ######################################################################
  3102. #
  3103. # valkey
  3104. #
  3105. ######################################################################
  3106. valkey_enabled: "{{ matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_encryption_enabled) }}"
  3107. valkey_identifier: matrix-valkey
  3108. valkey_uid: "{{ matrix_user_uid }}"
  3109. valkey_gid: "{{ matrix_user_gid }}"
  3110. valkey_base_path: "{{ matrix_base_data_path }}/valkey"
  3111. valkey_arch: "{{ matrix_architecture }}"
  3112. valkey_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else valkey_container_image_registry_prefix_upstream_default }}"
  3113. ######################################################################
  3114. #
  3115. # valkey
  3116. #
  3117. ######################################################################
  3118. ######################################################################
  3119. #
  3120. # matrix-client-element
  3121. #
  3122. ######################################################################
  3123. # By default, this playbook installs the Element Web on the `matrix_server_fqn_element` domain.
  3124. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  3125. matrix_client_element_enabled: true
  3126. matrix_client_element_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3127. matrix_client_element_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_element_docker_image_registry_prefix_upstream_default }}"
  3128. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3129. matrix_client_element_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8765') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3130. matrix_client_element_container_network: "{{ matrix_addons_container_network }}"
  3131. matrix_client_element_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_element_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3132. matrix_client_element_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3133. matrix_client_element_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3134. matrix_client_element_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3135. matrix_client_element_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3136. matrix_client_element_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3137. matrix_client_element_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3138. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  3139. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  3140. # Use Scalar by default
  3141. matrix_client_element_integrations_ui_url: "https://scalar.vector.im/"
  3142. matrix_client_element_integrations_rest_url: "https://scalar.vector.im/api"
  3143. matrix_client_element_integrations_widgets_urls: "{{ ['https://scalar.vector.im/api'] }}"
  3144. matrix_client_element_integrations_jitsi_widget_url: "https://scalar.vector.im/api/widgets/jitsi.html"
  3145. matrix_client_element_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3146. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3147. matrix_client_element_enable_presence_by_hs_url: |-
  3148. {{
  3149. none
  3150. if matrix_synapse_presence_enabled
  3151. else {matrix_client_element_default_hs_url: false}
  3152. }}
  3153. matrix_client_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3154. matrix_client_element_features_feature_video_rooms: "{{ matrix_rtc_enabled }}"
  3155. matrix_client_element_features_feature_group_calls: "{{ matrix_rtc_enabled }}"
  3156. matrix_client_element_features_feature_element_call_video_rooms: "{{ matrix_rtc_enabled }}"
  3157. matrix_client_element_features_feature_oidc_native_flow: "{{ matrix_authentication_service_enabled }}"
  3158. matrix_client_element_element_call_enabled: "{{ matrix_element_call_enabled }}"
  3159. matrix_client_element_element_call_url: "{{ matrix_element_call_public_url if matrix_element_call_enabled else '' }}"
  3160. ######################################################################
  3161. #
  3162. # /matrix-client-element
  3163. #
  3164. ######################################################################
  3165. ######################################################################
  3166. #
  3167. # hydrogen
  3168. #
  3169. ######################################################################
  3170. hydrogen_enabled: false
  3171. hydrogen_identifier: matrix-client-hydrogen
  3172. hydrogen_uid: "{{ matrix_user_uid }}"
  3173. hydrogen_gid: "{{ matrix_user_gid }}"
  3174. hydrogen_container_image_registry_prefix: "{{ 'localhost/' if hydrogen_container_image_self_build else hydrogen_container_image_registry_prefix_upstream }}"
  3175. hydrogen_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else hydrogen_container_image_registry_prefix_upstream_default }}"
  3176. hydrogen_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3177. hydrogen_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8768') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3178. hydrogen_container_network: "{{ matrix_addons_container_network }}"
  3179. hydrogen_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (hydrogen_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3180. hydrogen_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3181. hydrogen_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3182. hydrogen_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3183. hydrogen_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3184. hydrogen_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3185. hydrogen_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3186. hydrogen_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3187. hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  3188. hydrogen_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3189. hydrogen_base_path: "{{ matrix_base_data_path }}/client-hydrogen"
  3190. hydrogen_hostname: "{{ matrix_server_fqn_hydrogen }}"
  3191. ######################################################################
  3192. #
  3193. # /hydrogen
  3194. #
  3195. ######################################################################
  3196. ######################################################################
  3197. #
  3198. # cinny
  3199. #
  3200. ######################################################################
  3201. cinny_enabled: false
  3202. cinny_identifier: matrix-client-cinny
  3203. cinny_uid: "{{ matrix_user_uid }}"
  3204. cinny_gid: "{{ matrix_user_gid }}"
  3205. cinny_container_image_registry_prefix: "{{ 'localhost/' if cinny_container_image_self_build else cinny_container_image_registry_prefix_upstream }}"
  3206. cinny_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else cinny_container_image_registry_prefix_upstream_default }}"
  3207. cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3208. cinny_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3209. cinny_container_network: "{{ matrix_addons_container_network }}"
  3210. cinny_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (cinny_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3211. cinny_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3212. cinny_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3213. cinny_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3214. cinny_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3215. cinny_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3216. cinny_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3217. cinny_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3218. cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  3219. cinny_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3220. cinny_base_path: "{{ matrix_base_data_path }}/client-cinny"
  3221. cinny_hostname: "{{ matrix_server_fqn_cinny }}"
  3222. ######################################################################
  3223. #
  3224. # /cinny
  3225. #
  3226. ######################################################################
  3227. ######################################################################
  3228. #
  3229. # matrix-client-schildichat
  3230. #
  3231. ######################################################################
  3232. matrix_client_schildichat_enabled: false
  3233. matrix_client_schildichat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3234. matrix_client_schildichat_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_schildichat_docker_image_registry_prefix_upstream_default }}"
  3235. matrix_client_schildichat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3236. matrix_client_schildichat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8765') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3237. matrix_client_schildichat_container_network: "{{ matrix_addons_container_network }}"
  3238. matrix_client_schildichat_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_schildichat_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3239. matrix_client_schildichat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3240. matrix_client_schildichat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3241. matrix_client_schildichat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3242. matrix_client_schildichat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3243. matrix_client_schildichat_default_hs_url: "{{ matrix_homeserver_url }}"
  3244. matrix_client_schildichat_default_is_url: "{{ matrix_identity_server_url }}"
  3245. # Use Scalar by default
  3246. matrix_client_schildichat_integrations_ui_url: "https://scalar.vector.im/"
  3247. matrix_client_schildichat_integrations_rest_url: "https://scalar.vector.im/api"
  3248. matrix_client_schildichat_integrations_widgets_urls: "{{ ['https://scalar.vector.im/api'] }}"
  3249. matrix_client_schildichat_integrations_jitsi_widget_url: "https://scalar.vector.im/api/widgets/jitsi.html"
  3250. matrix_client_schildichat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3251. matrix_client_schildichat_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3252. matrix_client_schildichat_enable_presence_by_hs_url: |-
  3253. {{
  3254. none
  3255. if matrix_synapse_presence_enabled
  3256. else {matrix_client_schildichat_default_hs_url: false}
  3257. }}
  3258. matrix_client_schildichat_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3259. ######################################################################
  3260. #
  3261. # /matrix-client-schildichat
  3262. #
  3263. ######################################################################
  3264. ######################################################################
  3265. #
  3266. # matrix-client-fluffychat
  3267. #
  3268. ######################################################################
  3269. matrix_client_fluffychat_enabled: false
  3270. matrix_client_fluffychat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3271. matrix_client_fluffychat_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_fluffychat_docker_image_registry_prefix_upstream_default }}"
  3272. matrix_client_fluffychat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3273. matrix_client_fluffychat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8770') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3274. matrix_client_fluffychat_container_network: "{{ matrix_addons_container_network }}"
  3275. matrix_client_fluffychat_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_fluffychat_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3276. matrix_client_fluffychat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3277. matrix_client_fluffychat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3278. matrix_client_fluffychat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3279. matrix_client_fluffychat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3280. matrix_client_fluffychat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3281. ######################################################################
  3282. #
  3283. # /matrix-client-fluffychat
  3284. #
  3285. ######################################################################
  3286. ######################################################################
  3287. #
  3288. # matrix-synapse
  3289. #
  3290. ######################################################################
  3291. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  3292. matrix_synapse_username: "{{ matrix_user_name }}"
  3293. matrix_synapse_uid: "{{ matrix_user_uid }}"
  3294. matrix_synapse_gid: "{{ matrix_user_gid }}"
  3295. matrix_synapse_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3296. matrix_synapse_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_docker_image_registry_prefix_upstream_default }}"
  3297. matrix_s3_goofys_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_s3_goofys_docker_image_registry_prefix_upstream_default }}"
  3298. matrix_synapse_rust_synapse_compress_state_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_rust_synapse_compress_state_docker_image_registry_prefix_upstream_default }}"
  3299. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3300. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  3301. matrix_synapse_container_federation_api_tls_host_bind_port: "{{ matrix_federation_public_port if (matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled) else '' }}"
  3302. #
  3303. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  3304. matrix_synapse_container_metrics_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9100') if matrix_synapse_metrics_enabled and matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3305. #
  3306. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  3307. matrix_synapse_container_manhole_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9000') if matrix_synapse_metrics_enabled and matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3308. matrix_synapse_container_network: "{{ matrix_homeserver_container_network }}"
  3309. matrix_synapse_container_additional_networks_auto: |
  3310. {{
  3311. (
  3312. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_synapse_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  3313. +
  3314. ([postgres_container_network] if (postgres_enabled and postgres_container_network != matrix_synapse_container_network and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3315. +
  3316. ([valkey_container_network] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == valkey_identifier else [])
  3317. +
  3318. ([exim_relay_container_network] if (exim_relay_enabled and matrix_synapse_email_enabled and matrix_synapse_email_smtp_host == exim_relay_identifier and matrix_synapse_container_network != exim_relay_container_network) else [])
  3319. +
  3320. ([matrix_bot_draupnir_container_network] if (matrix_synapse_ext_synapse_http_antispam_enabled and matrix_synapse_ext_synapse_http_antispam_config_base_url == matrix_bot_draupnir_synapse_http_antispam_config_base_url and matrix_bot_draupnir_container_network != matrix_synapse_container_network) else [])
  3321. ) | unique
  3322. }}
  3323. matrix_synapse_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3324. matrix_synapse_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3325. matrix_synapse_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3326. matrix_synapse_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3327. matrix_synapse_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  3328. matrix_synapse_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3329. matrix_synapse_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3330. matrix_synapse_container_labels_matrix_labels_enabled: "{{ not matrix_synapse_workers_enabled }}"
  3331. matrix_synapse_container_labels_public_client_root_redirection_enabled: "{{ matrix_synapse_container_labels_public_client_root_redirection_url != '' }}"
  3332. matrix_synapse_container_labels_public_client_root_redirection_url: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element) if matrix_client_element_enabled else '' }}"
  3333. matrix_synapse_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled or matrix_element_admin_enabled }}"
  3334. matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled: "{{ (matrix_bot_draupnir_enabled and matrix_bot_draupnir_admin_api_enabled) }}"
  3335. matrix_synapse_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3336. matrix_synapse_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  3337. matrix_synapse_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  3338. matrix_synapse_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  3339. matrix_synapse_container_labels_public_federation_api_traefik_tls_certResolver: "{{ matrix_synapse_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  3340. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3341. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3342. matrix_synapse_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3343. matrix_synapse_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3344. # For exposing the Synapse worker (and metrics) ports to the local host.
  3345. matrix_synapse_workers_container_host_bind_address: "{{ matrix_playbook_service_host_bind_interface_prefix[0:-1] if (matrix_synapse_workers_enabled and matrix_playbook_service_host_bind_interface_prefix) else '' }}"
  3346. matrix_synapse_database_host: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3347. matrix_synapse_database_password: "{{ (matrix_homeserver_generic_secret_key + ':synapse.db') | hash('sha512') | to_uuid }}"
  3348. matrix_synapse_macaroon_secret_key: "{{ (matrix_homeserver_generic_secret_key + ':synapse.mac') | hash('sha512') | to_uuid }}"
  3349. # We do not enable TLS in Synapse by default, since it's handled by Traefik.
  3350. matrix_synapse_tls_federation_listener_enabled: false
  3351. matrix_synapse_tls_certificate_path: ~
  3352. matrix_synapse_tls_private_key_path: ~
  3353. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_user_verification_service_enabled or matrix_livekit_jwt_service_enabled) }}"
  3354. matrix_synapse_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3355. matrix_synapse_metrics_proxying_enabled: "{{ matrix_synapse_metrics_enabled and matrix_metrics_exposure_enabled }}"
  3356. matrix_synapse_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  3357. matrix_synapse_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/synapse"
  3358. matrix_synapse_email_enabled: "{{ exim_relay_enabled }}"
  3359. matrix_synapse_email_smtp_host: "{{ exim_relay_identifier }}"
  3360. matrix_synapse_email_smtp_port: 8025
  3361. matrix_synapse_email_smtp_require_transport_security: false
  3362. matrix_synapse_email_notif_from: "Matrix <{{ exim_relay_sender_address }}>"
  3363. matrix_synapse_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  3364. matrix_synapse_turn_shared_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  3365. matrix_synapse_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  3366. matrix_synapse_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  3367. matrix_synapse_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3368. matrix_synapse_systemd_required_services_list_auto: |
  3369. {{
  3370. ([postgres_identifier ~ '.service'] if (postgres_enabled and postgres_container_network != matrix_synapse_container_network and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3371. +
  3372. ([valkey_identifier ~ '.service'] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == valkey_identifier else [])
  3373. +
  3374. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  3375. +
  3376. (['matrix-authentication-service.service'] if (matrix_synapse_matrix_authentication_service_enabled and matrix_synapse_matrix_authentication_service_endpoint == matrix_authentication_service_http_base_container_url) else [])
  3377. }}
  3378. matrix_synapse_systemd_wanted_services_list_auto: |
  3379. {{
  3380. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  3381. +
  3382. ([exim_relay_identifier ~ '.service'] if exim_relay_enabled else [])
  3383. }}
  3384. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  3385. matrix_synapse_redis_enabled: "{{ valkey_enabled }}"
  3386. matrix_synapse_redis_host: "{{ valkey_identifier if valkey_enabled else '' }}"
  3387. matrix_synapse_redis_password: "{{ valkey_connection_password if valkey_enabled else '' }}"
  3388. matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  3389. matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  3390. # Disable creation of media repository Synapse worker when using media-repo
  3391. matrix_synapse_ext_media_repo_enabled: "{{ matrix_media_repo_enabled }}"
  3392. matrix_synapse_ext_synapse_http_antispam_enabled: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled }}"
  3393. matrix_synapse_ext_synapse_http_antispam_config_base_url: "{{ matrix_bot_draupnir_synapse_http_antispam_config_base_url if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else '' }}"
  3394. matrix_synapse_ext_synapse_http_antispam_config_authorization: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else '' }}"
  3395. matrix_synapse_ext_synapse_http_antispam_config_enabled_callbacks: "{{ matrix_bot_draupnir_synapse_http_antispam_config_enabled_callbacks if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else [] }}"
  3396. matrix_synapse_ext_synapse_http_antispam_config_fail_open: "{{ matrix_bot_draupnir_synapse_http_antispam_config_fail_open if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else {} }}"
  3397. matrix_synapse_ext_synapse_http_antispam_config_async: "{{ matrix_bot_draupnir_synapse_http_antispam_config_async if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else {} }}"
  3398. # Enable Synapse statistics reporting when using synapse-usage-exporter
  3399. matrix_synapse_report_stats: "{{ matrix_synapse_usage_exporter_enabled }}"
  3400. matrix_synapse_report_stats_endpoint: "{{ (('http://' + matrix_synapse_usage_exporter_identifier + ':' + matrix_synapse_usage_exporter_container_port | string + '/report-usage-stats/push') if matrix_synapse_usage_exporter_enabled else '') }}"
  3401. matrix_synapse_experimental_features_msc3266_enabled: "{{ matrix_rtc_enabled }}"
  3402. matrix_synapse_matrix_authentication_service_enabled: "{{ matrix_authentication_service_enabled }}"
  3403. matrix_synapse_matrix_authentication_service_endpoint: "{{ matrix_authentication_service_http_base_container_url if matrix_authentication_service_enabled else '' }}"
  3404. matrix_synapse_matrix_authentication_service_secret: "{{ matrix_authentication_service_config_matrix_secret if matrix_authentication_service_enabled else '' }}"
  3405. matrix_synapse_experimental_features_msc4108_enabled: "{{ matrix_authentication_service_enabled and not matrix_authentication_service_migration_in_progress }}"
  3406. matrix_synapse_experimental_features_msc4140_enabled: "{{ matrix_rtc_enabled }}"
  3407. matrix_synapse_experimental_features_msc4222_enabled: "{{ matrix_rtc_enabled }}"
  3408. # Disable password authentication when delegating authentication to Matrix Authentication Service.
  3409. # Unless this is done, Synapse fails on startup with:
  3410. # > Error in configuration at 'password_config.enabled':
  3411. # > Password auth cannot be enabled when OAuth delegation is enabled
  3412. matrix_synapse_password_config_enabled: "{{ not matrix_synapse_matrix_authentication_service_enabled }}"
  3413. matrix_synapse_register_user_script_matrix_authentication_service_path: "{{ matrix_authentication_service_bin_path }}/register-user"
  3414. # After Synapse's systemd health check passes, the reverse proxy still needs time to
  3415. # discover the container and register its routes. We derive this delay from Traefik's
  3416. # providers.providersThrottleDuration setting (+1s grace for our healthcheck polling interval),
  3417. # so it stays in sync automatically.
  3418. matrix_synapse_systemd_service_post_start_delay_seconds: "{{ (traefik_config_providers_providersThrottleDuration_seconds | int + 1) if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] else 0 }}"
  3419. ######################################################################
  3420. #
  3421. # /matrix-synapse
  3422. #
  3423. ######################################################################
  3424. ######################################################################
  3425. #
  3426. # matrix-synapse-auto-compressor
  3427. #
  3428. ######################################################################
  3429. # Not enabled by default, for now
  3430. matrix_synapse_auto_compressor_enabled: false
  3431. matrix_synapse_auto_compressor_uid: "{{ matrix_user_uid }}"
  3432. matrix_synapse_auto_compressor_gid: "{{ matrix_user_gid }}"
  3433. matrix_synapse_auto_compressor_postgres_image: "{{ postgres_container_image_to_use }}"
  3434. matrix_synapse_auto_compressor_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_auto_compressor_container_image_registry_prefix_upstream_default }}"
  3435. matrix_synapse_auto_compressor_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3436. matrix_synapse_auto_compressor_container_network: "{{ (postgres_container_network if (postgres_enabled and matrix_synapse_auto_compressor_database_hostname == matrix_synapse_database_host and matrix_synapse_database_host == postgres_connection_hostname) else 'matrix-synapse-auto-compressor') }}"
  3437. matrix_synapse_auto_compressor_database_username: "{{ matrix_synapse_database_user if matrix_synapse_enabled else '' }}"
  3438. matrix_synapse_auto_compressor_database_password: "{{ matrix_synapse_database_password if matrix_synapse_enabled else '' }}"
  3439. matrix_synapse_auto_compressor_database_hostname: "{{ matrix_synapse_database_host if matrix_synapse_enabled else '' }}"
  3440. matrix_synapse_auto_compressor_database_port: "{{ matrix_synapse_database_port if matrix_synapse_enabled else '5432' }}"
  3441. matrix_synapse_auto_compressor_database_name: "{{ matrix_synapse_database_database if matrix_synapse_enabled else '' }}"
  3442. matrix_synapse_auto_compressor_systemd_required_services_list_auto: |
  3443. {{
  3444. ([postgres_identifier ~ '.service'] if (matrix_synapse_auto_compressor_container_network == postgres_container_network) else [])
  3445. }}
  3446. ######################################################################
  3447. #
  3448. # /matrix-synapse-auto-compressor
  3449. #
  3450. ######################################################################
  3451. ######################################################################
  3452. #
  3453. # matrix-synapse-reverse-proxy-companion
  3454. #
  3455. ######################################################################
  3456. matrix_synapse_reverse_proxy_companion_enabled: "{{ matrix_synapse_enabled and matrix_synapse_workers_enabled }}"
  3457. matrix_synapse_reverse_proxy_companion_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_reverse_proxy_companion_container_image_registry_prefix_upstream_default }}"
  3458. matrix_synapse_reverse_proxy_companion_container_network: "{{ matrix_synapse_container_network }}"
  3459. matrix_synapse_reverse_proxy_companion_container_additional_networks_auto: |
  3460. {{
  3461. (
  3462. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_synapse_reverse_proxy_companion_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  3463. +
  3464. ([matrix_prometheus_nginxlog_exporter_container_network] if (matrix_prometheus_nginxlog_exporter_enabled and matrix_prometheus_nginxlog_exporter_container_network != matrix_synapse_reverse_proxy_companion_container_network) else [])
  3465. +
  3466. ([] if matrix_homeserver_container_network in ['', matrix_synapse_reverse_proxy_companion_container_network] else [matrix_homeserver_container_network])
  3467. ) | unique
  3468. }}
  3469. matrix_synapse_reverse_proxy_companion_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  3470. matrix_synapse_reverse_proxy_companion_container_client_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8008') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3471. matrix_synapse_reverse_proxy_companion_container_federation_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8048') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3472. matrix_synapse_reverse_proxy_companion_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3473. matrix_synapse_reverse_proxy_companion_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3474. matrix_synapse_reverse_proxy_companion_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3475. matrix_synapse_reverse_proxy_companion_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3476. matrix_synapse_reverse_proxy_companion_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  3477. matrix_synapse_reverse_proxy_companion_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3478. matrix_synapse_reverse_proxy_companion_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3479. matrix_synapse_reverse_proxy_companion_container_labels_public_client_synapse_client_api_enabled: "{{ matrix_synapse_container_labels_public_client_synapse_client_api_enabled }}"
  3480. matrix_synapse_reverse_proxy_companion_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_container_labels_public_client_synapse_admin_api_enabled }}"
  3481. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_enabled: "{{ matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled }}"
  3482. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3483. matrix_synapse_reverse_proxy_companion_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_synapse_container_labels_public_federation_api_traefik_entrypoints }}"
  3484. matrix_synapse_reverse_proxy_companion_container_labels_public_federation_api_traefik_tls: "{{ matrix_synapse_container_labels_public_federation_api_traefik_tls }}"
  3485. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_api_enabled: "{{ matrix_synapse_container_labels_internal_client_api_enabled }}"
  3486. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_synapse_container_labels_internal_client_api_traefik_entrypoints }}"
  3487. matrix_synapse_reverse_proxy_companion_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  3488. matrix_synapse_reverse_proxy_companion_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  3489. matrix_synapse_reverse_proxy_companion_synapse_room_worker_client_server_locations: "{{ matrix_synapse_workers_room_worker_client_server_endpoints }}"
  3490. matrix_synapse_reverse_proxy_companion_synapse_room_worker_federation_locations: "{{ matrix_synapse_workers_room_worker_federation_endpoints }}"
  3491. matrix_synapse_reverse_proxy_companion_synapse_sync_worker_client_server_locations: "{{ matrix_synapse_workers_sync_worker_client_server_endpoints }}"
  3492. matrix_synapse_reverse_proxy_companion_synapse_client_reader_client_server_locations: "{{ matrix_synapse_workers_client_reader_client_server_endpoints }}"
  3493. matrix_synapse_reverse_proxy_companion_synapse_federation_reader_federation_locations: "{{ matrix_synapse_workers_federation_reader_federation_endpoints }}"
  3494. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  3495. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  3496. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_typing_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints }}"
  3497. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_to_device_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_to_device_stream_worker_client_server_endpoints }}"
  3498. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_account_data_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_account_data_stream_worker_client_server_endpoints }}"
  3499. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_receipts_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_receipts_stream_worker_client_server_endpoints }}"
  3500. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_presence_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_presence_stream_worker_client_server_endpoints }}"
  3501. matrix_synapse_reverse_proxy_companion_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  3502. matrix_synapse_reverse_proxy_companion_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_worker_client_server_endpoints|default([]) }}"
  3503. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  3504. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_server_port: "{{ (matrix_prometheus_nginxlog_exporter_identifier | string +':'+ matrix_prometheus_nginxlog_exporter_container_syslog_port | string) | default('') }}"
  3505. ######################################################################
  3506. #
  3507. # /matrix-synapse-reverse-proxy-companion
  3508. #
  3509. ######################################################################
  3510. ######################################################################
  3511. #
  3512. # matrix-synapse-admin
  3513. #
  3514. ######################################################################
  3515. matrix_synapse_admin_enabled: false
  3516. matrix_synapse_admin_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_admin_docker_image_registry_prefix_upstream_default }}"
  3517. matrix_synapse_admin_container_uid: "{{ matrix_user_uid }}"
  3518. matrix_synapse_admin_container_gid: "{{ matrix_user_gid }}"
  3519. matrix_synapse_admin_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8766') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3520. matrix_synapse_admin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3521. matrix_synapse_admin_container_network: "{{ matrix_addons_container_network }}"
  3522. matrix_synapse_admin_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3523. matrix_synapse_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3524. matrix_synapse_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3525. matrix_synapse_admin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3526. matrix_synapse_admin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3527. matrix_synapse_admin_config_externalAuthProvider: "{{ matrix_authentication_service_enabled | default(false) or matrix_synapse_ext_password_provider_ldap_enabled | default(false) }}"
  3528. matrix_synapse_admin_config_asManagedUsers_auto: |
  3529. {{
  3530. ([
  3531. '^@'+(matrix_alertmanager_receiver_config_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3532. ] if matrix_alertmanager_receiver_enabled else [])
  3533. +
  3534. ([
  3535. '^@'+(matrix_appservice_draupnir_for_all_user_prefix | default('') | regex_escape) +'_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3536. ] if matrix_appservice_draupnir_for_all_enabled else [])
  3537. +
  3538. ([
  3539. '^@'+(matrix_bot_baibot_config_user_mxid_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3540. ] if matrix_bot_baibot_enabled else [])
  3541. +
  3542. ([
  3543. '^@'+(matrix_bot_buscarron_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3544. ] if matrix_bot_buscarron_enabled else [])
  3545. +
  3546. ([
  3547. '^@'+(matrix_bot_draupnir_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3548. ] if matrix_bot_draupnir_enabled else [])
  3549. +
  3550. ([
  3551. '^@'+(matrix_bot_honoroit_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3552. ] if matrix_bot_honoroit_enabled else [])
  3553. +
  3554. ([
  3555. '^@'+(matrix_bot_matrix_registration_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3556. ] if matrix_bot_matrix_registration_bot_enabled else [])
  3557. +
  3558. ([
  3559. '^@'+(matrix_bot_matrix_reminder_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3560. ] if matrix_bot_matrix_reminder_bot_enabled else [])
  3561. +
  3562. ([
  3563. '^@'+(matrix_bot_maubot_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3564. ] if matrix_bot_maubot_enabled else [])
  3565. +
  3566. ([
  3567. '^@'+(matrix_postmoogle_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  3568. ] if matrix_postmoogle_enabled else [])
  3569. +
  3570. ([
  3571. '^@_discord_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3572. ] if matrix_appservice_discord_enabled else [])
  3573. +
  3574. ([
  3575. '^@'+(matrix_appservice_slack_bot_name | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3576. '^@'+(matrix_appservice_slack_user_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3577. ] if matrix_appservice_slack_enabled else [])
  3578. +
  3579. ([
  3580. '^@'+(matrix_beeper_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3581. '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3582. ] if matrix_beeper_linkedin_enabled else [])
  3583. +
  3584. ([
  3585. '^@heisenbridge:'+(matrix_domain | regex_escape)+'$',
  3586. '^@hbirc_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3587. ] if matrix_heisenbridge_enabled else [])
  3588. +
  3589. ([
  3590. '^@hookshot:'+(matrix_domain | regex_escape)+'$',
  3591. '^@_github_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3592. '^@_gitlab_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3593. '^@_jira_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3594. '^@'+(matrix_hookshot_generic_userIdPrefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3595. ] if matrix_hookshot_enabled else [])
  3596. +
  3597. ([
  3598. '^@'+(matrix_mautrix_bluesky_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3599. '^@bluesky_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3600. ] if matrix_mautrix_bluesky_enabled else [])
  3601. +
  3602. ([
  3603. '^@'+(matrix_mautrix_discord_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3604. '^@discord_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  3605. ] if matrix_mautrix_discord_enabled else [])
  3606. +
  3607. ([
  3608. '^@'+(matrix_mautrix_gmessages_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3609. '^@gmessages_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3610. ] if matrix_mautrix_gmessages_enabled else [])
  3611. +
  3612. ([
  3613. '^@'+(matrix_mautrix_googlechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3614. '^@googlechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3615. ] if matrix_mautrix_googlechat_enabled else [])
  3616. +
  3617. ([
  3618. '^@'+(matrix_mautrix_meta_instagram_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3619. '^@'+(matrix_mautrix_meta_instagram_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3620. ] if matrix_mautrix_meta_instagram_enabled else [])
  3621. +
  3622. ([
  3623. '^@'+(matrix_mautrix_meta_messenger_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3624. '^@'+(matrix_mautrix_meta_messenger_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3625. ] if matrix_mautrix_meta_messenger_enabled else [])
  3626. +
  3627. ([
  3628. '^@'+(matrix_mautrix_signal_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3629. '^@signal_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3630. ] if matrix_mautrix_signal_enabled else [])
  3631. +
  3632. ([
  3633. '^@'+(matrix_mautrix_slack_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3634. '^@slack_[a-zA-Z0-9\-]+:'+(matrix_domain | regex_escape)+'$',
  3635. ] if matrix_mautrix_slack_enabled else [])
  3636. +
  3637. ([
  3638. '^@'+(matrix_mautrix_telegram_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3639. '^@'+(matrix_mautrix_telegram_username_template | regex_escape | replace('{userid}', '.+'))+':'+(matrix_domain | regex_escape)+'$',
  3640. ] if matrix_mautrix_telegram_enabled else [])
  3641. +
  3642. ([
  3643. '^@'+(matrix_mautrix_twitter_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3644. '^@twitter_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3645. ] if matrix_mautrix_twitter_enabled else [])
  3646. +
  3647. ([
  3648. '^@'+(matrix_mautrix_whatsapp_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3649. '^@whatsapp_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  3650. ] if matrix_mautrix_whatsapp_enabled else [])
  3651. +
  3652. ([
  3653. '^@'+(matrix_mautrix_imessage_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3654. '^@imessage_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3655. ] if matrix_mautrix_wsproxy_enabled else [])
  3656. +
  3657. ([
  3658. '^@_groupmepuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3659. ] if matrix_mx_puppet_groupme_enabled else [])
  3660. +
  3661. ([
  3662. '^@_steampuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3663. ] if matrix_mx_puppet_steam_enabled else [])
  3664. +
  3665. ([
  3666. '^@smsbot:'+(matrix_domain | regex_escape)+'$',
  3667. '^@sms_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3668. ] if matrix_sms_bridge_enabled else [])
  3669. +
  3670. ([
  3671. '^@'+(matrix_wechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3672. '^@_wechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3673. ] if matrix_wechat_enabled else [])
  3674. +
  3675. ([
  3676. '^@'+(matrix_steam_bridge_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  3677. '^@steam_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  3678. ] if matrix_steam_bridge_enabled else [])
  3679. }}
  3680. ######################################################################
  3681. #
  3682. # /matrix-synapse-admin
  3683. #
  3684. ######################################################################
  3685. ######################################################################
  3686. #
  3687. # matrix-synapse-usage-exporter
  3688. #
  3689. ######################################################################
  3690. matrix_synapse_usage_exporter_enabled: false
  3691. matrix_synapse_usage_exporter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_usage_exporter_container_image_registry_prefix_upstream_default }}"
  3692. matrix_synapse_usage_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  3693. matrix_synapse_usage_exporter_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3694. matrix_synapse_usage_exporter_container_labels_traefik_enabled: "{{ matrix_synapse_usage_exporter_proxying_enabled }}"
  3695. matrix_synapse_usage_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3696. matrix_synapse_usage_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3697. matrix_synapse_usage_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3698. ######################################################################
  3699. #
  3700. # /matrix-synapse-usage-exporter
  3701. #
  3702. ######################################################################
  3703. ######################################################################
  3704. #
  3705. # prometheus_node_exporter
  3706. #
  3707. ######################################################################
  3708. prometheus_node_exporter_enabled: false
  3709. prometheus_node_exporter_identifier: matrix-prometheus-node-exporter
  3710. prometheus_node_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-node-exporter"
  3711. prometheus_node_exporter_uid: "{{ matrix_user_uid }}"
  3712. prometheus_node_exporter_gid: "{{ matrix_user_gid }}"
  3713. prometheus_node_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  3714. prometheus_node_exporter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else prometheus_node_exporter_container_image_registry_prefix_upstream_default }}"
  3715. prometheus_node_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  3716. prometheus_node_exporter_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3717. prometheus_node_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  3718. prometheus_node_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3719. prometheus_node_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3720. prometheus_node_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3721. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3722. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3723. ######################################################################
  3724. #
  3725. # /prometheus_node_exporter
  3726. #
  3727. ######################################################################
  3728. ######################################################################
  3729. #
  3730. # prometheus_postgres_exporter
  3731. #
  3732. ######################################################################
  3733. prometheus_postgres_exporter_enabled: false
  3734. prometheus_postgres_exporter_identifier: matrix-prometheus-postgres-exporter
  3735. prometheus_postgres_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-postgres-exporter"
  3736. prometheus_postgres_exporter_uid: "{{ matrix_user_uid }}"
  3737. prometheus_postgres_exporter_gid: "{{ matrix_user_gid }}"
  3738. prometheus_postgres_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  3739. prometheus_postgres_exporter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else prometheus_postgres_exporter_container_image_registry_prefix_upstream_default }}"
  3740. prometheus_postgres_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  3741. prometheus_postgres_exporter_container_additional_networks: |
  3742. {{
  3743. ([postgres_container_network] if (postgres_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname and prometheus_postgres_exporter_container_network != postgres_container_network) else [])
  3744. +
  3745. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and prometheus_postgres_exporter_container_labels_traefik_enabled else [])
  3746. }}
  3747. prometheus_postgres_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  3748. prometheus_postgres_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3749. prometheus_postgres_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3750. prometheus_postgres_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3751. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3752. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3753. prometheus_postgres_exporter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3754. prometheus_postgres_exporter_database_username: matrix_prometheus_postgres_exporter
  3755. prometheus_postgres_exporter_database_password: "{{ (matrix_homeserver_generic_secret_key + ':prometheus.pg.db') | hash('sha512') | to_uuid }}"
  3756. prometheus_postgres_exporter_database_name: matrix_prometheus_postgres_exporter
  3757. prometheus_postgres_exporter_systemd_required_services_list_auto: |
  3758. {{
  3759. ([postgres_identifier ~ '.service'] if (postgres_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  3760. }}
  3761. ######################################################################
  3762. #
  3763. # /prometheus_postgres_exporter
  3764. #
  3765. ######################################################################
  3766. ######################################################################
  3767. #
  3768. # matrix-prometheus-nginxlog-exporter
  3769. #
  3770. ######################################################################
  3771. matrix_prometheus_nginxlog_exporter_enabled: false
  3772. matrix_prometheus_nginxlog_exporter_identifier: matrix-prometheus-nginxlog-exporter
  3773. matrix_prometheus_nginxlog_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  3774. matrix_prometheus_nginxlog_exporter_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_prometheus_nginxlog_exporter_docker_image_registry_prefix_upstream_default }}"
  3775. matrix_prometheus_nginxlog_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  3776. matrix_prometheus_nginxlog_exporter_container_additional_networks_auto: |-
  3777. {{
  3778. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_prometheus_nginxlog_exporter_container_labels_traefik_enabled) else [])
  3779. }}
  3780. matrix_prometheus_nginxlog_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  3781. matrix_prometheus_nginxlog_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3782. matrix_prometheus_nginxlog_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3783. matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3784. matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3785. matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3786. matrix_prometheus_nginxlog_exporter_config_namespaces_matrix_source_tags_auto: |
  3787. {{
  3788. ([matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_tag] if matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled else [])
  3789. }}
  3790. ######################################################################
  3791. #
  3792. # /matrix-prometheus-nginxlog-exporter
  3793. #
  3794. ######################################################################
  3795. ######################################################################
  3796. #
  3797. # prometheus
  3798. #
  3799. ######################################################################
  3800. prometheus_enabled: false
  3801. prometheus_identifier: matrix-prometheus
  3802. prometheus_base_path: "{{ matrix_base_data_path }}/prometheus"
  3803. prometheus_uid: "{{ matrix_user_uid }}"
  3804. prometheus_gid: "{{ matrix_user_gid }}"
  3805. prometheus_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else prometheus_container_image_registry_prefix_upstream_default }}"
  3806. prometheus_container_network: "{{ matrix_monitoring_container_network }}"
  3807. prometheus_container_additional_networks_auto: |
  3808. {{
  3809. (
  3810. ([prometheus_node_exporter_container_network] if prometheus_self_node_scraper_enabled and prometheus_node_exporter_container_network != prometheus_container_network else [])
  3811. +
  3812. ([matrix_synapse_container_network] if matrix_prometheus_services_connect_scraper_synapse_enabled and matrix_synapse_container_network != prometheus_container_network else [])
  3813. +
  3814. ([prometheus_postgres_exporter_container_network] if matrix_prometheus_services_connect_scraper_postgres_enabled and prometheus_postgres_exporter_container_network != prometheus_container_network else [])
  3815. +
  3816. ([matrix_hookshot_container_network] if matrix_prometheus_services_connect_scraper_hookshot_enabled and matrix_hookshot_container_network != prometheus_container_network else [])
  3817. +
  3818. ([matrix_prometheus_nginxlog_exporter_container_network] if matrix_prometheus_services_connect_scraper_nginxlog_enabled and matrix_prometheus_nginxlog_exporter_container_network != prometheus_container_network else [])
  3819. +
  3820. ([matrix_media_repo_container_network] if matrix_prometheus_services_connect_scraper_media_repo_enabled and matrix_media_repo_container_network != prometheus_container_network else [])
  3821. +
  3822. ([matrix_synapse_usage_exporter_container_network] if matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled and matrix_synapse_usage_exporter_container_network != prometheus_container_network else [])
  3823. ) | unique
  3824. }}
  3825. prometheus_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9090') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3826. prometheus_config_rule_files_auto: |
  3827. {{
  3828. (['synapse-v2.rules'] if matrix_prometheus_services_connect_synapse_rules_enabled else [])
  3829. }}
  3830. prometheus_self_node_scraper_enabled: "{{ prometheus_node_exporter_enabled }}"
  3831. prometheus_self_node_scraper_static_configs_target: "{{ (prometheus_node_exporter_identifier + ':9100') if prometheus_node_exporter_enabled else '' }}"
  3832. prometheus_config_scrape_configs_auto: |
  3833. {{
  3834. (matrix_prometheus_services_connect_scraper_synapse_configs if matrix_prometheus_services_connect_scraper_synapse_enabled else [])
  3835. +
  3836. (matrix_prometheus_services_connect_scraper_postgres_scrape_configs if matrix_prometheus_services_connect_scraper_postgres_enabled else [])
  3837. +
  3838. (matrix_prometheus_services_connect_scraper_hookshot_scrape_configs if matrix_prometheus_services_connect_scraper_hookshot_enabled else [])
  3839. +
  3840. (matrix_prometheus_services_connect_scraper_nginxlog_scrape_configs if matrix_prometheus_services_connect_scraper_nginxlog_enabled else [])
  3841. +
  3842. (matrix_prometheus_services_connect_scraper_media_repo_scrape_configs if matrix_prometheus_services_connect_scraper_media_repo_enabled else [])
  3843. +
  3844. (matrix_prometheus_services_connect_scraper_synapse_usage_exporter_scrape_configs if matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled else [])
  3845. }}
  3846. ######################################################################
  3847. #
  3848. # /prometheus
  3849. #
  3850. ######################################################################
  3851. ######################################################################
  3852. #
  3853. # matrix-prometheus-services-connect
  3854. #
  3855. ######################################################################
  3856. matrix_prometheus_services_connect_synapse_enabled: "{{ prometheus_enabled and matrix_synapse_enabled }}"
  3857. matrix_prometheus_services_connect_synapse_rules_download_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  3858. matrix_prometheus_services_connect_synapse_rules_download_dir_path: "{{ prometheus_config_path }}"
  3859. matrix_prometheus_services_connect_synapse_rules_download_owner: "{{ prometheus_uid }}"
  3860. matrix_prometheus_services_connect_synapse_rules_download_group: "{{ prometheus_gid }}"
  3861. matrix_prometheus_services_connect_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  3862. matrix_prometheus_services_connect_scraper_synapse_main_process_static_configs_target: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  3863. matrix_prometheus_services_connect_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  3864. matrix_prometheus_services_connect_scraper_postgres_enabled: "{{ prometheus_postgres_exporter_enabled }}"
  3865. matrix_prometheus_services_connect_scraper_postgres_static_configs_target: "{{ prometheus_postgres_exporter_identifier }}:{{ prometheus_postgres_exporter_container_http_port | string }}"
  3866. matrix_prometheus_services_connect_scraper_hookshot_enabled: "{{ matrix_hookshot_enabled and matrix_hookshot_metrics_enabled }}"
  3867. matrix_prometheus_services_connect_scraper_hookshot_static_configs_target: "{{ matrix_hookshot_container_url }}:{{ matrix_hookshot_metrics_port | string }}"
  3868. matrix_prometheus_services_connect_scraper_nginxlog_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  3869. matrix_prometheus_services_connect_scraper_nginxlog_static_configs_target: "{{ matrix_prometheus_nginxlog_exporter_identifier }}:{{ matrix_prometheus_nginxlog_exporter_container_metrics_port | string }}"
  3870. matrix_prometheus_services_connect_scraper_media_repo_enabled: "{{ matrix_media_repo_enabled and matrix_media_repo_metrics_enabled }}"
  3871. matrix_prometheus_services_connect_scraper_media_repo_static_configs_target: "{{ matrix_media_repo_identifier }}:{{ matrix_media_repo_metrics_port }}"
  3872. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled: "{{ matrix_synapse_usage_exporter_enabled }}"
  3873. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_static_configs_target: "{{ matrix_synapse_usage_exporter_identifier }}:{{ matrix_synapse_usage_exporter_container_port | string }}"
  3874. ######################################################################
  3875. #
  3876. # /matrix-prometheus-services-connect
  3877. #
  3878. ######################################################################
  3879. ######################################################################
  3880. #
  3881. # grafana
  3882. #
  3883. ######################################################################
  3884. grafana_enabled: false
  3885. grafana_identifier: matrix-grafana
  3886. grafana_uid: "{{ matrix_user_uid }}"
  3887. grafana_gid: "{{ matrix_user_gid }}"
  3888. grafana_hostname: "{{ matrix_server_fqn_grafana }}"
  3889. grafana_base_path: "{{ matrix_base_data_path }}/grafana"
  3890. grafana_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else grafana_container_image_registry_prefix_upstream_default }}"
  3891. grafana_container_network: "{{ matrix_monitoring_container_network }}"
  3892. grafana_container_additional_networks_auto: |
  3893. {{
  3894. (
  3895. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and grafana_container_labels_traefik_enabled else [])
  3896. +
  3897. ([prometheus_container_network] if prometheus_enabled and prometheus_container_network != grafana_container_network else [])
  3898. ) | unique
  3899. }}
  3900. grafana_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3901. grafana_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3902. grafana_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3903. grafana_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3904. grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3905. grafana_provisioning_datasources_datasources: |
  3906. {{
  3907. ([{
  3908. 'name': (matrix_server_fqn_matrix + ' - Prometheus'),
  3909. 'type': 'prometheus',
  3910. 'access': 'proxy',
  3911. 'url': ('http://' + prometheus_identifier + ':9090'),
  3912. 'jsonData': {
  3913. 'timeInterval': prometheus_config_global_scrape_interval,
  3914. }
  3915. }] if prometheus_enabled else [])
  3916. }}
  3917. grafana_dashboard_download_urls: |
  3918. {{
  3919. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  3920. +
  3921. (prometheus_node_exporter_dashboard_urls if prometheus_node_exporter_enabled else [])
  3922. +
  3923. (prometheus_postgres_exporter_dashboard_urls if prometheus_postgres_exporter_enabled else [])
  3924. +
  3925. (matrix_prometheus_nginxlog_exporter_dashboard_urls if matrix_prometheus_nginxlog_exporter_enabled else [])
  3926. +
  3927. (matrix_media_repo_dashboard_urls if matrix_media_repo_metrics_enabled else [])
  3928. +
  3929. (matrix_synapse_usage_exporter_dashboard_urls if matrix_synapse_usage_exporter_enabled else [])
  3930. }}
  3931. grafana_provisioning_dashboard_template_files: |
  3932. {{
  3933. ([{
  3934. 'path': 'roles/custom/matrix-prometheus-nginxlog-exporter/templates/grafana/nginx-proxy.json',
  3935. 'name': 'nginx-proxy.json',
  3936. }] if matrix_prometheus_nginxlog_exporter_enabled else [])
  3937. }}
  3938. grafana_default_home_dashboard_path: |-
  3939. {{
  3940. {
  3941. 'synapse': ('/etc/grafana/dashboards/synapse.json' if matrix_synapse_metrics_enabled and matrix_synapse_metrics_enabled else ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else '')),
  3942. 'dendrite': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  3943. 'conduit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  3944. 'continuwuity': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  3945. }[matrix_homeserver_implementation]
  3946. }}
  3947. ######################################################################
  3948. #
  3949. # /grafana
  3950. #
  3951. ######################################################################
  3952. ######################################################################
  3953. #
  3954. # matrix-registration
  3955. #
  3956. ######################################################################
  3957. matrix_registration_enabled: false
  3958. matrix_registration_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3959. matrix_registration_hostname: "{{ matrix_server_fqn_matrix }}"
  3960. matrix_registration_path_prefix: /matrix-registration
  3961. matrix_registration_systemd_required_services_list_auto: |
  3962. {{
  3963. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_registration_database_hostname == postgres_connection_hostname) else [])
  3964. }}
  3965. matrix_registration_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_registration_docker_image_registry_prefix_upstream_default }}"
  3966. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  3967. matrix_registration_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8767') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3968. matrix_registration_container_network: "{{ matrix_addons_container_network }}"
  3969. matrix_registration_container_additional_networks_auto: |-
  3970. {{
  3971. (
  3972. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  3973. +
  3974. ([postgres_container_network] if (postgres_enabled and matrix_registration_database_hostname == postgres_connection_hostname and matrix_registration_container_network != postgres_container_network) else [])
  3975. +
  3976. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_registration_container_labels_traefik_enabled) else [])
  3977. ) | unique
  3978. }}
  3979. matrix_registration_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3980. matrix_registration_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3981. matrix_registration_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3982. matrix_registration_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3983. matrix_registration_riot_instance: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://element.io/app/' }}"
  3984. matrix_registration_shared_secret: |-
  3985. {{
  3986. {
  3987. 'synapse': matrix_synapse_registration_shared_secret | default (''),
  3988. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default (''),
  3989. 'conduit': '',
  3990. 'continuwuity': '',
  3991. }[matrix_homeserver_implementation]
  3992. }}
  3993. matrix_registration_server_location: "{{ matrix_addons_homeserver_client_api_url }}"
  3994. matrix_registration_api_validate_certs: "{{ matrix_playbook_ssl_enabled }}"
  3995. # Postgres is the default, except if not using internal Postgres server
  3996. matrix_registration_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  3997. matrix_registration_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3998. matrix_registration_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mx.registr.db') | hash('sha512') | to_uuid }}"
  3999. ######################################################################
  4000. #
  4001. # /matrix-registration
  4002. #
  4003. ######################################################################
  4004. ######################################################################
  4005. #
  4006. # matrix-dendrite
  4007. #
  4008. ######################################################################
  4009. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  4010. matrix_dendrite_hostname: "{{ matrix_server_fqn_matrix }}"
  4011. matrix_dendrite_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  4012. matrix_dendrite_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_dendrite_docker_image_registry_prefix_upstream_default }}"
  4013. matrix_dendrite_container_network: "{{ matrix_homeserver_container_network }}"
  4014. matrix_dendrite_container_additional_networks_auto: |
  4015. {{
  4016. (
  4017. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_dendrite_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4018. +
  4019. ([postgres_container_network] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_dendrite_container_network) else [])
  4020. ) | unique
  4021. }}
  4022. matrix_dendrite_container_http_host_bind_address: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ matrix_dendrite_http_bind_port | string) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4023. matrix_dendrite_container_https_host_bind_address: "{{ '' if not matrix_dendrite_https_bind_port or not matrix_playbook_service_host_bind_interface_prefix else (matrix_playbook_service_host_bind_interface_prefix + matrix_dendrite_https_bind_port | string) }}"
  4024. matrix_dendrite_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4025. matrix_dendrite_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4026. matrix_dendrite_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4027. matrix_dendrite_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4028. matrix_dendrite_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  4029. matrix_dendrite_container_labels_public_client_root_redirection_enabled: "{{ matrix_dendrite_container_labels_public_client_root_redirection_url != '' }}"
  4030. matrix_dendrite_container_labels_public_client_root_redirection_url: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element) if matrix_client_element_enabled else '' }}"
  4031. matrix_dendrite_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4032. matrix_dendrite_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4033. matrix_dendrite_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4034. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4035. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4036. matrix_dendrite_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4037. matrix_dendrite_metrics_proxying_enabled: "{{ matrix_dendrite_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4038. matrix_dendrite_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4039. matrix_dendrite_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/dendrite"
  4040. matrix_dendrite_client_api_registration_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':dendrite.rss') | hash('sha512') | to_uuid }}"
  4041. matrix_dendrite_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4042. matrix_dendrite_database_password: "{{ (matrix_homeserver_generic_secret_key + ':dendrite.db') | hash('sha512') | to_uuid }}"
  4043. matrix_dendrite_client_api_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4044. matrix_dendrite_client_api_turn_shared_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4045. matrix_dendrite_client_api_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4046. matrix_dendrite_client_api_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4047. matrix_dendrite_disable_tls_validation: "{{ not matrix_playbook_ssl_enabled }}"
  4048. matrix_dendrite_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4049. matrix_dendrite_trusted_id_servers: "{{ ['matrix.org', 'vector.im'] }}"
  4050. matrix_dendrite_systemd_required_services_list_auto: |
  4051. {{
  4052. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  4053. +
  4054. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  4055. }}
  4056. matrix_dendrite_systemd_wanted_services_list_auto: |
  4057. {{
  4058. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  4059. }}
  4060. matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  4061. matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  4062. ######################################################################
  4063. #
  4064. # /matrix-dendrite
  4065. #
  4066. ######################################################################
  4067. ######################################################################
  4068. #
  4069. # matrix-conduit
  4070. #
  4071. ######################################################################
  4072. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  4073. matrix_conduit_hostname: "{{ matrix_server_fqn_matrix }}"
  4074. matrix_conduit_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4075. matrix_conduit_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_conduit_docker_image_registry_prefix_upstream_default }}"
  4076. matrix_conduit_container_network: "{{ matrix_homeserver_container_network }}"
  4077. matrix_conduit_container_additional_networks_auto: |
  4078. {{
  4079. (
  4080. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_conduit_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4081. ) | unique
  4082. }}
  4083. matrix_conduit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4084. matrix_conduit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4085. matrix_conduit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4086. matrix_conduit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4087. matrix_conduit_container_labels_public_client_root_redirection_enabled: "{{ matrix_conduit_container_labels_public_client_root_redirection_url != '' }}"
  4088. matrix_conduit_container_labels_public_client_root_redirection_url: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element) if matrix_client_element_enabled else '' }}"
  4089. matrix_conduit_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4090. matrix_conduit_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4091. matrix_conduit_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4092. matrix_conduit_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4093. matrix_conduit_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4094. matrix_conduit_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4095. matrix_conduit_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4096. matrix_conduit_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4097. matrix_conduit_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4098. ######################################################################
  4099. #
  4100. # /matrix-conduit
  4101. #
  4102. ######################################################################
  4103. ######################################################################
  4104. #
  4105. # matrix-continuwuity
  4106. #
  4107. ######################################################################
  4108. matrix_continuwuity_enabled: "{{ matrix_homeserver_implementation == 'continuwuity' }}"
  4109. matrix_continuwuity_hostname: "{{ matrix_server_fqn_matrix }}"
  4110. matrix_continuwuity_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4111. matrix_continuwuity_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_continuwuity_docker_image_registry_prefix_upstream_default }}"
  4112. matrix_continuwuity_container_network: "{{ matrix_homeserver_container_network }}"
  4113. matrix_continuwuity_container_additional_networks_auto: |
  4114. {{
  4115. (
  4116. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_continuwuity_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4117. ) | unique
  4118. }}
  4119. matrix_continuwuity_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4120. matrix_continuwuity_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4121. matrix_continuwuity_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4122. matrix_continuwuity_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4123. matrix_continuwuity_container_labels_public_client_root_redirection_enabled: "{{ matrix_continuwuity_container_labels_public_client_root_redirection_url != '' }}"
  4124. matrix_continuwuity_container_labels_public_client_root_redirection_url: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element) if matrix_client_element_enabled else '' }}"
  4125. matrix_continuwuity_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4126. matrix_continuwuity_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4127. matrix_continuwuity_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4128. matrix_continuwuity_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4129. matrix_continuwuity_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4130. matrix_continuwuity_config_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4131. matrix_continuwuity_config_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4132. matrix_continuwuity_config_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4133. matrix_continuwuity_config_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4134. matrix_continuwuity_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4135. ######################################################################
  4136. #
  4137. # /matrix-continuwuity
  4138. #
  4139. ######################################################################
  4140. ######################################################################
  4141. #
  4142. # matrix-user-creator
  4143. #
  4144. ######################################################################
  4145. matrix_user_creator_users_auto: |
  4146. {{
  4147. ([{
  4148. 'username': matrix_bot_matrix_registration_bot_matrix_user_id_localpart,
  4149. 'initial_password': matrix_bot_matrix_registration_bot_bot_password,
  4150. 'initial_type': 'admin',
  4151. }] if matrix_bot_matrix_registration_bot_enabled else [])
  4152. +
  4153. ([{
  4154. 'username': matrix_bot_baibot_config_user_mxid_localpart,
  4155. 'initial_password': matrix_bot_baibot_config_user_password,
  4156. 'initial_type': 'bot',
  4157. }] if matrix_bot_baibot_enabled else [])
  4158. +
  4159. ([{
  4160. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  4161. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  4162. 'initial_type': 'bot',
  4163. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  4164. +
  4165. ([{
  4166. 'username': matrix_bot_honoroit_login,
  4167. 'initial_password': matrix_bot_honoroit_password,
  4168. 'initial_type': 'bot',
  4169. }] if matrix_bot_honoroit_enabled else [])
  4170. +
  4171. ([{
  4172. 'username': matrix_postmoogle_login,
  4173. 'initial_password': matrix_postmoogle_password,
  4174. 'initial_type': 'bot',
  4175. }] if matrix_postmoogle_enabled else [])
  4176. +
  4177. ([{
  4178. 'username': matrix_bot_buscarron_login,
  4179. 'initial_password': matrix_bot_buscarron_password,
  4180. 'initial_type': 'bot',
  4181. }] if matrix_bot_buscarron_enabled else [])
  4182. +
  4183. ([{
  4184. 'username': matrix_bot_maubot_login,
  4185. 'initial_password': matrix_bot_maubot_initial_password,
  4186. 'initial_type': 'bot',
  4187. }] if matrix_bot_maubot_enabled else [])
  4188. +
  4189. ([{
  4190. 'username': matrix_bot_draupnir_login,
  4191. 'initial_password': matrix_bot_draupnir_password,
  4192. 'initial_type': ('admin' if matrix_bot_draupnir_admin_api_enabled else 'bot'),
  4193. }] if matrix_bot_draupnir_enabled and matrix_bot_draupnir_password else [])
  4194. }}
  4195. ######################################################################
  4196. #
  4197. # /matrix-user-creator
  4198. #
  4199. ######################################################################
  4200. ######################################################################
  4201. #
  4202. # matrix-user-verification-service
  4203. #
  4204. ######################################################################
  4205. matrix_user_verification_service_enabled: false
  4206. matrix_user_verification_service_systemd_required_services_list: |
  4207. {{
  4208. [devture_systemd_docker_base_docker_service_name]
  4209. +
  4210. (['matrix-' + matrix_homeserver_implementation + '.service'])
  4211. }}
  4212. matrix_user_verification_service_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_user_verification_service_docker_image_registry_prefix_upstream_default }}"
  4213. matrix_user_verification_service_container_network: "{{ matrix_addons_container_network }}"
  4214. matrix_user_verification_service_container_additional_networks: |
  4215. {{
  4216. (
  4217. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  4218. +
  4219. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_user_verification_service_container_network else [])
  4220. ) | unique
  4221. }}
  4222. # If Jitsi is managed by this playbook we can use the docker network — no need to expose a port.
  4223. # If Jitsi is not managed by this playbook, or you otherwise have a need for it, you can expose
  4224. # matrix-user-verfification-services's client-server port to port 3003.
  4225. # By default Matrix-User-Verification-Service binds to port 3000, which collides with grafana, therefore this uses port 3003.
  4226. matrix_user_verification_service_container_http_host_bind_port: "{{ '' if (jitsi_enabled | bool and jitsi_enable_auth | bool and jitsi_auth_type == 'matrix') else matrix_playbook_service_host_bind_interface_prefix ~ '3003' }}"
  4227. # URL exposed in the docker network
  4228. matrix_user_verification_service_container_url: "http://{{ matrix_user_verification_service_container_name }}:3000"
  4229. matrix_user_verification_service_uvs_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  4230. # We connect via the container network (private IPs), so we need to disable IP checks
  4231. matrix_user_verification_service_uvs_disable_ip_blacklist: "{{ matrix_synapse_enabled }}"
  4232. matrix_user_verification_service_uvs_auth_token: "{{ (matrix_homeserver_generic_secret_key + ':uvs.auth.token') | hash('sha512') | to_uuid }}"
  4233. ######################################################################
  4234. #
  4235. # /matrix-user-verification-service
  4236. #
  4237. ######################################################################
  4238. ########################################################################
  4239. # #
  4240. # matrix-static-files #
  4241. # #
  4242. ########################################################################
  4243. matrix_static_files_enabled: true
  4244. matrix_static_files_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_static_files_container_image_registry_prefix_upstream_default }}"
  4245. matrix_static_files_container_network: "{{ (matrix_static_files_identifier if matrix_playbook_reverse_proxy_type == 'none' else matrix_playbook_reverse_proxy_container_network) }}"
  4246. matrix_static_files_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4247. matrix_static_files_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4248. matrix_static_files_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4249. matrix_static_files_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4250. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4251. # Base domain serving is not enabled by default (see `matrix_static_files_container_labels_base_domain_enabled`),
  4252. # but we pass the hostname, so that enabling it is easy.
  4253. matrix_static_files_container_labels_base_domain_traefik_hostname: "{{ matrix_domain }}"
  4254. # If we're not serving a static webpage, serve a redirect instead of a 404.
  4255. matrix_static_files_container_labels_base_domain_root_path_redirection_enabled: "{{ not matrix_static_files_file_index_html_enabled }}"
  4256. matrix_static_files_container_labels_base_domain_root_path_redirection_url: "{{ ('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_matrix }}/${1}"
  4257. matrix_static_files_file_matrix_client_property_io_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  4258. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_enabled: "{{ matrix_authentication_service_enabled }}"
  4259. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_issuer: "{{ matrix_authentication_service_config_http_issuer if matrix_authentication_service_enabled else '' }}"
  4260. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_account: "{{ matrix_authentication_service_account_management_url if matrix_authentication_service_enabled else '' }}"
  4261. matrix_static_files_file_matrix_client_property_m_tile_server_entries_enabled: "{{ matrix_client_element_location_sharing_enabled }}"
  4262. matrix_static_files_file_matrix_client_property_m_tile_server_map_style_url: "{{ ('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element }}/map_style.json"
  4263. # We set this regardless of whether synapse-admin is enabled, because people may wish to use a hosted (externally) synapse-admin installation and still have it auto-configured.
  4264. # See: https://github.com/etkecc/synapse-admin/pull/126
  4265. matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_auto: "{{ matrix_synapse_admin_configuration if matrix_homeserver_implementation == 'synapse' else {} }}"
  4266. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled: "{{ matrix_livekit_jwt_service_enabled }}"
  4267. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto: |-
  4268. {{
  4269. (
  4270. [{'type': 'livekit', 'livekit_service_url': matrix_livekit_jwt_service_public_url}] if matrix_livekit_jwt_service_enabled else []
  4271. )
  4272. }}
  4273. matrix_static_files_file_matrix_server_property_m_server: "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}"
  4274. matrix_static_files_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4275. matrix_static_files_self_check_hostname_matrix: "{{ matrix_server_fqn_matrix }}"
  4276. matrix_static_files_self_check_hostname_identity: "{{ matrix_domain }}"
  4277. ########################################################################
  4278. # #
  4279. # /matrix-static-files #
  4280. # #
  4281. ########################################################################
  4282. ########################################################################
  4283. # #
  4284. # container-socket-proxy #
  4285. # #
  4286. ########################################################################
  4287. container_socket_proxy_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  4288. container_socket_proxy_identifier: matrix-container-socket-proxy
  4289. container_socket_proxy_base_path: "{{ matrix_base_data_path }}/container-socket-proxy"
  4290. container_socket_proxy_uid: "{{ matrix_user_uid }}"
  4291. container_socket_proxy_gid: "{{ matrix_user_gid }}"
  4292. # Traefik requires read access to the containers APIs to do its job
  4293. container_socket_proxy_api_containers_enabled: true
  4294. container_socket_proxy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else container_socket_proxy_container_image_registry_prefix_upstream_default }}"
  4295. ########################################################################
  4296. # #
  4297. # /container-socket-proxy #
  4298. # #
  4299. ########################################################################
  4300. ########################################################################
  4301. # #
  4302. # traefik #
  4303. # #
  4304. ########################################################################
  4305. traefik_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  4306. traefik_identifier: matrix-traefik
  4307. traefik_base_path: "{{ matrix_base_data_path }}/traefik"
  4308. traefik_uid: "{{ matrix_user_uid }}"
  4309. traefik_gid: "{{ matrix_user_gid }}"
  4310. # It's common for setups to deal with large file uploads which may take longer than the default readTimeout (60s).
  4311. # This override (for the `web` entrypoint) also cascades to overriding the `web-secure` entrypoint and the `matrix-federation` entrypoint.
  4312. traefik_config_entrypoint_web_transport_respondingTimeouts_readTimeout: 300s
  4313. traefik_additional_entrypoints_auto: |
  4314. {{
  4315. ([matrix_playbook_public_matrix_federation_api_traefik_entrypoint_definition] if matrix_playbook_public_matrix_federation_api_traefik_entrypoint_enabled else [])
  4316. +
  4317. ([matrix_playbook_internal_matrix_client_api_traefik_entrypoint_definition] if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else [])
  4318. }}
  4319. traefik_config_providers_docker_endpoint: "{{ container_socket_proxy_endpoint if container_socket_proxy_enabled else 'unix:///var/run/docker.sock' }}"
  4320. traefik_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else traefik_container_image_registry_prefix_upstream_default }}"
  4321. traefik_container_additional_networks_auto: |
  4322. {{
  4323. ([container_socket_proxy_container_network] if container_socket_proxy_enabled else [])
  4324. }}
  4325. traefik_systemd_required_services_list: |
  4326. {{
  4327. ([devture_systemd_docker_base_docker_service_name])
  4328. +
  4329. ([container_socket_proxy_identifier + '.service'] if container_socket_proxy_enabled else [])
  4330. }}
  4331. traefik_additional_domains_to_obtain_certificates_for_auto: |
  4332. {{
  4333. ([coturn_hostname] if (coturn_enabled and coturn_tls_enabled and coturn_hostname != matrix_server_fqn_matrix) else [])
  4334. }}
  4335. ########################################################################
  4336. # #
  4337. # /traefik #
  4338. # #
  4339. ########################################################################
  4340. ########################################################################
  4341. # #
  4342. # traefik_certs_dumper #
  4343. # #
  4344. ########################################################################
  4345. traefik_certs_dumper_enabled: "{{ (matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' and traefik_config_entrypoint_web_secure_enabled and traefik_config_certificatesResolvers_acme_enabled) or matrix_playbook_reverse_proxy_type == 'other-traefik-container' }}"
  4346. traefik_certs_dumper_identifier: matrix-traefik-certs-dumper
  4347. traefik_certs_dumper_base_path: "{{ matrix_base_data_path }}/traefik-certs-dumper"
  4348. traefik_certs_dumper_uid: "{{ matrix_user_uid }}"
  4349. traefik_certs_dumper_gid: "{{ matrix_user_gid }}"
  4350. traefik_certs_dumper_ssl_path: "{{ traefik_ssl_dir_path if traefik_enabled else '' }}"
  4351. # We make the certs dumper require the Traefik service (not just docker.service),
  4352. # because when both restart simultaneously (e.g. in all-at-once mode), Traefik may
  4353. # momentarily truncate or reinitialize acme.json, causing the certs dumper to read
  4354. # an empty file and panic. By requiring Traefik, the certs dumper only starts after
  4355. # Traefik is fully ready and acme.json is stable.
  4356. traefik_certs_dumper_systemd_required_services_list_auto: |
  4357. {{
  4358. ([traefik_identifier + '.service'] if traefik_enabled else [])
  4359. }}
  4360. traefik_certs_dumper_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else traefik_certs_dumper_container_image_registry_prefix_upstream_default }}"
  4361. ########################################################################
  4362. # #
  4363. # /traefik_certs_dumper #
  4364. # #
  4365. ########################################################################
  4366. ########################################################################
  4367. # #
  4368. # matrix-element-admin #
  4369. # #
  4370. ########################################################################
  4371. # We don't enable this by default.
  4372. matrix_element_admin_enabled: false
  4373. matrix_element_admin_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4374. matrix_element_admin_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_element_admin_container_image_registry_prefix_upstream_default }}"
  4375. matrix_element_admin_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  4376. matrix_element_admin_container_network: "{{ matrix_addons_container_network }}"
  4377. matrix_element_admin_container_additional_networks_auto: |-
  4378. {{
  4379. (
  4380. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  4381. +
  4382. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_element_admin_container_labels_traefik_enabled) else [])
  4383. ) | unique
  4384. }}
  4385. matrix_element_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4386. matrix_element_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4387. matrix_element_admin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4388. matrix_element_admin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4389. matrix_element_admin_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  4390. ######################################################################
  4391. # #
  4392. # /matrix-element-admin #
  4393. # #
  4394. ######################################################################
  4395. ########################################################################
  4396. # #
  4397. # matrix-element-call #
  4398. # #
  4399. ########################################################################
  4400. matrix_element_call_enabled: false
  4401. matrix_element_call_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4402. matrix_element_call_container_network: "{{ matrix_addons_container_network }}"
  4403. matrix_element_call_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_element_call_container_image_registry_prefix_upstream_default }}"
  4404. matrix_element_call_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_element_call_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  4405. matrix_element_call_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4406. matrix_element_call_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4407. matrix_element_call_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4408. matrix_element_call_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4409. matrix_element_call_config_livekit_livekit_service_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  4410. ########################################################################
  4411. # #
  4412. # /matrix-element-call #
  4413. # #
  4414. ########################################################################
  4415. ########################################################################
  4416. # #
  4417. # livekit-server #
  4418. # #
  4419. ########################################################################
  4420. livekit_server_enabled: "{{ matrix_rtc_enabled }}"
  4421. livekit_server_identifier: matrix-livekit-server
  4422. livekit_server_uid: "{{ matrix_user_uid }}"
  4423. livekit_server_gid: "{{ matrix_user_gid }}"
  4424. livekit_server_base_path: "{{ matrix_base_data_path }}/livekit-server"
  4425. livekit_server_hostname: "{{ matrix_server_fqn_matrix }}"
  4426. livekit_server_path_prefix: "/livekit-server"
  4427. livekit_server_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4428. livekit_server_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else livekit_server_container_image_registry_prefix_upstream_default }}"
  4429. livekit_server_container_network: "{{ matrix_addons_container_network }}"
  4430. livekit_server_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (livekit_server_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  4431. livekit_server_container_additional_volumes_auto: |
  4432. {{
  4433. (
  4434. [
  4435. {
  4436. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + livekit_server_config_turn_domain + '/certificate.crt'),
  4437. 'dst': livekit_server_config_turn_cert_file,
  4438. 'options': 'ro',
  4439. },
  4440. {
  4441. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + livekit_server_config_turn_domain + '/privatekey.key'),
  4442. 'dst': livekit_server_config_turn_key_file,
  4443. 'options': 'ro',
  4444. },
  4445. ] if (matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and livekit_server_config_turn_enabled and (livekit_server_config_turn_cert_file and livekit_server_config_turn_key_file)) else []
  4446. )
  4447. }}
  4448. livekit_server_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4449. livekit_server_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4450. livekit_server_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4451. livekit_server_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4452. livekit_server_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4453. livekit_server_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4454. livekit_server_metrics_proxying_enabled: "{{ livekit_server_config_prometheus_enabled and matrix_metrics_exposure_enabled }}"
  4455. livekit_server_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4456. livekit_server_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/livekit-server"
  4457. livekit_server_config_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4458. livekit_server_config_keys_auto: |-
  4459. {{
  4460. {}
  4461. | combine(
  4462. {matrix_livekit_jwt_service_environment_variable_livekit_key: matrix_livekit_jwt_service_environment_variable_livekit_secret}
  4463. if matrix_livekit_jwt_service_enabled else {}
  4464. )
  4465. }}
  4466. # We only wish for matrix-livekit-jwt-service to create rooms, only for users on trusted homeservers.
  4467. # See `matrix_livekit_jwt_service_environment_variable_livekit_full_access_homeservers`.
  4468. #
  4469. # Ref:
  4470. # - https://github.com/element-hq/lk-jwt-service/releases/tag/v0.3.0
  4471. # - https://github.com/livekit/livekit/blob/5e483e7554e5afbf254acf84e3ec0aa6e108e758/config-sample.yaml#L168-L170
  4472. # - https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server/commit/2a1b04552634097bdd26d472502a8f5bf1b8528f
  4473. livekit_server_config_room_auto_create: false
  4474. # The playbook intentionally uses a non-standard port than the default used by the role (5349),
  4475. # because Coturn is already using that port.
  4476. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  4477. livekit_server_config_turn_tls_port: 5350
  4478. # The playbook intentionally uses a non-standard port than the default used by the role (3478),
  4479. # because Coturn is already using that port.
  4480. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  4481. livekit_server_config_turn_udp_port: 3479
  4482. # LiveKit's TURN implementation requires SSL certificates.
  4483. # We only enable it if we can provide them automatically via Traefik + Traefik Certs Dumper.
  4484. livekit_server_config_turn_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled }}"
  4485. livekit_server_config_turn_cert_file: |-
  4486. {{
  4487. {
  4488. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  4489. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  4490. 'none': '',
  4491. }[matrix_playbook_reverse_proxy_type]
  4492. }}
  4493. livekit_server_config_turn_key_file: |-
  4494. {{
  4495. {
  4496. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  4497. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  4498. 'none': '',
  4499. }[matrix_playbook_reverse_proxy_type]
  4500. }}
  4501. livekit_server_systemd_required_services_list_auto: |
  4502. {{
  4503. ([traefik_certs_dumper_identifier + '-wait-for-domain@' + livekit_server_config_turn_domain + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and livekit_server_config_turn_enabled else [])
  4504. }}
  4505. ########################################################################
  4506. # #
  4507. # /livekit-server #
  4508. # #
  4509. ########################################################################
  4510. ########################################################################
  4511. # #
  4512. # matrix-livekit-jwt-service #
  4513. # #
  4514. ########################################################################
  4515. matrix_livekit_jwt_service_enabled: "{{ matrix_rtc_enabled and livekit_server_enabled }}"
  4516. matrix_livekit_jwt_service_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4517. matrix_livekit_jwt_service_hostname: "{{ matrix_server_fqn_matrix }}"
  4518. matrix_livekit_jwt_service_path_prefix: "/livekit-jwt-service"
  4519. matrix_livekit_jwt_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  4520. matrix_livekit_jwt_service_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_livekit_jwt_service_container_image_registry_prefix_upstream_default }}"
  4521. matrix_livekit_jwt_service_container_network: "{{ matrix_addons_container_network }}"
  4522. matrix_livekit_jwt_service_container_additional_networks_auto: |
  4523. {{
  4524. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_livekit_jwt_service_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [])
  4525. }}
  4526. matrix_livekit_jwt_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4527. matrix_livekit_jwt_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4528. matrix_livekit_jwt_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4529. matrix_livekit_jwt_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4530. matrix_livekit_jwt_service_environment_variable_livekit_url: "{{ livekit_server_websocket_public_url }}"
  4531. matrix_livekit_jwt_service_environment_variable_livekit_key: "{{ (matrix_homeserver_generic_secret_key + ':lk.key') | hash('sha512') | to_uuid }}"
  4532. matrix_livekit_jwt_service_environment_variable_livekit_secret: "{{ (matrix_homeserver_generic_secret_key + ':lk.secret') | hash('sha512') | to_uuid }}"
  4533. matrix_livekit_jwt_service_environment_variable_livekit_full_access_homeservers_list: ["{{ matrix_domain }}"]
  4534. ########################################################################
  4535. # #
  4536. # /matrix-livekit-jwt-service #
  4537. # #
  4538. ########################################################################