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

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