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

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