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

457 linhas
18 KiB

  1. ---
  2. matrix_synapse_workers_generic_worker_endpoints:
  3. # This worker can handle API requests matching the following regular expressions.
  4. # These endpoints can be routed to any worker. If a worker is set up to handle a
  5. # stream then, for maximum efficiency, additional endpoints should be routed to that
  6. # worker: refer to the [stream writers](#stream-writers) section below for further
  7. # information.
  8. # Sync requests
  9. - ^/_matrix/client/(r0|v3)/sync$
  10. - ^/_matrix/client/(api/v1|r0|v3)/events$
  11. - ^/_matrix/client/(api/v1|r0|v3)/initialSync$
  12. - ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$
  13. # Federation requests
  14. - ^/_matrix/federation/v1/event/
  15. - ^/_matrix/federation/v1/state/
  16. - ^/_matrix/federation/v1/state_ids/
  17. - ^/_matrix/federation/v1/backfill/
  18. - ^/_matrix/federation/v1/get_missing_events/
  19. - ^/_matrix/federation/v1/publicRooms
  20. - ^/_matrix/federation/v1/query/
  21. - ^/_matrix/federation/v1/make_join/
  22. - ^/_matrix/federation/v1/make_leave/
  23. - ^/_matrix/federation/(v1|v2)/send_join/
  24. - ^/_matrix/federation/(v1|v2)/send_leave/
  25. - ^/_matrix/federation/(v1|v2)/invite/
  26. - ^/_matrix/federation/v1/event_auth/
  27. - ^/_matrix/federation/v1/exchange_third_party_invite/
  28. - ^/_matrix/federation/v1/user/devices/
  29. - ^/_matrix/key/v2/query
  30. - ^/_matrix/federation/v1/hierarchy/
  31. # Inbound federation transaction request
  32. - ^/_matrix/federation/v1/send/
  33. # Client API requests
  34. - ^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$
  35. - ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$
  36. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$
  37. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$
  38. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
  39. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
  40. - ^/_matrix/client/v1/rooms/.*/hierarchy$
  41. - ^/_matrix/client/(v1|unstable)/rooms/.*/relations/
  42. - ^/_matrix/client/v1/rooms/.*/threads$
  43. - ^/_matrix/client/unstable/org.matrix.msc2716/rooms/.*/batch_send$
  44. - ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
  45. - ^/_matrix/client/(r0|v3|unstable)/account/3pid$
  46. - ^/_matrix/client/(r0|v3|unstable)/account/whoami$
  47. - ^/_matrix/client/(r0|v3|unstable)/devices$
  48. - ^/_matrix/client/versions$
  49. - ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$
  50. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/
  51. - ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$
  52. - ^/_matrix/client/(api/v1|r0|v3|unstable)/search$
  53. # Encryption requests
  54. # Note that ^/_matrix/client/(r0|v3|unstable)/keys/upload/ requires `worker_main_http_uri`
  55. - ^/_matrix/client/(r0|v3|unstable)/keys/query$
  56. - ^/_matrix/client/(r0|v3|unstable)/keys/changes$
  57. - ^/_matrix/client/(r0|v3|unstable)/keys/claim$
  58. - ^/_matrix/client/(r0|v3|unstable)/room_keys/
  59. - ^/_matrix/client/(r0|v3|unstable)/keys/upload/
  60. # Registration/login requests
  61. - ^/_matrix/client/(api/v1|r0|v3|unstable)/login$
  62. - ^/_matrix/client/(r0|v3|unstable)/register$
  63. - ^/_matrix/client/v1/register/m.login.registration_token/validity$
  64. # Event sending requests
  65. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
  66. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send
  67. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/
  68. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$
  69. - ^/_matrix/client/(api/v1|r0|v3|unstable)/join/
  70. - ^/_matrix/client/(api/v1|r0|v3|unstable)/profile/
  71. # These appear to be conditional and should not be enabled by default.
  72. # We need to fix up our workers-doc-to-yaml.awk parsing script to exclude them.
  73. # For now, they've been commented out manually.
  74. # # Account data requests
  75. # - ^/_matrix/client/(r0|v3|unstable)/.*/tags
  76. # - ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  77. #
  78. # # Receipts requests
  79. # - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  80. # - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  81. #
  82. # # Presence requests
  83. # - ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  84. # User directory search requests
  85. # Any worker can handle these, but we have a dedicated user_dir worker for this,
  86. # so we'd like for other generic workers to not try and capture these requests.
  87. # - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  88. # Additionally, the following REST endpoints can be handled for GET requests:
  89. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  90. # ^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/
  91. # Pagination requests can also be handled, but all requests for a given
  92. # room must be routed to the same instance. Additionally, care must be taken to
  93. # ensure that the purge history admin API is not used while pagination requests
  94. # for the room are in flight:
  95. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  96. # ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$
  97. # Additionally, the following endpoints should be included if Synapse is configured
  98. # to use SSO (you only need to include the ones for whichever SSO provider you're
  99. # using):
  100. # for all SSO providers
  101. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  102. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect
  103. # ^/_synapse/client/pick_idp$
  104. # ^/_synapse/client/pick_username
  105. # ^/_synapse/client/new_user_consent$
  106. # ^/_synapse/client/sso_register$
  107. # OpenID Connect requests.
  108. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  109. # ^/_synapse/client/oidc/callback$
  110. # SAML requests.
  111. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  112. # ^/_synapse/client/saml2/authn_response$
  113. # CAS requests.
  114. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  115. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/cas/ticket$
  116. # Ensure that all SSO logins go to a single process.
  117. # For multiple workers not handling the SSO endpoints properly, see
  118. # [#7530](https://github.com/matrix-org/synapse/issues/7530) and
  119. # [#9427](https://github.com/matrix-org/synapse/issues/9427).
  120. # Note that a [HTTP listener](usage/configuration/config_documentation.md#listeners)
  121. # with `client` and `federation` `resources` must be configured in the `worker_listeners`
  122. # option in the worker config.
  123. # #### Load balancing
  124. # It is possible to run multiple instances of this worker app, with incoming requests
  125. # being load-balanced between them by the reverse-proxy. However, different endpoints
  126. # have different characteristics and so admins
  127. # may wish to run multiple groups of workers handling different endpoints so that
  128. # load balancing can be done in different ways.
  129. # For `/sync` and `/initialSync` requests it will be more efficient if all
  130. # requests from a particular user are routed to a single instance. Extracting a
  131. # user ID from the access token or `Authorization` header is currently left as an
  132. # exercise for the reader. Admins may additionally wish to separate out `/sync`
  133. # requests that have a `since` query parameter from those that don't (and
  134. # `/initialSync`), as requests that don't are known as "initial sync" that happens
  135. # when a user logs in on a new device and can be *very* resource intensive, so
  136. # isolating these requests will stop them from interfering with other users ongoing
  137. # syncs.
  138. # Federation and client requests can be balanced via simple round robin.
  139. # The inbound federation transaction request `^/_matrix/federation/v1/send/`
  140. # should be balanced by source IP so that transactions from the same remote server
  141. # go to the same process.
  142. # Registration/login requests can be handled separately purely to help ensure that
  143. # unexpected load doesn't affect new logins and sign ups.
  144. # Finally, event sending requests can be balanced by the room ID in the URI (or
  145. # the full URI, or even just round robin), the room ID is the path component after
  146. # `/rooms/`. If there is a large bridge connected that is sending or may send lots
  147. # of events, then a dedicated set of workers can be provisioned to limit the
  148. # effects of bursts of events from that bridge on events sent by normal users.
  149. # #### Stream writers
  150. # Additionally, the writing of specific streams (such as events) can be moved off
  151. # of the main process to a particular worker.
  152. # To enable this, the worker must have a
  153. # [HTTP `replication` listener](usage/configuration/config_documentation.md#listeners) configured,
  154. # have a `worker_name` and be listed in the `instance_map` config. The same worker
  155. # can handle multiple streams, but unless otherwise documented, each stream can only
  156. # have a single writer.
  157. # For example, to move event persistence off to a dedicated worker, the shared
  158. # configuration would include:
  159. # ```yaml
  160. # instance_map:
  161. # event_persister1:
  162. # host: localhost
  163. # port: 8034
  164. # stream_writers:
  165. # events: event_persister1
  166. # ```
  167. # An example for a stream writer instance:
  168. # ```yaml
  169. # {{#include systemd-with-workers/workers/event_persister.yaml}}
  170. # ```
  171. # Some of the streams have associated endpoints which, for maximum efficiency, should
  172. # be routed to the workers handling that stream. See below for the currently supported
  173. # streams and the endpoints associated with them:
  174. # ##### The `events` stream
  175. # The `events` stream experimentally supports having multiple writers, where work
  176. # is sharded between them by room ID. Note that you *must* restart all worker
  177. # instances when adding or removing event persisters. An example `stream_writers`
  178. # configuration with multiple writers:
  179. # ```yaml
  180. # stream_writers:
  181. # events:
  182. # - event_persister1
  183. # - event_persister2
  184. # ```
  185. # ##### The `typing` stream
  186. # The following endpoints should be routed directly to the worker configured as
  187. # the stream writer for the `typing` stream:
  188. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  189. # ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing
  190. # ##### The `to_device` stream
  191. # The following endpoints should be routed directly to the worker configured as
  192. # the stream writer for the `to_device` stream:
  193. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  194. # ^/_matrix/client/(r0|v3|unstable)/sendToDevice/
  195. # ##### The `account_data` stream
  196. # The following endpoints should be routed directly to the worker configured as
  197. # the stream writer for the `account_data` stream:
  198. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  199. # ^/_matrix/client/(r0|v3|unstable)/.*/tags
  200. # ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  201. # ##### The `receipts` stream
  202. # The following endpoints should be routed directly to the worker configured as
  203. # the stream writer for the `receipts` stream:
  204. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  205. # ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  206. # ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  207. # ##### The `presence` stream
  208. # The following endpoints should be routed directly to the worker configured as
  209. # the stream writer for the `presence` stream:
  210. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  211. # ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  212. # #### Background tasks
  213. # There is also support for moving background tasks to a separate
  214. # worker. Background tasks are run periodically or started via replication. Exactly
  215. # which tasks are configured to run depends on your Synapse configuration (e.g. if
  216. # stats is enabled). This worker doesn't handle any REST endpoints itself.
  217. # To enable this, the worker must have a `worker_name` and can be configured to run
  218. # background tasks. For example, to move background tasks to a dedicated worker,
  219. # the shared configuration would include:
  220. # ```yaml
  221. # run_background_tasks_on: background_worker
  222. # ```
  223. # You might also wish to investigate the `update_user_directory_from_worker` and
  224. # `media_instance_running_background_jobs` settings.
  225. # An example for a dedicated background worker instance:
  226. # ```yaml
  227. # {{#include systemd-with-workers/workers/background_worker.yaml}}
  228. # ```
  229. # #### Updating the User Directory
  230. # You can designate one generic worker to update the user directory.
  231. # Specify its name in the shared configuration as follows:
  232. # ```yaml
  233. # update_user_directory_from_worker: worker_name
  234. # ```
  235. # This work cannot be load-balanced; please ensure the main process is restarted
  236. # after setting this option in the shared configuration!
  237. # User directory updates allow REST endpoints matching the following regular
  238. # expressions to work:
  239. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  240. # ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  241. # The above endpoints can be routed to any worker, though you may choose to route
  242. # it to the chosen user directory worker.
  243. # This style of configuration supersedes the legacy `synapse.app.user_dir`
  244. # worker application type.
  245. # #### Notifying Application Services
  246. # You can designate one generic worker to send output traffic to Application Services.
  247. # Doesn't handle any REST endpoints itself, but you should specify its name in the
  248. # shared configuration as follows:
  249. # ```yaml
  250. # notify_appservices_from_worker: worker_name
  251. # ```
  252. # This work cannot be load-balanced; please ensure the main process is restarted
  253. # after setting this option in the shared configuration!
  254. # This style of configuration supersedes the legacy `synapse.app.appservice`
  255. # worker application type.
  256. # pusher worker (no API endpoints) [
  257. # Handles sending push notifications to sygnal and email. Doesn't handle any
  258. # REST endpoints itself, but you should set `start_pushers: False` in the
  259. # shared configuration file to stop the main synapse sending push notifications.
  260. # To run multiple instances at once the `pusher_instances` option should list all
  261. # pusher instances by their worker name, e.g.:
  262. # ```yaml
  263. # pusher_instances:
  264. # - pusher_worker1
  265. # - pusher_worker2
  266. # ```
  267. # An example for a pusher instance:
  268. # ```yaml
  269. # {{#include systemd-with-workers/workers/pusher_worker.yaml}}
  270. # ```
  271. # ]
  272. # appservice worker (no API endpoints) [
  273. # **Deprecated as of Synapse v1.59.** [Use `synapse.app.generic_worker` with the
  274. # `notify_appservices_from_worker` option instead.](#notifying-application-services)
  275. # Handles sending output traffic to Application Services. Doesn't handle any
  276. # REST endpoints itself, but you should set `notify_appservices: False` in the
  277. # shared configuration file to stop the main synapse sending appservice notifications.
  278. # Note this worker cannot be load-balanced: only one instance should be active.
  279. # ]
  280. # federation_sender worker (no API endpoints) [
  281. # Handles sending federation traffic to other servers. Doesn't handle any
  282. # REST endpoints itself, but you should set `send_federation: False` in the
  283. # shared configuration file to stop the main synapse sending this traffic.
  284. # If running multiple federation senders then you must list each
  285. # instance in the `federation_sender_instances` option by their `worker_name`.
  286. # All instances must be stopped and started when adding or removing instances.
  287. # For example:
  288. # ```yaml
  289. # federation_sender_instances:
  290. # - federation_sender1
  291. # - federation_sender2
  292. # ```
  293. # An example for a federation sender instance:
  294. # ```yaml
  295. # {{#include systemd-with-workers/workers/federation_sender.yaml}}
  296. # ```
  297. # ]
  298. matrix_synapse_workers_media_repository_endpoints:
  299. # Handles the media repository. It can handle all endpoints starting with:
  300. - ^/_matrix/media/
  301. # ... and the following regular expressions matching media-specific administration APIs:
  302. - ^/_synapse/admin/v1/purge_media_cache$
  303. - ^/_synapse/admin/v1/room/.*/media.*$
  304. - ^/_synapse/admin/v1/user/.*/media.*$
  305. - ^/_synapse/admin/v1/media/.*$
  306. - ^/_synapse/admin/v1/quarantine_media/.*$
  307. - ^/_synapse/admin/v1/users/.*/media$
  308. # You should also set `enable_media_repo: False` in the shared configuration
  309. # file to stop the main synapse running background jobs related to managing the
  310. # media repository. Note that doing so will prevent the main process from being
  311. # able to handle the above endpoints.
  312. # In the `media_repository` worker configuration file, configure the
  313. # [HTTP listener](usage/configuration/config_documentation.md#listeners) to
  314. # expose the `media` resource. For example:
  315. # ```yaml
  316. # {{#include systemd-with-workers/workers/media_worker.yaml}}
  317. # ```
  318. # Note that if running multiple media repositories they must be on the same server
  319. # and you must configure a single instance to run the background tasks, e.g.:
  320. # ```yaml
  321. # media_instance_running_background_jobs: "media-repository-1"
  322. # ```
  323. # Note that if a reverse proxy is used , then `/_matrix/media/` must be routed for both inbound client and federation requests (if they are handled separately).
  324. matrix_synapse_workers_user_dir_endpoints:
  325. # **Deprecated as of Synapse v1.59.** [Use `synapse.app.generic_worker` with the
  326. # `update_user_directory_from_worker` option instead.](#updating-the-user-directory)
  327. # Handles searches in the user directory. It can handle REST endpoints matching
  328. # the following regular expressions:
  329. - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  330. # When using this worker you must also set `update_user_directory: false` in the
  331. # shared configuration file to stop the main synapse running background
  332. # jobs related to updating the user directory.
  333. # Above endpoint is not *required* to be routed to this worker. By default,
  334. # `update_user_directory` is set to `true`, which means the main process
  335. # will handle updates. All workers configured with `client` can handle the above
  336. # endpoint as long as either this worker or the main process are configured to
  337. # handle it, and are online.
  338. # If `update_user_directory` is set to `false`, and this worker is not running,
  339. # the above endpoint may give outdated results.
  340. matrix_synapse_workers_avail_list:
  341. - appservice
  342. - federation_sender
  343. - generic_worker
  344. - media_repository
  345. - pusher
  346. - user_dir