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

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