Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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