Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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