Playbooks to a new Lilik
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.

1825 lines
62 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. # Configuration file for Synapse.
  2. #
  3. # This is a YAML file: see [1] for a quick introduction. Note in particular
  4. # that *indentation is important*: all the elements of a list or dictionary
  5. # should have the same indentation.
  6. #
  7. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  8. ## Server ##
  9. # The domain name of the server, with optional explicit port.
  10. # This is used by remote servers to connect to this server,
  11. # e.g. matrix.org, localhost:8080, etc.
  12. # This is also the last part of your UserID.
  13. #
  14. #
  15. # This is set in /etc/matrix-synapse/conf.d/server_name.yaml for Debian installations.
  16. # server_name: "SERVERNAME"
  17. # When running as a daemon, the file to store the pid in
  18. #
  19. pid_file: "/var/run/matrix-synapse.pid"
  20. # The path to the web client which will be served at /_matrix/client/
  21. # if 'webclient' is configured under the 'listeners' configuration.
  22. #
  23. #web_client_location: "/path/to/web/root"
  24. # The public-facing base URL that clients use to access this HS
  25. # (not including _matrix/...). This is the same URL a user would
  26. # enter into the 'custom HS URL' field on their client. If you
  27. # use synapse with a reverse proxy, this should be the URL to reach
  28. # synapse via the proxy.
  29. #
  30. public_baseurl: https://{{ server_fqdn }}/
  31. # Set the soft limit on the number of file descriptors synapse can use
  32. # Zero is used to indicate synapse should set the soft limit to the
  33. # hard limit.
  34. #
  35. #soft_file_limit: 0
  36. # Set to false to disable presence tracking on this homeserver.
  37. #
  38. #use_presence: false
  39. # Whether to require authentication to retrieve profile data (avatars,
  40. # display names) of other users through the client API. Defaults to
  41. # 'false'. Note that profile data is also available via the federation
  42. # API, so this setting is of limited value if federation is enabled on
  43. # the server.
  44. #
  45. #require_auth_for_profile_requests: true
  46. # Uncomment to require a user to share a room with another user in order
  47. # to retrieve their profile information. Only checked on Client-Server
  48. # requests. Profile requests from other servers should be checked by the
  49. # requesting server. Defaults to 'false'.
  50. #
  51. #limit_profile_requests_to_users_who_share_rooms: true
  52. # If set to 'true', removes the need for authentication to access the server's
  53. # public rooms directory through the client API, meaning that anyone can
  54. # query the room directory. Defaults to 'false'.
  55. #
  56. #allow_public_rooms_without_auth: true
  57. # If set to 'true', allows any other homeserver to fetch the server's public
  58. # rooms directory via federation. Defaults to 'false'.
  59. #
  60. #allow_public_rooms_over_federation: true
  61. # The default room version for newly created rooms.
  62. #
  63. # Known room versions are listed here:
  64. # https://matrix.org/docs/spec/#complete-list-of-room-versions
  65. #
  66. # For example, for room version 1, default_room_version should be set
  67. # to "1".
  68. #
  69. #default_room_version: "5"
  70. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  71. #
  72. #gc_thresholds: [700, 10, 10]
  73. # Set the limit on the returned events in the timeline in the get
  74. # and sync operations. The default value is -1, means no upper limit.
  75. #
  76. #filter_timeline_limit: 5000
  77. # Whether room invites to users on this server should be blocked
  78. # (except those sent by local server admins). The default is False.
  79. #
  80. #block_non_admin_invites: true
  81. # Room searching
  82. #
  83. # If disabled, new messages will not be indexed for searching and users
  84. # will receive errors when searching for messages. Defaults to enabled.
  85. #
  86. #enable_search: false
  87. # Restrict federation to the following whitelist of domains.
  88. # N.B. we recommend also firewalling your federation listener to limit
  89. # inbound federation traffic as early as possible, rather than relying
  90. # purely on this application-layer restriction. If not specified, the
  91. # default is to whitelist everything.
  92. #
  93. #federation_domain_whitelist:
  94. # - lon.example.com
  95. # - nyc.example.com
  96. # - syd.example.com
  97. # Prevent federation requests from being sent to the following
  98. # blacklist IP address CIDR ranges. If this option is not specified, or
  99. # specified with an empty list, no ip range blacklist will be enforced.
  100. #
  101. # As of Synapse v1.4.0 this option also affects any outbound requests to identity
  102. # servers provided by user input.
  103. #
  104. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  105. # listed here, since they correspond to unroutable addresses.)
  106. #
  107. federation_ip_range_blacklist:
  108. - '127.0.0.0/8'
  109. - '10.0.0.0/8'
  110. - '172.16.0.0/12'
  111. - '192.168.0.0/16'
  112. - '100.64.0.0/10'
  113. - '169.254.0.0/16'
  114. - '::1/128'
  115. - 'fe80::/64'
  116. - 'fc00::/7'
  117. # List of ports that Synapse should listen on, their purpose and their
  118. # configuration.
  119. #
  120. # Options for each listener include:
  121. #
  122. # port: the TCP port to bind to
  123. #
  124. # bind_addresses: a list of local addresses to listen on. The default is
  125. # 'all local interfaces'.
  126. #
  127. # type: the type of listener. Normally 'http', but other valid options are:
  128. # 'manhole' (see docs/manhole.md),
  129. # 'metrics' (see docs/metrics-howto.md),
  130. # 'replication' (see docs/workers.md).
  131. #
  132. # tls: set to true to enable TLS for this listener. Will use the TLS
  133. # key/cert specified in tls_private_key_path / tls_certificate_path.
  134. #
  135. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  136. # X-Forwarded-For header as the client IP. Useful when Synapse is
  137. # behind a reverse-proxy.
  138. #
  139. # resources: Only valid for an 'http' listener. A list of resources to host
  140. # on this port. Options for each resource are:
  141. #
  142. # names: a list of names of HTTP resources. See below for a list of
  143. # valid resource names.
  144. #
  145. # compress: set to true to enable HTTP comression for this resource.
  146. #
  147. # additional_resources: Only valid for an 'http' listener. A map of
  148. # additional endpoints which should be loaded via dynamic modules.
  149. #
  150. # Valid resource names are:
  151. #
  152. # client: the client-server API (/_matrix/client), and the synapse admin
  153. # API (/_synapse/admin). Also implies 'media' and 'static'.
  154. #
  155. # consent: user consent forms (/_matrix/consent). See
  156. # docs/consent_tracking.md.
  157. #
  158. # federation: the server-server API (/_matrix/federation). Also implies
  159. # 'media', 'keys', 'openid'
  160. #
  161. # keys: the key discovery API (/_matrix/keys).
  162. #
  163. # media: the media API (/_matrix/media).
  164. #
  165. # metrics: the metrics interface. See docs/metrics-howto.md.
  166. #
  167. # openid: OpenID authentication.
  168. #
  169. # replication: the HTTP replication API (/_synapse/replication). See
  170. # docs/workers.md.
  171. #
  172. # static: static resources under synapse/static (/_matrix/static). (Mostly
  173. # useful for 'fallback authentication'.)
  174. #
  175. # webclient: A web client. Requires web_client_location to be set.
  176. #
  177. listeners:
  178. # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  179. #
  180. # Disabled by default. To enable it, uncomment the following. (Note that you
  181. # will also need to give Synapse a TLS key and certificate: see the TLS section
  182. # below.)
  183. #
  184. #- port: 8448
  185. # type: http
  186. # tls: true
  187. # resources:
  188. # - names: [client, federation]
  189. # Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
  190. # that unwraps TLS.
  191. #
  192. # If you plan to use a reverse proxy, please see
  193. # https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.md.
  194. #
  195. - port: 8008
  196. tls: false
  197. type: http
  198. x_forwarded: true
  199. bind_addresses: ['::1', '127.0.0.1']
  200. resources:
  201. - names: [client, federation]
  202. compress: false
  203. # example additional_resources:
  204. #
  205. #additional_resources:
  206. # "/_matrix/my/custom/endpoint":
  207. # module: my_module.CustomRequestHandler
  208. # config: {}
  209. # Turn on the twisted ssh manhole service on localhost on the given
  210. # port.
  211. #
  212. #- port: 9000
  213. # bind_addresses: ['::1', '127.0.0.1']
  214. # type: manhole
  215. ## Homeserver blocking ##
  216. # How to reach the server admin, used in ResourceLimitError
  217. #
  218. #admin_contact: 'mailto:admin@server.com'
  219. # Global blocking
  220. #
  221. #hs_disabled: false
  222. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  223. # Monthly Active User Blocking
  224. #
  225. # Used in cases where the admin or server owner wants to limit to the
  226. # number of monthly active users.
  227. #
  228. # 'limit_usage_by_mau' disables/enables monthly active user blocking. When
  229. # anabled and a limit is reached the server returns a 'ResourceLimitError'
  230. # with error type Codes.RESOURCE_LIMIT_EXCEEDED
  231. #
  232. # 'max_mau_value' is the hard limit of monthly active users above which
  233. # the server will start blocking user actions.
  234. #
  235. # 'mau_trial_days' is a means to add a grace period for active users. It
  236. # means that users must be active for this number of days before they
  237. # can be considered active and guards against the case where lots of users
  238. # sign up in a short space of time never to return after their initial
  239. # session.
  240. #
  241. # 'mau_limit_alerting' is a means of limiting client side alerting
  242. # should the mau limit be reached. This is useful for small instances
  243. # where the admin has 5 mau seats (say) for 5 specific people and no
  244. # interest increasing the mau limit further. Defaults to True, which
  245. # means that alerting is enabled
  246. #
  247. #limit_usage_by_mau: false
  248. #max_mau_value: 50
  249. #mau_trial_days: 2
  250. #mau_limit_alerting: false
  251. # If enabled, the metrics for the number of monthly active users will
  252. # be populated, however no one will be limited. If limit_usage_by_mau
  253. # is true, this is implied to be true.
  254. #
  255. #mau_stats_only: false
  256. # Sometimes the server admin will want to ensure certain accounts are
  257. # never blocked by mau checking. These accounts are specified here.
  258. #
  259. #mau_limit_reserved_threepids:
  260. # - medium: 'email'
  261. # address: 'reserved_user@example.com'
  262. # Used by phonehome stats to group together related servers.
  263. #server_context: context
  264. # Resource-constrained homeserver Settings
  265. #
  266. # If limit_remote_rooms.enabled is True, the room complexity will be
  267. # checked before a user joins a new remote room. If it is above
  268. # limit_remote_rooms.complexity, it will disallow joining or
  269. # instantly leave.
  270. #
  271. # limit_remote_rooms.complexity_error can be set to customise the text
  272. # displayed to the user when a room above the complexity threshold has
  273. # its join cancelled.
  274. #
  275. # Uncomment the below lines to enable:
  276. #limit_remote_rooms:
  277. # enabled: true
  278. # complexity: 1.0
  279. # complexity_error: "This room is too complex."
  280. # Whether to require a user to be in the room to add an alias to it.
  281. # Defaults to 'true'.
  282. #
  283. #require_membership_for_aliases: false
  284. # Whether to allow per-room membership profiles through the send of membership
  285. # events with profile information that differ from the target's global profile.
  286. # Defaults to 'true'.
  287. #
  288. #allow_per_room_profiles: false
  289. # How long to keep redacted events in unredacted form in the database. After
  290. # this period redacted events get replaced with their redacted form in the DB.
  291. #
  292. # Defaults to `7d`. Set to `null` to disable.
  293. #
  294. #redaction_retention_period: 28d
  295. # How long to track users' last seen time and IPs in the database.
  296. #
  297. # Defaults to `28d`. Set to `null` to disable clearing out of old rows.
  298. #
  299. #user_ips_max_age: 14d
  300. # Message retention policy at the server level.
  301. #
  302. # Room admins and mods can define a retention period for their rooms using the
  303. # 'm.room.retention' state event, and server admins can cap this period by setting
  304. # the 'allowed_lifetime_min' and 'allowed_lifetime_max' config options.
  305. #
  306. # If this feature is enabled, Synapse will regularly look for and purge events
  307. # which are older than the room's maximum retention period. Synapse will also
  308. # filter events received over federation so that events that should have been
  309. # purged are ignored and not stored again.
  310. #
  311. retention:
  312. # The message retention policies feature is disabled by default. Uncomment the
  313. # following line to enable it.
  314. #
  315. #enabled: true
  316. # Default retention policy. If set, Synapse will apply it to rooms that lack the
  317. # 'm.room.retention' state event. Currently, the value of 'min_lifetime' doesn't
  318. # matter much because Synapse doesn't take it into account yet.
  319. #
  320. #default_policy:
  321. # min_lifetime: 1d
  322. # max_lifetime: 1y
  323. # Retention policy limits. If set, a user won't be able to send a
  324. # 'm.room.retention' event which features a 'min_lifetime' or a 'max_lifetime'
  325. # that's not within this range. This is especially useful in closed federations,
  326. # in which server admins can make sure every federating server applies the same
  327. # rules.
  328. #
  329. #allowed_lifetime_min: 1d
  330. #allowed_lifetime_max: 1y
  331. # Server admins can define the settings of the background jobs purging the
  332. # events which lifetime has expired under the 'purge_jobs' section.
  333. #
  334. # If no configuration is provided, a single job will be set up to delete expired
  335. # events in every room daily.
  336. #
  337. # Each job's configuration defines which range of message lifetimes the job
  338. # takes care of. For example, if 'shortest_max_lifetime' is '2d' and
  339. # 'longest_max_lifetime' is '3d', the job will handle purging expired events in
  340. # rooms whose state defines a 'max_lifetime' that's both higher than 2 days, and
  341. # lower than or equal to 3 days. Both the minimum and the maximum value of a
  342. # range are optional, e.g. a job with no 'shortest_max_lifetime' and a
  343. # 'longest_max_lifetime' of '3d' will handle every room with a retention policy
  344. # which 'max_lifetime' is lower than or equal to three days.
  345. #
  346. # The rationale for this per-job configuration is that some rooms might have a
  347. # retention policy with a low 'max_lifetime', where history needs to be purged
  348. # of outdated messages on a more frequent basis than for the rest of the rooms
  349. # (e.g. every 12h), but not want that purge to be performed by a job that's
  350. # iterating over every room it knows, which could be heavy on the server.
  351. #
  352. #purge_jobs:
  353. # - shortest_max_lifetime: 1d
  354. # longest_max_lifetime: 3d
  355. # interval: 12h
  356. # - shortest_max_lifetime: 3d
  357. # longest_max_lifetime: 1y
  358. # interval: 1d
  359. ## TLS ##
  360. # PEM-encoded X509 certificate for TLS.
  361. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  362. # certificate, signed by a recognised Certificate Authority.
  363. #
  364. # See 'ACME support' below to enable auto-provisioning this certificate via
  365. # Let's Encrypt.
  366. #
  367. # If supplying your own, be sure to use a `.pem` file that includes the
  368. # full certificate chain including any intermediate certificates (for
  369. # instance, if using certbot, use `fullchain.pem` as your certificate,
  370. # not `cert.pem`).
  371. #
  372. #tls_certificate_path: "/etc/matrix-synapse/SERVERNAME.tls.crt"
  373. # PEM-encoded private key for TLS
  374. #
  375. #tls_private_key_path: "/etc/matrix-synapse/SERVERNAME.tls.key"
  376. # Whether to verify TLS server certificates for outbound federation requests.
  377. #
  378. # Defaults to `true`. To disable certificate verification, uncomment the
  379. # following line.
  380. #
  381. #federation_verify_certificates: false
  382. # The minimum TLS version that will be used for outbound federation requests.
  383. #
  384. # Defaults to `1`. Configurable to `1`, `1.1`, `1.2`, or `1.3`. Note
  385. # that setting this value higher than `1.2` will prevent federation to most
  386. # of the public Matrix network: only configure it to `1.3` if you have an
  387. # entirely private federation setup and you can ensure TLS 1.3 support.
  388. #
  389. #federation_client_minimum_tls_version: 1.2
  390. # Skip federation certificate verification on the following whitelist
  391. # of domains.
  392. #
  393. # This setting should only be used in very specific cases, such as
  394. # federation over Tor hidden services and similar. For private networks
  395. # of homeservers, you likely want to use a private CA instead.
  396. #
  397. # Only effective if federation_verify_certicates is `true`.
  398. #
  399. #federation_certificate_verification_whitelist:
  400. # - lon.example.com
  401. # - *.domain.com
  402. # - *.onion
  403. # List of custom certificate authorities for federation traffic.
  404. #
  405. # This setting should only normally be used within a private network of
  406. # homeservers.
  407. #
  408. # Note that this list will replace those that are provided by your
  409. # operating environment. Certificates must be in PEM format.
  410. #
  411. #federation_custom_ca_list:
  412. # - myCA1.pem
  413. # - myCA2.pem
  414. # - myCA3.pem
  415. # ACME support: This will configure Synapse to request a valid TLS certificate
  416. # for your configured `server_name` via Let's Encrypt.
  417. #
  418. # Note that ACME v1 is now deprecated, and Synapse currently doesn't support
  419. # ACME v2. This means that this feature currently won't work with installs set
  420. # up after November 2019. For more info, and alternative solutions, see
  421. # https://github.com/matrix-org/synapse/blob/master/docs/ACME.md#deprecation-of-acme-v1
  422. #
  423. # Note that provisioning a certificate in this way requires port 80 to be
  424. # routed to Synapse so that it can complete the http-01 ACME challenge.
  425. # By default, if you enable ACME support, Synapse will attempt to listen on
  426. # port 80 for incoming http-01 challenges - however, this will likely fail
  427. # with 'Permission denied' or a similar error.
  428. #
  429. # There are a couple of potential solutions to this:
  430. #
  431. # * If you already have an Apache, Nginx, or similar listening on port 80,
  432. # you can configure Synapse to use an alternate port, and have your web
  433. # server forward the requests. For example, assuming you set 'port: 8009'
  434. # below, on Apache, you would write:
  435. #
  436. # ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  437. #
  438. # * Alternatively, you can use something like `authbind` to give Synapse
  439. # permission to listen on port 80.
  440. #
  441. acme:
  442. # ACME support is disabled by default. Set this to `true` and uncomment
  443. # tls_certificate_path and tls_private_key_path above to enable it.
  444. #
  445. enabled: false
  446. # Endpoint to use to request certificates. If you only want to test,
  447. # use Let's Encrypt's staging url:
  448. # https://acme-staging.api.letsencrypt.org/directory
  449. #
  450. #url: https://acme-v01.api.letsencrypt.org/directory
  451. # Port number to listen on for the HTTP-01 challenge. Change this if
  452. # you are forwarding connections through Apache/Nginx/etc.
  453. #
  454. port: 80
  455. # Local addresses to listen on for incoming connections.
  456. # Again, you may want to change this if you are forwarding connections
  457. # through Apache/Nginx/etc.
  458. #
  459. bind_addresses: ['::', '0.0.0.0']
  460. # How many days remaining on a certificate before it is renewed.
  461. #
  462. reprovision_threshold: 30
  463. # The domain that the certificate should be for. Normally this
  464. # should be the same as your Matrix domain (i.e., 'server_name'), but,
  465. # by putting a file at 'https://<server_name>/.well-known/matrix/server',
  466. # you can delegate incoming traffic to another server. If you do that,
  467. # you should give the target of the delegation here.
  468. #
  469. # For example: if your 'server_name' is 'example.com', but
  470. # 'https://example.com/.well-known/matrix/server' delegates to
  471. # 'matrix.example.com', you should put 'matrix.example.com' here.
  472. #
  473. # If not set, defaults to your 'server_name'.
  474. #
  475. domain: matrix.example.com
  476. # file to use for the account key. This will be generated if it doesn't
  477. # exist.
  478. #
  479. # If unspecified, we will use CONFDIR/client.key.
  480. #
  481. account_key_file: /var/lib/matrix-synapse/acme_account.key
  482. # List of allowed TLS fingerprints for this server to publish along
  483. # with the signing keys for this server. Other matrix servers that
  484. # make HTTPS requests to this server will check that the TLS
  485. # certificates returned by this server match one of the fingerprints.
  486. #
  487. # Synapse automatically adds the fingerprint of its own certificate
  488. # to the list. So if federation traffic is handled directly by synapse
  489. # then no modification to the list is required.
  490. #
  491. # If synapse is run behind a load balancer that handles the TLS then it
  492. # will be necessary to add the fingerprints of the certificates used by
  493. # the loadbalancers to this list if they are different to the one
  494. # synapse is using.
  495. #
  496. # Homeservers are permitted to cache the list of TLS fingerprints
  497. # returned in the key responses up to the "valid_until_ts" returned in
  498. # key. It may be necessary to publish the fingerprints of a new
  499. # certificate and wait until the "valid_until_ts" of the previous key
  500. # responses have passed before deploying it.
  501. #
  502. # You can calculate a fingerprint from a given TLS listener via:
  503. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  504. # openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  505. # or by checking matrix.org/federationtester/api/report?server_name=$host
  506. #
  507. #tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  508. ## Database ##
  509. database:
  510. # The database engine name
  511. #name: "sqlite3"
  512. # Arguments to pass to the engine
  513. #args:
  514. # Path to the database
  515. #database: "/var/lib/matrix-synapse/homeserver.db"
  516. name: "psycopg2"
  517. args:
  518. user: "matrix-synapse"
  519. database: "synapse"
  520. # Number of events to cache in memory.
  521. #
  522. #event_cache_size: 10K
  523. ## Logging ##
  524. # A yaml python logging config file as described by
  525. # https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
  526. #
  527. log_config: "/etc/matrix-synapse/log.yaml"
  528. ## Ratelimiting ##
  529. # Ratelimiting settings for client actions (registration, login, messaging).
  530. #
  531. # Each ratelimiting configuration is made of two parameters:
  532. # - per_second: number of requests a client can send per second.
  533. # - burst_count: number of requests a client can send before being throttled.
  534. #
  535. # Synapse currently uses the following configurations:
  536. # - one for messages that ratelimits sending based on the account the client
  537. # is using
  538. # - one for registration that ratelimits registration requests based on the
  539. # client's IP address.
  540. # - one for login that ratelimits login requests based on the client's IP
  541. # address.
  542. # - one for login that ratelimits login requests based on the account the
  543. # client is attempting to log into.
  544. # - one for login that ratelimits login requests based on the account the
  545. # client is attempting to log into, based on the amount of failed login
  546. # attempts for this account.
  547. # - one for ratelimiting redactions by room admins. If this is not explicitly
  548. # set then it uses the same ratelimiting as per rc_message. This is useful
  549. # to allow room admins to deal with abuse quickly.
  550. #
  551. # The defaults are as shown below.
  552. #
  553. #rc_message:
  554. # per_second: 0.2
  555. # burst_count: 10
  556. #
  557. #rc_registration:
  558. # per_second: 0.17
  559. # burst_count: 3
  560. #
  561. #rc_login:
  562. # address:
  563. # per_second: 0.17
  564. # burst_count: 3
  565. # account:
  566. # per_second: 0.17
  567. # burst_count: 3
  568. # failed_attempts:
  569. # per_second: 0.17
  570. # burst_count: 3
  571. #
  572. #rc_admin_redaction:
  573. # per_second: 1
  574. # burst_count: 50
  575. # Ratelimiting settings for incoming federation
  576. #
  577. # The rc_federation configuration is made up of the following settings:
  578. # - window_size: window size in milliseconds
  579. # - sleep_limit: number of federation requests from a single server in
  580. # a window before the server will delay processing the request.
  581. # - sleep_delay: duration in milliseconds to delay processing events
  582. # from remote servers by if they go over the sleep limit.
  583. # - reject_limit: maximum number of concurrent federation requests
  584. # allowed from a single server
  585. # - concurrent: number of federation requests to concurrently process
  586. # from a single server
  587. #
  588. # The defaults are as shown below.
  589. #
  590. #rc_federation:
  591. # window_size: 1000
  592. # sleep_limit: 10
  593. # sleep_delay: 500
  594. # reject_limit: 50
  595. # concurrent: 3
  596. # Target outgoing federation transaction frequency for sending read-receipts,
  597. # per-room.
  598. #
  599. # If we end up trying to send out more read-receipts, they will get buffered up
  600. # into fewer transactions.
  601. #
  602. #federation_rr_transactions_per_room_per_second: 50
  603. ## Media Store ##
  604. # Enable the media store service in the Synapse master. Uncomment the
  605. # following if you are using a separate media store worker.
  606. #
  607. #enable_media_repo: false
  608. # Directory where uploaded images and attachments are stored.
  609. #
  610. media_store_path: "/var/lib/matrix-synapse/media"
  611. # Media storage providers allow media to be stored in different
  612. # locations.
  613. #
  614. #media_storage_providers:
  615. # - module: file_system
  616. # # Whether to write new local files.
  617. # store_local: false
  618. # # Whether to write new remote media
  619. # store_remote: false
  620. # # Whether to block upload requests waiting for write to this
  621. # # provider to complete
  622. # store_synchronous: false
  623. # config:
  624. # directory: /mnt/some/other/directory
  625. # The largest allowed upload size in bytes
  626. #
  627. #max_upload_size: 10M
  628. # Maximum number of pixels that will be thumbnailed
  629. #
  630. #max_image_pixels: 32M
  631. # Whether to generate new thumbnails on the fly to precisely match
  632. # the resolution requested by the client. If true then whenever
  633. # a new resolution is requested by the client the server will
  634. # generate a new thumbnail. If false the server will pick a thumbnail
  635. # from a precalculated list.
  636. #
  637. #dynamic_thumbnails: false
  638. # List of thumbnails to precalculate when an image is uploaded.
  639. #
  640. #thumbnail_sizes:
  641. # - width: 32
  642. # height: 32
  643. # method: crop
  644. # - width: 96
  645. # height: 96
  646. # method: crop
  647. # - width: 320
  648. # height: 240
  649. # method: scale
  650. # - width: 640
  651. # height: 480
  652. # method: scale
  653. # - width: 800
  654. # height: 600
  655. # method: scale
  656. # Is the preview URL API enabled?
  657. #
  658. # 'false' by default: uncomment the following to enable it (and specify a
  659. # url_preview_ip_range_blacklist blacklist).
  660. #
  661. #url_preview_enabled: true
  662. # List of IP address CIDR ranges that the URL preview spider is denied
  663. # from accessing. There are no defaults: you must explicitly
  664. # specify a list for URL previewing to work. You should specify any
  665. # internal services in your network that you do not want synapse to try
  666. # to connect to, otherwise anyone in any Matrix room could cause your
  667. # synapse to issue arbitrary GET requests to your internal services,
  668. # causing serious security issues.
  669. #
  670. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  671. # listed here, since they correspond to unroutable addresses.)
  672. #
  673. # This must be specified if url_preview_enabled is set. It is recommended that
  674. # you uncomment the following list as a starting point.
  675. #
  676. #url_preview_ip_range_blacklist:
  677. # - '127.0.0.0/8'
  678. # - '10.0.0.0/8'
  679. # - '172.16.0.0/12'
  680. # - '192.168.0.0/16'
  681. # - '100.64.0.0/10'
  682. # - '169.254.0.0/16'
  683. # - '::1/128'
  684. # - 'fe80::/64'
  685. # - 'fc00::/7'
  686. # List of IP address CIDR ranges that the URL preview spider is allowed
  687. # to access even if they are specified in url_preview_ip_range_blacklist.
  688. # This is useful for specifying exceptions to wide-ranging blacklisted
  689. # target IP ranges - e.g. for enabling URL previews for a specific private
  690. # website only visible in your network.
  691. #
  692. #url_preview_ip_range_whitelist:
  693. # - '192.168.1.1'
  694. # Optional list of URL matches that the URL preview spider is
  695. # denied from accessing. You should use url_preview_ip_range_blacklist
  696. # in preference to this, otherwise someone could define a public DNS
  697. # entry that points to a private IP address and circumvent the blacklist.
  698. # This is more useful if you know there is an entire shape of URL that
  699. # you know that will never want synapse to try to spider.
  700. #
  701. # Each list entry is a dictionary of url component attributes as returned
  702. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  703. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  704. # The values of the dictionary are treated as an filename match pattern
  705. # applied to that component of URLs, unless they start with a ^ in which
  706. # case they are treated as a regular expression match. If all the
  707. # specified component matches for a given list item succeed, the URL is
  708. # blacklisted.
  709. #
  710. #url_preview_url_blacklist:
  711. # # blacklist any URL with a username in its URI
  712. # - username: '*'
  713. #
  714. # # blacklist all *.google.com URLs
  715. # - netloc: 'google.com'
  716. # - netloc: '*.google.com'
  717. #
  718. # # blacklist all plain HTTP URLs
  719. # - scheme: 'http'
  720. #
  721. # # blacklist http(s)://www.acme.com/foo
  722. # - netloc: 'www.acme.com'
  723. # path: '/foo'
  724. #
  725. # # blacklist any URL with a literal IPv4 address
  726. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  727. # The largest allowed URL preview spidering size in bytes
  728. #
  729. #max_spider_size: 10M
  730. ## Captcha ##
  731. # See docs/CAPTCHA_SETUP for full details of configuring this.
  732. # This homeserver's ReCAPTCHA public key.
  733. #
  734. #recaptcha_public_key: "YOUR_PUBLIC_KEY"
  735. # This homeserver's ReCAPTCHA private key.
  736. #
  737. #recaptcha_private_key: "YOUR_PRIVATE_KEY"
  738. # Enables ReCaptcha checks when registering, preventing signup
  739. # unless a captcha is answered. Requires a valid ReCaptcha
  740. # public/private key.
  741. #
  742. #enable_registration_captcha: false
  743. # A secret key used to bypass the captcha test entirely.
  744. #
  745. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  746. # The API endpoint to use for verifying m.login.recaptcha responses.
  747. #
  748. #recaptcha_siteverify_api: "https://www.recaptcha.net/recaptcha/api/siteverify"
  749. ## TURN ##
  750. {% if turn_integration %}
  751. # The public URIs of the TURN server to give to clients
  752. #
  753. turn_uris: [ "turn:{{ turn_fqdn }}:{{ turn_port }}?transport=udp", "turn:{{ turn_fqdn }}:{{ turn_port }}?transport=tcp" ]
  754. # The shared secret used to compute passwords for the TURN server
  755. #
  756. turn_shared_secret: "{{ coturn_secret.content | b64decode }}"
  757. # The Username and password if the TURN server needs them and
  758. # does not use a token
  759. #
  760. #turn_username: "TURNSERVER_USERNAME"
  761. #turn_password: "TURNSERVER_PASSWORD"
  762. # How long generated TURN credentials last
  763. #
  764. turn_user_lifetime: 86400000
  765. # Whether guests should be allowed to use the TURN server.
  766. # This defaults to True, otherwise VoIP will be unreliable for guests.
  767. # However, it does introduce a slight security risk as it allows users to
  768. # connect to arbitrary endpoints without having first signed up for a
  769. # valid account (e.g. by passing a CAPTCHA).
  770. #
  771. turn_allow_guests: false
  772. {% endif %}
  773. ## Registration ##
  774. #
  775. # Registration can be rate-limited using the parameters in the "Ratelimiting"
  776. # section of this file.
  777. # Enable registration for new users.
  778. #
  779. #enable_registration: false
  780. # Optional account validity configuration. This allows for accounts to be denied
  781. # any request after a given period.
  782. #
  783. # Once this feature is enabled, Synapse will look for registered users without an
  784. # expiration date at startup and will add one to every account it found using the
  785. # current settings at that time.
  786. # This means that, if a validity period is set, and Synapse is restarted (it will
  787. # then derive an expiration date from the current validity period), and some time
  788. # after that the validity period changes and Synapse is restarted, the users'
  789. # expiration dates won't be updated unless their account is manually renewed. This
  790. # date will be randomly selected within a range [now + period - d ; now + period],
  791. # where d is equal to 10% of the validity period.
  792. #
  793. account_validity:
  794. # The account validity feature is disabled by default. Uncomment the
  795. # following line to enable it.
  796. #
  797. #enabled: true
  798. # The period after which an account is valid after its registration. When
  799. # renewing the account, its validity period will be extended by this amount
  800. # of time. This parameter is required when using the account validity
  801. # feature.
  802. #
  803. #period: 6w
  804. # The amount of time before an account's expiry date at which Synapse will
  805. # send an email to the account's email address with a renewal link. By
  806. # default, no such emails are sent.
  807. #
  808. # If you enable this setting, you will also need to fill out the 'email' and
  809. # 'public_baseurl' configuration sections.
  810. #
  811. #renew_at: 1w
  812. # The subject of the email sent out with the renewal link. '%(app)s' can be
  813. # used as a placeholder for the 'app_name' parameter from the 'email'
  814. # section.
  815. #
  816. # Note that the placeholder must be written '%(app)s', including the
  817. # trailing 's'.
  818. #
  819. # If this is not set, a default value is used.
  820. #
  821. #renew_email_subject: "Renew your %(app)s account"
  822. # Directory in which Synapse will try to find templates for the HTML files to
  823. # serve to the user when trying to renew an account. If not set, default
  824. # templates from within the Synapse package will be used.
  825. #
  826. #template_dir: "res/templates"
  827. # File within 'template_dir' giving the HTML to be displayed to the user after
  828. # they successfully renewed their account. If not set, default text is used.
  829. #
  830. #account_renewed_html_path: "account_renewed.html"
  831. # File within 'template_dir' giving the HTML to be displayed when the user
  832. # tries to renew an account with an invalid renewal token. If not set,
  833. # default text is used.
  834. #
  835. #invalid_token_html_path: "invalid_token.html"
  836. # Time that a user's session remains valid for, after they log in.
  837. #
  838. # Note that this is not currently compatible with guest logins.
  839. #
  840. # Note also that this is calculated at login time: changes are not applied
  841. # retrospectively to users who have already logged in.
  842. #
  843. # By default, this is infinite.
  844. #
  845. #session_lifetime: 24h
  846. # The user must provide all of the below types of 3PID when registering.
  847. #
  848. #registrations_require_3pid:
  849. # - email
  850. # - msisdn
  851. # Explicitly disable asking for MSISDNs from the registration
  852. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  853. #
  854. #disable_msisdn_registration: true
  855. # Mandate that users are only allowed to associate certain formats of
  856. # 3PIDs with accounts on this server.
  857. #
  858. #allowed_local_3pids:
  859. # - medium: email
  860. # pattern: '.*@matrix\.org'
  861. # - medium: email
  862. # pattern: '.*@vector\.im'
  863. # - medium: msisdn
  864. # pattern: '\+44'
  865. # Enable 3PIDs lookup requests to identity servers from this server.
  866. #
  867. #enable_3pid_lookup: true
  868. # If set, allows registration of standard or admin accounts by anyone who
  869. # has the shared secret, even if registration is otherwise disabled.
  870. #
  871. # registration_shared_secret: <PRIVATE STRING>
  872. # Set the number of bcrypt rounds used to generate password hash.
  873. # Larger numbers increase the work factor needed to generate the hash.
  874. # The default number is 12 (which equates to 2^12 rounds).
  875. # N.B. that increasing this will exponentially increase the time required
  876. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  877. #
  878. #bcrypt_rounds: 12
  879. # Allows users to register as guests without a password/email/etc, and
  880. # participate in rooms hosted on this server which have been made
  881. # accessible to anonymous users.
  882. #
  883. #allow_guest_access: false
  884. # The identity server which we suggest that clients should use when users log
  885. # in on this server.
  886. #
  887. # (By default, no suggestion is made, so it is left up to the client.
  888. # This setting is ignored unless public_baseurl is also set.)
  889. #
  890. #default_identity_server: https://matrix.org
  891. # The list of identity servers trusted to verify third party
  892. # identifiers by this server.
  893. #
  894. # Also defines the ID server which will be called when an account is
  895. # deactivated (one will be picked arbitrarily).
  896. #
  897. # Note: This option is deprecated. Since v0.99.4, Synapse has tracked which identity
  898. # server a 3PID has been bound to. For 3PIDs bound before then, Synapse runs a
  899. # background migration script, informing itself that the identity server all of its
  900. # 3PIDs have been bound to is likely one of the below.
  901. #
  902. # As of Synapse v1.4.0, all other functionality of this option has been deprecated, and
  903. # it is now solely used for the purposes of the background migration script, and can be
  904. # removed once it has run.
  905. #trusted_third_party_id_servers:
  906. # - matrix.org
  907. # - vector.im
  908. # Handle threepid (email/phone etc) registration and password resets through a set of
  909. # *trusted* identity servers. Note that this allows the configured identity server to
  910. # reset passwords for accounts!
  911. #
  912. # Be aware that if `email` is not set, and SMTP options have not been
  913. # configured in the email config block, registration and user password resets via
  914. # email will be globally disabled.
  915. #
  916. # Additionally, if `msisdn` is not set, registration and password resets via msisdn
  917. # will be disabled regardless. This is due to Synapse currently not supporting any
  918. # method of sending SMS messages on its own.
  919. #
  920. # To enable using an identity server for operations regarding a particular third-party
  921. # identifier type, set the value to the URL of that identity server as shown in the
  922. # examples below.
  923. #
  924. # Servers handling the these requests must answer the `/requestToken` endpoints defined
  925. # by the Matrix Identity Service API specification:
  926. # https://matrix.org/docs/spec/identity_service/latest
  927. #
  928. # If a delegate is specified, the config option public_baseurl must also be filled out.
  929. #
  930. account_threepid_delegates:
  931. #email: https://example.com # Delegate email sending to example.com
  932. #msisdn: http://localhost:8090 # Delegate SMS sending to this local process
  933. # Users who register on this homeserver will automatically be joined
  934. # to these rooms
  935. #
  936. #auto_join_rooms:
  937. # - "#example:example.com"
  938. # Where auto_join_rooms are specified, setting this flag ensures that the
  939. # the rooms exist by creating them when the first user on the
  940. # homeserver registers.
  941. # Setting to false means that if the rooms are not manually created,
  942. # users cannot be auto-joined since they do not exist.
  943. #
  944. #autocreate_auto_join_rooms: true
  945. ## Metrics ###
  946. # Enable collection and rendering of performance metrics
  947. #
  948. #enable_metrics: false
  949. # Enable sentry integration
  950. # NOTE: While attempts are made to ensure that the logs don't contain
  951. # any sensitive information, this cannot be guaranteed. By enabling
  952. # this option the sentry server may therefore receive sensitive
  953. # information, and it in turn may then diseminate sensitive information
  954. # through insecure notification channels if so configured.
  955. #
  956. #sentry:
  957. # dsn: "..."
  958. # Flags to enable Prometheus metrics which are not suitable to be
  959. # enabled by default, either for performance reasons or limited use.
  960. #
  961. metrics_flags:
  962. # Publish synapse_federation_known_servers, a g auge of the number of
  963. # servers this homeserver knows about, including itself. May cause
  964. # performance problems on large homeservers.
  965. #
  966. #known_servers: true
  967. # Whether or not to report anonymized homeserver usage statistics.
  968. # The endpoint to report the anonymized homeserver usage statistics to.
  969. # Defaults to https://matrix.org/report-usage-stats/push
  970. #
  971. #report_stats_endpoint: https://example.com/report-usage-stats/push
  972. ## API Configuration ##
  973. # A list of event types that will be included in the room_invite_state
  974. #
  975. #room_invite_state_types:
  976. # - "m.room.join_rules"
  977. # - "m.room.canonical_alias"
  978. # - "m.room.avatar"
  979. # - "m.room.encryption"
  980. # - "m.room.name"
  981. # A list of application service config files to use
  982. #
  983. #app_service_config_files:
  984. # - app_service_1.yaml
  985. # - app_service_2.yaml
  986. # Uncomment to enable tracking of application service IP addresses. Implicitly
  987. # enables MAU tracking for application service users.
  988. #
  989. #track_appservice_user_ips: true
  990. # a secret which is used to sign access tokens. If none is specified,
  991. # the registration_shared_secret is used, if one is given; otherwise,
  992. # a secret key is derived from the signing key.
  993. #
  994. # macaroon_secret_key: <PRIVATE STRING>
  995. # a secret which is used to calculate HMACs for form values, to stop
  996. # falsification of values. Must be specified for the User Consent
  997. # forms to work.
  998. #
  999. # form_secret: <PRIVATE STRING>
  1000. ## Signing Keys ##
  1001. # Path to the signing key to sign messages with
  1002. #
  1003. signing_key_path: "/etc/matrix-synapse/homeserver.signing.key"
  1004. # The keys that the server used to sign messages with but won't use
  1005. # to sign new messages.
  1006. #
  1007. old_signing_keys:
  1008. # For each key, `key` should be the base64-encoded public key, and
  1009. # `expired_ts`should be the time (in milliseconds since the unix epoch) that
  1010. # it was last used.
  1011. #
  1012. # It is possible to build an entry from an old signing.key file using the
  1013. # `export_signing_key` script which is provided with synapse.
  1014. #
  1015. # For example:
  1016. #
  1017. #"ed25519:id": { key: "base64string", expired_ts: 123456789123 }
  1018. # How long key response published by this server is valid for.
  1019. # Used to set the valid_until_ts in /key/v2 APIs.
  1020. # Determines how quickly servers will query to check which keys
  1021. # are still valid.
  1022. #
  1023. #key_refresh_interval: 1d
  1024. # The trusted servers to download signing keys from.
  1025. #
  1026. # When we need to fetch a signing key, each server is tried in parallel.
  1027. #
  1028. # Normally, the connection to the key server is validated via TLS certificates.
  1029. # Additional security can be provided by configuring a `verify key`, which
  1030. # will make synapse check that the response is signed by that key.
  1031. #
  1032. # This setting supercedes an older setting named `perspectives`. The old format
  1033. # is still supported for backwards-compatibility, but it is deprecated.
  1034. #
  1035. # 'trusted_key_servers' defaults to matrix.org, but using it will generate a
  1036. # warning on start-up. To suppress this warning, set
  1037. # 'suppress_key_server_warning' to true.
  1038. #
  1039. # Options for each entry in the list include:
  1040. #
  1041. # server_name: the name of the server. required.
  1042. #
  1043. # verify_keys: an optional map from key id to base64-encoded public key.
  1044. # If specified, we will check that the response is signed by at least
  1045. # one of the given keys.
  1046. #
  1047. # accept_keys_insecurely: a boolean. Normally, if `verify_keys` is unset,
  1048. # and federation_verify_certificates is not `true`, synapse will refuse
  1049. # to start, because this would allow anyone who can spoof DNS responses
  1050. # to masquerade as the trusted key server. If you know what you are doing
  1051. # and are sure that your network environment provides a secure connection
  1052. # to the key server, you can set this to `true` to override this
  1053. # behaviour.
  1054. #
  1055. # An example configuration might look like:
  1056. #
  1057. #trusted_key_servers:
  1058. # - server_name: "my_trusted_server.example.com"
  1059. # verify_keys:
  1060. # "ed25519:auto": "abcdefghijklmnopqrstuvwxyzabcdefghijklmopqr"
  1061. # - server_name: "my_other_trusted_server.example.com"
  1062. #
  1063. trusted_key_servers:
  1064. - server_name: "matrix.org"
  1065. # Uncomment the following to disable the warning that is emitted when the
  1066. # trusted_key_servers include 'matrix.org'. See above.
  1067. #
  1068. #suppress_key_server_warning: true
  1069. # The signing keys to use when acting as a trusted key server. If not specified
  1070. # defaults to the server signing key.
  1071. #
  1072. # Can contain multiple keys, one per line.
  1073. #
  1074. #key_server_signing_keys_path: "key_server_signing_keys.key"
  1075. # Enable SAML2 for registration and login. Uses pysaml2.
  1076. #
  1077. # At least one of `sp_config` or `config_path` must be set in this section to
  1078. # enable SAML login.
  1079. #
  1080. # (You will probably also want to set the following options to `false` to
  1081. # disable the regular login/registration flows:
  1082. # * enable_registration
  1083. # * password_config.enabled
  1084. #
  1085. # Once SAML support is enabled, a metadata file will be exposed at
  1086. # https://<server>:<port>/_matrix/saml2/metadata.xml, which you may be able to
  1087. # use to configure your SAML IdP with. Alternatively, you can manually configure
  1088. # the IdP to use an ACS location of
  1089. # https://<server>:<port>/_matrix/saml2/authn_response.
  1090. #
  1091. saml2_config:
  1092. # `sp_config` is the configuration for the pysaml2 Service Provider.
  1093. # See pysaml2 docs for format of config.
  1094. #
  1095. # Default values will be used for the 'entityid' and 'service' settings,
  1096. # so it is not normally necessary to specify them unless you need to
  1097. # override them.
  1098. #
  1099. #sp_config:
  1100. # # point this to the IdP's metadata. You can use either a local file or
  1101. # # (preferably) a URL.
  1102. # metadata:
  1103. # #local: ["saml2/idp.xml"]
  1104. # remote:
  1105. # - url: https://our_idp/metadata.xml
  1106. #
  1107. # # By default, the user has to go to our login page first. If you'd like
  1108. # # to allow IdP-initiated login, set 'allow_unsolicited: true' in a
  1109. # # 'service.sp' section:
  1110. # #
  1111. # #service:
  1112. # # sp:
  1113. # # allow_unsolicited: true
  1114. #
  1115. # # The examples below are just used to generate our metadata xml, and you
  1116. # # may well not need them, depending on your setup. Alternatively you
  1117. # # may need a whole lot more detail - see the pysaml2 docs!
  1118. #
  1119. # description: ["My awesome SP", "en"]
  1120. # name: ["Test SP", "en"]
  1121. #
  1122. # organization:
  1123. # name: Example com
  1124. # display_name:
  1125. # - ["Example co", "en"]
  1126. # url: "http://example.com"
  1127. #
  1128. # contact_person:
  1129. # - given_name: Bob
  1130. # sur_name: "the Sysadmin"
  1131. # email_address": ["admin@example.com"]
  1132. # contact_type": technical
  1133. # Instead of putting the config inline as above, you can specify a
  1134. # separate pysaml2 configuration file:
  1135. #
  1136. #config_path: "/etc/matrix-synapse/sp_conf.py"
  1137. # The lifetime of a SAML session. This defines how long a user has to
  1138. # complete the authentication process, if allow_unsolicited is unset.
  1139. # The default is 5 minutes.
  1140. #
  1141. #saml_session_lifetime: 5m
  1142. # An external module can be provided here as a custom solution to
  1143. # mapping attributes returned from a saml provider onto a matrix user.
  1144. #
  1145. user_mapping_provider:
  1146. # The custom module's class. Uncomment to use a custom module.
  1147. #
  1148. #module: mapping_provider.SamlMappingProvider
  1149. # Custom configuration values for the module. Below options are
  1150. # intended for the built-in provider, they should be changed if
  1151. # using a custom module. This section will be passed as a Python
  1152. # dictionary to the module's `parse_config` method.
  1153. #
  1154. config:
  1155. # The SAML attribute (after mapping via the attribute maps) to use
  1156. # to derive the Matrix ID from. 'uid' by default.
  1157. #
  1158. # Note: This used to be configured by the
  1159. # saml2_config.mxid_source_attribute option. If that is still
  1160. # defined, its value will be used instead.
  1161. #
  1162. #mxid_source_attribute: displayName
  1163. # The mapping system to use for mapping the saml attribute onto a
  1164. # matrix ID.
  1165. #
  1166. # Options include:
  1167. # * 'hexencode' (which maps unpermitted characters to '=xx')
  1168. # * 'dotreplace' (which replaces unpermitted characters with
  1169. # '.').
  1170. # The default is 'hexencode'.
  1171. #
  1172. # Note: This used to be configured by the
  1173. # saml2_config.mxid_mapping option. If that is still defined, its
  1174. # value will be used instead.
  1175. #
  1176. #mxid_mapping: dotreplace
  1177. # In previous versions of synapse, the mapping from SAML attribute to
  1178. # MXID was always calculated dynamically rather than stored in a
  1179. # table. For backwards- compatibility, we will look for user_ids
  1180. # matching such a pattern before creating a new account.
  1181. #
  1182. # This setting controls the SAML attribute which will be used for this
  1183. # backwards-compatibility lookup. Typically it should be 'uid', but if
  1184. # the attribute maps are changed, it may be necessary to change it.
  1185. #
  1186. # The default is 'uid'.
  1187. #
  1188. #grandfathered_mxid_source_attribute: upn
  1189. # Directory in which Synapse will try to find the template files below.
  1190. # If not set, default templates from within the Synapse package will be used.
  1191. #
  1192. # DO NOT UNCOMMENT THIS SETTING unless you want to customise the templates.
  1193. # If you *do* uncomment it, you will need to make sure that all the templates
  1194. # below are in the directory.
  1195. #
  1196. # Synapse will look for the following templates in this directory:
  1197. #
  1198. # * HTML page to display to users if something goes wrong during the
  1199. # authentication process: 'saml_error.html'.
  1200. #
  1201. # This template doesn't currently need any variable to render.
  1202. #
  1203. # You can see the default templates at:
  1204. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1205. #
  1206. #template_dir: "res/templates"
  1207. # Enable CAS for registration and login.
  1208. #
  1209. #cas_config:
  1210. # enabled: true
  1211. # server_url: "https://cas-server.com"
  1212. # service_url: "https://homeserver.domain.com:8448"
  1213. # #displayname_attribute: name
  1214. # #required_attributes:
  1215. # # name: value
  1216. # Additional settings to use with single-sign on systems such as SAML2 and CAS.
  1217. #
  1218. sso:
  1219. # A list of client URLs which are whitelisted so that the user does not
  1220. # have to confirm giving access to their account to the URL. Any client
  1221. # whose URL starts with an entry in the following list will not be subject
  1222. # to an additional confirmation step after the SSO login is completed.
  1223. #
  1224. # WARNING: An entry such as "https://my.client" is insecure, because it
  1225. # will also match "https://my.client.evil.site", exposing your users to
  1226. # phishing attacks from evil.site. To avoid this, include a slash after the
  1227. # hostname: "https://my.client/".
  1228. #
  1229. # By default, this list is empty.
  1230. #
  1231. #client_whitelist:
  1232. # - https://riot.im/develop
  1233. # - https://my.custom.client/
  1234. # Directory in which Synapse will try to find the template files below.
  1235. # If not set, default templates from within the Synapse package will be used.
  1236. #
  1237. # DO NOT UNCOMMENT THIS SETTING unless you want to customise the templates.
  1238. # If you *do* uncomment it, you will need to make sure that all the templates
  1239. # below are in the directory.
  1240. #
  1241. # Synapse will look for the following templates in this directory:
  1242. #
  1243. # * HTML page for a confirmation step before redirecting back to the client
  1244. # with the login token: 'sso_redirect_confirm.html'.
  1245. #
  1246. # When rendering, this template is given three variables:
  1247. # * redirect_url: the URL the user is about to be redirected to. Needs
  1248. # manual escaping (see
  1249. # https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1250. #
  1251. # * display_url: the same as `redirect_url`, but with the query
  1252. # parameters stripped. The intention is to have a
  1253. # human-readable URL to show to users, not to use it as
  1254. # the final address to redirect to. Needs manual escaping
  1255. # (see https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1256. #
  1257. # * server_name: the homeserver's name.
  1258. #
  1259. # You can see the default templates at:
  1260. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1261. #
  1262. #template_dir: "res/templates"
  1263. # The JWT needs to contain a globally unique "sub" (subject) claim.
  1264. #
  1265. #jwt_config:
  1266. # enabled: true
  1267. # secret: "a secret"
  1268. # algorithm: "HS256"
  1269. password_config:
  1270. # Uncomment to disable password login
  1271. #
  1272. #enabled: false
  1273. # Uncomment to disable authentication against the local password
  1274. # database. This is ignored if `enabled` is false, and is only useful
  1275. # if you have other password_providers.
  1276. #
  1277. #localdb_enabled: false
  1278. # Uncomment and change to a secret random string for extra security.
  1279. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  1280. #
  1281. #pepper: "EVEN_MORE_SECRET"
  1282. # Configuration for sending emails from Synapse.
  1283. #
  1284. email:
  1285. # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
  1286. #
  1287. #smtp_host: mail.server
  1288. # The port on the mail server for outgoing SMTP. Defaults to 25.
  1289. #
  1290. #smtp_port: 587
  1291. # Username/password for authentication to the SMTP server. By default, no
  1292. # authentication is attempted.
  1293. #
  1294. # smtp_user: "exampleusername"
  1295. # smtp_pass: "examplepassword"
  1296. # Uncomment the following to require TLS transport security for SMTP.
  1297. # By default, Synapse will connect over plain text, and will then switch to
  1298. # TLS via STARTTLS *if the SMTP server supports it*. If this option is set,
  1299. # Synapse will refuse to connect unless the server supports STARTTLS.
  1300. #
  1301. #require_transport_security: true
  1302. # notif_from defines the "From" address to use when sending emails.
  1303. # It must be set if email sending is enabled.
  1304. #
  1305. # The placeholder '%(app)s' will be replaced by the application name,
  1306. # which is normally 'app_name' (below), but may be overridden by the
  1307. # Matrix client application.
  1308. #
  1309. # Note that the placeholder must be written '%(app)s', including the
  1310. # trailing 's'.
  1311. #
  1312. #notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>"
  1313. # app_name defines the default value for '%(app)s' in notif_from. It
  1314. # defaults to 'Matrix'.
  1315. #
  1316. #app_name: my_branded_matrix_server
  1317. # Uncomment the following to enable sending emails for messages that the user
  1318. # has missed. Disabled by default.
  1319. #
  1320. #enable_notifs: true
  1321. # Uncomment the following to disable automatic subscription to email
  1322. # notifications for new users. Enabled by default.
  1323. #
  1324. #notif_for_new_users: false
  1325. # Custom URL for client links within the email notifications. By default
  1326. # links will be based on "https://matrix.to".
  1327. #
  1328. # (This setting used to be called riot_base_url; the old name is still
  1329. # supported for backwards-compatibility but is now deprecated.)
  1330. #
  1331. #client_base_url: "http://localhost/riot"
  1332. # Configure the time that a validation email will expire after sending.
  1333. # Defaults to 1h.
  1334. #
  1335. #validation_token_lifetime: 15m
  1336. # Directory in which Synapse will try to find the template files below.
  1337. # If not set, default templates from within the Synapse package will be used.
  1338. #
  1339. # DO NOT UNCOMMENT THIS SETTING unless you want to customise the templates.
  1340. # If you *do* uncomment it, you will need to make sure that all the templates
  1341. # below are in the directory.
  1342. #
  1343. # Synapse will look for the following templates in this directory:
  1344. #
  1345. # * The contents of email notifications of missed events: 'notif_mail.html' and
  1346. # 'notif_mail.txt'.
  1347. #
  1348. # * The contents of account expiry notice emails: 'notice_expiry.html' and
  1349. # 'notice_expiry.txt'.
  1350. #
  1351. # * The contents of password reset emails sent by the homeserver:
  1352. # 'password_reset.html' and 'password_reset.txt'
  1353. #
  1354. # * HTML pages for success and failure that a user will see when they follow
  1355. # the link in the password reset email: 'password_reset_success.html' and
  1356. # 'password_reset_failure.html'
  1357. #
  1358. # * The contents of address verification emails sent during registration:
  1359. # 'registration.html' and 'registration.txt'
  1360. #
  1361. # * HTML pages for success and failure that a user will see when they follow
  1362. # the link in an address verification email sent during registration:
  1363. # 'registration_success.html' and 'registration_failure.html'
  1364. #
  1365. # * The contents of address verification emails sent when an address is added
  1366. # to a Matrix account: 'add_threepid.html' and 'add_threepid.txt'
  1367. #
  1368. # * HTML pages for success and failure that a user will see when they follow
  1369. # the link in an address verification email sent when an address is added
  1370. # to a Matrix account: 'add_threepid_success.html' and
  1371. # 'add_threepid_failure.html'
  1372. #
  1373. # You can see the default templates at:
  1374. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1375. #
  1376. #template_dir: "res/templates"
  1377. password_providers:
  1378. - module: "ldap_auth_provider.LdapAuthProvider"
  1379. config:
  1380. enabled: true
  1381. uri: "ldap://{{ ldap_server }}:389"
  1382. start_tls: true
  1383. base: "ou=People,{{ ldap_basedn }}"
  1384. attributes:
  1385. uid: "cn"
  1386. mail: "mail"
  1387. name: "sn"
  1388. bind_dn: "cn={{ ansible_hostname }},ou=Server,{{ ldap_basedn }}"
  1389. bind_password: "{{ new_passwd.passwd }}"
  1390. filter: "(authorizedService=matrix)"
  1391. # Clients requesting push notifications can either have the body of
  1392. # the message sent in the notification poke along with other details
  1393. # like the sender, or just the event ID and room ID (`event_id_only`).
  1394. # If clients choose the former, this option controls whether the
  1395. # notification request includes the content of the event (other details
  1396. # like the sender are still included). For `event_id_only` push, it
  1397. # has no effect.
  1398. #
  1399. # For modern android devices the notification content will still appear
  1400. # because it is loaded by the app. iPhone, however will send a
  1401. # notification saying only that a message arrived and who it came from.
  1402. #
  1403. #push:
  1404. # include_content: true
  1405. #spam_checker:
  1406. # module: "my_custom_project.SuperSpamChecker"
  1407. # config:
  1408. # example_option: 'things'
  1409. # Uncomment to allow non-server-admin users to create groups on this server
  1410. #
  1411. #enable_group_creation: true
  1412. # If enabled, non server admins can only create groups with local parts
  1413. # starting with this prefix
  1414. #
  1415. #group_creation_prefix: "unofficial/"
  1416. # User Directory configuration
  1417. #
  1418. # 'enabled' defines whether users can search the user directory. If
  1419. # false then empty responses are returned to all queries. Defaults to
  1420. # true.
  1421. #
  1422. # 'search_all_users' defines whether to search all users visible to your HS
  1423. # when searching the user directory, rather than limiting to users visible
  1424. # in public rooms. Defaults to false. If you set it True, you'll have to
  1425. # rebuild the user_directory search indexes, see
  1426. # https://github.com/matrix-org/synapse/blob/master/docs/user_directory.md
  1427. #
  1428. #user_directory:
  1429. # enabled: true
  1430. # search_all_users: false
  1431. # User Consent configuration
  1432. #
  1433. # for detailed instructions, see
  1434. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  1435. #
  1436. # Parts of this section are required if enabling the 'consent' resource under
  1437. # 'listeners', in particular 'template_dir' and 'version'.
  1438. #
  1439. # 'template_dir' gives the location of the templates for the HTML forms.
  1440. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  1441. # and each language directory should contain the policy document (named as
  1442. # '<version>.html') and a success page (success.html).
  1443. #
  1444. # 'version' specifies the 'current' version of the policy document. It defines
  1445. # the version to be served by the consent resource if there is no 'v'
  1446. # parameter.
  1447. #
  1448. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  1449. # asking them to consent to the privacy policy. The 'server_notices' section
  1450. # must also be configured for this to work. Notices will *not* be sent to
  1451. # guest users unless 'send_server_notice_to_guests' is set to true.
  1452. #
  1453. # 'block_events_error', if set, will block any attempts to send events
  1454. # until the user consents to the privacy policy. The value of the setting is
  1455. # used as the text of the error.
  1456. #
  1457. # 'require_at_registration', if enabled, will add a step to the registration
  1458. # process, similar to how captcha works. Users will be required to accept the
  1459. # policy before their account is created.
  1460. #
  1461. # 'policy_name' is the display name of the policy users will see when registering
  1462. # for an account. Has no effect unless `require_at_registration` is enabled.
  1463. # Defaults to "Privacy Policy".
  1464. #
  1465. #user_consent:
  1466. # template_dir: res/templates/privacy
  1467. # version: 1.0
  1468. # server_notice_content:
  1469. # msgtype: m.text
  1470. # body: >-
  1471. # To continue using this homeserver you must review and agree to the
  1472. # terms and conditions at %(consent_uri)s
  1473. # send_server_notice_to_guests: true
  1474. # block_events_error: >-
  1475. # To continue using this homeserver you must review and agree to the
  1476. # terms and conditions at %(consent_uri)s
  1477. # require_at_registration: false
  1478. # policy_name: Privacy Policy
  1479. #
  1480. # Local statistics collection. Used in populating the room directory.
  1481. #
  1482. # 'bucket_size' controls how large each statistics timeslice is. It can
  1483. # be defined in a human readable short form -- e.g. "1d", "1y".
  1484. #
  1485. # 'retention' controls how long historical statistics will be kept for.
  1486. # It can be defined in a human readable short form -- e.g. "1d", "1y".
  1487. #
  1488. #
  1489. #stats:
  1490. # enabled: true
  1491. # bucket_size: 1d
  1492. # retention: 1y
  1493. # Server Notices room configuration
  1494. #
  1495. # Uncomment this section to enable a room which can be used to send notices
  1496. # from the server to users. It is a special room which cannot be left; notices
  1497. # come from a special "notices" user id.
  1498. #
  1499. # If you uncomment this section, you *must* define the system_mxid_localpart
  1500. # setting, which defines the id of the user which will be used to send the
  1501. # notices.
  1502. #
  1503. # It's also possible to override the room name, the display name of the
  1504. # "notices" user, and the avatar for the user.
  1505. #
  1506. #server_notices:
  1507. # system_mxid_localpart: notices
  1508. # system_mxid_display_name: "Server Notices"
  1509. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  1510. # room_name: "Server Notices"
  1511. # Uncomment to disable searching the public room list. When disabled
  1512. # blocks searching local and remote room lists for local and remote
  1513. # users by always returning an empty list for all queries.
  1514. #
  1515. #enable_room_list_search: false
  1516. # The `alias_creation` option controls who's allowed to create aliases
  1517. # on this server.
  1518. #
  1519. # The format of this option is a list of rules that contain globs that
  1520. # match against user_id, room_id and the new alias (fully qualified with
  1521. # server name). The action in the first rule that matches is taken,
  1522. # which can currently either be "allow" or "deny".
  1523. #
  1524. # Missing user_id/room_id/alias fields default to "*".
  1525. #
  1526. # If no rules match the request is denied. An empty list means no one
  1527. # can create aliases.
  1528. #
  1529. # Options for the rules include:
  1530. #
  1531. # user_id: Matches against the creator of the alias
  1532. # alias: Matches against the alias being created
  1533. # room_id: Matches against the room ID the alias is being pointed at
  1534. # action: Whether to "allow" or "deny" the request if the rule matches
  1535. #
  1536. # The default is:
  1537. #
  1538. #alias_creation_rules:
  1539. # - user_id: "*"
  1540. # alias: "*"
  1541. # room_id: "*"
  1542. # action: allow
  1543. # The `room_list_publication_rules` option controls who can publish and
  1544. # which rooms can be published in the public room list.
  1545. #
  1546. # The format of this option is the same as that for
  1547. # `alias_creation_rules`.
  1548. #
  1549. # If the room has one or more aliases associated with it, only one of
  1550. # the aliases needs to match the alias rule. If there are no aliases
  1551. # then only rules with `alias: *` match.
  1552. #
  1553. # If no rules match the request is denied. An empty list means no one
  1554. # can publish rooms.
  1555. #
  1556. # Options for the rules include:
  1557. #
  1558. # user_id: Matches agaisnt the creator of the alias
  1559. # room_id: Matches against the room ID being published
  1560. # alias: Matches against any current local or canonical aliases
  1561. # associated with the room
  1562. # action: Whether to "allow" or "deny" the request if the rule matches
  1563. #
  1564. # The default is:
  1565. #
  1566. #room_list_publication_rules:
  1567. # - user_id: "*"
  1568. # alias: "*"
  1569. # room_id: "*"
  1570. # action: allow
  1571. # Server admins can define a Python module that implements extra rules for
  1572. # allowing or denying incoming events. In order to work, this module needs to
  1573. # override the methods defined in synapse/events/third_party_rules.py.
  1574. #
  1575. # This feature is designed to be used in closed federations only, where each
  1576. # participating server enforces the same rules.
  1577. #
  1578. #third_party_event_rules:
  1579. # module: "my_custom_project.SuperRulesSet"
  1580. # config:
  1581. # example_option: 'things'
  1582. ## Opentracing ##
  1583. # These settings enable opentracing, which implements distributed tracing.
  1584. # This allows you to observe the causal chains of events across servers
  1585. # including requests, key lookups etc., across any server running
  1586. # synapse or any other other services which supports opentracing
  1587. # (specifically those implemented with Jaeger).
  1588. #
  1589. opentracing:
  1590. # tracing is disabled by default. Uncomment the following line to enable it.
  1591. #
  1592. #enabled: true
  1593. # The list of homeservers we wish to send and receive span contexts and span baggage.
  1594. # See docs/opentracing.rst
  1595. # This is a list of regexes which are matched against the server_name of the
  1596. # homeserver.
  1597. #
  1598. # By defult, it is empty, so no servers are matched.
  1599. #
  1600. #homeserver_whitelist:
  1601. # - ".*"
  1602. # Jaeger can be configured to sample traces at different rates.
  1603. # All configuration options provided by Jaeger can be set here.
  1604. # Jaeger's configuration mostly related to trace sampling which
  1605. # is documented here:
  1606. # https://www.jaegertracing.io/docs/1.13/sampling/.
  1607. #
  1608. #jaeger_config:
  1609. # sampler:
  1610. # type: const
  1611. # param: 1
  1612. # Logging whether spans were started and reported
  1613. #
  1614. # logging:
  1615. # false