Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

2365 Zeilen
105 KiB

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