Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

1067 lignes
42 KiB

  1. ---
  2. # This variables file wires together the various components (roles) used by the playbook.
  3. #
  4. # Roles used by playbook are pretty minimal and kept independent of one another as much as possible.
  5. # To deliver a turnkey fully-featured Matrix server, this playbook needs
  6. # to connect them all together. It does so by overriding role variables.
  7. #
  8. # You can also override ANY variable (seen here or in any given role),
  9. # by re-defining it in your own configuration file (`inventory/host_vars/matrix.<your-domain>`).
  10. ######################################################################
  11. #
  12. # matrix-base
  13. #
  14. ######################################################################
  15. matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
  16. ######################################################################
  17. #
  18. # /matrix-base
  19. #
  20. ######################################################################
  21. ######################################################################
  22. #
  23. # matrix-architecture
  24. #
  25. ######################################################################
  26. matrix_architecture: "amd64"
  27. ######################################################################
  28. #
  29. # /matrix-architecture
  30. #
  31. ######################################################################
  32. ######################################################################
  33. #
  34. # matrix-bridge-appservice-discord
  35. #
  36. ######################################################################
  37. # We don't enable bridges by default.
  38. matrix_appservice_discord_enabled: false
  39. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  40. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  41. # matrix-appservice-discord's client-server port to the local host.
  42. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  43. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  44. matrix_appservice_discord_bridge_disablePresence: "{{ matrix_synapse_use_presence }}"
  45. matrix_appservice_discord_systemd_required_services_list: |
  46. {{
  47. ['docker.service']
  48. +
  49. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  50. }}
  51. matrix_appservice_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  52. matrix_appservice_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  53. ######################################################################
  54. #
  55. # /matrix-bridge-appservice-discord
  56. #
  57. ######################################################################
  58. ######################################################################
  59. #
  60. # matrix-appservice-webhooks
  61. #
  62. ######################################################################
  63. # We don't enable bridges by default.
  64. matrix_appservice_webhooks_enabled: false
  65. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  66. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  67. # matrix-appservice-webhooks' client-server port to the local host.
  68. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_webhooks_matrix_port) }}"
  69. matrix_appservice_webhooks_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  70. matrix_appservice_webhooks_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  71. matrix_appservice_webhooks_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  72. matrix_appservice_webhooks_systemd_required_services_list: |
  73. {{
  74. ['docker.service']
  75. +
  76. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  77. }}
  78. ######################################################################
  79. #
  80. # /matrix-appservice-webhooks
  81. #
  82. ######################################################################
  83. ######################################################################
  84. #
  85. # matrix-appservice-slack
  86. #
  87. ######################################################################
  88. # We don't enable bridges by default.
  89. matrix_appservice_slack_enabled: false
  90. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  91. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  92. # matrix-appservice-slack's client-server port to the local host.
  93. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  94. matrix_appservice_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  95. matrix_appservice_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  96. matrix_appservice_slack_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  97. matrix_appservice_slack_systemd_required_services_list: |
  98. {{
  99. ['docker.service']
  100. +
  101. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  102. }}
  103. ######################################################################
  104. #
  105. # /matrix-bridge-appservice-slack
  106. #
  107. ######################################################################
  108. ######################################################################
  109. #
  110. # matrix-bridge-appservice-irc
  111. #
  112. ######################################################################
  113. # We don't enable bridges by default.
  114. matrix_appservice_irc_enabled: false
  115. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  116. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  117. # matrix-appservice-irc's client-server port to the local host.
  118. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  119. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  120. # IRC bridge presence, for performance reasons.
  121. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_use_presence }}"
  122. matrix_appservice_irc_systemd_required_services_list: |
  123. {{
  124. ['docker.service']
  125. +
  126. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  127. }}
  128. matrix_appservice_irc_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  129. matrix_appservice_irc_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  130. ######################################################################
  131. #
  132. # /matrix-bridge-appservice-irc
  133. #
  134. ######################################################################
  135. ######################################################################
  136. #
  137. # matrix-bridge-mautrix-facebook
  138. #
  139. ######################################################################
  140. # We don't enable bridges by default.
  141. matrix_mautrix_facebook_enabled: false
  142. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  143. matrix_mautrix_facebook_systemd_required_services_list: |
  144. {{
  145. ['docker.service']
  146. +
  147. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  148. }}
  149. matrix_mautrix_facebook_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  150. matrix_mautrix_facebook_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  151. 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 '' }}"
  152. ######################################################################
  153. #
  154. # /matrix-bridge-mautrix-facebook
  155. #
  156. ######################################################################
  157. ######################################################################
  158. #
  159. # matrix-bridge-mautrix-hangouts
  160. #
  161. ######################################################################
  162. # We don't enable bridges by default.
  163. matrix_mautrix_hangouts_enabled: false
  164. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  165. matrix_mautrix_hangouts_systemd_required_services_list: |
  166. {{
  167. ['docker.service']
  168. +
  169. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  170. }}
  171. matrix_mautrix_hangouts_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.as.token') | to_uuid }}"
  172. matrix_mautrix_hangouts_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.hs.token') | to_uuid }}"
  173. matrix_mautrix_hangouts_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  174. 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 '' }}"
  175. ######################################################################
  176. #
  177. # /matrix-bridge-mautrix-hangouts
  178. #
  179. ######################################################################
  180. ######################################################################
  181. #
  182. # matrix-bridge-mautrix-telegram
  183. #
  184. ######################################################################
  185. # We don't enable bridges by default.
  186. matrix_mautrix_telegram_enabled: false
  187. matrix_mautrix_telegram_systemd_required_services_list: |
  188. {{
  189. ['docker.service']
  190. +
  191. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  192. }}
  193. matrix_mautrix_telegram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  194. matrix_mautrix_telegram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  195. matrix_mautrix_telegram_public_endpoint: "/{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegram') | to_uuid }}"
  196. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  197. 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 '' }}"
  198. ######################################################################
  199. #
  200. # /matrix-bridge-mautrix-telegram
  201. #
  202. ######################################################################
  203. ######################################################################
  204. #
  205. # matrix-bridge-mautrix-whatsapp
  206. #
  207. ######################################################################
  208. # We don't enable bridges by default.
  209. matrix_mautrix_whatsapp_enabled: false
  210. matrix_mautrix_whatsapp_systemd_required_services_list: |
  211. {{
  212. ['docker.service']
  213. +
  214. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  215. }}
  216. matrix_mautrix_whatsapp_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  217. matrix_mautrix_whatsapp_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  218. 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 '' }}"
  219. ######################################################################
  220. #
  221. # /matrix-bridge-mautrix-whatsapp
  222. #
  223. ######################################################################
  224. ######################################################################
  225. #
  226. # matrix-sms-bridge
  227. #
  228. ######################################################################
  229. # We don't enable bridges by default.
  230. matrix_sms_bridge_enabled: false
  231. matrix_sms_bridge_systemd_required_services_list: |
  232. {{
  233. ['docker.service']
  234. +
  235. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  236. }}
  237. matrix_sms_bridge_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.as.token') | to_uuid }}"
  238. matrix_sms_bridge_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.hs.token') | to_uuid }}"
  239. ######################################################################
  240. #
  241. # /matrix-sms-bridge
  242. #
  243. ######################################################################
  244. ######################################################################
  245. #
  246. # matrix-bridge-mx-puppet-skype
  247. #
  248. ######################################################################
  249. # We don't enable bridges by default.
  250. matrix_mx_puppet_skype_enabled: false
  251. matrix_mx_puppet_skype_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  252. matrix_mx_puppet_skype_systemd_required_services_list: |
  253. {{
  254. ['docker.service']
  255. +
  256. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  257. }}
  258. matrix_mx_puppet_skype_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.as.tok') | to_uuid }}"
  259. matrix_mx_puppet_skype_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.hs.tok') | to_uuid }}"
  260. matrix_mx_puppet_skype_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  261. ######################################################################
  262. #
  263. # /matrix-bridge-mx-puppet-skype
  264. #
  265. ######################################################################
  266. ######################################################################
  267. #
  268. # matrix-bridge-mx-puppet-slack
  269. #
  270. ######################################################################
  271. # We don't enable bridges by default.
  272. matrix_mx_puppet_slack_enabled: false
  273. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  274. matrix_mx_puppet_slack_systemd_required_services_list: |
  275. {{
  276. ['docker.service']
  277. +
  278. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  279. }}
  280. matrix_mx_puppet_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.as.tok') | to_uuid }}"
  281. matrix_mx_puppet_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.hs.tok') | to_uuid }}"
  282. 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 '' }}"
  283. ######################################################################
  284. #
  285. # /matrix-bridge-mx-puppet-slack
  286. #
  287. ######################################################################
  288. ######################################################################
  289. #
  290. # matrix-bridge-mx-puppet-twitter
  291. #
  292. ######################################################################
  293. # We don't enable bridges by default.
  294. matrix_mx_puppet_twitter_enabled: false
  295. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  296. matrix_mx_puppet_twitter_systemd_required_services_list: |
  297. {{
  298. ['docker.service']
  299. +
  300. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  301. }}
  302. matrix_mx_puppet_twitter_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.as.tok') | to_uuid }}"
  303. matrix_mx_puppet_twitter_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.hs.tok') | to_uuid }}"
  304. 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 '' }}"
  305. 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) }}"
  306. ######################################################################
  307. #
  308. # /matrix-bridge-mx-puppet-twitter
  309. #
  310. ######################################################################
  311. ######################################################################
  312. #
  313. # matrix-bridge-mx-puppet-instagram
  314. #
  315. ######################################################################
  316. # We don't enable bridges by default.
  317. matrix_mx_puppet_instagram_enabled: false
  318. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  319. matrix_mx_puppet_instagram_systemd_required_services_list: |
  320. {{
  321. ['docker.service']
  322. +
  323. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  324. }}
  325. matrix_mx_puppet_instagram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.as.tok') | to_uuid }}"
  326. matrix_mx_puppet_instagram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.hs.tok') | to_uuid }}"
  327. 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 '' }}"
  328. ######################################################################
  329. #
  330. # /matrix-bridge-mx-puppet-instagram
  331. #
  332. ######################################################################
  333. ######################################################################
  334. #
  335. # matrix-bridge-mx-puppet-discord
  336. #
  337. ######################################################################
  338. # We don't enable bridges by default.
  339. matrix_mx_puppet_discord_enabled: false
  340. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  341. matrix_mx_puppet_discord_systemd_required_services_list: |
  342. {{
  343. ['docker.service']
  344. +
  345. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  346. }}
  347. matrix_mx_puppet_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.as.tok') | to_uuid }}"
  348. matrix_mx_puppet_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.hs.tok') | to_uuid }}"
  349. 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 '' }}"
  350. ######################################################################
  351. #
  352. # /matrix-bridge-mx-puppet-discord
  353. #
  354. ######################################################################
  355. ######################################################################
  356. #
  357. # matrix-bridge-mx-puppet-steam
  358. #
  359. ######################################################################
  360. # We don't enable bridges by default.
  361. matrix_mx_puppet_steam_enabled: false
  362. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  363. matrix_mx_puppet_steam_systemd_required_services_list: |
  364. {{
  365. ['docker.service']
  366. +
  367. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  368. }}
  369. matrix_mx_puppet_steam_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.as.tok') | to_uuid }}"
  370. matrix_mx_puppet_steam_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.hs.tok') | to_uuid }}"
  371. 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 '' }}"
  372. ######################################################################
  373. #
  374. # /matrix-bridge-mx-puppet-steam
  375. #
  376. ######################################################################
  377. ######################################################################
  378. #
  379. # matrix-bot-matrix-reminder-bot
  380. #
  381. ######################################################################
  382. # We don't enable bots by default.
  383. matrix_bot_matrix_reminder_bot_enabled: false
  384. ######################################################################
  385. #
  386. # /matrix-bot-matrix-reminder-bot
  387. #
  388. ######################################################################
  389. ######################################################################
  390. #
  391. # matrix-corporal
  392. #
  393. ######################################################################
  394. matrix_corporal_enabled: false
  395. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  396. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  397. # matrix-corporal's web-server ports to the local host.
  398. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  399. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  400. matrix_corporal_systemd_required_services_list: |
  401. {{
  402. (['docker.service'])
  403. +
  404. (['matrix-synapse.service'])
  405. }}
  406. matrix_corporal_matrix_homeserver_api_endpoint: "http://matrix-synapse:8008"
  407. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  408. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  409. ######################################################################
  410. #
  411. # /matrix-corporal
  412. #
  413. ######################################################################
  414. ######################################################################
  415. #
  416. # matrix-coturn
  417. #
  418. ######################################################################
  419. matrix_coturn_enabled: true
  420. matrix_coturn_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  421. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  422. matrix_coturn_tls_enabled: true
  423. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  424. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  425. matrix_coturn_container_additional_volumes:
  426. - src: "{{ matrix_ssl_config_dir_path }}"
  427. dst: "{{ matrix_ssl_config_dir_path }}"
  428. options: ro
  429. ######################################################################
  430. #
  431. # /matrix-coturn
  432. #
  433. ######################################################################
  434. ######################################################################
  435. #
  436. # matrix-dimension
  437. #
  438. ######################################################################
  439. matrix_dimension_enabled: false
  440. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  441. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  442. # the Dimension HTTP port to the local host.
  443. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  444. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  445. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  446. matrix_dimension_homeserver_federationUrl: "http://matrix-synapse:{{ 8048 if matrix_synapse_federation_enabled|bool else 8008 }}"
  447. ######################################################################
  448. #
  449. # /matrix-dimension
  450. #
  451. ######################################################################
  452. ######################################################################
  453. #
  454. # matrix-email2matrix
  455. #
  456. ######################################################################
  457. matrix_email2matrix_enabled: false
  458. ######################################################################
  459. #
  460. # /matrix-email2matrix
  461. #
  462. ######################################################################
  463. ######################################################################
  464. #
  465. # matrix-jitsi
  466. #
  467. ######################################################################
  468. matrix_jitsi_enabled: false
  469. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  470. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  471. # the Jitsi HTTP port to the local host.
  472. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:12080' }}"
  473. matrix_jitsi_jibri_xmpp_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jibri') | to_uuid }}"
  474. matrix_jitsi_jicofo_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jicofo') | to_uuid }}"
  475. matrix_jitsi_jvb_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jvb') | to_uuid }}"
  476. matrix_jitsi_web_stun_servers: |
  477. {{
  478. [
  479. 'stun:' + matrix_server_fqn_matrix + ':5349',
  480. 'stun:' + matrix_server_fqn_matrix + ':3478',
  481. ]
  482. if matrix_coturn_enabled
  483. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  484. }}
  485. ######################################################################
  486. #
  487. # /matrix-jitsi
  488. #
  489. ######################################################################
  490. ######################################################################
  491. #
  492. # matrix-mailer
  493. #
  494. ######################################################################
  495. # By default, this playbook sets up an exim mailer server (running in a container).
  496. # This is so that Synapse can send email reminders for unread messages.
  497. # Other services (like ma1sd), also use the mailer.
  498. matrix_mailer_enabled: true
  499. matrix_mailer_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  500. ######################################################################
  501. #
  502. # /matrix-mailer
  503. #
  504. ######################################################################
  505. ######################################################################
  506. #
  507. # matrix-ma1sd
  508. #
  509. ######################################################################
  510. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  511. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  512. matrix_ma1sd_enabled: true
  513. # There's no prebuilt ma1sd image for the `arm32` architecture.
  514. # We're relying on self-building there.
  515. matrix_ma1sd_architecture: "{{
  516. {
  517. 'amd64': 'amd64',
  518. 'arm32': 'arm32',
  519. 'arm64': 'arm64',
  520. }[matrix_architecture]
  521. }}"
  522. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  523. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  524. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  525. # ma1sd's web-server port.
  526. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8090' }}"
  527. # We enable Synapse integration via its Postgres database by default.
  528. # When using another Identity store, you might wish to disable this and define
  529. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  530. matrix_ma1sd_synapsesql_enabled: true
  531. matrix_ma1sd_synapsesql_type: postgresql
  532. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  533. matrix_ma1sd_dns_overwrite_enabled: true
  534. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  535. matrix_ma1sd_dns_overwrite_homeserver_client_value: "http://{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  536. # By default, we send mail through the `matrix-mailer` service.
  537. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  538. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  539. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  540. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  541. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  542. matrix_ma1sd_systemd_wanted_services_list: |
  543. {{
  544. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  545. +
  546. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  547. +
  548. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  549. }}
  550. ######################################################################
  551. #
  552. # /matrix-ma1sd
  553. #
  554. ######################################################################
  555. ######################################################################
  556. #
  557. # matrix-nginx-proxy
  558. #
  559. ######################################################################
  560. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  561. # This is fine if you're dedicating the whole server to Matrix.
  562. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  563. matrix_nginx_proxy_enabled: true
  564. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  565. matrix_nginx_proxy_proxy_matrix_client_api_addr_sans_container: "{{ '127.0.0.1:41080' if matrix_corporal_enabled else '127.0.0.1:8008' }}"
  566. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  567. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  568. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  569. matrix_nginx_proxy_proxy_matrix_enabled: true
  570. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  571. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  572. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  573. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  574. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  575. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  576. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  577. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:8090"
  578. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:8090"
  579. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  580. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: true
  581. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-synapse:8048"
  582. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:8048"
  583. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  584. matrix_nginx_proxy_proxy_synapse_metrics: "{{ matrix_synapse_metrics_enabled }}"
  585. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  586. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  587. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  588. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  589. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  590. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  591. matrix_nginx_proxy_systemd_wanted_services_list: |
  592. {{
  593. (['matrix-synapse.service'])
  594. +
  595. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  596. +
  597. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  598. +
  599. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  600. }}
  601. matrix_ssl_domains_to_obtain_certificates_for: |
  602. {{
  603. ([matrix_server_fqn_matrix])
  604. +
  605. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  606. +
  607. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  608. +
  609. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  610. +
  611. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  612. +
  613. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  614. }}
  615. matrix_ssl_architecture: "{{
  616. {
  617. 'amd64': 'amd64',
  618. 'arm32': 'arm32v6',
  619. 'arm64': 'arm64v8',
  620. }[matrix_architecture]
  621. }}"
  622. ######################################################################
  623. #
  624. # /matrix-nginx-proxy
  625. #
  626. ######################################################################
  627. ######################################################################
  628. #
  629. # matrix-postgres
  630. #
  631. ######################################################################
  632. matrix_postgres_enabled: true
  633. matrix_postgres_connection_hostname: "matrix-postgres"
  634. matrix_postgres_connection_username: "synapse"
  635. matrix_postgres_connection_password: "synapse-password"
  636. matrix_postgres_db_name: "homeserver"
  637. ######################################################################
  638. #
  639. # /matrix-postgres
  640. #
  641. ######################################################################
  642. ######################################################################
  643. #
  644. # matrix-client-element
  645. #
  646. ######################################################################
  647. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  648. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  649. matrix_client_element_enabled: true
  650. matrix_client_element_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  651. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  652. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  653. # the Element HTTP port to the local host.
  654. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  655. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  656. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  657. # Use Dimension if enabled, otherwise fall back to Scalar
  658. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  659. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  660. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  661. 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' }}"
  662. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  663. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  664. matrix_client_element_enable_presence_by_hs_url: |
  665. {{
  666. none
  667. if matrix_synapse_use_presence
  668. else {matrix_client_element_default_hs_url: false}
  669. }}
  670. matrix_client_element_welcome_user_id: ~
  671. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  672. ######################################################################
  673. #
  674. # /matrix-client-element
  675. #
  676. ######################################################################
  677. ######################################################################
  678. #
  679. # matrix-synapse
  680. #
  681. ######################################################################
  682. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm32', 'arm64', 'amd64'] }}"
  683. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  684. # Synapse can validate email addresses by itself as well, but it's probably not what we want by default when we have an identity server.
  685. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  686. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  687. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  688. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  689. # you can expose Synapse's ports to the host.
  690. #
  691. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  692. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  693. #
  694. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  695. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  696. #
  697. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  698. 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 '' }}"
  699. #
  700. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  701. 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 '' }}"
  702. #
  703. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  704. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  705. matrix_synapse_database_host: "{{ matrix_postgres_connection_hostname }}"
  706. matrix_synapse_database_user: "{{ matrix_postgres_connection_username }}"
  707. matrix_synapse_database_password: "{{ matrix_postgres_connection_password }}"
  708. matrix_synapse_database_database: "{{ matrix_postgres_db_name }}"
  709. # We do not enable TLS in Synapse by default.
  710. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  711. matrix_synapse_tls_federation_listener_enabled: false
  712. matrix_synapse_tls_certificate_path: ~
  713. matrix_synapse_tls_private_key_path: ~
  714. matrix_synapse_http_listener_resource_names: |
  715. {{
  716. ["client"]
  717. +
  718. ( ["openid"] if matrix_dimension_enabled and not matrix_synapse_federation_enabled else [] )
  719. }}
  720. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  721. matrix_synapse_email_smtp_host: "matrix-mailer"
  722. matrix_synapse_email_smtp_port: 8025
  723. matrix_synapse_email_smtp_require_transport_security: false
  724. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  725. # Even if TURN doesn't support TLS (it does by default),
  726. # it doesn't hurt to try a secure connection anyway.
  727. matrix_synapse_turn_uris: |
  728. {{
  729. [
  730. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  731. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  732. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  733. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  734. ]
  735. if matrix_coturn_enabled
  736. else []
  737. }}
  738. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  739. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  740. matrix_synapse_systemd_required_services_list: |
  741. {{
  742. (['docker.service'])
  743. +
  744. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  745. +
  746. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  747. }}
  748. matrix_synapse_systemd_wanted_services_list: |
  749. {{
  750. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  751. +
  752. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  753. }}
  754. ######################################################################
  755. #
  756. # /matrix-synapse
  757. #
  758. ######################################################################
  759. ######################################################################
  760. #
  761. # matrix-synapse-admin
  762. #
  763. ######################################################################
  764. matrix_synapse_admin_enabled: false
  765. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  766. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  767. # Synapse Admin's HTTP port to the local host.
  768. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  769. matrix_synapse_admin_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  770. ######################################################################
  771. #
  772. # /matrix-synapse-admin
  773. #
  774. ######################################################################
  775. ######################################################################
  776. #
  777. # matrix-registration
  778. #
  779. ######################################################################
  780. matrix_registration_enabled: false
  781. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  782. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  783. # matrix-registration's HTTP port to the local host.
  784. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  785. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  786. matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret if matrix_synapse_enabled else '' }}"
  787. matrix_registration_server_location: "{{ 'http://matrix-synapse:8008' if matrix_synapse_enabled else '' }}"
  788. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  789. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  790. ######################################################################
  791. #
  792. # /matrix-registration
  793. #
  794. ######################################################################