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.
 
 

771 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. ######################################################################
  293. #
  294. # /matrix-dimension
  295. #
  296. ######################################################################
  297. ######################################################################
  298. #
  299. # matrix-email2matrix
  300. #
  301. ######################################################################
  302. matrix_email2matrix_enabled: false
  303. ######################################################################
  304. #
  305. # /matrix-email2matrix
  306. #
  307. ######################################################################
  308. ######################################################################
  309. #
  310. # matrix-jitsi
  311. #
  312. ######################################################################
  313. matrix_jitsi_enabled: false
  314. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  315. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  316. # the Jitsi HTTP port to the local host.
  317. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:12080' }}"
  318. matrix_jitsi_jibri_xmpp_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jibri') | to_uuid }}"
  319. matrix_jitsi_jicofo_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jicofo') | to_uuid }}"
  320. matrix_jitsi_jvb_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jvb') | to_uuid }}"
  321. matrix_jitsi_web_stun_servers: |
  322. {{
  323. [
  324. 'stun:' + matrix_server_fqn_matrix + ':5349',
  325. 'stun:' + matrix_server_fqn_matrix + ':3478',
  326. ]
  327. if matrix_coturn_enabled
  328. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  329. }}
  330. ######################################################################
  331. #
  332. # /matrix-jitsi
  333. #
  334. ######################################################################
  335. ######################################################################
  336. #
  337. # matrix-mailer
  338. #
  339. ######################################################################
  340. # By default, this playbook sets up a postfix mailer server (running in a container).
  341. # This is so that Synapse can send email reminders for unread messages.
  342. # Other services (like ma1sd), also use the mailer.
  343. matrix_mailer_enabled: true
  344. ######################################################################
  345. #
  346. # /matrix-mailer
  347. #
  348. ######################################################################
  349. ######################################################################
  350. #
  351. # matrix-ma1sd
  352. #
  353. ######################################################################
  354. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  355. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  356. matrix_ma1sd_enabled: true
  357. matrix_ma1sd_container_image_self_build: "{{ matrix_container_images_self_build }}"
  358. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  359. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  360. # ma1sd's web-server port.
  361. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8090' }}"
  362. # We enable Synapse integration via its Postgres database by default.
  363. # When using another Identity store, you might wish to disable this and define
  364. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  365. matrix_ma1sd_synapsesql_enabled: true
  366. matrix_ma1sd_synapsesql_type: postgresql
  367. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  368. matrix_ma1sd_dns_overwrite_enabled: true
  369. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  370. matrix_ma1sd_dns_overwrite_homeserver_client_value: "http://{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  371. # By default, we send mail through the `matrix-mailer` service.
  372. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  373. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  374. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  375. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  376. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  377. matrix_ma1sd_systemd_wanted_services_list: |
  378. {{
  379. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  380. +
  381. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  382. +
  383. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  384. }}
  385. ######################################################################
  386. #
  387. # /matrix-ma1sd
  388. #
  389. ######################################################################
  390. ######################################################################
  391. #
  392. # matrix-nginx-proxy
  393. #
  394. ######################################################################
  395. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  396. # This is fine if you're dedicating the whole server to Matrix.
  397. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  398. matrix_nginx_proxy_enabled: true
  399. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  400. 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' }}"
  401. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  402. matrix_nginx_proxy_proxy_matrix_enabled: true
  403. matrix_nginx_proxy_proxy_riot_enabled: "{{ matrix_riot_web_enabled }}"
  404. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  405. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  406. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  407. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  408. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  409. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  410. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:8090"
  411. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:8090"
  412. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  413. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: true
  414. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-synapse:8048"
  415. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:8048"
  416. matrix_nginx_proxy_proxy_synapse_metrics: "{{ matrix_synapse_metrics_enabled }}"
  417. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  418. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  419. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  420. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  421. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  422. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  423. matrix_nginx_proxy_systemd_wanted_services_list: |
  424. {{
  425. (['matrix-synapse.service'])
  426. +
  427. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  428. +
  429. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  430. +
  431. (['matrix-riot-web.service'] if matrix_riot_web_enabled else [])
  432. }}
  433. matrix_ssl_domains_to_obtain_certificates_for: |
  434. {{
  435. ([matrix_server_fqn_matrix])
  436. +
  437. ([matrix_server_fqn_riot] if matrix_riot_web_enabled else [])
  438. +
  439. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  440. +
  441. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  442. +
  443. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  444. }}
  445. ######################################################################
  446. #
  447. # /matrix-nginx-proxy
  448. #
  449. ######################################################################
  450. ######################################################################
  451. #
  452. # matrix-postgres
  453. #
  454. ######################################################################
  455. matrix_postgres_enabled: true
  456. matrix_postgres_connection_hostname: "matrix-postgres"
  457. matrix_postgres_connection_username: "synapse"
  458. matrix_postgres_connection_password: "synapse-password"
  459. matrix_postgres_db_name: "homeserver"
  460. ######################################################################
  461. #
  462. # /matrix-postgres
  463. #
  464. ######################################################################
  465. ######################################################################
  466. #
  467. # matrix-riot-web
  468. #
  469. ######################################################################
  470. # By default, this playbook installs the Riot.IM web UI on the `matrix_server_fqn_riot` domain.
  471. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  472. matrix_riot_web_enabled: true
  473. matrix_riot_web_container_image_self_build: "{{ matrix_container_images_self_build }}"
  474. # Normally, matrix-nginx-proxy is enabled and nginx can reach riot-web over the container network.
  475. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  476. # the riot-web HTTP port to the local host.
  477. matrix_riot_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  478. matrix_riot_web_default_hs_url: "{{ matrix_homeserver_url }}"
  479. matrix_riot_web_default_is_url: "{{ matrix_identity_server_url }}"
  480. # Use Dimension if enabled, otherwise fall back to Scalar
  481. matrix_riot_web_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  482. matrix_riot_web_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  483. matrix_riot_web_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  484. 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' }}"
  485. matrix_riot_web_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  486. matrix_riot_web_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  487. matrix_riot_web_enable_presence_by_hs_url: |
  488. {{
  489. none
  490. if matrix_synapse_use_presence
  491. else {matrix_riot_web_default_hs_url: false}
  492. }}
  493. matrix_riot_web_welcome_user_id: ~
  494. matrix_riot_web_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  495. ######################################################################
  496. #
  497. # /matrix-riot-web
  498. #
  499. ######################################################################
  500. ######################################################################
  501. #
  502. # matrix-synapse
  503. #
  504. ######################################################################
  505. matrix_synapse_container_image_self_build: "{{ matrix_container_images_self_build }}"
  506. # When ma1sd is enabled, we can use it instead of the default public Identity servers.
  507. matrix_synapse_trusted_third_party_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else matrix_synapse_id_servers_public }}"
  508. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  509. # 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.
  510. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  511. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  512. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  513. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  514. # you can expose Synapse's ports to the host.
  515. #
  516. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  517. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  518. #
  519. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  520. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  521. #
  522. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  523. matrix_synapse_container_federation_api_tls_host_bind_port: "{{ '8448' if (matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled) else '' }}"
  524. #
  525. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  526. 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 '' }}"
  527. #
  528. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  529. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  530. matrix_synapse_database_host: "{{ matrix_postgres_connection_hostname }}"
  531. matrix_synapse_database_user: "{{ matrix_postgres_connection_username }}"
  532. matrix_synapse_database_password: "{{ matrix_postgres_connection_password }}"
  533. matrix_synapse_database_database: "{{ matrix_postgres_db_name }}"
  534. # We do not enable TLS in Synapse by default.
  535. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  536. matrix_synapse_tls_federation_listener_enabled: false
  537. matrix_synapse_tls_certificate_path: ~
  538. matrix_synapse_tls_private_key_path: ~
  539. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  540. matrix_synapse_email_smtp_host: "matrix-mailer"
  541. matrix_synapse_email_smtp_port: 8025
  542. matrix_synapse_email_smtp_require_transport_security: false
  543. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  544. # Even if TURN doesn't support TLS (it does by default),
  545. # it doesn't hurt to try a secure connection anyway.
  546. matrix_synapse_turn_uris: |
  547. {{
  548. [
  549. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  550. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  551. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  552. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  553. ]
  554. if matrix_coturn_enabled
  555. else []
  556. }}
  557. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  558. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  559. matrix_synapse_systemd_required_services_list: |
  560. {{
  561. (['docker.service'])
  562. +
  563. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  564. +
  565. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  566. }}
  567. matrix_synapse_systemd_wanted_services_list: |
  568. {{
  569. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  570. +
  571. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  572. }}
  573. ######################################################################
  574. #
  575. # /matrix-synapse
  576. #
  577. ######################################################################