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

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