Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1063 строки
42 KiB

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