Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

2343 wiersze
104 KiB

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