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

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