Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

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