Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

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