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.
 
 

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