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

1727 linhas
73 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. # If Synapse workers are enabled and matrix-nginx-proxy is disabled, certain APIs may not work over 'http://matrix-synapse:8008'.
  17. # This is because we explicitly disable them for the main Synapse process.
  18. matrix_homeserver_container_url: "{{ 'http://matrix-nginx-proxy:12080' if matrix_nginx_proxy_enabled else 'http://matrix-synapse:8008' }}"
  19. ######################################################################
  20. #
  21. # /matrix-base
  22. #
  23. ######################################################################
  24. ######################################################################
  25. #
  26. # matrix-awx
  27. #
  28. ######################################################################
  29. matrix_nginx_proxy_data_path: "{{ '/chroot/website' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else (matrix_nginx_proxy_base_path + '/data') }}"
  30. matrix_nginx_proxy_data_path_in_container: "{{ '/nginx-data/matrix-domain' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else '/nginx-data' }}"
  31. ######################################################################
  32. #
  33. # /matrix-awx
  34. #
  35. ######################################################################
  36. ######################################################################
  37. #
  38. # matrix-bridge-appservice-discord
  39. #
  40. ######################################################################
  41. # We don't enable bridges by default.
  42. matrix_appservice_discord_enabled: false
  43. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  44. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  45. # matrix-appservice-discord's client-server port to the local host.
  46. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  47. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  48. matrix_appservice_discord_bridge_disablePresence: "{{ matrix_synapse_use_presence }}"
  49. matrix_appservice_discord_systemd_required_services_list: |
  50. {{
  51. ['docker.service']
  52. +
  53. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  54. +
  55. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  56. }}
  57. matrix_appservice_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  58. matrix_appservice_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  59. # We only make this use Postgres if our own Postgres server is enabled.
  60. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  61. matrix_appservice_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  62. matrix_appservice_discord_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.discord.db') | to_uuid }}"
  63. ######################################################################
  64. #
  65. # /matrix-bridge-appservice-discord
  66. #
  67. ######################################################################
  68. ######################################################################
  69. #
  70. # matrix-appservice-webhooks
  71. #
  72. ######################################################################
  73. # We don't enable bridges by default.
  74. matrix_appservice_webhooks_enabled: false
  75. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  76. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  77. # matrix-appservice-webhooks' client-server port to the local host.
  78. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_webhooks_matrix_port) }}"
  79. matrix_appservice_webhooks_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  80. matrix_appservice_webhooks_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  81. matrix_appservice_webhooks_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  82. matrix_appservice_webhooks_systemd_required_services_list: |
  83. {{
  84. ['docker.service']
  85. +
  86. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  87. }}
  88. ######################################################################
  89. #
  90. # /matrix-appservice-webhooks
  91. #
  92. ######################################################################
  93. ######################################################################
  94. #
  95. # matrix-appservice-slack
  96. #
  97. ######################################################################
  98. # We don't enable bridges by default.
  99. matrix_appservice_slack_enabled: false
  100. matrix_appservice_slack_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  101. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  102. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  103. # matrix-appservice-slack's client-server port to the local host.
  104. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  105. matrix_appservice_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  106. matrix_appservice_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  107. matrix_appservice_slack_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  108. matrix_appservice_slack_systemd_required_services_list: |
  109. {{
  110. ['docker.service']
  111. +
  112. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  113. }}
  114. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  115. matrix_appservice_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  116. matrix_appservice_slack_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.slack.db') | to_uuid }}"
  117. ######################################################################
  118. #
  119. # /matrix-bridge-appservice-slack
  120. #
  121. ######################################################################
  122. ######################################################################
  123. #
  124. # matrix-bridge-appservice-irc
  125. #
  126. ######################################################################
  127. # We don't enable bridges by default.
  128. matrix_appservice_irc_enabled: false
  129. matrix_appservice_irc_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  130. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  131. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  132. # matrix-appservice-irc's client-server port to the local host.
  133. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  134. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  135. # IRC bridge presence, for performance reasons.
  136. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_use_presence }}"
  137. matrix_appservice_irc_systemd_required_services_list: |
  138. {{
  139. ['docker.service']
  140. +
  141. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  142. }}
  143. matrix_appservice_irc_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  144. matrix_appservice_irc_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  145. matrix_appservice_irc_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  146. matrix_appservice_irc_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.irc.db') | to_uuid }}"
  147. ######################################################################
  148. #
  149. # /matrix-bridge-appservice-irc
  150. #
  151. ######################################################################
  152. ######################################################################
  153. #
  154. # matrix-bridge-mautrix-facebook
  155. #
  156. ######################################################################
  157. # We don't enable bridges by default.
  158. matrix_mautrix_facebook_enabled: false
  159. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  160. matrix_mautrix_facebook_systemd_required_services_list: |
  161. {{
  162. ['docker.service']
  163. +
  164. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  165. +
  166. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  167. }}
  168. matrix_mautrix_facebook_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  169. matrix_mautrix_facebook_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  170. 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 '' }}"
  171. matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_use_presence if matrix_synapse_enabled else true }}"
  172. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  173. # and point them to a migration path.
  174. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  175. matrix_mautrix_facebook_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.fb.db') | to_uuid }}"
  176. ######################################################################
  177. #
  178. # /matrix-bridge-mautrix-facebook
  179. #
  180. ######################################################################
  181. ######################################################################
  182. #
  183. # matrix-bridge-mautrix-hangouts
  184. #
  185. ######################################################################
  186. # We don't enable bridges by default.
  187. matrix_mautrix_hangouts_enabled: false
  188. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  189. matrix_mautrix_hangouts_systemd_required_services_list: |
  190. {{
  191. ['docker.service']
  192. +
  193. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  194. +
  195. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  196. }}
  197. matrix_mautrix_hangouts_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.as.token') | to_uuid }}"
  198. matrix_mautrix_hangouts_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.hs.token') | to_uuid }}"
  199. matrix_mautrix_hangouts_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  200. 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 '' }}"
  201. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  202. matrix_mautrix_hangouts_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  203. matrix_mautrix_hangouts_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.hangouts.db') | to_uuid }}"
  204. ######################################################################
  205. #
  206. # /matrix-bridge-mautrix-hangouts
  207. #
  208. ######################################################################
  209. ######################################################################
  210. #
  211. # matrix-bridge-mautrix-instagram
  212. #
  213. ######################################################################
  214. # We don't enable bridges by default.
  215. matrix_mautrix_instagram_enabled: false
  216. matrix_mautrix_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  217. matrix_mautrix_instagram_systemd_required_services_list: |
  218. {{
  219. ['docker.service']
  220. +
  221. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  222. +
  223. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  224. }}
  225. matrix_mautrix_instagram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ig.as.token') | to_uuid }}"
  226. matrix_mautrix_instagram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ig.hs.token') | to_uuid }}"
  227. matrix_mautrix_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 '' }}"
  228. matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_use_presence if matrix_synapse_enabled else true }}"
  229. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  230. # and point them to a migration path.
  231. matrix_mautrix_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  232. matrix_mautrix_instagram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.ig.db') | to_uuid }}"
  233. ######################################################################
  234. #
  235. # /matrix-bridge-mautrix-instagram
  236. #
  237. ######################################################################
  238. ######################################################################
  239. #
  240. # matrix-bridge-mautrix-signal
  241. #
  242. ######################################################################
  243. # We don't enable bridges by default.
  244. matrix_mautrix_signal_enabled: false
  245. matrix_mautrix_signal_systemd_required_services_list: |
  246. {{
  247. ['docker.service']
  248. +
  249. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  250. +
  251. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  252. +
  253. ['matrix-mautrix-signal-daemon.service']
  254. }}
  255. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  256. matrix_mautrix_signal_homeserver_address: "{{ matrix_homeserver_container_url }}"
  257. matrix_mautrix_signal_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'si.hs.token') | to_uuid }}"
  258. matrix_mautrix_signal_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'si.as.token') | to_uuid }}"
  259. 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 '' }}"
  260. matrix_mautrix_signal_database_engine: 'postgres'
  261. matrix_mautrix_signal_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.signal.db') | to_uuid }}"
  262. ######################################################################
  263. #
  264. # /matrix-bridge-mautrix-signal
  265. #
  266. ######################################################################
  267. ######################################################################
  268. #
  269. # matrix-bridge-mautrix-telegram
  270. #
  271. ######################################################################
  272. # We don't enable bridges by default.
  273. matrix_mautrix_telegram_enabled: false
  274. # Images are multi-arch (amd64 and arm64, but not arm32).
  275. matrix_mautrix_telegram_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  276. matrix_mautrix_telegram_systemd_required_services_list: |
  277. {{
  278. ['docker.service']
  279. +
  280. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  281. +
  282. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  283. }}
  284. matrix_mautrix_telegram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  285. matrix_mautrix_telegram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  286. matrix_mautrix_telegram_public_endpoint: "/{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegram') | to_uuid }}"
  287. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  288. 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 '' }}"
  289. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  290. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  291. matrix_mautrix_telegram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.telegram.db') | to_uuid }}"
  292. ######################################################################
  293. #
  294. # /matrix-bridge-mautrix-telegram
  295. #
  296. ######################################################################
  297. ######################################################################
  298. #
  299. # matrix-bridge-mautrix-whatsapp
  300. #
  301. ######################################################################
  302. # We don't enable bridges by default.
  303. matrix_mautrix_whatsapp_enabled: false
  304. matrix_mautrix_whatsapp_systemd_required_services_list: |
  305. {{
  306. ['docker.service']
  307. +
  308. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  309. +
  310. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  311. }}
  312. matrix_mautrix_whatsapp_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  313. matrix_mautrix_whatsapp_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  314. 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 '' }}"
  315. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  316. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  317. matrix_mautrix_whatsapp_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mauwhatsapp.db') | to_uuid }}"
  318. ######################################################################
  319. #
  320. # /matrix-bridge-mautrix-whatsapp
  321. #
  322. ######################################################################
  323. ######################################################################
  324. #
  325. # matrix-sms-bridge
  326. #
  327. ######################################################################
  328. # We don't enable bridges by default.
  329. matrix_sms_bridge_enabled: false
  330. matrix_sms_bridge_systemd_required_services_list: |
  331. {{
  332. ['docker.service']
  333. +
  334. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  335. }}
  336. matrix_sms_bridge_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.as.token') | to_uuid }}"
  337. matrix_sms_bridge_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.hs.token') | to_uuid }}"
  338. ######################################################################
  339. #
  340. # /matrix-sms-bridge
  341. #
  342. ######################################################################
  343. ######################################################################
  344. #
  345. # matrix-bridge-mx-puppet-skype
  346. #
  347. ######################################################################
  348. # We don't enable bridges by default.
  349. matrix_mx_puppet_skype_enabled: false
  350. matrix_mx_puppet_skype_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  351. matrix_mx_puppet_skype_systemd_required_services_list: |
  352. {{
  353. ['docker.service']
  354. +
  355. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  356. +
  357. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  358. }}
  359. matrix_mx_puppet_skype_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.as.tok') | to_uuid }}"
  360. matrix_mx_puppet_skype_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.hs.tok') | to_uuid }}"
  361. 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 '' }}"
  362. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  363. matrix_mx_puppet_skype_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  364. matrix_mx_puppet_skype_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.skype.db') | to_uuid }}"
  365. ######################################################################
  366. #
  367. # /matrix-bridge-mx-puppet-skype
  368. #
  369. ######################################################################
  370. ######################################################################
  371. #
  372. # matrix-bridge-mx-puppet-slack
  373. #
  374. ######################################################################
  375. # We don't enable bridges by default.
  376. matrix_mx_puppet_slack_enabled: false
  377. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  378. matrix_mx_puppet_slack_systemd_required_services_list: |
  379. {{
  380. ['docker.service']
  381. +
  382. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  383. +
  384. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  385. }}
  386. matrix_mx_puppet_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.as.tok') | to_uuid }}"
  387. matrix_mx_puppet_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.hs.tok') | to_uuid }}"
  388. 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 '' }}"
  389. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  390. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  391. matrix_mx_puppet_slack_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.slack.db') | to_uuid }}"
  392. ######################################################################
  393. #
  394. # /matrix-bridge-mx-puppet-slack
  395. #
  396. ######################################################################
  397. ######################################################################
  398. #
  399. # matrix-bridge-mx-puppet-twitter
  400. #
  401. ######################################################################
  402. # We don't enable bridges by default.
  403. matrix_mx_puppet_twitter_enabled: false
  404. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  405. matrix_mx_puppet_twitter_systemd_required_services_list: |
  406. {{
  407. ['docker.service']
  408. +
  409. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  410. +
  411. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  412. }}
  413. matrix_mx_puppet_twitter_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.as.tok') | to_uuid }}"
  414. matrix_mx_puppet_twitter_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.hs.tok') | to_uuid }}"
  415. 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 '' }}"
  416. 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) }}"
  417. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  418. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  419. matrix_mx_puppet_twitter_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.twitter.db') | to_uuid }}"
  420. ######################################################################
  421. #
  422. # /matrix-bridge-mx-puppet-twitter
  423. #
  424. ######################################################################
  425. ######################################################################
  426. #
  427. # matrix-bridge-mx-puppet-instagram
  428. #
  429. ######################################################################
  430. # We don't enable bridges by default.
  431. matrix_mx_puppet_instagram_enabled: false
  432. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  433. matrix_mx_puppet_instagram_systemd_required_services_list: |
  434. {{
  435. ['docker.service']
  436. +
  437. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  438. +
  439. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  440. }}
  441. matrix_mx_puppet_instagram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.as.tok') | to_uuid }}"
  442. matrix_mx_puppet_instagram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.hs.tok') | to_uuid }}"
  443. 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 '' }}"
  444. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  445. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  446. matrix_mx_puppet_instagram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.ig.db') | to_uuid }}"
  447. ######################################################################
  448. #
  449. # /matrix-bridge-mx-puppet-instagram
  450. #
  451. ######################################################################
  452. ######################################################################
  453. #
  454. # matrix-bridge-mx-puppet-discord
  455. #
  456. ######################################################################
  457. # We don't enable bridges by default.
  458. matrix_mx_puppet_discord_enabled: false
  459. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  460. matrix_mx_puppet_discord_systemd_required_services_list: |
  461. {{
  462. ['docker.service']
  463. +
  464. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  465. +
  466. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  467. }}
  468. matrix_mx_puppet_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.as.tok') | to_uuid }}"
  469. matrix_mx_puppet_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.hs.tok') | to_uuid }}"
  470. 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 '' }}"
  471. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  472. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  473. matrix_mx_puppet_discord_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"
  474. ######################################################################
  475. #
  476. # /matrix-bridge-mx-puppet-discord
  477. #
  478. ######################################################################
  479. ######################################################################
  480. #
  481. # matrix-bridge-mx-puppet-steam
  482. #
  483. ######################################################################
  484. # We don't enable bridges by default.
  485. matrix_mx_puppet_steam_enabled: false
  486. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  487. matrix_mx_puppet_steam_systemd_required_services_list: |
  488. {{
  489. ['docker.service']
  490. +
  491. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  492. +
  493. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  494. }}
  495. matrix_mx_puppet_steam_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.as.tok') | to_uuid }}"
  496. matrix_mx_puppet_steam_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.hs.tok') | to_uuid }}"
  497. 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 '' }}"
  498. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  499. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  500. matrix_mx_puppet_steam_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.steam.db') | to_uuid }}"
  501. ######################################################################
  502. #
  503. # /matrix-bridge-mx-puppet-steam
  504. #
  505. ######################################################################
  506. ######################################################################
  507. #
  508. # matrix-bridge-mx-puppet-groupme
  509. #
  510. ######################################################################
  511. # We don't enable bridges by default.
  512. matrix_mx_puppet_groupme_enabled: false
  513. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  514. matrix_mx_puppet_groupme_systemd_required_services_list: |
  515. {{
  516. ['docker.service']
  517. +
  518. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  519. +
  520. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  521. }}
  522. matrix_mx_puppet_groupme_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxgro.as.tok') | to_uuid }}"
  523. matrix_mx_puppet_groupme_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxgro.hs.tok') | to_uuid }}"
  524. matrix_mx_puppet_groupme_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  525. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  526. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  527. matrix_mx_puppet_groupme_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.groupme.db') | to_uuid }}"
  528. ######################################################################
  529. #
  530. # /matrix-bridge-mx-puppet-groupme
  531. #
  532. ######################################################################
  533. ######################################################################
  534. #
  535. # matrix-bot-matrix-reminder-bot
  536. #
  537. ######################################################################
  538. # We don't enable bots by default.
  539. matrix_bot_matrix_reminder_bot_enabled: false
  540. matrix_bot_matrix_reminder_bot_systemd_required_services_list: |
  541. {{
  542. ['docker.service']
  543. +
  544. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  545. }}
  546. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  547. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  548. matrix_bot_matrix_reminder_bot_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'reminder.bot.db') | to_uuid }}"
  549. ######################################################################
  550. #
  551. # /matrix-bot-matrix-reminder-bot
  552. #
  553. ######################################################################
  554. ######################################################################
  555. #
  556. # matrix-bot-go-neb
  557. #
  558. ######################################################################
  559. # We don't enable bots by default.
  560. matrix_bot_go_neb_enabled: false
  561. matrix_bot_go_neb_systemd_required_services_list: |
  562. {{
  563. ['docker.service']
  564. }}
  565. matrix_bot_go_neb_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:4050' }}"
  566. ######################################################################
  567. #
  568. # /matrix-bot-go-neb
  569. #
  570. ######################################################################
  571. ######################################################################
  572. #
  573. # matrix-bot-mjolnir
  574. #
  575. ######################################################################
  576. # We don't enable bots by default.
  577. matrix_bot_mjolnir_enabled: false
  578. matrix_bot_mjolnir_systemd_required_services_list: |
  579. {{
  580. ['docker.service']
  581. +
  582. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  583. +
  584. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  585. +
  586. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  587. }}
  588. ######################################################################
  589. #
  590. # /matrix-bot-mjolnir
  591. #
  592. ######################################################################
  593. ######################################################################
  594. #
  595. # matrix-corporal
  596. #
  597. ######################################################################
  598. matrix_corporal_enabled: false
  599. matrix_corporal_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  600. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  601. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  602. # matrix-corporal's web-server ports to the local host.
  603. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  604. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  605. matrix_corporal_systemd_required_services_list: |
  606. {{
  607. (['docker.service'])
  608. +
  609. (['matrix-synapse.service'])
  610. }}
  611. # This goes to Synapse's vhost
  612. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  613. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  614. # This is only useful if there's REST auth provider to make use of it.
  615. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  616. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  617. ######################################################################
  618. #
  619. # /matrix-corporal
  620. #
  621. ######################################################################
  622. ######################################################################
  623. #
  624. # matrix-coturn
  625. #
  626. ######################################################################
  627. matrix_coturn_enabled: true
  628. matrix_coturn_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  629. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  630. matrix_coturn_tls_enabled: "{{ matrix_ssl_retrieval_method != 'none' }}"
  631. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  632. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  633. matrix_coturn_container_additional_volumes: |
  634. {{
  635. ([] if matrix_ssl_retrieval_method == 'none' else [
  636. {
  637. 'src': matrix_ssl_config_dir_path,
  638. 'dst': matrix_ssl_config_dir_path,
  639. 'options': 'ro',
  640. }
  641. ])
  642. }}
  643. ######################################################################
  644. #
  645. # /matrix-coturn
  646. #
  647. ######################################################################
  648. ######################################################################
  649. #
  650. # matrix-dimension
  651. #
  652. ######################################################################
  653. matrix_dimension_enabled: false
  654. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  655. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  656. # the Dimension HTTP port to the local host.
  657. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  658. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  659. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  660. matrix_dimension_systemd_required_services_list: |
  661. {{
  662. ['docker.service']
  663. +
  664. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  665. }}
  666. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  667. matrix_dimension_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  668. matrix_dimension_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'dimension.db') | to_uuid }}"
  669. ######################################################################
  670. #
  671. # /matrix-dimension
  672. #
  673. ######################################################################
  674. ######################################################################
  675. #
  676. # matrix-etherpad
  677. #
  678. ######################################################################
  679. matrix_etherpad_enabled: false
  680. matrix_etherpad_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9001' }}"
  681. matrix_etherpad_systemd_required_services_list: |
  682. {{
  683. ['docker.service']
  684. +
  685. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  686. }}
  687. matrix_etherpad_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'etherpad.db') | to_uuid }}"
  688. ######################################################################
  689. #
  690. # /matrix-etherpad
  691. #
  692. ######################################################################
  693. ######################################################################
  694. #
  695. # matrix-dynamic-dns
  696. #
  697. ######################################################################
  698. matrix_dynamic_dns_enabled: false
  699. ######################################################################
  700. #
  701. # /matrix-dynamic-dns
  702. #
  703. ######################################################################
  704. ######################################################################
  705. #
  706. # matrix-email2matrix
  707. #
  708. ######################################################################
  709. matrix_email2matrix_enabled: false
  710. ######################################################################
  711. #
  712. # /matrix-email2matrix
  713. #
  714. ######################################################################
  715. ######################################################################
  716. #
  717. # matrix-jitsi
  718. #
  719. ######################################################################
  720. matrix_jitsi_enabled: false
  721. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  722. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  723. # the Jitsi HTTP port to the local host.
  724. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13080' }}"
  725. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13090' }}"
  726. matrix_jitsi_jibri_xmpp_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jibri') | to_uuid }}"
  727. matrix_jitsi_jicofo_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jicofo') | to_uuid }}"
  728. matrix_jitsi_jvb_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jvb') | to_uuid }}"
  729. matrix_jitsi_web_stun_servers: |
  730. {{
  731. [
  732. 'stun:' + matrix_server_fqn_matrix + ':5349',
  733. 'stun:' + matrix_server_fqn_matrix + ':3478',
  734. ]
  735. if matrix_coturn_enabled
  736. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  737. }}
  738. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  739. # unless explicitly disabled by setting `matrix_jitsi_etherpad_enabled` to false.
  740. # Falls back to the scalar.vector.im etherpad in case someone sets `matrix_jitsi_etherpad_enabled` to true,
  741. # while also setting `matrix_etherpad_enabled` to false.
  742. matrix_jitsi_etherpad_enabled: "{{ matrix_etherpad_enabled }}"
  743. matrix_jitsi_etherpad_base: "{{ matrix_etherpad_base_url if matrix_etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  744. ######################################################################
  745. #
  746. # /matrix-jitsi
  747. #
  748. ######################################################################
  749. ######################################################################
  750. #
  751. # matrix-mailer
  752. #
  753. ######################################################################
  754. # By default, this playbook sets up an exim mailer server (running in a container).
  755. # This is so that Synapse can send email reminders for unread messages.
  756. # Other services (like ma1sd), also use the mailer.
  757. matrix_mailer_enabled: true
  758. matrix_mailer_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  759. ######################################################################
  760. #
  761. # /matrix-mailer
  762. #
  763. ######################################################################
  764. ######################################################################
  765. #
  766. # matrix-ma1sd
  767. #
  768. ######################################################################
  769. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  770. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  771. matrix_ma1sd_enabled: true
  772. # There's no prebuilt ma1sd image for the `arm32` architecture.
  773. # We're relying on self-building there.
  774. matrix_ma1sd_architecture: "{{
  775. {
  776. 'amd64': 'amd64',
  777. 'arm32': 'arm32',
  778. 'arm64': 'arm64',
  779. }[matrix_architecture]
  780. }}"
  781. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  782. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  783. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  784. # ma1sd's web-server port.
  785. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8090' }}"
  786. # We enable Synapse integration via its Postgres database by default.
  787. # When using another Identity store, you might wish to disable this and define
  788. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  789. matrix_ma1sd_synapsesql_enabled: true
  790. matrix_ma1sd_synapsesql_type: postgresql
  791. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  792. matrix_ma1sd_dns_overwrite_enabled: true
  793. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  794. matrix_ma1sd_dns_overwrite_homeserver_client_value: "http://{{ matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container }}"
  795. # By default, we send mail through the `matrix-mailer` service.
  796. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  797. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  798. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  799. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  800. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  801. matrix_ma1sd_systemd_required_services_list: |
  802. {{
  803. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  804. }}
  805. matrix_ma1sd_systemd_wanted_services_list: |
  806. {{
  807. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  808. +
  809. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  810. +
  811. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  812. }}
  813. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  814. matrix_ma1sd_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  815. matrix_ma1sd_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ma1sd.db') | to_uuid }}"
  816. ######################################################################
  817. #
  818. # /matrix-ma1sd
  819. #
  820. ######################################################################
  821. ######################################################################
  822. #
  823. # matrix-nginx-proxy
  824. #
  825. ######################################################################
  826. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  827. # This is fine if you're dedicating the whole server to Matrix.
  828. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  829. matrix_nginx_proxy_enabled: true
  830. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-nginx-proxy:12080' }}"
  831. matrix_nginx_proxy_proxy_matrix_client_api_addr_sans_container: "{{ '127.0.0.1:41080' if matrix_corporal_enabled else '127.0.0.1:12080' }}"
  832. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  833. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  834. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  835. matrix_nginx_proxy_proxy_matrix_enabled: true
  836. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  837. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  838. matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}"
  839. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  840. matrix_nginx_proxy_proxy_grafana_enabled: "{{ matrix_grafana_enabled }}"
  841. matrix_nginx_proxy_proxy_sygnal_enabled: "{{ matrix_sygnal_enabled }}"
  842. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  843. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  844. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  845. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  846. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:8090"
  847. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:8090"
  848. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  849. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  850. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: "{{ matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled }}"
  851. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-nginx-proxy:12088"
  852. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:12088"
  853. # Settings controlling matrix-synapse-proxy.conf
  854. matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}"
  855. matrix_nginx_proxy_proxy_synapse_federation_api_enabled: "{{ matrix_nginx_proxy_proxy_matrix_federation_api_enabled }}"
  856. # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter.
  857. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}"
  858. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  859. # This used to be hooked to `matrix_synapse_metrics_enabled`, but we don't do it anymore.
  860. # The fact that someone wishes to enable Synapse metrics does not necessarily mean they want to make them public.
  861. # A local Prometheus can consume them over the container network.
  862. matrix_nginx_proxy_proxy_synapse_metrics: false
  863. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  864. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  865. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  866. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  867. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  868. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  869. matrix_nginx_proxy_synapse_presence_disabled: "{{ not matrix_synapse_use_presence }}"
  870. matrix_nginx_proxy_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  871. matrix_nginx_proxy_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  872. matrix_nginx_proxy_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  873. matrix_nginx_proxy_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  874. matrix_nginx_proxy_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  875. matrix_nginx_proxy_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_endpoints|default([]) }}"
  876. matrix_nginx_proxy_synapse_frontend_proxy_locations: "{{ matrix_synapse_workers_frontend_proxy_endpoints|default([]) }}"
  877. matrix_nginx_proxy_systemd_wanted_services_list: |
  878. {{
  879. (['matrix-synapse.service'])
  880. +
  881. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  882. +
  883. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  884. +
  885. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  886. }}
  887. matrix_ssl_domains_to_obtain_certificates_for: |
  888. {{
  889. ([matrix_server_fqn_matrix])
  890. +
  891. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  892. +
  893. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  894. +
  895. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  896. +
  897. ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
  898. +
  899. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  900. +
  901. ([matrix_server_fqn_grafana] if matrix_grafana_enabled else [])
  902. +
  903. ([matrix_server_fqn_sygnal] if matrix_sygnal_enabled else [])
  904. +
  905. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  906. +
  907. matrix_ssl_additional_domains_to_obtain_certificates_for
  908. }}
  909. matrix_ssl_architecture: "{{
  910. {
  911. 'amd64': 'amd64',
  912. 'arm32': 'arm32v6',
  913. 'arm64': 'arm64v8',
  914. }[matrix_architecture]
  915. }}"
  916. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  917. ######################################################################
  918. #
  919. # /matrix-nginx-proxy
  920. #
  921. ######################################################################
  922. ######################################################################
  923. #
  924. # matrix-postgres
  925. #
  926. ######################################################################
  927. matrix_postgres_enabled: true
  928. matrix_postgres_architecture: "{{ matrix_architecture }}"
  929. # We unset this if internal Postgres disabled, which will cascade to some other variables
  930. # and tell users they need to set it (either here or in those variables).
  931. matrix_postgres_connection_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  932. matrix_postgres_pgloader_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  933. matrix_postgres_additional_databases: |
  934. {{
  935. ([{
  936. 'name': matrix_synapse_database_database,
  937. 'username': matrix_synapse_database_user,
  938. 'password': matrix_synapse_database_password,
  939. }] if (matrix_synapse_enabled and matrix_synapse_database_database != matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  940. +
  941. ([{
  942. 'name': matrix_ma1sd_database_name,
  943. 'username': matrix_ma1sd_database_username,
  944. 'password': matrix_ma1sd_database_password,
  945. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == 'matrix-postgres') else [])
  946. +
  947. ([{
  948. 'name': matrix_bot_matrix_reminder_bot_database_name,
  949. 'username': matrix_bot_matrix_reminder_bot_database_username,
  950. 'password': matrix_bot_matrix_reminder_bot_database_password,
  951. }] if (matrix_bot_matrix_reminder_bot_enabled and matrix_bot_matrix_reminder_bot_database_engine == 'postgres' and matrix_bot_matrix_reminder_bot_database_hostname == 'matrix-postgres') else [])
  952. +
  953. ([{
  954. 'name': matrix_registration_database_name,
  955. 'username': matrix_registration_database_username,
  956. 'password': matrix_registration_database_password,
  957. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == 'matrix-postgres') else [])
  958. +
  959. ([{
  960. 'name': matrix_appservice_discord_database_name,
  961. 'username': matrix_appservice_discord_database_username,
  962. 'password': matrix_appservice_discord_database_password,
  963. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == 'matrix-postgres') else [])
  964. +
  965. ([{
  966. 'name': matrix_appservice_slack_database_name,
  967. 'username': matrix_appservice_slack_database_username,
  968. 'password': matrix_appservice_slack_database_password,
  969. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  970. +
  971. ([{
  972. 'name': matrix_appservice_irc_database_name,
  973. 'username': matrix_appservice_irc_database_username,
  974. 'password': matrix_appservice_irc_database_password,
  975. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  976. +
  977. ([{
  978. 'name': matrix_mautrix_facebook_database_name,
  979. 'username': matrix_mautrix_facebook_database_username,
  980. 'password': matrix_mautrix_facebook_database_password,
  981. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == 'matrix-postgres') else [])
  982. +
  983. ([{
  984. 'name': matrix_mautrix_hangouts_database_name,
  985. 'username': matrix_mautrix_hangouts_database_username,
  986. 'password': matrix_mautrix_hangouts_database_password,
  987. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  988. +
  989. ([{
  990. 'name': matrix_mautrix_instagram_database_name,
  991. 'username': matrix_mautrix_instagram_database_username,
  992. 'password': matrix_mautrix_instagram_database_password,
  993. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == 'matrix-postgres') else [])
  994. +
  995. ([{
  996. 'name': matrix_mautrix_signal_database_name,
  997. 'username': matrix_mautrix_signal_database_username,
  998. 'password': matrix_mautrix_signal_database_password,
  999. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == 'matrix-postgres') else [])
  1000. +
  1001. ([{
  1002. 'name': matrix_mautrix_telegram_database_name,
  1003. 'username': matrix_mautrix_telegram_database_username,
  1004. 'password': matrix_mautrix_telegram_database_password,
  1005. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == 'matrix-postgres') else [])
  1006. +
  1007. ([{
  1008. 'name': matrix_mautrix_whatsapp_database_name,
  1009. 'username': matrix_mautrix_whatsapp_database_username,
  1010. 'password': matrix_mautrix_whatsapp_database_password,
  1011. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  1012. +
  1013. ([{
  1014. 'name': matrix_mx_puppet_skype_database_name,
  1015. 'username': matrix_mx_puppet_skype_database_username,
  1016. 'password': matrix_mx_puppet_skype_database_password,
  1017. }] if (matrix_mx_puppet_skype_enabled and matrix_mx_puppet_skype_database_engine == 'postgres' and matrix_mx_puppet_skype_database_hostname == 'matrix-postgres') else [])
  1018. +
  1019. ([{
  1020. 'name': matrix_mx_puppet_slack_database_name,
  1021. 'username': matrix_mx_puppet_slack_database_username,
  1022. 'password': matrix_mx_puppet_slack_database_password,
  1023. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  1024. +
  1025. ([{
  1026. 'name': matrix_mx_puppet_twitter_database_name,
  1027. 'username': matrix_mx_puppet_twitter_database_username,
  1028. 'password': matrix_mx_puppet_twitter_database_password,
  1029. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  1030. +
  1031. ([{
  1032. 'name': matrix_mx_puppet_instagram_database_name,
  1033. 'username': matrix_mx_puppet_instagram_database_username,
  1034. 'password': matrix_mx_puppet_instagram_database_password,
  1035. }] if (matrix_mx_puppet_instagram_enabled and matrix_mx_puppet_instagram_database_engine == 'postgres' and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  1036. +
  1037. ([{
  1038. 'name': matrix_mx_puppet_discord_database_name,
  1039. 'username': matrix_mx_puppet_discord_database_username,
  1040. 'password': matrix_mx_puppet_discord_database_password,
  1041. }] if (matrix_mx_puppet_discord_enabled and matrix_mx_puppet_discord_database_engine == 'postgres' and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  1042. +
  1043. ([{
  1044. 'name': matrix_mx_puppet_steam_database_name,
  1045. 'username': matrix_mx_puppet_steam_database_username,
  1046. 'password': matrix_mx_puppet_steam_database_password,
  1047. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  1048. +
  1049. ([{
  1050. 'name': matrix_mx_puppet_groupme_database_name,
  1051. 'username': matrix_mx_puppet_groupme_database_username,
  1052. 'password': matrix_mx_puppet_groupme_database_password,
  1053. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == 'matrix-postgres') else [])
  1054. +
  1055. ([{
  1056. 'name': matrix_dimension_database_name,
  1057. 'username': matrix_dimension_database_username,
  1058. 'password': matrix_dimension_database_password,
  1059. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  1060. +
  1061. ([{
  1062. 'name': matrix_etherpad_database_name,
  1063. 'username': matrix_etherpad_database_username,
  1064. 'password': matrix_etherpad_database_password,
  1065. }] if (matrix_etherpad_enabled and matrix_etherpad_database_engine == 'postgres' and matrix_etherpad_database_hostname == 'matrix-postgres') else [])
  1066. +
  1067. ([{
  1068. 'name': matrix_sygnal_database_name,
  1069. 'username': matrix_sygnal_database_username,
  1070. 'password': matrix_sygnal_database_password,
  1071. }] if (matrix_sygnal_enabled and matrix_sygnal_database_engine == 'postgres' and matrix_sygnal_database_hostname == 'matrix-postgres') else [])
  1072. }}
  1073. matrix_postgres_import_roles_to_ignore: |
  1074. {{
  1075. [matrix_postgres_connection_username]
  1076. +
  1077. matrix_postgres_additional_databases|map(attribute='username')|list
  1078. }}
  1079. matrix_postgres_import_databases_to_ignore: |
  1080. {{
  1081. [matrix_postgres_db_name]
  1082. +
  1083. matrix_postgres_additional_databases|map(attribute='name')|list
  1084. }}
  1085. ######################################################################
  1086. #
  1087. # /matrix-postgres
  1088. #
  1089. ######################################################################
  1090. ######################################################################
  1091. #
  1092. # matrix-sygnal
  1093. #
  1094. ######################################################################
  1095. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  1096. matrix_sygnal_enabled: false
  1097. # If someone instals Prometheus via the playbook, they most likely wish to monitor Sygnal.
  1098. matrix_sygnal_metrics_prometheus_enabled: "{{ matrix_prometheus_enabled }}"
  1099. matrix_sygnal_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:6000' }}"
  1100. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1101. matrix_sygnal_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1102. matrix_sygnal_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sygnal') | to_uuid }}"
  1103. ######################################################################
  1104. #
  1105. # /matrix-sygnal
  1106. #
  1107. ######################################################################
  1108. ######################################################################
  1109. #
  1110. # matrix-redis
  1111. #
  1112. ######################################################################
  1113. matrix_redis_enabled: "{{ matrix_synapse_workers_enabled }}"
  1114. ######################################################################
  1115. #
  1116. # /matrix-redis
  1117. #
  1118. ######################################################################
  1119. ######################################################################
  1120. #
  1121. # matrix-client-element
  1122. #
  1123. ######################################################################
  1124. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  1125. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  1126. matrix_client_element_enabled: true
  1127. matrix_client_element_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1128. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  1129. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1130. # the Element HTTP port to the local host.
  1131. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  1132. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  1133. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  1134. # Use Dimension if enabled, otherwise fall back to Scalar
  1135. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  1136. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  1137. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  1138. 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' }}"
  1139. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1140. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  1141. matrix_client_element_enable_presence_by_hs_url: |
  1142. {{
  1143. none
  1144. if matrix_synapse_use_presence
  1145. else {matrix_client_element_default_hs_url: false}
  1146. }}
  1147. matrix_client_element_welcome_user_id: ~
  1148. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  1149. ######################################################################
  1150. #
  1151. # /matrix-client-element
  1152. #
  1153. ######################################################################
  1154. ######################################################################
  1155. #
  1156. # matrix-synapse
  1157. #
  1158. ######################################################################
  1159. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1160. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  1161. # 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.
  1162. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  1163. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  1164. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  1165. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  1166. # you can expose Synapse's ports to the host.
  1167. #
  1168. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  1169. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  1170. #
  1171. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  1172. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  1173. #
  1174. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  1175. 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 '' }}"
  1176. #
  1177. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  1178. 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 '' }}"
  1179. #
  1180. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  1181. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  1182. #
  1183. # For exposing the Synapse worker (and metrics) ports to the local host.
  1184. matrix_synapse_workers_container_host_bind_address: "{{ '127.0.0.1' if (matrix_synapse_workers_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  1185. matrix_synapse_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'synapse.db') | to_uuid }}"
  1186. # We do not enable TLS in Synapse by default.
  1187. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  1188. matrix_synapse_tls_federation_listener_enabled: false
  1189. matrix_synapse_tls_certificate_path: ~
  1190. matrix_synapse_tls_private_key_path: ~
  1191. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  1192. # If someone instals Prometheus via the playbook, they most likely wish to monitor Synapse.
  1193. matrix_synapse_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  1194. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  1195. matrix_synapse_email_smtp_host: "matrix-mailer"
  1196. matrix_synapse_email_smtp_port: 8025
  1197. matrix_synapse_email_smtp_require_transport_security: false
  1198. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  1199. # Even if TURN doesn't support TLS (it does by default),
  1200. # it doesn't hurt to try a secure connection anyway.
  1201. matrix_synapse_turn_uris: |
  1202. {{
  1203. [
  1204. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  1205. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  1206. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  1207. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  1208. ]
  1209. if matrix_coturn_enabled
  1210. else []
  1211. }}
  1212. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1213. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1214. matrix_synapse_systemd_required_services_list: |
  1215. {{
  1216. (['docker.service'])
  1217. +
  1218. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1219. +
  1220. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  1221. }}
  1222. matrix_synapse_systemd_wanted_services_list: |
  1223. {{
  1224. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  1225. +
  1226. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1227. }}
  1228. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  1229. matrix_synapse_redis_enabled: "{{ matrix_redis_enabled }}"
  1230. matrix_synapse_redis_host: "{{ 'matrix-redis' if matrix_redis_enabled else '' }}"
  1231. matrix_synapse_redis_password: "{{ matrix_redis_connection_password if matrix_redis_enabled else '' }}"
  1232. ######################################################################
  1233. #
  1234. # /matrix-synapse
  1235. #
  1236. ######################################################################
  1237. ######################################################################
  1238. #
  1239. # matrix-synapse-admin
  1240. #
  1241. ######################################################################
  1242. matrix_synapse_admin_enabled: false
  1243. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  1244. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1245. # Synapse Admin's HTTP port to the local host.
  1246. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  1247. matrix_synapse_admin_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  1248. ######################################################################
  1249. #
  1250. # /matrix-synapse-admin
  1251. #
  1252. ######################################################################
  1253. ######################################################################
  1254. #
  1255. # matrix-prometheus-node-exporter
  1256. #
  1257. ######################################################################
  1258. matrix_prometheus_node_exporter_enabled: false
  1259. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus Node Exporter over the container network.
  1260. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1261. # Prometheus' HTTP port to the local host.
  1262. matrix_prometheus_node_exporter_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9100' }}"
  1263. ######################################################################
  1264. #
  1265. # /matrix-prometheus-node-exporter
  1266. #
  1267. ######################################################################
  1268. ######################################################################
  1269. #
  1270. # matrix-prometheus
  1271. #
  1272. ######################################################################
  1273. matrix_prometheus_enabled: false
  1274. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus over the container network.
  1275. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1276. # Prometheus' HTTP port to the local host.
  1277. matrix_prometheus_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9090' }}"
  1278. matrix_prometheus_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  1279. matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
  1280. matrix_prometheus_scraper_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  1281. matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
  1282. ######################################################################
  1283. #
  1284. # /matrix-prometheus
  1285. #
  1286. ######################################################################
  1287. ######################################################################
  1288. #
  1289. # matrix-grafana
  1290. #
  1291. ######################################################################
  1292. matrix_grafana_enabled: false
  1293. # Normally, matrix-nginx-proxy is enabled and nginx can reach Grafana over the container network.
  1294. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1295. # Grafana's HTTP port to the local host.
  1296. matrix_grafana_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:3000' }}"
  1297. ######################################################################
  1298. #
  1299. # /matrix-grafana
  1300. #
  1301. ######################################################################
  1302. ######################################################################
  1303. #
  1304. # matrix-registration
  1305. #
  1306. ######################################################################
  1307. matrix_registration_enabled: false
  1308. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  1309. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1310. # matrix-registration's HTTP port to the local host.
  1311. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  1312. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  1313. matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret if matrix_synapse_enabled else '' }}"
  1314. matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
  1315. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1316. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1317. matrix_registration_systemd_required_services_list: |
  1318. {{
  1319. ['docker.service']
  1320. +
  1321. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1322. }}
  1323. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1324. matrix_registration_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1325. matrix_registration_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mx.registr.db') | to_uuid }}"
  1326. ######################################################################
  1327. #
  1328. # /matrix-registration
  1329. #
  1330. ######################################################################