Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

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