Matrix Docker Ansible eploy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

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