Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

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