Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

2777 řádky
122 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.<your-domain>`).
  10. ########################################################################
  11. # #
  12. # com.devture.ansible.role.timesync #
  13. # #
  14. ########################################################################
  15. # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.
  16. ########################################################################
  17. # #
  18. # /com.devture.ansible.role.timesync #
  19. # #
  20. ########################################################################
  21. ######################################################################
  22. #
  23. # com.devture.ansible.role.playbook_state_preserver
  24. #
  25. ######################################################################
  26. # To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
  27. devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
  28. devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
  29. devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
  30. devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
  31. ######################################################################
  32. #
  33. # /com.devture.ansible.role.playbook_state_preserver
  34. #
  35. ######################################################################
  36. ######################################################################
  37. #
  38. # matrix-base
  39. #
  40. ######################################################################
  41. matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
  42. matrix_homeserver_container_url: |-
  43. {{
  44. 'http://matrix-nginx-proxy:12080' if matrix_nginx_proxy_enabled else {
  45. 'synapse': ('http://matrix-synapse-reverse-proxy-companion:8008' if matrix_synapse_reverse_proxy_companion_enabled else 'http://matrix-synapse:'+ matrix_synapse_container_client_api_port|string),
  46. 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string),
  47. 'conduit': ('http://matrix-conduit:' + matrix_conduit_port_number|string),
  48. }[matrix_homeserver_implementation]
  49. }}
  50. matrix_homeserver_container_federation_url: |-
  51. {{
  52. 'http://matrix-nginx-proxy:12088' if matrix_nginx_proxy_enabled else {
  53. 'synapse': ('http://matrix-synapse-reverse-proxy-companion:8048' if matrix_synapse_reverse_proxy_companion_enabled else 'http://matrix-synapse:'+ matrix_synapse_container_federation_api_plain_port|string),
  54. 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string),
  55. 'conduit': ('http://matrix-conduit:' + matrix_conduit_port_number|string),
  56. }[matrix_homeserver_implementation]
  57. }}
  58. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  59. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  60. ######################################################################
  61. #
  62. # /matrix-base
  63. #
  64. ######################################################################
  65. ######################################################################
  66. #
  67. # matrix-bridge-appservice-discord
  68. #
  69. ######################################################################
  70. # We don't enable bridges by default.
  71. matrix_appservice_discord_enabled: false
  72. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  73. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  74. # matrix-appservice-discord's client-server port to the local host.
  75. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  76. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  77. matrix_appservice_discord_bridge_disablePresence: "{{ not matrix_synapse_presence_enabled }}"
  78. matrix_appservice_discord_systemd_required_services_list: |
  79. {{
  80. ['docker.service']
  81. +
  82. ['matrix-' + matrix_homeserver_implementation + '.service']
  83. +
  84. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  85. +
  86. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  87. }}
  88. matrix_appservice_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  89. matrix_appservice_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  90. # We only make this use Postgres if our own Postgres server is enabled.
  91. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  92. matrix_appservice_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  93. matrix_appservice_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.discord.db') | to_uuid }}"
  94. ######################################################################
  95. #
  96. # /matrix-bridge-appservice-discord
  97. #
  98. ######################################################################
  99. ######################################################################
  100. #
  101. # matrix-appservice-webhooks
  102. #
  103. ######################################################################
  104. # We don't enable bridges by default.
  105. matrix_appservice_webhooks_enabled: false
  106. matrix_appservice_webhooks_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  107. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  108. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  109. # matrix-appservice-webhooks' client-server port to the local host.
  110. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_webhooks_matrix_port) }}"
  111. matrix_appservice_webhooks_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  112. matrix_appservice_webhooks_homeserver_url: "{{ matrix_homeserver_container_url }}"
  113. matrix_appservice_webhooks_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  114. matrix_appservice_webhooks_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  115. matrix_appservice_webhooks_systemd_required_services_list: |
  116. {{
  117. ['docker.service']
  118. +
  119. ['matrix-' + matrix_homeserver_implementation + '.service']
  120. +
  121. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  122. }}
  123. ######################################################################
  124. #
  125. # /matrix-appservice-webhooks
  126. #
  127. ######################################################################
  128. ######################################################################
  129. #
  130. # matrix-appservice-slack
  131. #
  132. ######################################################################
  133. # We don't enable bridges by default.
  134. matrix_appservice_slack_enabled: false
  135. matrix_appservice_slack_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  136. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  137. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  138. # matrix-appservice-slack's client-server port to the local host.
  139. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  140. matrix_appservice_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  141. matrix_appservice_slack_homeserver_url: "{{ matrix_homeserver_container_url }}"
  142. matrix_appservice_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  143. matrix_appservice_slack_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  144. matrix_appservice_slack_systemd_required_services_list: |
  145. {{
  146. ['docker.service']
  147. +
  148. ['matrix-' + matrix_homeserver_implementation + '.service']
  149. +
  150. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  151. }}
  152. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  153. matrix_appservice_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  154. matrix_appservice_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.slack.db') | to_uuid }}"
  155. ######################################################################
  156. #
  157. # /matrix-bridge-appservice-slack
  158. #
  159. ######################################################################
  160. ######################################################################
  161. #
  162. # matrix-bridge-appservice-irc
  163. #
  164. ######################################################################
  165. # We don't enable bridges by default.
  166. matrix_appservice_irc_enabled: false
  167. matrix_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  168. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  169. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  170. # matrix-appservice-irc's client-server port to the local host.
  171. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  172. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  173. # IRC bridge presence, for performance reasons.
  174. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled }}"
  175. matrix_appservice_irc_systemd_required_services_list: |
  176. {{
  177. ['docker.service']
  178. +
  179. ['matrix-' + matrix_homeserver_implementation + '.service']
  180. +
  181. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  182. }}
  183. matrix_appservice_irc_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  184. matrix_appservice_irc_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  185. matrix_appservice_irc_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  186. matrix_appservice_irc_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.irc.db') | to_uuid }}"
  187. ######################################################################
  188. #
  189. # /matrix-bridge-appservice-irc
  190. #
  191. ######################################################################
  192. ######################################################################
  193. #
  194. # matrix-bridge-appservice-kakaotalk
  195. #
  196. ######################################################################
  197. # We don't enable bridges by default.
  198. matrix_appservice_kakaotalk_enabled: false
  199. matrix_appservice_kakaotalk_systemd_required_services_list: |
  200. {{
  201. ['docker.service']
  202. +
  203. ['matrix-appservice-kakaotalk-node.service']
  204. +
  205. ['matrix-' + matrix_homeserver_implementation + '.service']
  206. +
  207. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  208. +
  209. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  210. }}
  211. matrix_appservice_kakaotalk_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs') | to_uuid }}"
  212. matrix_appservice_kakaotalk_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs') | to_uuid }}"
  213. 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 '' }}"
  214. matrix_appservice_kakaotalk_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  215. matrix_appservice_kakaotalk_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.db') | to_uuid }}"
  216. ######################################################################
  217. #
  218. # /matrix-bridge-appservice-kakaotalk
  219. #
  220. ######################################################################
  221. ######################################################################
  222. #
  223. # matrix-bridge-beeper-linkedin
  224. #
  225. ######################################################################
  226. # We don't enable bridges by default.
  227. matrix_beeper_linkedin_enabled: false
  228. matrix_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  229. matrix_beeper_linkedin_systemd_required_services_list: |
  230. {{
  231. ['docker.service']
  232. +
  233. ['matrix-' + matrix_homeserver_implementation + '.service']
  234. +
  235. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  236. +
  237. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  238. }}
  239. matrix_beeper_linkedin_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.as.token') | to_uuid }}"
  240. matrix_beeper_linkedin_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.hs.token') | to_uuid }}"
  241. matrix_beeper_linkedin_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  242. matrix_beeper_linkedin_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  243. matrix_beeper_linkedin_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maulinkedin.db') | to_uuid }}"
  244. ######################################################################
  245. #
  246. # /matrix-bridge-beeper-linkedin
  247. #
  248. ######################################################################
  249. ######################################################################
  250. #
  251. # matrix-bridge-go-skype-bridge
  252. #
  253. ######################################################################
  254. # We don't enable bridges by default.
  255. matrix_go_skype_bridge_enabled: false
  256. matrix_go_skype_bridge_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  257. matrix_go_skype_bridge_systemd_required_services_list: |
  258. {{
  259. ['docker.service']
  260. +
  261. ['matrix-' + matrix_homeserver_implementation + '.service']
  262. +
  263. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  264. +
  265. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  266. }}
  267. matrix_go_skype_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.as.token') | to_uuid }}"
  268. matrix_go_skype_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.hs.token') | to_uuid }}"
  269. matrix_go_skype_bridge_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  270. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  271. matrix_go_skype_bridge_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  272. matrix_go_skype_bridge_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'goskype.db') | to_uuid }}"
  273. ######################################################################
  274. #
  275. # /matrix-bridge-go-skype-bridge
  276. #
  277. ######################################################################
  278. ######################################################################
  279. #
  280. # matrix-bridge-mautrix-facebook
  281. #
  282. ######################################################################
  283. # We don't enable bridges by default.
  284. matrix_mautrix_facebook_enabled: false
  285. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  286. matrix_mautrix_facebook_systemd_required_services_list: |
  287. {{
  288. ['docker.service']
  289. +
  290. ['matrix-' + matrix_homeserver_implementation + '.service']
  291. +
  292. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  293. +
  294. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  295. }}
  296. matrix_mautrix_facebook_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  297. matrix_mautrix_facebook_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  298. matrix_mautrix_facebook_public_endpoint: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'facebook') | to_uuid }}"
  299. matrix_mautrix_facebook_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9008' }}"
  300. matrix_mautrix_facebook_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  301. matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  302. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  303. # and point them to a migration path.
  304. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  305. matrix_mautrix_facebook_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.fb.db') | to_uuid }}"
  306. ######################################################################
  307. #
  308. # /matrix-bridge-mautrix-facebook
  309. #
  310. ######################################################################
  311. ######################################################################
  312. #
  313. # matrix-bridge-mautrix-hangouts
  314. #
  315. ######################################################################
  316. # We don't enable bridges by default.
  317. matrix_mautrix_hangouts_enabled: false
  318. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  319. matrix_mautrix_hangouts_systemd_required_services_list: |
  320. {{
  321. ['docker.service']
  322. +
  323. ['matrix-' + matrix_homeserver_implementation + '.service']
  324. +
  325. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  326. +
  327. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  328. }}
  329. matrix_mautrix_hangouts_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ho.as.token') | to_uuid }}"
  330. matrix_mautrix_hangouts_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ho.hs.token') | to_uuid }}"
  331. matrix_mautrix_hangouts_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  332. matrix_mautrix_hangouts_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  333. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  334. matrix_mautrix_hangouts_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  335. matrix_mautrix_hangouts_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.hangouts.db') | to_uuid }}"
  336. ######################################################################
  337. #
  338. # /matrix-bridge-mautrix-hangouts
  339. #
  340. ######################################################################
  341. ######################################################################
  342. #
  343. # matrix-bridge-mautrix-googlechat
  344. #
  345. ######################################################################
  346. # We don't enable bridges by default.
  347. matrix_mautrix_googlechat_enabled: false
  348. matrix_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  349. matrix_mautrix_googlechat_systemd_required_services_list: |
  350. {{
  351. ['docker.service']
  352. +
  353. ['matrix-' + matrix_homeserver_implementation + '.service']
  354. +
  355. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  356. +
  357. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  358. }}
  359. matrix_mautrix_googlechat_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.as.token') | to_uuid }}"
  360. matrix_mautrix_googlechat_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.hs.token') | to_uuid }}"
  361. matrix_mautrix_googlechat_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  362. matrix_mautrix_googlechat_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  363. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  364. matrix_mautrix_googlechat_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  365. matrix_mautrix_googlechat_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.gc.db') | to_uuid }}"
  366. ######################################################################
  367. #
  368. # /matrix-bridge-mautrix-googlechat
  369. #
  370. ######################################################################
  371. ######################################################################
  372. #
  373. # matrix-bridge-mautrix-instagram
  374. #
  375. ######################################################################
  376. # We don't enable bridges by default.
  377. matrix_mautrix_instagram_enabled: false
  378. matrix_mautrix_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  379. matrix_mautrix_instagram_systemd_required_services_list: |
  380. {{
  381. ['docker.service']
  382. +
  383. ['matrix-' + matrix_homeserver_implementation + '.service']
  384. +
  385. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  386. +
  387. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  388. }}
  389. matrix_mautrix_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.as.token') | to_uuid }}"
  390. matrix_mautrix_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.hs.token') | to_uuid }}"
  391. matrix_mautrix_instagram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  392. matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  393. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  394. # and point them to a migration path.
  395. matrix_mautrix_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  396. matrix_mautrix_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.ig.db') | to_uuid }}"
  397. ######################################################################
  398. #
  399. # /matrix-bridge-mautrix-instagram
  400. #
  401. ######################################################################
  402. ######################################################################
  403. #
  404. # matrix-bridge-mautrix-signal
  405. #
  406. ######################################################################
  407. # We don't enable bridges by default.
  408. matrix_mautrix_signal_enabled: false
  409. matrix_mautrix_signal_systemd_required_services_list: |
  410. {{
  411. ['docker.service']
  412. +
  413. ['matrix-' + matrix_homeserver_implementation + '.service']
  414. +
  415. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  416. +
  417. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  418. +
  419. ['matrix-mautrix-signal-daemon.service']
  420. }}
  421. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  422. matrix_mautrix_signal_homeserver_address: "{{ matrix_homeserver_container_url }}"
  423. matrix_mautrix_signal_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.hs.token') | to_uuid }}"
  424. matrix_mautrix_signal_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.as.token') | to_uuid }}"
  425. matrix_mautrix_signal_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  426. matrix_mautrix_signal_database_engine: 'postgres'
  427. matrix_mautrix_signal_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.signal.db') | to_uuid }}"
  428. matrix_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  429. matrix_mautrix_signal_daemon_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  430. ######################################################################
  431. #
  432. # /matrix-bridge-mautrix-signal
  433. #
  434. ######################################################################
  435. ######################################################################
  436. #
  437. # matrix-bridge-mautrix-telegram
  438. #
  439. ######################################################################
  440. # We don't enable bridges by default.
  441. matrix_mautrix_telegram_enabled: false
  442. # Images are multi-arch (amd64 and arm64, but not arm32).
  443. matrix_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  444. matrix_telegram_lottieconverter_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  445. matrix_telegram_lottieconverter_container_image_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}"
  446. matrix_mautrix_telegram_systemd_required_services_list: |
  447. {{
  448. ['docker.service']
  449. +
  450. ['matrix-' + matrix_homeserver_implementation + '.service']
  451. +
  452. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  453. +
  454. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  455. }}
  456. matrix_mautrix_telegram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  457. matrix_mautrix_telegram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  458. matrix_mautrix_telegram_public_endpoint: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegram') | to_uuid }}"
  459. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  460. matrix_mautrix_telegram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  461. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  462. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  463. matrix_mautrix_telegram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.telegram.db') | to_uuid }}"
  464. ######################################################################
  465. #
  466. # /matrix-bridge-mautrix-telegram
  467. #
  468. ######################################################################
  469. ######################################################################
  470. #
  471. # matrix-bridge-mautrix-twitter
  472. #
  473. ######################################################################
  474. # We don't enable bridges by default.
  475. matrix_mautrix_twitter_enabled: false
  476. matrix_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  477. matrix_mautrix_twitter_systemd_required_services_list: |
  478. {{
  479. ['docker.service']
  480. +
  481. ['matrix-' + matrix_homeserver_implementation + '.service']
  482. +
  483. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  484. +
  485. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  486. }}
  487. matrix_mautrix_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.as.token') | to_uuid }}"
  488. matrix_mautrix_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.hs.token') | to_uuid }}"
  489. matrix_mautrix_twitter_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  490. matrix_mautrix_twitter_database_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  491. matrix_mautrix_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.twt.db') | to_uuid if matrix_postgres_enabled else '' }}"
  492. ######################################################################
  493. #
  494. # /matrix-bridge-mautrix-twitter
  495. #
  496. ######################################################################
  497. ######################################################################
  498. #
  499. # matrix-bridge-mautrix-whatsapp
  500. #
  501. ######################################################################
  502. # We don't enable bridges by default.
  503. matrix_mautrix_whatsapp_enabled: false
  504. matrix_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  505. matrix_mautrix_whatsapp_systemd_required_services_list: |
  506. {{
  507. ['docker.service']
  508. +
  509. ['matrix-' + matrix_homeserver_implementation + '.service']
  510. +
  511. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  512. +
  513. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  514. }}
  515. matrix_mautrix_whatsapp_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  516. matrix_mautrix_whatsapp_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  517. matrix_mautrix_whatsapp_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  518. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  519. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  520. matrix_mautrix_whatsapp_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauwhatsapp.db') | to_uuid }}"
  521. ######################################################################
  522. #
  523. # /matrix-bridge-mautrix-whatsapp
  524. #
  525. ######################################################################
  526. ######################################################################
  527. #
  528. # matrix-bridge-mautrix-discord
  529. #
  530. ######################################################################
  531. # We don't enable bridges by default.
  532. matrix_mautrix_discord_enabled: false
  533. matrix_mautrix_discord_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  534. matrix_mautrix_discord_systemd_required_services_list: |
  535. {{
  536. ['docker.service']
  537. +
  538. ['matrix-' + matrix_homeserver_implementation + '.service']
  539. +
  540. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  541. +
  542. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  543. }}
  544. matrix_mautrix_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.as.tok') | to_uuid }}"
  545. matrix_mautrix_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.hs.tok') | to_uuid }}"
  546. matrix_mautrix_discord_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  547. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  548. matrix_mautrix_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  549. matrix_mautrix_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudiscord.db') | to_uuid }}"
  550. # Enabling bridge.restricted_rooms for this bridge does not work well with Conduit, so we disable it by default.
  551. # This will be fixed in the upcoming `0.5.0` release of conduit.
  552. matrix_mautrix_discord_bridge_restricted_rooms: "{{ false if matrix_homeserver_implementation == 'conduit' else true }}"
  553. ######################################################################
  554. #
  555. # /matrix-bridge-mautrix-discord
  556. #
  557. ######################################################################
  558. ######################################################################
  559. #
  560. # matrix-sms-bridge
  561. #
  562. ######################################################################
  563. # We don't enable bridges by default.
  564. matrix_sms_bridge_enabled: false
  565. matrix_sms_bridge_systemd_required_services_list: |
  566. {{
  567. ['docker.service']
  568. +
  569. ['matrix-' + matrix_homeserver_implementation + '.service']
  570. +
  571. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  572. }}
  573. matrix_sms_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.as.token') | to_uuid }}"
  574. matrix_sms_bridge_homeserver_port: "{{ matrix_synapse_container_client_api_port }}"
  575. matrix_sms_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.hs.token') | to_uuid }}"
  576. ######################################################################
  577. #
  578. # /matrix-sms-bridge
  579. #
  580. ######################################################################
  581. ######################################################################
  582. #
  583. # matrix-bridge-heisenbridge
  584. #
  585. ######################################################################
  586. # We don't enable bridges by default.
  587. matrix_heisenbridge_enabled: false
  588. matrix_heisenbridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.as.tok') | to_uuid }}"
  589. matrix_heisenbridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.hs.tok') | to_uuid }}"
  590. matrix_heisenbridge_systemd_wanted_services_list: |
  591. {{
  592. ['matrix-' + matrix_homeserver_implementation + '.service']
  593. +
  594. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  595. }}
  596. ######################################################################
  597. #
  598. # /matrix-bridge-heisenbridge
  599. #
  600. ######################################################################
  601. ######################################################################
  602. #
  603. # matrix-bridge-hookshot
  604. #
  605. ######################################################################
  606. # We don't enable bridges by default.
  607. matrix_hookshot_enabled: false
  608. matrix_hookshot_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  609. matrix_hookshot_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.as.tok') | to_uuid }}"
  610. matrix_hookshot_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.hs.tok') | to_uuid }}"
  611. matrix_hookshot_systemd_wanted_services_list: |
  612. {{
  613. (['matrix-' + matrix_homeserver_implementation + '.service'])
  614. +
  615. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  616. }}
  617. matrix_hookshot_container_http_host_bind_ports_defaultmapping:
  618. - "127.0.0.1:{{ matrix_hookshot_appservice_port }}:{{ matrix_hookshot_appservice_port }}"
  619. - "127.0.0.1:{{ matrix_hookshot_metrics_port }}:{{ matrix_hookshot_metrics_port }}"
  620. - "127.0.0.1:{{ matrix_hookshot_webhook_port }}:{{ matrix_hookshot_webhook_port }}"
  621. - "127.0.0.1:{{ matrix_hookshot_provisioning_port }}:{{ matrix_hookshot_provisioning_port }}"
  622. matrix_hookshot_container_http_host_bind_ports: "{{ [] if matrix_nginx_proxy_enabled else matrix_hookshot_container_http_host_bind_ports_defaultmapping }}"
  623. matrix_hookshot_provisioning_enabled: "{{ matrix_hookshot_provisioning_secret and matrix_dimension_enabled }}"
  624. # We only enable metrics (locally, in the container network) for the bridge if Prometheus is enabled.
  625. #
  626. # People using an external Prometheus server will need to toggle all of these to be able to consume metrics remotely:
  627. # - `matrix_hookshot_metrics_enabled`
  628. # - `matrix_hookshot_metrics_proxying_enabled`
  629. # - `matrix_nginx_proxy_proxy_matrix_metrics_enabled`
  630. matrix_hookshot_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  631. matrix_hookshot_urlprefix_port_enabled: "{{ matrix_nginx_proxy_container_https_host_bind_port == 443 if matrix_nginx_proxy_https_enabled else matrix_nginx_proxy_container_https_host_bind_port == 80 }}"
  632. matrix_hookshot_urlprefix_port: ":{{ matrix_nginx_proxy_container_https_host_bind_port if matrix_nginx_proxy_https_enabled else matrix_nginx_proxy_container_http_host_bind_port }}"
  633. matrix_hookshot_urlprefix: "http{{ 's' if matrix_nginx_proxy_https_enabled else '' }}://{{ matrix_server_fqn_matrix }}{{ matrix_hookshot_urlprefix_port if matrix_hookshot_urlprefix_port_enabled else '' }}"
  634. ######################################################################
  635. #
  636. # /matrix-bridge-hookshot
  637. #
  638. ######################################################################
  639. ######################################################################
  640. #
  641. # matrix-bridge-mx-puppet-slack
  642. #
  643. ######################################################################
  644. # We don't enable bridges by default.
  645. matrix_mx_puppet_slack_enabled: false
  646. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  647. matrix_mx_puppet_slack_systemd_required_services_list: |
  648. {{
  649. ['docker.service']
  650. +
  651. ['matrix-' + matrix_homeserver_implementation + '.service']
  652. +
  653. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  654. +
  655. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  656. }}
  657. matrix_mx_puppet_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.as.tok') | to_uuid }}"
  658. matrix_mx_puppet_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.hs.tok') | to_uuid }}"
  659. matrix_mx_puppet_slack_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  660. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  661. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  662. matrix_mx_puppet_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.slack.db') | to_uuid }}"
  663. ######################################################################
  664. #
  665. # /matrix-bridge-mx-puppet-slack
  666. #
  667. ######################################################################
  668. ######################################################################
  669. #
  670. # matrix-bridge-mx-puppet-twitter
  671. #
  672. ######################################################################
  673. # We don't enable bridges by default.
  674. matrix_mx_puppet_twitter_enabled: false
  675. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  676. matrix_mx_puppet_twitter_systemd_required_services_list: |
  677. {{
  678. ['docker.service']
  679. +
  680. ['matrix-' + matrix_homeserver_implementation + '.service']
  681. +
  682. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  683. +
  684. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  685. }}
  686. matrix_mx_puppet_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.as.tok') | to_uuid }}"
  687. matrix_mx_puppet_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.hs.tok') | to_uuid }}"
  688. matrix_mx_puppet_twitter_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  689. matrix_mx_puppet_twitter_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_mx_puppet_twitter_appservice_port) }}"
  690. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  691. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  692. matrix_mx_puppet_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.twitter.db') | to_uuid }}"
  693. ######################################################################
  694. #
  695. # /matrix-bridge-mx-puppet-twitter
  696. #
  697. ######################################################################
  698. ######################################################################
  699. #
  700. # matrix-bridge-mx-puppet-instagram
  701. #
  702. ######################################################################
  703. # We don't enable bridges by default.
  704. matrix_mx_puppet_instagram_enabled: false
  705. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  706. matrix_mx_puppet_instagram_systemd_required_services_list: |
  707. {{
  708. ['docker.service']
  709. +
  710. ['matrix-' + matrix_homeserver_implementation + '.service']
  711. +
  712. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  713. +
  714. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  715. }}
  716. matrix_mx_puppet_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.as.tok') | to_uuid }}"
  717. matrix_mx_puppet_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.hs.tok') | to_uuid }}"
  718. matrix_mx_puppet_instagram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  719. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  720. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  721. matrix_mx_puppet_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.ig.db') | to_uuid }}"
  722. ######################################################################
  723. #
  724. # /matrix-bridge-mx-puppet-instagram
  725. #
  726. ######################################################################
  727. ######################################################################
  728. #
  729. # matrix-bridge-mx-puppet-discord
  730. #
  731. ######################################################################
  732. # We don't enable bridges by default.
  733. matrix_mx_puppet_discord_enabled: false
  734. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  735. matrix_mx_puppet_discord_systemd_required_services_list: |
  736. {{
  737. ['docker.service']
  738. +
  739. ['matrix-' + matrix_homeserver_implementation + '.service']
  740. +
  741. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  742. +
  743. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  744. }}
  745. matrix_mx_puppet_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.as.tok') | to_uuid }}"
  746. matrix_mx_puppet_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.hs.tok') | to_uuid }}"
  747. matrix_mx_puppet_discord_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  748. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  749. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  750. matrix_mx_puppet_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"
  751. ######################################################################
  752. #
  753. # /matrix-bridge-mx-puppet-discord
  754. #
  755. ######################################################################
  756. ######################################################################
  757. #
  758. # matrix-bridge-mx-puppet-steam
  759. #
  760. ######################################################################
  761. # We don't enable bridges by default.
  762. matrix_mx_puppet_steam_enabled: false
  763. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  764. matrix_mx_puppet_steam_systemd_required_services_list: |
  765. {{
  766. ['docker.service']
  767. +
  768. ['matrix-' + matrix_homeserver_implementation + '.service']
  769. +
  770. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  771. +
  772. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  773. }}
  774. matrix_mx_puppet_steam_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.as.tok') | to_uuid }}"
  775. matrix_mx_puppet_steam_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.hs.tok') | to_uuid }}"
  776. 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 '' }}"
  777. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  778. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  779. matrix_mx_puppet_steam_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.steam.db') | to_uuid }}"
  780. ######################################################################
  781. #
  782. # /matrix-bridge-mx-puppet-steam
  783. #
  784. ######################################################################
  785. ######################################################################
  786. #
  787. # matrix-bridge-mx-puppet-groupme
  788. #
  789. ######################################################################
  790. # We don't enable bridges by default.
  791. matrix_mx_puppet_groupme_enabled: false
  792. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  793. matrix_mx_puppet_groupme_systemd_required_services_list: |
  794. {{
  795. ['docker.service']
  796. +
  797. ['matrix-' + matrix_homeserver_implementation + '.service']
  798. +
  799. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  800. +
  801. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  802. }}
  803. matrix_mx_puppet_groupme_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.as.tok') | to_uuid }}"
  804. matrix_mx_puppet_groupme_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.hs.tok') | to_uuid }}"
  805. 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 '' }}"
  806. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  807. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  808. matrix_mx_puppet_groupme_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.groupme.db') | to_uuid }}"
  809. ######################################################################
  810. #
  811. # /matrix-bridge-mx-puppet-groupme
  812. #
  813. ######################################################################
  814. ######################################################################
  815. #
  816. # matrix-bot-matrix-reminder-bot
  817. #
  818. ######################################################################
  819. # We don't enable bots by default.
  820. matrix_bot_matrix_reminder_bot_enabled: false
  821. matrix_bot_matrix_reminder_bot_systemd_required_services_list: |
  822. {{
  823. ['docker.service']
  824. +
  825. ['matrix-' + matrix_homeserver_implementation + '.service']
  826. +
  827. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  828. +
  829. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  830. }}
  831. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  832. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  833. matrix_bot_matrix_reminder_bot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'reminder.bot.db') | to_uuid }}"
  834. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  835. ######################################################################
  836. #
  837. # /matrix-bot-matrix-reminder-bot
  838. #
  839. ######################################################################
  840. ######################################################################
  841. #
  842. # matrix-bot-matrix-registration-bot
  843. #
  844. ######################################################################
  845. # We don't enable bots by default.
  846. matrix_bot_matrix_registration_bot_enabled: false
  847. matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  848. matrix_bot_matrix_registration_bot_systemd_required_services_list: |
  849. {{
  850. ['docker.service']
  851. +
  852. ['matrix-' + matrix_homeserver_implementation + '.service']
  853. +
  854. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  855. }}
  856. ######################################################################
  857. #
  858. # /matrix-bot-matrix-registration-bot
  859. #
  860. ######################################################################
  861. ######################################################################
  862. #
  863. # matrix-bot-maubot
  864. #
  865. ######################################################################
  866. # We don't enable bots by default.
  867. matrix_bot_maubot_enabled: false
  868. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  869. matrix_bot_maubot_systemd_required_services_list: |
  870. {{
  871. ['docker.service']
  872. +
  873. ['matrix-' + matrix_homeserver_implementation + '.service']
  874. +
  875. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  876. +
  877. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  878. }}
  879. matrix_bot_maubot_registration_shared_secret: |-
  880. {{
  881. {
  882. 'synapse': matrix_synapse_registration_shared_secret,
  883. 'dendrite': matrix_dendrite_registration_shared_secret,
  884. }[matrix_homeserver_implementation]
  885. }}
  886. matrix_bot_maubot_management_interface_http_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_bot_maubot_management_interface_port | string) }}"
  887. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  888. matrix_bot_maubot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  889. matrix_bot_maubot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"
  890. ######################################################################
  891. #
  892. # /matrix-bot-maubot
  893. #
  894. ######################################################################
  895. ######################################################################
  896. #
  897. # matrix-bot-honoroit
  898. #
  899. ######################################################################
  900. # We don't enable bots by default.
  901. matrix_bot_honoroit_enabled: false
  902. matrix_bot_honoroit_systemd_required_services_list: |
  903. {{
  904. ['docker.service']
  905. +
  906. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  907. +
  908. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  909. +
  910. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  911. }}
  912. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  913. matrix_bot_honoroit_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  914. matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'honoroit.bot.db') | to_uuid }}"
  915. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  916. ######################################################################
  917. #
  918. # /matrix-bot-honoroit
  919. #
  920. ######################################################################
  921. ######################################################################
  922. #
  923. # matrix-bot-buscarron
  924. #
  925. ######################################################################
  926. # We don't enable bots by default.
  927. matrix_bot_buscarron_enabled: false
  928. matrix_bot_buscarron_systemd_required_services_list: |
  929. {{
  930. ['docker.service']
  931. +
  932. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  933. +
  934. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  935. +
  936. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  937. }}
  938. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  939. matrix_bot_buscarron_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  940. matrix_bot_buscarron_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'buscarron.bot.db') | to_uuid }}"
  941. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  942. ######################################################################
  943. #
  944. # /matrix-bot-buscarron
  945. #
  946. ######################################################################
  947. ######################################################################
  948. #
  949. # matrix-bot-postmoogle
  950. #
  951. ######################################################################
  952. # We don't enable bots by default.
  953. matrix_bot_postmoogle_enabled: false
  954. matrix_bot_postmoogle_ssl_path: "{{ matrix_ssl_config_dir_path }}"
  955. matrix_bot_postmoogle_tls_cert: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/live/{{ domain }}/fullchain.pem {% endfor %}"
  956. matrix_bot_postmoogle_tls_key: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/live/{{ domain }}/privkey.pem {% endfor %}"
  957. matrix_bot_postmoogle_systemd_required_services_list: |
  958. {{
  959. ['docker.service']
  960. +
  961. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  962. +
  963. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  964. }}
  965. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  966. matrix_bot_postmoogle_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  967. matrix_bot_postmoogle_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'postmoogle.db') | to_uuid }}"
  968. matrix_bot_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  969. ######################################################################
  970. #
  971. # /matrix-bot-postmoogle
  972. #
  973. ######################################################################
  974. ######################################################################
  975. #
  976. # matrix-bot-go-neb
  977. #
  978. ######################################################################
  979. # We don't enable bots by default.
  980. matrix_bot_go_neb_enabled: false
  981. matrix_bot_go_neb_systemd_required_services_list: |
  982. {{
  983. ['docker.service']
  984. +
  985. ['matrix-' + matrix_homeserver_implementation + '.service']
  986. +
  987. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  988. }}
  989. matrix_bot_go_neb_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:4050' }}"
  990. ######################################################################
  991. #
  992. # /matrix-bot-go-neb
  993. #
  994. ######################################################################
  995. ######################################################################
  996. #
  997. # matrix-bot-mjolnir
  998. #
  999. ######################################################################
  1000. # We don't enable bots by default.
  1001. matrix_bot_mjolnir_enabled: false
  1002. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1003. matrix_bot_mjolnir_systemd_required_services_list: |
  1004. {{
  1005. ['docker.service']
  1006. +
  1007. ['matrix-' + matrix_homeserver_implementation + '.service']
  1008. +
  1009. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1010. +
  1011. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1012. }}
  1013. ######################################################################
  1014. #
  1015. # /matrix-bot-mjolnir
  1016. #
  1017. ######################################################################
  1018. ######################################################################
  1019. #
  1020. # matrix-backup-borg
  1021. #
  1022. ######################################################################
  1023. matrix_backup_borg_enabled: false
  1024. matrix_backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1025. matrix_backup_borg_postgresql_enabled: "{{ matrix_postgres_enabled }}"
  1026. matrix_backup_borg_postgresql_databases_hostname: "{{ matrix_postgres_connection_hostname }}"
  1027. matrix_backup_borg_postgresql_databases_username: "{{ matrix_postgres_connection_username }}"
  1028. matrix_backup_borg_postgresql_databases_password: "{{ matrix_postgres_connection_password }}"
  1029. matrix_backup_borg_postgresql_databases_port: "{{ matrix_postgres_connection_port }}"
  1030. matrix_backup_borg_postgresql_databases: |
  1031. {{
  1032. (([{
  1033. 'name': matrix_synapse_database_database
  1034. }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1035. +
  1036. matrix_postgres_additional_databases)|map(attribute='name') | list
  1037. }}
  1038. matrix_backup_borg_location_source_directories:
  1039. - "{{ matrix_base_data_path }}"
  1040. matrix_backup_borg_location_exclude_patterns: |
  1041. {{
  1042. ([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 [])
  1043. +
  1044. ([matrix_postgres_data_path] if matrix_postgres_enabled else [])
  1045. }}
  1046. matrix_backup_borg_systemd_required_services_list: |
  1047. {{
  1048. ['docker.service']
  1049. +
  1050. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1051. }}
  1052. ######################################################################
  1053. #
  1054. # /matrix-backup-borg
  1055. #
  1056. ######################################################################
  1057. ######################################################################
  1058. #
  1059. # matrix-cactus-comments
  1060. #
  1061. ######################################################################
  1062. matrix_cactus_comments_enabled: false
  1063. # Derive secret values from homeserver secret
  1064. matrix_cactus_comments_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.as.token') | to_uuid }}"
  1065. matrix_cactus_comments_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.hs.token') | to_uuid }}"
  1066. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1067. matrix_cactus_comments_systemd_required_services_list: |
  1068. {{
  1069. (['docker.service'])
  1070. +
  1071. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1072. +
  1073. (['matrix-' + matrix_homeserver_implementation + '.service'])
  1074. }}
  1075. matrix_cactus_comments_client_nginx_path: "{{ '/cactus-comments/' if matrix_nginx_proxy_enabled else matrix_cactus_comments_client_path + '/' }}"
  1076. ######################################################################
  1077. #
  1078. # /matrix-cactus-comments
  1079. #
  1080. ######################################################################
  1081. ######################################################################
  1082. #
  1083. # matrix-corporal
  1084. #
  1085. ######################################################################
  1086. matrix_corporal_enabled: false
  1087. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1088. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  1089. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1090. # matrix-corporal's web-server ports to the local host.
  1091. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  1092. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  1093. matrix_corporal_systemd_required_services_list: |
  1094. {{
  1095. (['docker.service'])
  1096. +
  1097. (['matrix-' + matrix_homeserver_implementation + '.service'])
  1098. }}
  1099. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  1100. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  1101. # This is only useful if there's REST auth provider to make use of it.
  1102. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  1103. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  1104. ######################################################################
  1105. #
  1106. # /matrix-corporal
  1107. #
  1108. ######################################################################
  1109. ######################################################################
  1110. #
  1111. # matrix-coturn
  1112. #
  1113. ######################################################################
  1114. matrix_coturn_enabled: true
  1115. matrix_coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1116. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  1117. matrix_coturn_turn_static_auth_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'coturn.sas') | to_uuid }}"
  1118. matrix_coturn_tls_enabled: "{{ matrix_ssl_retrieval_method != 'none' }}"
  1119. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  1120. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  1121. matrix_coturn_container_additional_volumes: |
  1122. {{
  1123. ([] if matrix_ssl_retrieval_method == 'none' else [
  1124. {
  1125. 'src': matrix_ssl_config_dir_path,
  1126. 'dst': matrix_ssl_config_dir_path,
  1127. 'options': 'ro',
  1128. }
  1129. ])
  1130. }}
  1131. ######################################################################
  1132. #
  1133. # /matrix-coturn
  1134. #
  1135. ######################################################################
  1136. ######################################################################
  1137. #
  1138. # matrix-dimension
  1139. #
  1140. ######################################################################
  1141. matrix_dimension_enabled: false
  1142. matrix_dimension_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1143. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  1144. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1145. # the Dimension HTTP port to the local host.
  1146. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  1147. matrix_dimension_homeserver_federationUrl: "{{ matrix_homeserver_container_federation_url }}"
  1148. matrix_dimension_systemd_required_services_list: |
  1149. {{
  1150. ['docker.service']
  1151. +
  1152. ['matrix-' + matrix_homeserver_implementation + '.service']
  1153. +
  1154. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1155. +
  1156. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1157. }}
  1158. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1159. matrix_dimension_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1160. matrix_dimension_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dimension.db') | to_uuid }}"
  1161. ######################################################################
  1162. #
  1163. # /matrix-dimension
  1164. #
  1165. ######################################################################
  1166. ######################################################################
  1167. #
  1168. # matrix-etherpad
  1169. #
  1170. ######################################################################
  1171. matrix_etherpad_enabled: false
  1172. matrix_etherpad_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9001' }}"
  1173. matrix_etherpad_base_url: "{{ 'https://'+ matrix_server_fqn_dimension + matrix_etherpad_public_endpoint if matrix_etherpad_mode == 'dimension' else 'https://' + matrix_server_fqn_etherpad + '/' }}"
  1174. matrix_etherpad_systemd_required_services_list: |
  1175. {{
  1176. ['docker.service']
  1177. +
  1178. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1179. }}
  1180. matrix_etherpad_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'etherpad.db') | to_uuid }}"
  1181. ######################################################################
  1182. #
  1183. # /matrix-etherpad
  1184. #
  1185. ######################################################################
  1186. ######################################################################
  1187. #
  1188. # matrix-dynamic-dns
  1189. #
  1190. ######################################################################
  1191. matrix_dynamic_dns_enabled: false
  1192. ######################################################################
  1193. #
  1194. # /matrix-dynamic-dns
  1195. #
  1196. ######################################################################
  1197. ######################################################################
  1198. #
  1199. # matrix-email2matrix
  1200. #
  1201. ######################################################################
  1202. matrix_email2matrix_enabled: false
  1203. matrix_email2matrix_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1204. ######################################################################
  1205. #
  1206. # /matrix-email2matrix
  1207. #
  1208. ######################################################################
  1209. ######################################################################
  1210. #
  1211. # matrix-jitsi
  1212. #
  1213. ######################################################################
  1214. matrix_jitsi_enabled: false
  1215. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  1216. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1217. # the Jitsi HTTP port to the local host.
  1218. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13080' }}"
  1219. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13090' }}"
  1220. matrix_jitsi_prosody_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:5280' }}"
  1221. matrix_jitsi_jibri_xmpp_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jibri') | to_uuid }}"
  1222. matrix_jitsi_jicofo_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jicofo') | to_uuid }}"
  1223. matrix_jitsi_jvb_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jvb') | to_uuid }}"
  1224. matrix_jitsi_web_stun_servers: |
  1225. {{
  1226. [
  1227. 'stun:' + matrix_server_fqn_matrix + ':5349',
  1228. 'stun:' + matrix_server_fqn_matrix + ':3478',
  1229. ]
  1230. if matrix_coturn_enabled
  1231. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  1232. }}
  1233. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  1234. # unless explicitly disabled by setting `matrix_jitsi_etherpad_enabled` to false.
  1235. # Falls back to the scalar.vector.im etherpad in case someone sets `matrix_jitsi_etherpad_enabled` to true,
  1236. # while also setting `matrix_etherpad_enabled` to false.
  1237. matrix_jitsi_etherpad_enabled: "{{ matrix_etherpad_enabled }}"
  1238. matrix_jitsi_etherpad_base: "{{ matrix_etherpad_base_url if matrix_etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  1239. ######################################################################
  1240. #
  1241. # /matrix-jitsi
  1242. #
  1243. ######################################################################
  1244. ######################################################################
  1245. #
  1246. # matrix-ldap-registration-proxy
  1247. #
  1248. ######################################################################
  1249. # This is only for users with a specific LDAP setup
  1250. matrix_ldap_registration_proxy_enabled: false
  1251. ######################################################################
  1252. #
  1253. # /matrix-ldap-registration-proxy
  1254. #
  1255. ######################################################################
  1256. ######################################################################
  1257. #
  1258. # matrix-mailer
  1259. #
  1260. ######################################################################
  1261. # By default, this playbook sets up an exim mailer server (running in a container).
  1262. # This is so that Synapse can send email reminders for unread messages.
  1263. # Other services (like ma1sd), also use the mailer.
  1264. matrix_mailer_enabled: true
  1265. matrix_mailer_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1266. ######################################################################
  1267. #
  1268. # /matrix-mailer
  1269. #
  1270. ######################################################################
  1271. ######################################################################
  1272. #
  1273. # matrix-ma1sd
  1274. #
  1275. ######################################################################
  1276. # We no longer install the ma1sd identity server by default.
  1277. #
  1278. # The main reason we used to install ma1sd by default in the past was to
  1279. # prevent Element from talking to the `matrix.org` / `vector.im` identity servers,
  1280. # by forcing it to talk to our own self-hosted (but otherwise useless) identity server instead,
  1281. # thus preventing contact list leaks.
  1282. #
  1283. # Since Element no longer defaults to using a public identity server if another one is not provided,
  1284. # we can stop installing ma1sd.
  1285. matrix_ma1sd_enabled: false
  1286. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1287. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  1288. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1289. # ma1sd's web-server port.
  1290. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_ma1sd_container_port | string }}"
  1291. # We enable Synapse integration via its Postgres database by default.
  1292. # When using another Identity store, you might wish to disable this and define
  1293. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  1294. matrix_ma1sd_synapsesql_enabled: true
  1295. matrix_ma1sd_synapsesql_type: postgresql
  1296. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  1297. matrix_ma1sd_dns_overwrite_enabled: true
  1298. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  1299. # The `matrix_ma1sd_dns_overwrite_homeserver_client_value` value when matrix_nginx_proxy_enabled is false covers the general case,
  1300. # but may be inaccurate if matrix-corporal is enabled.
  1301. matrix_ma1sd_dns_overwrite_homeserver_client_value: "{{ ('http://' + matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container) if matrix_nginx_proxy_enabled else matrix_homeserver_container_url }}"
  1302. # By default, we send mail through the `matrix-mailer` service.
  1303. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  1304. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  1305. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  1306. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  1307. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1308. matrix_ma1sd_systemd_required_services_list: |
  1309. {{
  1310. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1311. }}
  1312. matrix_ma1sd_systemd_wanted_services_list: |
  1313. {{
  1314. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-' + matrix_homeserver_implementation + '.service'])
  1315. +
  1316. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1317. +
  1318. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1319. }}
  1320. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1321. matrix_ma1sd_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1322. matrix_ma1sd_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ma1sd.db') | to_uuid }}"
  1323. ######################################################################
  1324. #
  1325. # /matrix-ma1sd
  1326. #
  1327. ######################################################################
  1328. ######################################################################
  1329. #
  1330. # matrix-nginx-proxy
  1331. #
  1332. ######################################################################
  1333. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  1334. # This is fine if you're dedicating the whole server to Matrix.
  1335. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  1336. matrix_nginx_proxy_enabled: true
  1337. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-nginx-proxy:12080' }}"
  1338. matrix_nginx_proxy_proxy_matrix_client_api_addr_sans_container: "{{ '127.0.0.1:41080' if matrix_corporal_enabled else '127.0.0.1:12080' }}"
  1339. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: |-
  1340. {{
  1341. {
  1342. 'synapse': matrix_synapse_max_upload_size_mb,
  1343. 'dendrite': (matrix_dendrite_max_file_size_bytes / 1024 / 1024) | round,
  1344. 'conduit': (matrix_conduit_max_request_size / 1024 / 1024) | round,
  1345. }[matrix_homeserver_implementation]|int
  1346. }}
  1347. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled or matrix_bot_matrix_registration_bot_enabled }}"
  1348. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  1349. matrix_nginx_proxy_proxy_matrix_enabled: true
  1350. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  1351. matrix_nginx_proxy_proxy_hydrogen_enabled: "{{ matrix_client_hydrogen_enabled }}"
  1352. matrix_nginx_proxy_proxy_cinny_enabled: "{{ matrix_client_cinny_enabled }}"
  1353. matrix_nginx_proxy_proxy_buscarron_enabled: "{{ matrix_bot_buscarron_enabled }}"
  1354. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  1355. matrix_nginx_proxy_proxy_etherpad_enabled: "{{ matrix_etherpad_enabled and matrix_etherpad_mode == 'standalone' }}"
  1356. matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}"
  1357. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  1358. matrix_nginx_proxy_proxy_grafana_enabled: "{{ matrix_grafana_enabled }}"
  1359. matrix_nginx_proxy_proxy_sygnal_enabled: "{{ matrix_sygnal_enabled }}"
  1360. matrix_nginx_proxy_proxy_ntfy_enabled: "{{ matrix_ntfy_enabled }}"
  1361. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  1362. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  1363. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  1364. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  1365. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:{{ matrix_ma1sd_container_port }}"
  1366. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:{{ matrix_ma1sd_container_port }}"
  1367. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  1368. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  1369. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: |-
  1370. {{
  1371. {
  1372. 'synapse': (matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled),
  1373. 'dendrite': matrix_dendrite_federation_enabled,
  1374. 'conduit': matrix_conduit_allow_federation,
  1375. }[matrix_homeserver_implementation]|bool
  1376. }}
  1377. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-nginx-proxy:12088"
  1378. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:12088"
  1379. matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}"
  1380. matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container: "{{ 'matrix-synapse-reverse-proxy-companion:8008' if matrix_synapse_reverse_proxy_companion_enabled else 'matrix-synapse:8008' }}"
  1381. matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container: "127.0.0.1:8008"
  1382. matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container: "{{ 'matrix-synapse-reverse-proxy-companion:8048' if matrix_synapse_reverse_proxy_companion_enabled else 'matrix-synapse:8048' }}"
  1383. matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container: "127.0.0.1:8048"
  1384. matrix_nginx_proxy_proxy_dendrite_enabled: "{{ matrix_dendrite_enabled }}"
  1385. matrix_nginx_proxy_proxy_dendrite_client_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}"
  1386. matrix_nginx_proxy_proxy_dendrite_client_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}"
  1387. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}"
  1388. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}"
  1389. matrix_nginx_proxy_proxy_conduit_enabled: "{{ matrix_conduit_enabled }}"
  1390. matrix_nginx_proxy_proxy_conduit_client_api_addr_with_container: "matrix-conduit:{{ matrix_conduit_port_number|string }}"
  1391. matrix_nginx_proxy_proxy_conduit_client_api_addr_sans_container: "127.0.0.1:{{ matrix_conduit_port_number|string }}"
  1392. matrix_nginx_proxy_proxy_conduit_federation_api_addr_with_container: "matrix-conduit:{{ matrix_conduit_port_number|string }}"
  1393. matrix_nginx_proxy_proxy_conduit_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_conduit_port_number|string }}"
  1394. # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter.
  1395. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}"
  1396. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  1397. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  1398. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  1399. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  1400. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1401. # OCSP stapling does not make sense when self-signed certificates are used.
  1402. # See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1073
  1403. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1074
  1404. matrix_nginx_proxy_ocsp_stapling_enabled: "{{ matrix_ssl_retrieval_method != 'self-signed' }}"
  1405. matrix_nginx_proxy_systemd_wanted_services_list: |
  1406. {{
  1407. ['matrix-' + matrix_homeserver_implementation + '.service']
  1408. +
  1409. (matrix_synapse_webserving_workers_systemd_services_list if matrix_homeserver_implementation == 'synapse' and matrix_synapse_workers_enabled else [])
  1410. +
  1411. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  1412. +
  1413. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  1414. +
  1415. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  1416. +
  1417. (['matrix-client-cinny.service'] if matrix_client_cinny_enabled else [])
  1418. +
  1419. (['matrix-bot-buscarron.service'] if matrix_bot_buscarron_enabled else [])
  1420. +
  1421. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  1422. +
  1423. (['matrix-client-hydrogen.service'] if matrix_client_hydrogen_enabled else [])
  1424. +
  1425. (['matrix-grafana.service'] if matrix_grafana_enabled else [])
  1426. +
  1427. (['matrix-dimension.service'] if matrix_dimension_enabled else [])
  1428. +
  1429. (['matrix-sygnal.service'] if matrix_sygnal_enabled else [])
  1430. +
  1431. (['matrix-ntfy.service'] if matrix_ntfy_enabled else [])
  1432. +
  1433. (['matrix-jitsi.service'] if matrix_jitsi_enabled else [])
  1434. +
  1435. (['matrix-bot-go-neb.service'] if matrix_bot_go_neb_enabled else [])
  1436. +
  1437. (['matrix-etherpad.service'] if matrix_etherpad_enabled else [])
  1438. +
  1439. (['matrix-hookshot.service'] if matrix_hookshot_enabled else [])
  1440. }}
  1441. matrix_ssl_domains_to_obtain_certificates_for: |
  1442. {{
  1443. ([matrix_server_fqn_matrix])
  1444. +
  1445. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  1446. +
  1447. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  1448. +
  1449. ([matrix_server_fqn_hydrogen] if matrix_client_hydrogen_enabled else [])
  1450. +
  1451. ([matrix_server_fqn_cinny] if matrix_client_cinny_enabled else [])
  1452. +
  1453. ([matrix_server_fqn_buscarron] if matrix_bot_buscarron_enabled else [])
  1454. +
  1455. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  1456. +
  1457. ([matrix_server_fqn_etherpad] if (matrix_etherpad_enabled and matrix_etherpad_mode == 'standalone') else [])
  1458. +
  1459. ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
  1460. +
  1461. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  1462. +
  1463. ([matrix_server_fqn_grafana] if matrix_grafana_enabled else [])
  1464. +
  1465. ([matrix_server_fqn_sygnal] if matrix_sygnal_enabled else [])
  1466. +
  1467. ([matrix_server_fqn_ntfy] if matrix_ntfy_enabled else [])
  1468. +
  1469. ([matrix_bot_postmoogle_domain] if matrix_bot_postmoogle_enabled else [])
  1470. +
  1471. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  1472. +
  1473. matrix_ssl_additional_domains_to_obtain_certificates_for
  1474. }}
  1475. matrix_ssl_architecture: "{{
  1476. {
  1477. 'amd64': 'amd64',
  1478. 'arm32': 'arm32v6',
  1479. 'arm64': 'arm64v8',
  1480. }[matrix_architecture]
  1481. }}"
  1482. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  1483. ######################################################################
  1484. #
  1485. # /matrix-nginx-proxy
  1486. #
  1487. ######################################################################
  1488. ######################################################################
  1489. #
  1490. # matrix-postgres
  1491. #
  1492. ######################################################################
  1493. matrix_postgres_enabled: true
  1494. matrix_postgres_architecture: "{{ matrix_architecture }}"
  1495. # We unset this if internal Postgres disabled, which will cascade to some other variables
  1496. # and tell users they need to set it (either here or in those variables).
  1497. matrix_postgres_connection_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  1498. matrix_postgres_pgloader_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1499. matrix_postgres_additional_databases: |
  1500. {{
  1501. ([{
  1502. 'name': matrix_synapse_database_database,
  1503. 'username': matrix_synapse_database_user,
  1504. 'password': matrix_synapse_database_password,
  1505. }] if (matrix_synapse_enabled and matrix_synapse_database_database != matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1506. +
  1507. ([{
  1508. 'name': matrix_dendrite_federationapi_database,
  1509. 'username': matrix_dendrite_database_user,
  1510. 'password': matrix_dendrite_database_password,
  1511. },{
  1512. 'name': matrix_dendrite_keyserver_database,
  1513. 'username': matrix_dendrite_database_user,
  1514. 'password': matrix_dendrite_database_password,
  1515. },{
  1516. 'name': matrix_dendrite_mediaapi_database,
  1517. 'username': matrix_dendrite_database_user,
  1518. 'password': matrix_dendrite_database_password,
  1519. },{
  1520. 'name': matrix_dendrite_room_database,
  1521. 'username': matrix_dendrite_database_user,
  1522. 'password': matrix_dendrite_database_password,
  1523. },{
  1524. 'name': matrix_dendrite_syncapi_database,
  1525. 'username': matrix_dendrite_database_user,
  1526. 'password': matrix_dendrite_database_password,
  1527. },{
  1528. 'name': matrix_dendrite_userapi_database,
  1529. 'username': matrix_dendrite_database_user,
  1530. 'password': matrix_dendrite_database_password,
  1531. },{
  1532. 'name': matrix_dendrite_pushserver_database,
  1533. 'username': matrix_dendrite_database_user,
  1534. 'password': matrix_dendrite_database_password,
  1535. },{
  1536. 'name': matrix_dendrite_mscs_database,
  1537. 'username': matrix_dendrite_database_user,
  1538. 'password': matrix_dendrite_database_password,
  1539. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == 'matrix-postgres') else [])
  1540. +
  1541. ([{
  1542. 'name': matrix_ma1sd_database_name,
  1543. 'username': matrix_ma1sd_database_username,
  1544. 'password': matrix_ma1sd_database_password,
  1545. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == 'matrix-postgres') else [])
  1546. +
  1547. ([{
  1548. 'name': matrix_bot_matrix_reminder_bot_database_name,
  1549. 'username': matrix_bot_matrix_reminder_bot_database_username,
  1550. 'password': matrix_bot_matrix_reminder_bot_database_password,
  1551. }] if (matrix_bot_matrix_reminder_bot_enabled and matrix_bot_matrix_reminder_bot_database_engine == 'postgres' and matrix_bot_matrix_reminder_bot_database_hostname == 'matrix-postgres') else [])
  1552. +
  1553. ([{
  1554. 'name': matrix_bot_honoroit_database_name,
  1555. 'username': matrix_bot_honoroit_database_username,
  1556. 'password': matrix_bot_honoroit_database_password,
  1557. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == 'matrix-postgres') else [])
  1558. +
  1559. ([{
  1560. 'name': matrix_bot_postmoogle_database_name,
  1561. 'username': matrix_bot_postmoogle_database_username,
  1562. 'password': matrix_bot_postmoogle_database_password,
  1563. }] if (matrix_bot_postmoogle_enabled and matrix_bot_postmoogle_database_engine == 'postgres' and matrix_bot_postmoogle_database_hostname == 'matrix-postgres') else [])
  1564. +
  1565. ([{
  1566. 'name': matrix_bot_maubot_database_name,
  1567. 'username': matrix_bot_maubot_database_username,
  1568. 'password': matrix_bot_maubot_database_password,
  1569. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == 'matrix-postgres') else [])
  1570. +
  1571. ([{
  1572. 'name': matrix_bot_buscarron_database_name,
  1573. 'username': matrix_bot_buscarron_database_username,
  1574. 'password': matrix_bot_buscarron_database_password,
  1575. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == 'matrix-postgres') else [])
  1576. +
  1577. ([{
  1578. 'name': matrix_registration_database_name,
  1579. 'username': matrix_registration_database_username,
  1580. 'password': matrix_registration_database_password,
  1581. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == 'matrix-postgres') else [])
  1582. +
  1583. ([{
  1584. 'name': matrix_appservice_discord_database_name,
  1585. 'username': matrix_appservice_discord_database_username,
  1586. 'password': matrix_appservice_discord_database_password,
  1587. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == 'matrix-postgres') else [])
  1588. +
  1589. ([{
  1590. 'name': matrix_appservice_slack_database_name,
  1591. 'username': matrix_appservice_slack_database_username,
  1592. 'password': matrix_appservice_slack_database_password,
  1593. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  1594. +
  1595. ([{
  1596. 'name': matrix_appservice_irc_database_name,
  1597. 'username': matrix_appservice_irc_database_username,
  1598. 'password': matrix_appservice_irc_database_password,
  1599. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  1600. +
  1601. ([{
  1602. 'name': matrix_appservice_kakaotalk_database_name,
  1603. 'username': matrix_appservice_kakaotalk_database_username,
  1604. 'password': matrix_appservice_kakaotalk_database_password,
  1605. }] if (matrix_appservice_kakaotalk_enabled and matrix_appservice_kakaotalk_database_engine == 'postgres' and matrix_appservice_kakaotalk_database_hostname == 'matrix-postgres') else [])
  1606. +
  1607. ([{
  1608. 'name': matrix_beeper_linkedin_database_name,
  1609. 'username': matrix_beeper_linkedin_database_username,
  1610. 'password': matrix_beeper_linkedin_database_password,
  1611. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == 'matrix-postgres') else [])
  1612. +
  1613. ([{
  1614. 'name': matrix_go_skype_bridge_database_name,
  1615. 'username': matrix_go_skype_bridge_database_username,
  1616. 'password': matrix_go_skype_bridge_database_password,
  1617. }] if (matrix_go_skype_bridge_enabled and matrix_go_skype_bridge_database_engine == 'postgres' and matrix_go_skype_bridge_database_hostname == 'matrix-postgres') else [])
  1618. +
  1619. ([{
  1620. 'name': matrix_mautrix_facebook_database_name,
  1621. 'username': matrix_mautrix_facebook_database_username,
  1622. 'password': matrix_mautrix_facebook_database_password,
  1623. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == 'matrix-postgres') else [])
  1624. +
  1625. ([{
  1626. 'name': matrix_mautrix_hangouts_database_name,
  1627. 'username': matrix_mautrix_hangouts_database_username,
  1628. 'password': matrix_mautrix_hangouts_database_password,
  1629. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  1630. +
  1631. ([{
  1632. 'name': matrix_mautrix_googlechat_database_name,
  1633. 'username': matrix_mautrix_googlechat_database_username,
  1634. 'password': matrix_mautrix_googlechat_database_password,
  1635. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == 'matrix-postgres') else [])
  1636. +
  1637. ([{
  1638. 'name': matrix_mautrix_instagram_database_name,
  1639. 'username': matrix_mautrix_instagram_database_username,
  1640. 'password': matrix_mautrix_instagram_database_password,
  1641. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == 'matrix-postgres') else [])
  1642. +
  1643. ([{
  1644. 'name': matrix_mautrix_signal_database_name,
  1645. 'username': matrix_mautrix_signal_database_username,
  1646. 'password': matrix_mautrix_signal_database_password,
  1647. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == 'matrix-postgres') else [])
  1648. +
  1649. ([{
  1650. 'name': matrix_mautrix_telegram_database_name,
  1651. 'username': matrix_mautrix_telegram_database_username,
  1652. 'password': matrix_mautrix_telegram_database_password,
  1653. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == 'matrix-postgres') else [])
  1654. +
  1655. ([{
  1656. 'name': matrix_mautrix_twitter_database_name,
  1657. 'username': matrix_mautrix_twitter_database_username,
  1658. 'password': matrix_mautrix_twitter_database_password,
  1659. }] if (matrix_mautrix_twitter_enabled and matrix_mautrix_twitter_database_engine == 'postgres' and matrix_mautrix_twitter_database_hostname == 'matrix-postgres') else [])
  1660. +
  1661. ([{
  1662. 'name': matrix_mautrix_whatsapp_database_name,
  1663. 'username': matrix_mautrix_whatsapp_database_username,
  1664. 'password': matrix_mautrix_whatsapp_database_password,
  1665. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  1666. +
  1667. ([{
  1668. 'name': matrix_mautrix_discord_database_name,
  1669. 'username': matrix_mautrix_discord_database_username,
  1670. 'password': matrix_mautrix_discord_database_password,
  1671. }] if (matrix_mautrix_discord_enabled and matrix_mautrix_discord_database_engine == 'postgres' and matrix_mautrix_discord_database_hostname == 'matrix-postgres') else [])
  1672. +
  1673. ([{
  1674. 'name': matrix_mx_puppet_slack_database_name,
  1675. 'username': matrix_mx_puppet_slack_database_username,
  1676. 'password': matrix_mx_puppet_slack_database_password,
  1677. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  1678. +
  1679. ([{
  1680. 'name': matrix_mx_puppet_twitter_database_name,
  1681. 'username': matrix_mx_puppet_twitter_database_username,
  1682. 'password': matrix_mx_puppet_twitter_database_password,
  1683. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  1684. +
  1685. ([{
  1686. 'name': matrix_mx_puppet_instagram_database_name,
  1687. 'username': matrix_mx_puppet_instagram_database_username,
  1688. 'password': matrix_mx_puppet_instagram_database_password,
  1689. }] if (matrix_mx_puppet_instagram_enabled and matrix_mx_puppet_instagram_database_engine == 'postgres' and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  1690. +
  1691. ([{
  1692. 'name': matrix_mx_puppet_discord_database_name,
  1693. 'username': matrix_mx_puppet_discord_database_username,
  1694. 'password': matrix_mx_puppet_discord_database_password,
  1695. }] if (matrix_mx_puppet_discord_enabled and matrix_mx_puppet_discord_database_engine == 'postgres' and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  1696. +
  1697. ([{
  1698. 'name': matrix_mx_puppet_steam_database_name,
  1699. 'username': matrix_mx_puppet_steam_database_username,
  1700. 'password': matrix_mx_puppet_steam_database_password,
  1701. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  1702. +
  1703. ([{
  1704. 'name': matrix_mx_puppet_groupme_database_name,
  1705. 'username': matrix_mx_puppet_groupme_database_username,
  1706. 'password': matrix_mx_puppet_groupme_database_password,
  1707. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == 'matrix-postgres') else [])
  1708. +
  1709. ([{
  1710. 'name': matrix_dimension_database_name,
  1711. 'username': matrix_dimension_database_username,
  1712. 'password': matrix_dimension_database_password,
  1713. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  1714. +
  1715. ([{
  1716. 'name': matrix_etherpad_database_name,
  1717. 'username': matrix_etherpad_database_username,
  1718. 'password': matrix_etherpad_database_password,
  1719. }] if (matrix_etherpad_enabled and matrix_etherpad_database_engine == 'postgres' and matrix_etherpad_database_hostname == 'matrix-postgres') else [])
  1720. +
  1721. ([{
  1722. 'name': matrix_prometheus_postgres_exporter_database_name,
  1723. 'username': matrix_prometheus_postgres_exporter_database_username,
  1724. 'password': matrix_prometheus_postgres_exporter_database_password,
  1725. }] if (matrix_prometheus_postgres_exporter_enabled and matrix_prometheus_postgres_exporter_database_hostname == 'matrix-postgres') else [])
  1726. }}
  1727. matrix_postgres_systemd_services_to_stop_for_maintenance_list: |
  1728. {{
  1729. ['matrix-' + matrix_homeserver_implementation + '.service']
  1730. }}
  1731. ######################################################################
  1732. #
  1733. # /matrix-postgres
  1734. #
  1735. ######################################################################
  1736. ######################################################################
  1737. #
  1738. # matrix-sygnal
  1739. #
  1740. ######################################################################
  1741. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  1742. matrix_sygnal_enabled: false
  1743. # If someone instals Prometheus via the playbook, they most likely wish to monitor Sygnal.
  1744. matrix_sygnal_metrics_prometheus_enabled: "{{ matrix_prometheus_enabled }}"
  1745. matrix_sygnal_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:6000' }}"
  1746. ######################################################################
  1747. #
  1748. # /matrix-sygnal
  1749. #
  1750. ######################################################################
  1751. ######################################################################
  1752. #
  1753. # matrix-ntfy
  1754. #
  1755. ######################################################################
  1756. matrix_ntfy_enabled: false
  1757. matrix_ntfy_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:2586' }}"
  1758. ######################################################################
  1759. #
  1760. # /matrix-ntfy
  1761. #
  1762. ######################################################################
  1763. ######################################################################
  1764. #
  1765. # matrix-redis
  1766. #
  1767. ######################################################################
  1768. matrix_redis_enabled: "{{ matrix_synapse_workers_enabled }}"
  1769. ######################################################################
  1770. #
  1771. # /matrix-redis
  1772. #
  1773. ######################################################################
  1774. ######################################################################
  1775. #
  1776. # matrix-client-element
  1777. #
  1778. ######################################################################
  1779. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  1780. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  1781. matrix_client_element_enabled: true
  1782. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1783. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  1784. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1785. # the Element HTTP port to the local host.
  1786. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  1787. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  1788. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  1789. # Use Dimension if enabled, otherwise fall back to Scalar
  1790. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  1791. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  1792. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  1793. matrix_client_element_integrations_jitsi_widget_url: "{{ matrix_dimension_integrations_jitsi_widget_url if matrix_dimension_enabled else 'https://scalar.vector.im/api/widgets/jitsi.html' }}"
  1794. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1795. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  1796. matrix_client_element_enable_presence_by_hs_url: |
  1797. {{
  1798. none
  1799. if matrix_synapse_presence_enabled
  1800. else {matrix_client_element_default_hs_url: false}
  1801. }}
  1802. matrix_client_element_welcome_user_id: ~
  1803. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  1804. ######################################################################
  1805. #
  1806. # /matrix-client-element
  1807. #
  1808. ######################################################################
  1809. ######################################################################
  1810. #
  1811. # matrix-client-hydrogen
  1812. #
  1813. ######################################################################
  1814. matrix_client_hydrogen_enabled: false
  1815. # Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network.
  1816. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1817. # the HTTP port to the local host.
  1818. matrix_client_hydrogen_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8768' }}"
  1819. matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  1820. matrix_client_hydrogen_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1821. ######################################################################
  1822. #
  1823. # /matrix-client-hydrogen
  1824. #
  1825. ######################################################################
  1826. ######################################################################
  1827. #
  1828. # matrix-client-cinny
  1829. #
  1830. ######################################################################
  1831. matrix_client_cinny_enabled: false
  1832. matrix_client_cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1833. # Normally, matrix-nginx-proxy is enabled and nginx can reach Cinny over the container network.
  1834. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1835. # the HTTP port to the local host.
  1836. matrix_client_cinny_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8080' }}"
  1837. matrix_client_cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  1838. matrix_client_cinny_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1839. ######################################################################
  1840. #
  1841. # /matrix-client-cinny
  1842. #
  1843. ######################################################################
  1844. ######################################################################
  1845. #
  1846. # matrix-synapse
  1847. #
  1848. ######################################################################
  1849. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  1850. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1851. # When ma1sd is enabled, we can use it to validate phone numbers. It's something that the homeserver cannot do by itself.
  1852. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port | string if matrix_ma1sd_enabled else '' }}"
  1853. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  1854. 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 '' }}"
  1855. #
  1856. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  1857. matrix_synapse_container_metrics_api_host_bind_port: "{{ '127.0.0.1:9100' if (matrix_synapse_metrics_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  1858. #
  1859. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  1860. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  1861. #
  1862. # For exposing the Synapse worker (and metrics) ports to the local host.
  1863. matrix_synapse_workers_container_host_bind_address: "{{ '127.0.0.1' if (matrix_synapse_workers_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  1864. matrix_synapse_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.db') | to_uuid }}"
  1865. matrix_synapse_macaroon_secret_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.mac') | to_uuid }}"
  1866. # We do not enable TLS in Synapse by default.
  1867. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  1868. matrix_synapse_tls_federation_listener_enabled: false
  1869. matrix_synapse_tls_certificate_path: ~
  1870. matrix_synapse_tls_private_key_path: ~
  1871. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  1872. # If someone instals Prometheus via the playbook, they most likely wish to monitor Synapse.
  1873. matrix_synapse_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  1874. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  1875. matrix_synapse_email_smtp_host: "matrix-mailer"
  1876. matrix_synapse_email_smtp_port: 8025
  1877. matrix_synapse_email_smtp_require_transport_security: false
  1878. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  1879. # Even if TURN doesn't support TLS (it does by default),
  1880. # it doesn't hurt to try a secure connection anyway.
  1881. #
  1882. # When Let's Encrypt certificates are used (the default case),
  1883. # we don't enable `turns` endpoints, because WebRTC in Element can't talk to them.
  1884. # Learn more here: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1145
  1885. matrix_synapse_turn_uris: |
  1886. {{
  1887. []
  1888. +
  1889. [
  1890. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  1891. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  1892. ] if matrix_coturn_enabled and matrix_coturn_tls_enabled and matrix_ssl_retrieval_method != 'lets-encrypt' else []
  1893. +
  1894. [
  1895. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  1896. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  1897. ] if matrix_coturn_enabled else []
  1898. }}
  1899. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1900. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1901. matrix_synapse_systemd_required_services_list: |
  1902. {{
  1903. (['docker.service'])
  1904. +
  1905. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1906. +
  1907. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  1908. }}
  1909. matrix_synapse_systemd_wanted_services_list: |
  1910. {{
  1911. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  1912. +
  1913. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1914. }}
  1915. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  1916. matrix_synapse_redis_enabled: "{{ matrix_redis_enabled }}"
  1917. matrix_synapse_redis_host: "{{ 'matrix-redis' if matrix_redis_enabled else '' }}"
  1918. matrix_synapse_redis_password: "{{ matrix_redis_connection_password if matrix_redis_enabled else '' }}"
  1919. matrix_synapse_container_runtime_injected_arguments: "{{ matrix_homeserver_container_runtime_injected_arguments }}"
  1920. matrix_synapse_app_service_runtime_injected_config_files: "{{ matrix_homeserver_app_service_runtime_injected_config_files }}"
  1921. ######################################################################
  1922. #
  1923. # /matrix-synapse
  1924. #
  1925. ######################################################################
  1926. ######################################################################
  1927. #
  1928. # matrix-synapse-reverse-proxy-companion
  1929. #
  1930. ######################################################################
  1931. matrix_synapse_reverse_proxy_companion_enabled: "{{ matrix_synapse_enabled }}"
  1932. matrix_synapse_reverse_proxy_companion_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  1933. matrix_synapse_reverse_proxy_companion_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  1934. matrix_synapse_reverse_proxy_companion_container_federation_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  1935. matrix_synapse_reverse_proxy_companion_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  1936. matrix_synapse_reverse_proxy_companion_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  1937. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  1938. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  1939. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_typing_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints }}"
  1940. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_to_device_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_to_device_stream_worker_client_server_endpoints }}"
  1941. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_account_data_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_account_data_stream_worker_client_server_endpoints }}"
  1942. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_receipts_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_receipts_stream_worker_client_server_endpoints }}"
  1943. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_presence_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_presence_stream_worker_client_server_endpoints }}"
  1944. matrix_synapse_reverse_proxy_companion_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  1945. matrix_synapse_reverse_proxy_companion_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_worker_client_server_endpoints|default([]) }}"
  1946. ######################################################################
  1947. #
  1948. # /matrix-synapse-reverse-proxy-companion
  1949. #
  1950. ######################################################################
  1951. ######################################################################
  1952. #
  1953. # matrix-synapse-admin
  1954. #
  1955. ######################################################################
  1956. matrix_synapse_admin_enabled: false
  1957. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  1958. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1959. # Synapse Admin's HTTP port to the local host.
  1960. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  1961. matrix_synapse_admin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1962. ######################################################################
  1963. #
  1964. # /matrix-synapse-admin
  1965. #
  1966. ######################################################################
  1967. ######################################################################
  1968. #
  1969. # matrix-prometheus-node-exporter
  1970. #
  1971. ######################################################################
  1972. matrix_prometheus_node_exporter_enabled: false
  1973. ######################################################################
  1974. #
  1975. # /matrix-prometheus-node-exporter
  1976. #
  1977. ######################################################################
  1978. ######################################################################
  1979. #
  1980. # matrix-prometheus
  1981. #
  1982. ######################################################################
  1983. matrix_prometheus_enabled: false
  1984. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus over the container network.
  1985. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1986. # Prometheus' HTTP port to the local host.
  1987. matrix_prometheus_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9090' }}"
  1988. matrix_prometheus_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  1989. matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
  1990. matrix_prometheus_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  1991. matrix_prometheus_scraper_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  1992. matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
  1993. matrix_prometheus_scraper_node_targets: "{{ ['matrix-prometheus-node-exporter:9100'] if matrix_prometheus_node_exporter_enabled else [] }}"
  1994. matrix_prometheus_scraper_postgres_enabled: "{{ matrix_prometheus_postgres_exporter_enabled }}"
  1995. matrix_prometheus_scraper_postgres_targets: "{{ ['matrix-prometheus-postgres-exporter:'+ matrix_prometheus_postgres_exporter_port | string] if matrix_prometheus_scraper_postgres_enabled else [] }}"
  1996. matrix_prometheus_scraper_hookshot_enabled: "{{ matrix_hookshot_metrics_enabled|default(false) }}"
  1997. matrix_prometheus_scraper_hookshot_targets: "{{ [matrix_hookshot_container_url | string +':'+ matrix_hookshot_metrics_port | string] if matrix_hookshot_metrics_enabled else [] }}"
  1998. ######################################################################
  1999. #
  2000. # /matrix-prometheus
  2001. #
  2002. ######################################################################
  2003. ######################################################################
  2004. #
  2005. # matrix-prometheus-postgres-exporter
  2006. #
  2007. ######################################################################
  2008. matrix_prometheus_postgres_exporter_enabled: false
  2009. matrix_prometheus_postgres_exporter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'prometheus.pg.db') | to_uuid }}"
  2010. matrix_prometheus_postgres_exporter_systemd_required_services_list: |
  2011. {{
  2012. ['docker.service']
  2013. +
  2014. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  2015. }}
  2016. ######################################################################
  2017. #
  2018. # /matrix-prometheus-postgres-exporter
  2019. #
  2020. ######################################################################
  2021. ######################################################################
  2022. #
  2023. # matrix-grafana
  2024. #
  2025. ######################################################################
  2026. matrix_grafana_enabled: false
  2027. # Normally, matrix-nginx-proxy is enabled and nginx can reach Grafana over the container network.
  2028. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2029. # Grafana's HTTP port to the local host.
  2030. matrix_grafana_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:3000' }}"
  2031. matrix_grafana_dashboard_download_urls: |
  2032. {{
  2033. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  2034. +
  2035. (matrix_prometheus_node_exporter_dashboard_urls if matrix_prometheus_node_exporter_enabled else [])
  2036. +
  2037. (matrix_prometheus_postgres_exporter_dashboard_urls if matrix_prometheus_postgres_exporter_enabled else [])
  2038. }}
  2039. matrix_grafana_default_home_dashboard_path: |-
  2040. {{
  2041. {
  2042. 'synapse': ('/etc/grafana/dashboards/synapse.json' if matrix_synapse_metrics_enabled else '/etc/grafana/dashboards/node-exporter-full.json'),
  2043. 'dendrite': '/etc/grafana/dashboards/node-exporter-full.json',
  2044. 'conduit': '/etc/grafana/dashboards/node-exporter-full.json',
  2045. }[matrix_homeserver_implementation]
  2046. }}
  2047. matrix_grafana_systemd_wanted_services_list: |
  2048. {{
  2049. []
  2050. +
  2051. (['matrix-prometheus-postgres-exporter.service'] if matrix_prometheus_postgres_exporter_enabled else [])
  2052. }}
  2053. ######################################################################
  2054. #
  2055. # /matrix-grafana
  2056. #
  2057. ######################################################################
  2058. ######################################################################
  2059. #
  2060. # matrix-registration
  2061. #
  2062. ######################################################################
  2063. matrix_registration_enabled: false
  2064. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  2065. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2066. # matrix-registration's HTTP port to the local host.
  2067. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  2068. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  2069. matrix_registration_shared_secret: |-
  2070. {{
  2071. {
  2072. 'synapse': matrix_synapse_registration_shared_secret,
  2073. 'dendrite': matrix_dendrite_registration_shared_secret,
  2074. 'conduit': '',
  2075. }[matrix_homeserver_implementation]
  2076. }}
  2077. matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
  2078. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2079. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2080. matrix_registration_systemd_required_services_list: |
  2081. {{
  2082. ['docker.service']
  2083. +
  2084. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  2085. }}
  2086. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  2087. matrix_registration_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  2088. matrix_registration_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mx.registr.db') | to_uuid }}"
  2089. ######################################################################
  2090. #
  2091. # /matrix-registration
  2092. #
  2093. ######################################################################
  2094. ######################################################################
  2095. #
  2096. # matrix-postgres-backup
  2097. #
  2098. ######################################################################
  2099. matrix_postgres_backup_connection_hostname: "{{ matrix_postgres_connection_hostname }}"
  2100. matrix_postgres_backup_connection_port: "{{ matrix_postgres_connection_port }}"
  2101. matrix_postgres_backup_connection_username: "{{ matrix_postgres_connection_username }}"
  2102. matrix_postgres_backup_connection_password: "{{ matrix_postgres_connection_password }}"
  2103. matrix_postgres_backup_postgres_data_path: "{{ matrix_postgres_data_path if matrix_postgres_enabled else '' }}"
  2104. # the default matrix synapse databse is not always part of the matrix_postgres_additional_databases variable thus we have to add it if the default database is used
  2105. matrix_postgres_backup_databases: |
  2106. {{
  2107. (([{
  2108. 'name': matrix_synapse_database_database
  2109. }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  2110. +
  2111. matrix_postgres_additional_databases)|map(attribute='name') | list
  2112. }}
  2113. ######################################################################
  2114. #
  2115. # /matrix-postgres-backup
  2116. #
  2117. ######################################################################
  2118. ######################################################################
  2119. #
  2120. # matrix-dendrite
  2121. #
  2122. ######################################################################
  2123. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  2124. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dendrite over the container network.
  2125. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  2126. # you can expose Dendrite's ports to the host.
  2127. #
  2128. # For exposing Dendrite's plain HTTP server to the local host.
  2129. matrix_dendrite_container_http_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_dendrite_http_bind_port | string) }}"
  2130. #
  2131. # For exposing Dendrite's HTTPS server to the local host.
  2132. matrix_dendrite_container_https_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled or not matrix_dendrite_https_bind_port else ('127.0.0.1:' + matrix_dendrite_https_bind_port | string) }}"
  2133. matrix_dendrite_sync_api_real_ip_header: "{{ 'X-Forwarded-For' if matrix_nginx_proxy_enabled else '' }}"
  2134. matrix_dendrite_registration_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.rss') | to_uuid }}"
  2135. matrix_dendrite_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.db') | to_uuid }}"
  2136. # Even if TURN doesn't support TLS (it does by default),
  2137. # it doesn't hurt to try a secure connection anyway.
  2138. matrix_dendrite_turn_uris: |
  2139. {{
  2140. [
  2141. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  2142. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  2143. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  2144. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  2145. ]
  2146. if matrix_coturn_enabled
  2147. else []
  2148. }}
  2149. matrix_dendrite_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  2150. matrix_dendrite_disable_tls_validation: "{{ true if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  2151. matrix_dendrite_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2152. matrix_dendrite_trusted_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else ['matrix.org', 'vector.im'] }}"
  2153. matrix_dendrite_systemd_required_services_list: |
  2154. {{
  2155. (['docker.service'])
  2156. +
  2157. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  2158. +
  2159. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  2160. }}
  2161. matrix_dendrite_systemd_wanted_services_list: |
  2162. {{
  2163. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  2164. }}
  2165. matrix_dendrite_container_runtime_injected_arguments: "{{ matrix_homeserver_container_runtime_injected_arguments }}"
  2166. matrix_dendrite_app_service_runtime_injected_config_files: "{{ matrix_homeserver_app_service_runtime_injected_config_files }}"
  2167. ######################################################################
  2168. #
  2169. # /matrix-dendrite
  2170. #
  2171. ######################################################################
  2172. ######################################################################
  2173. #
  2174. # matrix-conduit
  2175. #
  2176. ######################################################################
  2177. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  2178. matrix_conduit_systemd_required_services_list: |
  2179. {{
  2180. (['docker.service'])
  2181. }}
  2182. ######################################################################
  2183. #
  2184. # /matrix-conduit
  2185. #
  2186. ######################################################################
  2187. ######################################################################
  2188. #
  2189. # matrix-user-creator
  2190. #
  2191. ######################################################################
  2192. matrix_user_creator_users_auto: |
  2193. {{
  2194. [{
  2195. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  2196. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  2197. 'initial_type': 'bot',
  2198. }] if matrix_bot_matrix_reminder_bot_enabled else []
  2199. +
  2200. [{
  2201. 'username': matrix_bot_honoroit_login,
  2202. 'initial_password': matrix_bot_honoroit_password,
  2203. 'initial_type': 'bot',
  2204. }] if matrix_bot_honoroit_enabled else []
  2205. +
  2206. [{
  2207. 'username': matrix_bot_postmoogle_login,
  2208. 'initial_password': matrix_bot_postmoogle_password,
  2209. 'initial_type': 'bot',
  2210. }] if matrix_bot_postmoogle_enabled else []
  2211. +
  2212. [{
  2213. 'username': matrix_bot_buscarron_login,
  2214. 'initial_password': matrix_bot_buscarron_password,
  2215. 'initial_type': 'bot',
  2216. }] if matrix_bot_buscarron_enabled else []
  2217. }}
  2218. ######################################################################
  2219. #
  2220. # /matrix-user-creator
  2221. #
  2222. ######################################################################