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

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