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.
 
 

780 righe
31 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_synapse_trusted_third_party_id_servers[0] if matrix_synapse_trusted_third_party_id_servers|length > 0 else None }}"
  16. matrix_riot_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  17. ######################################################################
  18. #
  19. # /matrix-base
  20. #
  21. ######################################################################
  22. ######################################################################
  23. #
  24. # matrix-bridge-appservice-discord
  25. #
  26. ######################################################################
  27. # We don't enable bridges by default.
  28. matrix_appservice_discord_enabled: false
  29. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  30. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  31. # matrix-appservice-discord's client-server port to the local host.
  32. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  33. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  34. matrix_appservice_discord_bridge_disablePresence: "{{ matrix_synapse_use_presence }}"
  35. matrix_appservice_discord_systemd_required_services_list: |
  36. {{
  37. ['docker.service']
  38. +
  39. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  40. }}
  41. matrix_appservice_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  42. matrix_appservice_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  43. ######################################################################
  44. #
  45. # /matrix-bridge-appservice-discord
  46. #
  47. ######################################################################
  48. ######################################################################
  49. #
  50. # matrix-appservice-webhooks
  51. #
  52. ######################################################################
  53. # We don't enable bridges by default.
  54. matrix_appservice_webhooks_enabled: false
  55. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  56. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  57. # matrix-appservice-webhooks' client-server port to the local host.
  58. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:{{ matrix_appservice_webhooks_matrix_port }}' }}"
  59. matrix_appservice_webhooks_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  60. matrix_appservice_webhooks_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  61. matrix_appservice_webhooks_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  62. matrix_appservice_webhooks_systemd_required_services_list: |
  63. {{
  64. ['docker.service']
  65. +
  66. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  67. }}
  68. ######################################################################
  69. #
  70. # /matrix-appservice-webhooks
  71. #
  72. ######################################################################
  73. ######################################################################
  74. #
  75. # matrix-appservice-slack
  76. #
  77. ######################################################################
  78. # We don't enable bridges by default.
  79. matrix_appservice_slack_enabled: false
  80. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  81. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  82. # matrix-appservice-slack's client-server port to the local host.
  83. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  84. matrix_appservice_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  85. matrix_appservice_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  86. matrix_appservice_slack_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  87. matrix_appservice_slack_systemd_required_services_list: |
  88. {{
  89. ['docker.service']
  90. +
  91. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  92. }}
  93. ######################################################################
  94. #
  95. # /matrix-bridge-appservice-slack
  96. #
  97. ######################################################################
  98. ######################################################################
  99. #
  100. # matrix-bridge-appservice-irc
  101. #
  102. ######################################################################
  103. # We don't enable bridges by default.
  104. matrix_appservice_irc_enabled: false
  105. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  106. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  107. # matrix-appservice-irc's client-server port to the local host.
  108. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  109. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  110. # IRC bridge presence, for performance reasons.
  111. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_use_presence }}"
  112. matrix_appservice_irc_systemd_required_services_list: |
  113. {{
  114. ['docker.service']
  115. +
  116. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  117. }}
  118. matrix_appservice_irc_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  119. matrix_appservice_irc_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  120. ######################################################################
  121. #
  122. # /matrix-bridge-appservice-irc
  123. #
  124. ######################################################################
  125. ######################################################################
  126. #
  127. # matrix-bridge-mautrix-facebook
  128. #
  129. ######################################################################
  130. # We don't enable bridges by default.
  131. matrix_mautrix_facebook_enabled: false
  132. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_container_images_self_build }}"
  133. matrix_mautrix_facebook_systemd_required_services_list: |
  134. {{
  135. ['docker.service']
  136. +
  137. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  138. }}
  139. matrix_mautrix_facebook_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  140. matrix_mautrix_facebook_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  141. 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 '' }}"
  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_container_images_self_build }}"
  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_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  164. ######################################################################
  165. #
  166. # /matrix-bridge-mautrix-hangouts
  167. #
  168. ######################################################################
  169. ######################################################################
  170. #
  171. # matrix-bridge-mautrix-telegram
  172. #
  173. ######################################################################
  174. # We don't enable bridges by default.
  175. matrix_mautrix_telegram_enabled: false
  176. matrix_mautrix_telegram_systemd_required_services_list: |
  177. {{
  178. ['docker.service']
  179. +
  180. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  181. }}
  182. matrix_mautrix_telegram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  183. matrix_mautrix_telegram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  184. matrix_mautrix_telegram_public_endpoint: "/{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegram') | to_uuid }}"
  185. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  186. 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 '' }}"
  187. ######################################################################
  188. #
  189. # /matrix-bridge-mautrix-telegram
  190. #
  191. ######################################################################
  192. ######################################################################
  193. #
  194. # matrix-bridge-mautrix-whatsapp
  195. #
  196. ######################################################################
  197. # We don't enable bridges by default.
  198. matrix_mautrix_whatsapp_enabled: false
  199. matrix_mautrix_whatsapp_systemd_required_services_list: |
  200. {{
  201. ['docker.service']
  202. +
  203. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  204. }}
  205. matrix_mautrix_whatsapp_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  206. matrix_mautrix_whatsapp_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  207. 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 '' }}"
  208. ######################################################################
  209. #
  210. # /matrix-bridge-mautrix-whatsapp
  211. #
  212. ######################################################################
  213. ######################################################################
  214. #
  215. # matrix-bridge-mx-puppet-skype
  216. #
  217. ######################################################################
  218. # We don't enable bridges by default.
  219. matrix_mx_puppet_skype_enabled: false
  220. matrix_mx_puppet_skype_container_image_self_build: "{{ matrix_container_images_self_build }}"
  221. matrix_mx_puppet_skype_systemd_required_services_list: |
  222. {{
  223. ['docker.service']
  224. +
  225. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  226. }}
  227. matrix_mx_puppet_skype_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.as.tok') | to_uuid }}"
  228. matrix_mx_puppet_skype_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.hs.tok') | to_uuid }}"
  229. 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 '' }}"
  230. ######################################################################
  231. #
  232. # /matrix-bridge-mx-puppet-skype
  233. #
  234. ######################################################################
  235. ######################################################################
  236. #
  237. # matrix-corporal
  238. #
  239. ######################################################################
  240. matrix_corporal_enabled: false
  241. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  242. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  243. # matrix-corporal's web-server ports to the local host.
  244. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  245. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  246. matrix_corporal_systemd_required_services_list: |
  247. {{
  248. (['docker.service'])
  249. +
  250. (['matrix-synapse.service'])
  251. }}
  252. matrix_corporal_matrix_homeserver_api_endpoint: "http://matrix-synapse:8008"
  253. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  254. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  255. ######################################################################
  256. #
  257. # /matrix-corporal
  258. #
  259. ######################################################################
  260. ######################################################################
  261. #
  262. # matrix-coturn
  263. #
  264. ######################################################################
  265. matrix_coturn_enabled: true
  266. matrix_coturn_container_image_self_build: "{{ matrix_container_images_self_build }}"
  267. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  268. matrix_coturn_tls_enabled: true
  269. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  270. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  271. matrix_coturn_container_additional_volumes:
  272. - src: "{{ matrix_ssl_config_dir_path }}"
  273. dst: "{{ matrix_ssl_config_dir_path }}"
  274. options: ro
  275. ######################################################################
  276. #
  277. # /matrix-coturn
  278. #
  279. ######################################################################
  280. ######################################################################
  281. #
  282. # matrix-dimension
  283. #
  284. ######################################################################
  285. matrix_dimension_enabled: false
  286. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  287. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  288. # the Dimension HTTP port to the local host.
  289. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  290. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  291. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  292. matrix_dimension_homeserver_federationUrl: "http://matrix-synapse:{{ 8048 if matrix_synapse_federation_enabled|bool else 8008 }}"
  293. ######################################################################
  294. #
  295. # /matrix-dimension
  296. #
  297. ######################################################################
  298. ######################################################################
  299. #
  300. # matrix-email2matrix
  301. #
  302. ######################################################################
  303. matrix_email2matrix_enabled: false
  304. ######################################################################
  305. #
  306. # /matrix-email2matrix
  307. #
  308. ######################################################################
  309. ######################################################################
  310. #
  311. # matrix-jitsi
  312. #
  313. ######################################################################
  314. matrix_jitsi_enabled: false
  315. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  316. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  317. # the Jitsi HTTP port to the local host.
  318. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:12080' }}"
  319. matrix_jitsi_jibri_xmpp_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jibri') | to_uuid }}"
  320. matrix_jitsi_jicofo_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jicofo') | to_uuid }}"
  321. matrix_jitsi_jvb_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jvb') | to_uuid }}"
  322. matrix_jitsi_web_stun_servers: |
  323. {{
  324. [
  325. 'stun:' + matrix_server_fqn_matrix + ':5349',
  326. 'stun:' + matrix_server_fqn_matrix + ':3478',
  327. ]
  328. if matrix_coturn_enabled
  329. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  330. }}
  331. ######################################################################
  332. #
  333. # /matrix-jitsi
  334. #
  335. ######################################################################
  336. ######################################################################
  337. #
  338. # matrix-mailer
  339. #
  340. ######################################################################
  341. # By default, this playbook sets up a postfix mailer server (running in a container).
  342. # This is so that Synapse can send email reminders for unread messages.
  343. # Other services (like ma1sd), also use the mailer.
  344. matrix_mailer_enabled: true
  345. ######################################################################
  346. #
  347. # /matrix-mailer
  348. #
  349. ######################################################################
  350. ######################################################################
  351. #
  352. # matrix-ma1sd
  353. #
  354. ######################################################################
  355. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  356. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  357. matrix_ma1sd_enabled: true
  358. matrix_ma1sd_container_image_self_build: "{{ matrix_container_images_self_build }}"
  359. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  360. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  361. # ma1sd's web-server port.
  362. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8090' }}"
  363. # We enable Synapse integration via its Postgres database by default.
  364. # When using another Identity store, you might wish to disable this and define
  365. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  366. matrix_ma1sd_synapsesql_enabled: true
  367. matrix_ma1sd_synapsesql_type: postgresql
  368. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  369. matrix_ma1sd_dns_overwrite_enabled: true
  370. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  371. matrix_ma1sd_dns_overwrite_homeserver_client_value: "http://{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  372. # By default, we send mail through the `matrix-mailer` service.
  373. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  374. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  375. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  376. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  377. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  378. matrix_ma1sd_systemd_wanted_services_list: |
  379. {{
  380. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  381. +
  382. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  383. +
  384. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  385. }}
  386. ######################################################################
  387. #
  388. # /matrix-ma1sd
  389. #
  390. ######################################################################
  391. ######################################################################
  392. #
  393. # matrix-nginx-proxy
  394. #
  395. ######################################################################
  396. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  397. # This is fine if you're dedicating the whole server to Matrix.
  398. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  399. matrix_nginx_proxy_enabled: true
  400. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  401. 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' }}"
  402. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  403. matrix_nginx_proxy_proxy_matrix_enabled: true
  404. matrix_nginx_proxy_proxy_riot_enabled: "{{ matrix_riot_web_enabled }}"
  405. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  406. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  407. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  408. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  409. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  410. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  411. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:8090"
  412. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:8090"
  413. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  414. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: true
  415. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-synapse:8048"
  416. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:8048"
  417. matrix_nginx_proxy_proxy_synapse_metrics: "{{ matrix_synapse_metrics_enabled }}"
  418. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  419. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  420. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  421. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  422. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  423. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  424. matrix_nginx_proxy_systemd_wanted_services_list: |
  425. {{
  426. (['matrix-synapse.service'])
  427. +
  428. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  429. +
  430. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  431. +
  432. (['matrix-riot-web.service'] if matrix_riot_web_enabled else [])
  433. }}
  434. matrix_ssl_domains_to_obtain_certificates_for: |
  435. {{
  436. ([matrix_server_fqn_matrix])
  437. +
  438. ([matrix_server_fqn_riot] if matrix_riot_web_enabled else [])
  439. +
  440. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  441. +
  442. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  443. +
  444. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  445. }}
  446. ######################################################################
  447. #
  448. # /matrix-nginx-proxy
  449. #
  450. ######################################################################
  451. ######################################################################
  452. #
  453. # matrix-postgres
  454. #
  455. ######################################################################
  456. matrix_postgres_enabled: true
  457. matrix_postgres_connection_hostname: "matrix-postgres"
  458. matrix_postgres_connection_username: "synapse"
  459. matrix_postgres_connection_password: "synapse-password"
  460. matrix_postgres_db_name: "homeserver"
  461. ######################################################################
  462. #
  463. # /matrix-postgres
  464. #
  465. ######################################################################
  466. ######################################################################
  467. #
  468. # matrix-riot-web
  469. #
  470. ######################################################################
  471. # By default, this playbook installs the Riot.IM web UI on the `matrix_server_fqn_riot` domain.
  472. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  473. matrix_riot_web_enabled: true
  474. matrix_riot_web_container_image_self_build: "{{ matrix_container_images_self_build }}"
  475. # Normally, matrix-nginx-proxy is enabled and nginx can reach riot-web over the container network.
  476. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  477. # the riot-web HTTP port to the local host.
  478. matrix_riot_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  479. matrix_riot_web_default_hs_url: "{{ matrix_homeserver_url }}"
  480. matrix_riot_web_default_is_url: "{{ matrix_identity_server_url }}"
  481. # Use Dimension if enabled, otherwise fall back to Scalar
  482. matrix_riot_web_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  483. matrix_riot_web_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  484. matrix_riot_web_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  485. matrix_riot_web_integrations_jitsi_widget_url: "{{ matrix_dimension_integrations_jitsi_widget_url if matrix_dimension_enabled else 'https://scalar.vector.im/api/widgets/jitsi.html' }}"
  486. matrix_riot_web_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  487. matrix_riot_web_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  488. matrix_riot_web_enable_presence_by_hs_url: |
  489. {{
  490. none
  491. if matrix_synapse_use_presence
  492. else {matrix_riot_web_default_hs_url: false}
  493. }}
  494. matrix_riot_web_welcome_user_id: ~
  495. matrix_riot_web_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  496. ######################################################################
  497. #
  498. # /matrix-riot-web
  499. #
  500. ######################################################################
  501. ######################################################################
  502. #
  503. # matrix-synapse
  504. #
  505. ######################################################################
  506. matrix_synapse_container_image_self_build: "{{ matrix_container_images_self_build }}"
  507. # When ma1sd is enabled, we can use it instead of the default public Identity servers.
  508. matrix_synapse_trusted_third_party_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else matrix_synapse_id_servers_public }}"
  509. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  510. # 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.
  511. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  512. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  513. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  514. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  515. # you can expose Synapse's ports to the host.
  516. #
  517. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  518. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  519. #
  520. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  521. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  522. #
  523. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  524. matrix_synapse_container_federation_api_tls_host_bind_port: "{{ '8448' if (matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled) else '' }}"
  525. #
  526. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  527. 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 '' }}"
  528. #
  529. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  530. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  531. matrix_synapse_database_host: "{{ matrix_postgres_connection_hostname }}"
  532. matrix_synapse_database_user: "{{ matrix_postgres_connection_username }}"
  533. matrix_synapse_database_password: "{{ matrix_postgres_connection_password }}"
  534. matrix_synapse_database_database: "{{ matrix_postgres_db_name }}"
  535. # We do not enable TLS in Synapse by default.
  536. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  537. matrix_synapse_tls_federation_listener_enabled: false
  538. matrix_synapse_tls_certificate_path: ~
  539. matrix_synapse_tls_private_key_path: ~
  540. matrix_synapse_http_listener_resource_names: |
  541. {{
  542. ["client"]
  543. +
  544. ( ["openid"] if matrix_dimension_enabled and not matrix_synapse_federation_enabled else [] )
  545. }}
  546. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  547. matrix_synapse_email_smtp_host: "matrix-mailer"
  548. matrix_synapse_email_smtp_port: 8025
  549. matrix_synapse_email_smtp_require_transport_security: false
  550. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  551. # Even if TURN doesn't support TLS (it does by default),
  552. # it doesn't hurt to try a secure connection anyway.
  553. matrix_synapse_turn_uris: |
  554. {{
  555. [
  556. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  557. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  558. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  559. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  560. ]
  561. if matrix_coturn_enabled
  562. else []
  563. }}
  564. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  565. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  566. matrix_synapse_systemd_required_services_list: |
  567. {{
  568. (['docker.service'])
  569. +
  570. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  571. +
  572. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  573. }}
  574. matrix_synapse_systemd_wanted_services_list: |
  575. {{
  576. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  577. +
  578. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  579. }}
  580. ######################################################################
  581. #
  582. # /matrix-synapse
  583. #
  584. ######################################################################