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

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