Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

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