Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

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