Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

572 行
26 KiB

  1. ---
  2. matrix_synapse_client_api_url_endpoint_public: "https://{{ matrix_server_fqn_matrix }}/_matrix/client/versions"
  3. matrix_synapse_federation_api_url_endpoint_public: "https://{{ matrix_server_fqn_matrix }}:{{ matrix_federation_public_port }}/_matrix/federation/v1/version"
  4. # Tells whether this role had executed or not. Toggled to `true` during runtime.
  5. matrix_synapse_role_executed: false
  6. matrix_synapse_media_store_directory_name: "{{ matrix_synapse_media_store_path | basename }}"
  7. # A Synapse generic worker can handle both federation and client-server API endpoints.
  8. # We wish to split these, as we normally serve federation separately and don't want them mixed up.
  9. #
  10. # This is some ugly Ansible/Jinja2 hack (seen here: https://stackoverflow.com/a/47831492),
  11. # which takes a list of various strings and removes the ones NOT containing `/_matrix/client` anywhere in them.
  12. #
  13. # We intentionally don't do a diff between everything possible (`matrix_synapse_workers_generic_worker_endpoints`) and `matrix_synapse_workers_generic_worker_federation_endpoints`,
  14. # because `matrix_synapse_workers_generic_worker_endpoints` also contains things like `/_synapse/client/`, etc.
  15. # While /_synapse/client/ endpoints are somewhat client-server API-related, they're:
  16. # - neither part of the client-server API spec (and are thus, different)
  17. # - nor always OK to forward to a worker (we're supposed to obey `matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_client_api_enabled`)
  18. #
  19. # It's also not too many of these APIs (only `^/_synapse/client/password_reset/email/submit_token$` at the time of this writing / 2021-01-24),
  20. # so it's not that important whether we forward them or not.
  21. #
  22. # Basically, we aim to cover most things. Skipping `/_synapse/client` or a few other minor things doesn't matter too much.
  23. matrix_synapse_workers_generic_worker_client_server_endpoints: "{{ matrix_synapse_workers_generic_worker_endpoints | default([]) | map('regex_search', '.*/_matrix/client.*') | list | difference([none]) }}"
  24. # A Synapse generic worker can handle both federation and client-server API endpoints.
  25. # We wish to split these, as we normally serve federation separately and don't want them mixed up.
  26. #
  27. # This is some ugly Ansible/Jinja2 hack (seen here: https://stackoverflow.com/a/47831492),
  28. # which takes a list of various strings and removes the ones NOT containing `/_matrix/federation` or `/_matrix/key` anywhere in them.
  29. matrix_synapse_workers_generic_worker_federation_endpoints: "{{ matrix_synapse_workers_generic_worker_endpoints | default([]) | map('regex_search', matrix_synapse_workers_generic_worker_federation_endpoints_regex) | list | difference([none]) }}"
  30. # matrix_synapse_workers_generic_worker_federation_endpoints_regex contains the regex used in matrix_synapse_workers_generic_worker_federation_endpoints.
  31. # It's intentionally put in a separate variable, to avoid tripping ansible-lint's jinja[spacing] rule.
  32. matrix_synapse_workers_generic_worker_federation_endpoints_regex: '.*(/_matrix/federation|/_matrix/key).*'
  33. # matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints contains the endpoints serviced by the `typing` stream writer.
  34. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-typing-stream
  35. matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints:
  36. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing
  37. # matrix_synapse_workers_stream_writer_to_device_stream_worker_client_server_endpoints contains the endpoints serviced by the `to_device` stream writer.
  38. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-to_device-stream
  39. matrix_synapse_workers_stream_writer_to_device_stream_worker_client_server_endpoints:
  40. - ^/_matrix/client/(r0|v3|unstable)/sendToDevice/
  41. # matrix_synapse_workers_stream_writer_account_data_stream_worker_client_server_endpoints contains the endpoints serviced by the `account_data` stream writer.
  42. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-account_data-stream
  43. matrix_synapse_workers_stream_writer_account_data_stream_worker_client_server_endpoints:
  44. - ^/_matrix/client/(r0|v3|unstable)/.*/tags
  45. - ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  46. # matrix_synapse_workers_stream_writer_receipts_stream_worker_client_server_endpoints contains the endpoints serviced by the `recepts` stream writer.
  47. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-receipts-stream
  48. matrix_synapse_workers_stream_writer_receipts_stream_worker_client_server_endpoints:
  49. - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  50. - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  51. # matrix_synapse_workers_stream_writer_presence_stream_worker_client_server_endpoints contains the endpoints serviced by the `presence` stream writer.
  52. # See: https://matrix-org.github.io/synapse/latest/workers.html#the-presence-stream
  53. matrix_synapse_workers_stream_writer_presence_stream_worker_client_server_endpoints:
  54. - ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  55. # matrix_synapse_workers_user_dir_worker_client_server_endpoints contains the endpoints serviced by the `type = user_dir` (`app = generic_worker`) worker.
  56. # See: https://matrix-org.github.io/synapse/latest/workers.html#updating-the-user-directory
  57. matrix_synapse_workers_user_dir_worker_client_server_endpoints:
  58. - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  59. # matrix_synapse_workers_known_stream_writer_stream_types contains the list of stream writer stream types that the playbook recognizes.
  60. # This is used for validation purposes. If adding support for a new type, besides adding it to this list,
  61. # don't forget to actually configure it where appropriate (see worker.yaml.j2`, the nginx proxy configuration, etc).
  62. matrix_synapse_workers_known_stream_writer_stream_types: ['events', 'typing', 'to_device', 'account_data', 'receipts', 'presence']
  63. # matrix_synapse_workers_webserving_stream_writer_types contains a list of stream writer types that serve web (client) requests.
  64. # Not all stream writers serve web requests. Some just perform background tasks.
  65. matrix_synapse_workers_webserving_stream_writer_types: ['typing', 'to_device', 'account_data', 'receipts', 'presence']
  66. # matrix_synapse_workers_systemd_services_list contains a list of systemd services (one for each worker systemd service which serves web requests).
  67. # This list is built during runtime.
  68. # Not all workers serve web requests. Those that don't won't be injected here.
  69. matrix_synapse_webserving_workers_systemd_services_list: []
  70. # matrix_synapse_known_worker_types contains the list of known worker types.
  71. #
  72. # A worker type is different than a worker app (e.g. `generic_worker`).
  73. # For example, the `stream_writer` worker type is served by the `generic_worker` app, but is a separate type that we recognize.
  74. #
  75. # Some other types (`appservice` and `user_dir`) used to be Synapse worker apps, which got subsequently deprecated.
  76. # We still allow these types of workers and map them to the `generic_worker` app,
  77. # which is why we make sure they're part of the list below.
  78. # We use the `unique` filter because they're part of `matrix_synapse_workers_avail_list` too (for now; scheduled for removal).
  79. matrix_synapse_known_worker_types: |
  80. {{
  81. (
  82. matrix_synapse_workers_avail_list
  83. +
  84. ['stream_writer']
  85. +
  86. ['appservice']
  87. +
  88. ['user_dir']
  89. +
  90. ['background']
  91. ) | unique
  92. }}
  93. # matrix_synapse_known_instance_map_eligible_worker_types contains the list of worker types that are to be injected into `matrix_synapse_instance_map`.
  94. matrix_synapse_known_instance_map_eligible_worker_types:
  95. - stream_writer
  96. # the following section contains semi-automatic generated content
  97. ### workers:start
  98. matrix_synapse_workers_generic_worker_endpoints:
  99. # This worker can handle API requests matching the following regular expressions.
  100. # These endpoints can be routed to any worker. If a worker is set up to handle a
  101. # stream then, for maximum efficiency, additional endpoints should be routed to that
  102. # worker: refer to the [stream writers](#stream-writers) section below for further
  103. # information.
  104. # Sync requests
  105. - ^/_matrix/client/(r0|v3)/sync$
  106. - ^/_matrix/client/(api/v1|r0|v3)/events$
  107. - ^/_matrix/client/(api/v1|r0|v3)/initialSync$
  108. - ^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync$
  109. # Federation requests
  110. - ^/_matrix/federation/v1/event/
  111. - ^/_matrix/federation/v1/state/
  112. - ^/_matrix/federation/v1/state_ids/
  113. - ^/_matrix/federation/v1/backfill/
  114. - ^/_matrix/federation/v1/get_missing_events/
  115. - ^/_matrix/federation/v1/publicRooms
  116. - ^/_matrix/federation/v1/query/
  117. - ^/_matrix/federation/v1/make_join/
  118. - ^/_matrix/federation/v1/make_leave/
  119. - ^/_matrix/federation/(v1|v2)/send_join/
  120. - ^/_matrix/federation/(v1|v2)/send_leave/
  121. - ^/_matrix/federation/(v1|v2)/invite/
  122. - ^/_matrix/federation/v1/event_auth/
  123. - ^/_matrix/federation/v1/exchange_third_party_invite/
  124. - ^/_matrix/federation/v1/user/devices/
  125. - ^/_matrix/key/v2/query
  126. - ^/_matrix/federation/v1/hierarchy/
  127. # Inbound federation transaction request
  128. - ^/_matrix/federation/v1/send/
  129. # Client API requests
  130. - ^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom$
  131. - ^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms$
  132. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members$
  133. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*$
  134. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members$
  135. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state$
  136. - ^/_matrix/client/v1/rooms/.*/hierarchy$
  137. - ^/_matrix/client/(v1|unstable)/rooms/.*/relations/
  138. - ^/_matrix/client/v1/rooms/.*/threads$
  139. - ^/_matrix/client/unstable/org.matrix.msc2716/rooms/.*/batch_send$
  140. - ^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary$
  141. - ^/_matrix/client/(r0|v3|unstable)/account/3pid$
  142. - ^/_matrix/client/(r0|v3|unstable)/account/whoami$
  143. - ^/_matrix/client/(r0|v3|unstable)/devices$
  144. - ^/_matrix/client/versions$
  145. - ^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer$
  146. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/
  147. - ^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms$
  148. - ^/_matrix/client/(api/v1|r0|v3|unstable)/search$
  149. # Encryption requests
  150. # Note that ^/_matrix/client/(r0|v3|unstable)/keys/upload/ requires `worker_main_http_uri`
  151. - ^/_matrix/client/(r0|v3|unstable)/keys/query$
  152. - ^/_matrix/client/(r0|v3|unstable)/keys/changes$
  153. - ^/_matrix/client/(r0|v3|unstable)/keys/claim$
  154. - ^/_matrix/client/(r0|v3|unstable)/room_keys/
  155. - ^/_matrix/client/(r0|v3|unstable)/keys/upload/
  156. # Registration/login requests
  157. - ^/_matrix/client/(api/v1|r0|v3|unstable)/login$
  158. - ^/_matrix/client/(r0|v3|unstable)/register$
  159. - ^/_matrix/client/v1/register/m.login.registration_token/validity$
  160. # Event sending requests
  161. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact
  162. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send
  163. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/
  164. - ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)$
  165. - ^/_matrix/client/(api/v1|r0|v3|unstable)/join/
  166. - ^/_matrix/client/(api/v1|r0|v3|unstable)/profile/
  167. # These appear to be conditional and should not be enabled by default.
  168. # We need to fix up our workers-doc-to-yaml.awk parsing script to exclude them.
  169. # For now, they've been commented out manually.
  170. # # Account data requests
  171. # - ^/_matrix/client/(r0|v3|unstable)/.*/tags
  172. # - ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  173. #
  174. # # Receipts requests
  175. # - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  176. # - ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  177. #
  178. # # Presence requests
  179. # - ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  180. # User directory search requests
  181. # Any worker can handle these, but we have a dedicated user_dir worker for this,
  182. # so we'd like for other generic workers to not try and capture these requests.
  183. # - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  184. # Additionally, the following REST endpoints can be handled for GET requests:
  185. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  186. # ^/_matrix/client/(api/v1|r0|v3|unstable)/pushrules/
  187. # Pagination requests can also be handled, but all requests for a given
  188. # room must be routed to the same instance. Additionally, care must be taken to
  189. # ensure that the purge history admin API is not used while pagination requests
  190. # for the room are in flight:
  191. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  192. # ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/messages$
  193. # Additionally, the following endpoints should be included if Synapse is configured
  194. # to use SSO (you only need to include the ones for whichever SSO provider you're
  195. # using):
  196. # for all SSO providers
  197. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  198. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect
  199. # ^/_synapse/client/pick_idp$
  200. # ^/_synapse/client/pick_username
  201. # ^/_synapse/client/new_user_consent$
  202. # ^/_synapse/client/sso_register$
  203. # OpenID Connect requests.
  204. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  205. # ^/_synapse/client/oidc/callback$
  206. # SAML requests.
  207. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  208. # ^/_synapse/client/saml2/authn_response$
  209. # CAS requests.
  210. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  211. # ^/_matrix/client/(api/v1|r0|v3|unstable)/login/cas/ticket$
  212. # Ensure that all SSO logins go to a single process.
  213. # For multiple workers not handling the SSO endpoints properly, see
  214. # [#7530](https://github.com/matrix-org/synapse/issues/7530) and
  215. # [#9427](https://github.com/matrix-org/synapse/issues/9427).
  216. # Note that a [HTTP listener](usage/configuration/config_documentation.md#listeners)
  217. # with `client` and `federation` `resources` must be configured in the `worker_listeners`
  218. # option in the worker config.
  219. # #### Load balancing
  220. # It is possible to run multiple instances of this worker app, with incoming requests
  221. # being load-balanced between them by the reverse-proxy. However, different endpoints
  222. # have different characteristics and so admins
  223. # may wish to run multiple groups of workers handling different endpoints so that
  224. # load balancing can be done in different ways.
  225. # For `/sync` and `/initialSync` requests it will be more efficient if all
  226. # requests from a particular user are routed to a single instance. Extracting a
  227. # user ID from the access token or `Authorization` header is currently left as an
  228. # exercise for the reader. Admins may additionally wish to separate out `/sync`
  229. # requests that have a `since` query parameter from those that don't (and
  230. # `/initialSync`), as requests that don't are known as "initial sync" that happens
  231. # when a user logs in on a new device and can be *very* resource intensive, so
  232. # isolating these requests will stop them from interfering with other users ongoing
  233. # syncs.
  234. # Federation and client requests can be balanced via simple round robin.
  235. # The inbound federation transaction request `^/_matrix/federation/v1/send/`
  236. # should be balanced by source IP so that transactions from the same remote server
  237. # go to the same process.
  238. # Registration/login requests can be handled separately purely to help ensure that
  239. # unexpected load doesn't affect new logins and sign ups.
  240. # Finally, event sending requests can be balanced by the room ID in the URI (or
  241. # the full URI, or even just round robin), the room ID is the path component after
  242. # `/rooms/`. If there is a large bridge connected that is sending or may send lots
  243. # of events, then a dedicated set of workers can be provisioned to limit the
  244. # effects of bursts of events from that bridge on events sent by normal users.
  245. # #### Stream writers
  246. # Additionally, the writing of specific streams (such as events) can be moved off
  247. # of the main process to a particular worker.
  248. # To enable this, the worker must have a
  249. # [HTTP `replication` listener](usage/configuration/config_documentation.md#listeners) configured,
  250. # have a `worker_name` and be listed in the `instance_map` config. The same worker
  251. # can handle multiple streams, but unless otherwise documented, each stream can only
  252. # have a single writer.
  253. # For example, to move event persistence off to a dedicated worker, the shared
  254. # configuration would include:
  255. # ```yaml
  256. # instance_map:
  257. # event_persister1:
  258. # host: localhost
  259. # port: 8034
  260. # stream_writers:
  261. # events: event_persister1
  262. # ```
  263. # An example for a stream writer instance:
  264. # ```yaml
  265. # {{#include systemd-with-workers/workers/event_persister.yaml}}
  266. # ```
  267. # Some of the streams have associated endpoints which, for maximum efficiency, should
  268. # be routed to the workers handling that stream. See below for the currently supported
  269. # streams and the endpoints associated with them:
  270. # ##### The `events` stream
  271. # The `events` stream experimentally supports having multiple writers, where work
  272. # is sharded between them by room ID. Note that you *must* restart all worker
  273. # instances when adding or removing event persisters. An example `stream_writers`
  274. # configuration with multiple writers:
  275. # ```yaml
  276. # stream_writers:
  277. # events:
  278. # - event_persister1
  279. # - event_persister2
  280. # ```
  281. # ##### The `typing` stream
  282. # The following endpoints should be routed directly to the worker configured as
  283. # the stream writer for the `typing` stream:
  284. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  285. # ^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/typing
  286. # ##### The `to_device` stream
  287. # The following endpoints should be routed directly to the worker configured as
  288. # the stream writer for the `to_device` stream:
  289. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  290. # ^/_matrix/client/(r0|v3|unstable)/sendToDevice/
  291. # ##### The `account_data` stream
  292. # The following endpoints should be routed directly to the worker configured as
  293. # the stream writer for the `account_data` stream:
  294. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  295. # ^/_matrix/client/(r0|v3|unstable)/.*/tags
  296. # ^/_matrix/client/(r0|v3|unstable)/.*/account_data
  297. # ##### The `receipts` stream
  298. # The following endpoints should be routed directly to the worker configured as
  299. # the stream writer for the `receipts` stream:
  300. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  301. # ^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt
  302. # ^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers
  303. # ##### The `presence` stream
  304. # The following endpoints should be routed directly to the worker configured as
  305. # the stream writer for the `presence` stream:
  306. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  307. # ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/
  308. # #### Background tasks
  309. # There is also support for moving background tasks to a separate
  310. # worker. Background tasks are run periodically or started via replication. Exactly
  311. # which tasks are configured to run depends on your Synapse configuration (e.g. if
  312. # stats is enabled). This worker doesn't handle any REST endpoints itself.
  313. # To enable this, the worker must have a `worker_name` and can be configured to run
  314. # background tasks. For example, to move background tasks to a dedicated worker,
  315. # the shared configuration would include:
  316. # ```yaml
  317. # run_background_tasks_on: background_worker
  318. # ```
  319. # You might also wish to investigate the `update_user_directory_from_worker` and
  320. # `media_instance_running_background_jobs` settings.
  321. # An example for a dedicated background worker instance:
  322. # ```yaml
  323. # {{#include systemd-with-workers/workers/background_worker.yaml}}
  324. # ```
  325. # #### Updating the User Directory
  326. # You can designate one generic worker to update the user directory.
  327. # Specify its name in the shared configuration as follows:
  328. # ```yaml
  329. # update_user_directory_from_worker: worker_name
  330. # ```
  331. # This work cannot be load-balanced; please ensure the main process is restarted
  332. # after setting this option in the shared configuration!
  333. # User directory updates allow REST endpoints matching the following regular
  334. # expressions to work:
  335. # FIXME: ADDITIONAL CONDITIONS REQUIRED: to be enabled manually
  336. # ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  337. # The above endpoints can be routed to any worker, though you may choose to route
  338. # it to the chosen user directory worker.
  339. # This style of configuration supersedes the legacy `synapse.app.user_dir`
  340. # worker application type.
  341. # #### Notifying Application Services
  342. # You can designate one generic worker to send output traffic to Application Services.
  343. # Doesn't handle any REST endpoints itself, but you should specify its name in the
  344. # shared configuration as follows:
  345. # ```yaml
  346. # notify_appservices_from_worker: worker_name
  347. # ```
  348. # This work cannot be load-balanced; please ensure the main process is restarted
  349. # after setting this option in the shared configuration!
  350. # This style of configuration supersedes the legacy `synapse.app.appservice`
  351. # worker application type.
  352. # pusher worker (no API endpoints) [
  353. # Handles sending push notifications to sygnal and email. Doesn't handle any
  354. # REST endpoints itself, but you should set `start_pushers: False` in the
  355. # shared configuration file to stop the main synapse sending push notifications.
  356. # To run multiple instances at once the `pusher_instances` option should list all
  357. # pusher instances by their worker name, e.g.:
  358. # ```yaml
  359. # pusher_instances:
  360. # - pusher_worker1
  361. # - pusher_worker2
  362. # ```
  363. # An example for a pusher instance:
  364. # ```yaml
  365. # {{#include systemd-with-workers/workers/pusher_worker.yaml}}
  366. # ```
  367. # ]
  368. # appservice worker (no API endpoints) [
  369. # **Deprecated as of Synapse v1.59.** [Use `synapse.app.generic_worker` with the
  370. # `notify_appservices_from_worker` option instead.](#notifying-application-services)
  371. # Handles sending output traffic to Application Services. Doesn't handle any
  372. # REST endpoints itself, but you should set `notify_appservices: False` in the
  373. # shared configuration file to stop the main synapse sending appservice notifications.
  374. # Note this worker cannot be load-balanced: only one instance should be active.
  375. # ]
  376. # federation_sender worker (no API endpoints) [
  377. # Handles sending federation traffic to other servers. Doesn't handle any
  378. # REST endpoints itself, but you should set `send_federation: False` in the
  379. # shared configuration file to stop the main synapse sending this traffic.
  380. # If running multiple federation senders then you must list each
  381. # instance in the `federation_sender_instances` option by their `worker_name`.
  382. # All instances must be stopped and started when adding or removing instances.
  383. # For example:
  384. # ```yaml
  385. # federation_sender_instances:
  386. # - federation_sender1
  387. # - federation_sender2
  388. # ```
  389. # An example for a federation sender instance:
  390. # ```yaml
  391. # {{#include systemd-with-workers/workers/federation_sender.yaml}}
  392. # ```
  393. # ]
  394. matrix_synapse_workers_media_repository_endpoints:
  395. # Handles the media repository. It can handle all endpoints starting with:
  396. - ^/_matrix/media/
  397. # ... and the following regular expressions matching media-specific administration APIs:
  398. - ^/_synapse/admin/v1/purge_media_cache$
  399. - ^/_synapse/admin/v1/room/.*/media.*$
  400. - ^/_synapse/admin/v1/user/.*/media.*$
  401. - ^/_synapse/admin/v1/media/.*$
  402. - ^/_synapse/admin/v1/quarantine_media/.*$
  403. - ^/_synapse/admin/v1/users/.*/media$
  404. # You should also set `enable_media_repo: False` in the shared configuration
  405. # file to stop the main synapse running background jobs related to managing the
  406. # media repository. Note that doing so will prevent the main process from being
  407. # able to handle the above endpoints.
  408. # In the `media_repository` worker configuration file, configure the
  409. # [HTTP listener](usage/configuration/config_documentation.md#listeners) to
  410. # expose the `media` resource. For example:
  411. # ```yaml
  412. # {{#include systemd-with-workers/workers/media_worker.yaml}}
  413. # ```
  414. # Note that if running multiple media repositories they must be on the same server
  415. # and you must configure a single instance to run the background tasks, e.g.:
  416. # ```yaml
  417. # media_instance_running_background_jobs: "media-repository-1"
  418. # ```
  419. # 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).
  420. matrix_synapse_workers_user_dir_endpoints:
  421. # **Deprecated as of Synapse v1.59.** [Use `synapse.app.generic_worker` with the
  422. # `update_user_directory_from_worker` option instead.](#updating-the-user-directory)
  423. # Handles searches in the user directory. It can handle REST endpoints matching
  424. # the following regular expressions:
  425. - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$
  426. # When using this worker you must also set `update_user_directory: false` in the
  427. # shared configuration file to stop the main synapse running background
  428. # jobs related to updating the user directory.
  429. # Above endpoint is not *required* to be routed to this worker. By default,
  430. # `update_user_directory` is set to `true`, which means the main process
  431. # will handle updates. All workers configured with `client` can handle the above
  432. # endpoint as long as either this worker or the main process are configured to
  433. # handle it, and are online.
  434. # If `update_user_directory` is set to `false`, and this worker is not running,
  435. # the above endpoint may give outdated results.
  436. matrix_synapse_workers_avail_list:
  437. - appservice
  438. - federation_sender
  439. - generic_worker
  440. - media_repository
  441. - pusher
  442. - user_dir
  443. ### workers:end