| giolekva | 56c1569 | 2021-10-20 11:44:54 +0400 | [diff] [blame] | 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 | |
| 9 | |
| 10 | ## Modules ## |
| 11 | |
| 12 | # Server admins can expand Synapse's functionality with external modules. |
| 13 | # |
| 14 | # See https://matrix-org.github.io/synapse/latest/modules.html for more |
| 15 | # documentation on how to configure or create custom modules for Synapse. |
| 16 | # |
| 17 | modules: |
| 18 | # - module: my_super_module.MySuperClass |
| 19 | # config: |
| 20 | # do_thing: true |
| 21 | # - module: my_other_super_module.SomeClass |
| 22 | # config: {} |
| 23 | |
| 24 | |
| 25 | ## Server ## |
| 26 | |
| 27 | # The public-facing domain of the server |
| 28 | # |
| 29 | # The server_name name will appear at the end of usernames and room addresses |
| 30 | # created on this server. For example if the server_name was example.com, |
| 31 | # usernames on this server would be in the format @user:example.com |
| 32 | # |
| 33 | # In most cases you should avoid using a matrix specific subdomain such as |
| 34 | # matrix.example.com or synapse.example.com as the server_name for the same |
| 35 | # reasons you wouldn't use user@email.example.com as your email address. |
| 36 | # See https://matrix-org.github.io/synapse/latest/delegate.html |
| 37 | # for information on how to host Synapse on a subdomain while preserving |
| 38 | # a clean server_name. |
| 39 | # |
| 40 | # The server_name cannot be changed later so it is important to |
| 41 | # configure this correctly before you start Synapse. It should be all |
| 42 | # lowercase and may contain an explicit port. |
| 43 | # Examples: matrix.org, localhost:8080 |
| 44 | # |
| 45 | server_name: "lekva.me" |
| 46 | |
| 47 | # When running as a daemon, the file to store the pid in |
| 48 | # |
| 49 | pid_file: /data/homeserver.pid |
| 50 | |
| 51 | # The absolute URL to the web client which /_matrix/client will redirect |
| 52 | # to if 'webclient' is configured under the 'listeners' configuration. |
| 53 | # |
| 54 | # This option can be also set to the filesystem path to the web client |
| 55 | # which will be served at /_matrix/client/ if 'webclient' is configured |
| 56 | # under the 'listeners' configuration, however this is a security risk: |
| 57 | # https://github.com/matrix-org/synapse#security-note |
| 58 | # |
| 59 | #web_client_location: https://riot.example.com/ |
| 60 | |
| 61 | # The public-facing base URL that clients use to access this Homeserver (not |
| 62 | # including _matrix/...). This is the same URL a user might enter into the |
| 63 | # 'Custom Homeserver URL' field on their client. If you use Synapse with a |
| 64 | # reverse proxy, this should be the URL to reach Synapse via the proxy. |
| 65 | # Otherwise, it should be the URL to reach Synapse's client HTTP listener (see |
| 66 | # 'listeners' below). |
| 67 | # |
| 68 | public_baseurl: https://matrix.lekva.me |
| 69 | |
| 70 | # Set the soft limit on the number of file descriptors synapse can use |
| 71 | # Zero is used to indicate synapse should set the soft limit to the |
| 72 | # hard limit. |
| 73 | # |
| 74 | #soft_file_limit: 0 |
| 75 | |
| 76 | # Presence tracking allows users to see the state (e.g online/offline) |
| 77 | # of other local and remote users. |
| 78 | # |
| 79 | presence: |
| 80 | # Uncomment to disable presence tracking on this homeserver. This option |
| 81 | # replaces the previous top-level 'use_presence' option. |
| 82 | # |
| 83 | #enabled: false |
| 84 | |
| 85 | # Whether to require authentication to retrieve profile data (avatars, |
| 86 | # display names) of other users through the client API. Defaults to |
| 87 | # 'false'. Note that profile data is also available via the federation |
| 88 | # API, unless allow_profile_lookup_over_federation is set to false. |
| 89 | # |
| 90 | #require_auth_for_profile_requests: true |
| 91 | |
| 92 | # Uncomment to require a user to share a room with another user in order |
| 93 | # to retrieve their profile information. Only checked on Client-Server |
| 94 | # requests. Profile requests from other servers should be checked by the |
| 95 | # requesting server. Defaults to 'false'. |
| 96 | # |
| 97 | #limit_profile_requests_to_users_who_share_rooms: true |
| 98 | |
| 99 | # Uncomment to prevent a user's profile data from being retrieved and |
| 100 | # displayed in a room until they have joined it. By default, a user's |
| 101 | # profile data is included in an invite event, regardless of the values |
| 102 | # of the above two settings, and whether or not the users share a server. |
| 103 | # Defaults to 'true'. |
| 104 | # |
| 105 | #include_profile_data_on_invite: false |
| 106 | |
| 107 | # If set to 'true', removes the need for authentication to access the server's |
| 108 | # public rooms directory through the client API, meaning that anyone can |
| 109 | # query the room directory. Defaults to 'false'. |
| 110 | # |
| 111 | #allow_public_rooms_without_auth: true |
| 112 | |
| 113 | # If set to 'true', allows any other homeserver to fetch the server's public |
| 114 | # rooms directory via federation. Defaults to 'false'. |
| 115 | # |
| 116 | #allow_public_rooms_over_federation: true |
| 117 | |
| 118 | # The default room version for newly created rooms. |
| 119 | # |
| 120 | # Known room versions are listed here: |
| 121 | # https://matrix.org/docs/spec/#complete-list-of-room-versions |
| 122 | # |
| 123 | # For example, for room version 1, default_room_version should be set |
| 124 | # to "1". |
| 125 | # |
| 126 | #default_room_version: "6" |
| 127 | |
| 128 | # The GC threshold parameters to pass to `gc.set_threshold`, if defined |
| 129 | # |
| 130 | #gc_thresholds: [700, 10, 10] |
| 131 | |
| 132 | # The minimum time in seconds between each GC for a generation, regardless of |
| 133 | # the GC thresholds. This ensures that we don't do GC too frequently. |
| 134 | # |
| 135 | # A value of `[1s, 10s, 30s]` indicates that a second must pass between consecutive |
| 136 | # generation 0 GCs, etc. |
| 137 | # |
| 138 | # Defaults to `[1s, 10s, 30s]`. |
| 139 | # |
| 140 | #gc_min_interval: [0.5s, 30s, 1m] |
| 141 | |
| 142 | # Set the limit on the returned events in the timeline in the get |
| 143 | # and sync operations. The default value is 100. -1 means no upper limit. |
| 144 | # |
| 145 | # Uncomment the following to increase the limit to 5000. |
| 146 | # |
| 147 | #filter_timeline_limit: 5000 |
| 148 | |
| 149 | # Whether room invites to users on this server should be blocked |
| 150 | # (except those sent by local server admins). The default is False. |
| 151 | # |
| 152 | #block_non_admin_invites: true |
| 153 | |
| 154 | # Room searching |
| 155 | # |
| 156 | # If disabled, new messages will not be indexed for searching and users |
| 157 | # will receive errors when searching for messages. Defaults to enabled. |
| 158 | # |
| 159 | #enable_search: false |
| 160 | |
| 161 | # Prevent outgoing requests from being sent to the following blacklisted IP address |
| 162 | # CIDR ranges. If this option is not specified then it defaults to private IP |
| 163 | # address ranges (see the example below). |
| 164 | # |
| 165 | # The blacklist applies to the outbound requests for federation, identity servers, |
| 166 | # push servers, and for checking key validity for third-party invite events. |
| 167 | # |
| 168 | # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly |
| 169 | # listed here, since they correspond to unroutable addresses.) |
| 170 | # |
| 171 | # This option replaces federation_ip_range_blacklist in Synapse v1.25.0. |
| 172 | # |
| 173 | # Note: The value is ignored when an HTTP proxy is in use |
| 174 | # |
| 175 | #ip_range_blacklist: |
| 176 | # - '127.0.0.0/8' |
| 177 | # - '10.0.0.0/8' |
| 178 | # - '172.16.0.0/12' |
| 179 | # - '192.168.0.0/16' |
| 180 | # - '100.64.0.0/10' |
| 181 | # - '192.0.0.0/24' |
| 182 | # - '169.254.0.0/16' |
| 183 | # - '192.88.99.0/24' |
| 184 | # - '198.18.0.0/15' |
| 185 | # - '192.0.2.0/24' |
| 186 | # - '198.51.100.0/24' |
| 187 | # - '203.0.113.0/24' |
| 188 | # - '224.0.0.0/4' |
| 189 | # - '::1/128' |
| 190 | # - 'fe80::/10' |
| 191 | # - 'fc00::/7' |
| 192 | # - '2001:db8::/32' |
| 193 | # - 'ff00::/8' |
| 194 | # - 'fec0::/10' |
| 195 | |
| 196 | # List of IP address CIDR ranges that should be allowed for federation, |
| 197 | # identity servers, push servers, and for checking key validity for |
| 198 | # third-party invite events. This is useful for specifying exceptions to |
| 199 | # wide-ranging blacklisted target IP ranges - e.g. for communication with |
| 200 | # a push server only visible in your network. |
| 201 | # |
| 202 | # This whitelist overrides ip_range_blacklist and defaults to an empty |
| 203 | # list. |
| 204 | # |
| 205 | #ip_range_whitelist: |
| 206 | # - '192.168.1.1' |
| 207 | |
| 208 | # List of ports that Synapse should listen on, their purpose and their |
| 209 | # configuration. |
| 210 | # |
| 211 | # Options for each listener include: |
| 212 | # |
| 213 | # port: the TCP port to bind to |
| 214 | # |
| 215 | # bind_addresses: a list of local addresses to listen on. The default is |
| 216 | # 'all local interfaces'. |
| 217 | # |
| 218 | # type: the type of listener. Normally 'http', but other valid options are: |
| 219 | # 'manhole' (see https://matrix-org.github.io/synapse/latest/manhole.html), |
| 220 | # 'metrics' (see https://matrix-org.github.io/synapse/latest/metrics-howto.html), |
| 221 | # 'replication' (see https://matrix-org.github.io/synapse/latest/workers.html). |
| 222 | # |
| 223 | # tls: set to true to enable TLS for this listener. Will use the TLS |
| 224 | # key/cert specified in tls_private_key_path / tls_certificate_path. |
| 225 | # |
| 226 | # x_forwarded: Only valid for an 'http' listener. Set to true to use the |
| 227 | # X-Forwarded-For header as the client IP. Useful when Synapse is |
| 228 | # behind a reverse-proxy. |
| 229 | # |
| 230 | # resources: Only valid for an 'http' listener. A list of resources to host |
| 231 | # on this port. Options for each resource are: |
| 232 | # |
| 233 | # names: a list of names of HTTP resources. See below for a list of |
| 234 | # valid resource names. |
| 235 | # |
| 236 | # compress: set to true to enable HTTP compression for this resource. |
| 237 | # |
| 238 | # additional_resources: Only valid for an 'http' listener. A map of |
| 239 | # additional endpoints which should be loaded via dynamic modules. |
| 240 | # |
| 241 | # Valid resource names are: |
| 242 | # |
| 243 | # client: the client-server API (/_matrix/client), and the synapse admin |
| 244 | # API (/_synapse/admin). Also implies 'media' and 'static'. |
| 245 | # |
| 246 | # consent: user consent forms (/_matrix/consent). |
| 247 | # See https://matrix-org.github.io/synapse/latest/consent_tracking.html. |
| 248 | # |
| 249 | # federation: the server-server API (/_matrix/federation). Also implies |
| 250 | # 'media', 'keys', 'openid' |
| 251 | # |
| 252 | # keys: the key discovery API (/_matrix/keys). |
| 253 | # |
| 254 | # media: the media API (/_matrix/media). |
| 255 | # |
| 256 | # metrics: the metrics interface. |
| 257 | # See https://matrix-org.github.io/synapse/latest/metrics-howto.html. |
| 258 | # |
| 259 | # openid: OpenID authentication. |
| 260 | # |
| 261 | # replication: the HTTP replication API (/_synapse/replication). |
| 262 | # See https://matrix-org.github.io/synapse/latest/workers.html. |
| 263 | # |
| 264 | # static: static resources under synapse/static (/_matrix/static). (Mostly |
| 265 | # useful for 'fallback authentication'.) |
| 266 | # |
| 267 | # webclient: A web client. Requires web_client_location to be set. |
| 268 | # |
| 269 | listeners: |
| 270 | # TLS-enabled listener: for when matrix traffic is sent directly to synapse. |
| 271 | # |
| 272 | # Disabled by default. To enable it, uncomment the following. (Note that you |
| 273 | # will also need to give Synapse a TLS key and certificate: see the TLS section |
| 274 | # below.) |
| 275 | # |
| 276 | #- port: 8448 |
| 277 | # type: http |
| 278 | # tls: true |
| 279 | # resources: |
| 280 | # - names: [client, federation] |
| 281 | |
| 282 | # Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy |
| 283 | # that unwraps TLS. |
| 284 | # |
| 285 | # If you plan to use a reverse proxy, please see |
| 286 | # https://matrix-org.github.io/synapse/latest/reverse_proxy.html. |
| 287 | # |
| 288 | - port: 8008 |
| 289 | tls: false |
| 290 | type: http |
| 291 | x_forwarded: true |
| 292 | |
| 293 | resources: |
| 294 | - names: [client, federation] |
| 295 | compress: false |
| 296 | |
| 297 | # example additional_resources: |
| 298 | # |
| 299 | #additional_resources: |
| 300 | # "/_matrix/my/custom/endpoint": |
| 301 | # module: my_module.CustomRequestHandler |
| 302 | # config: {} |
| 303 | |
| 304 | # Turn on the twisted ssh manhole service on localhost on the given |
| 305 | # port. |
| 306 | # |
| 307 | #- port: 9000 |
| 308 | # bind_addresses: ['::1', '127.0.0.1'] |
| 309 | # type: manhole |
| 310 | |
| 311 | # Connection settings for the manhole |
| 312 | # |
| 313 | manhole_settings: |
| 314 | # The username for the manhole. This defaults to 'matrix'. |
| 315 | # |
| 316 | #username: manhole |
| 317 | |
| 318 | # The password for the manhole. This defaults to 'rabbithole'. |
| 319 | # |
| 320 | #password: mypassword |
| 321 | |
| 322 | # The private and public SSH key pair used to encrypt the manhole traffic. |
| 323 | # If these are left unset, then hardcoded and non-secret keys are used, |
| 324 | # which could allow traffic to be intercepted if sent over a public network. |
| 325 | # |
| 326 | #ssh_priv_key_path: /data/id_rsa |
| 327 | #ssh_pub_key_path: /data/id_rsa.pub |
| 328 | |
| 329 | # Forward extremities can build up in a room due to networking delays between |
| 330 | # homeservers. Once this happens in a large room, calculation of the state of |
| 331 | # that room can become quite expensive. To mitigate this, once the number of |
| 332 | # forward extremities reaches a given threshold, Synapse will send an |
| 333 | # org.matrix.dummy_event event, which will reduce the forward extremities |
| 334 | # in the room. |
| 335 | # |
| 336 | # This setting defines the threshold (i.e. number of forward extremities in the |
| 337 | # room) at which dummy events are sent. The default value is 10. |
| 338 | # |
| 339 | #dummy_events_threshold: 5 |
| 340 | |
| 341 | |
| 342 | ## Homeserver blocking ## |
| 343 | |
| 344 | # How to reach the server admin, used in ResourceLimitError |
| 345 | # |
| 346 | #admin_contact: 'mailto:admin@server.com' |
| 347 | |
| 348 | # Global blocking |
| 349 | # |
| 350 | #hs_disabled: false |
| 351 | #hs_disabled_message: 'Human readable reason for why the HS is blocked' |
| 352 | |
| 353 | # Monthly Active User Blocking |
| 354 | # |
| 355 | # Used in cases where the admin or server owner wants to limit to the |
| 356 | # number of monthly active users. |
| 357 | # |
| 358 | # 'limit_usage_by_mau' disables/enables monthly active user blocking. When |
| 359 | # enabled and a limit is reached the server returns a 'ResourceLimitError' |
| 360 | # with error type Codes.RESOURCE_LIMIT_EXCEEDED |
| 361 | # |
| 362 | # 'max_mau_value' is the hard limit of monthly active users above which |
| 363 | # the server will start blocking user actions. |
| 364 | # |
| 365 | # 'mau_trial_days' is a means to add a grace period for active users. It |
| 366 | # means that users must be active for this number of days before they |
| 367 | # can be considered active and guards against the case where lots of users |
| 368 | # sign up in a short space of time never to return after their initial |
| 369 | # session. |
| 370 | # |
| 371 | # 'mau_limit_alerting' is a means of limiting client side alerting |
| 372 | # should the mau limit be reached. This is useful for small instances |
| 373 | # where the admin has 5 mau seats (say) for 5 specific people and no |
| 374 | # interest increasing the mau limit further. Defaults to True, which |
| 375 | # means that alerting is enabled |
| 376 | # |
| 377 | #limit_usage_by_mau: false |
| 378 | #max_mau_value: 50 |
| 379 | #mau_trial_days: 2 |
| 380 | #mau_limit_alerting: false |
| 381 | |
| 382 | # If enabled, the metrics for the number of monthly active users will |
| 383 | # be populated, however no one will be limited. If limit_usage_by_mau |
| 384 | # is true, this is implied to be true. |
| 385 | # |
| 386 | #mau_stats_only: false |
| 387 | |
| 388 | # Sometimes the server admin will want to ensure certain accounts are |
| 389 | # never blocked by mau checking. These accounts are specified here. |
| 390 | # |
| 391 | #mau_limit_reserved_threepids: |
| 392 | # - medium: 'email' |
| 393 | # address: 'reserved_user@example.com' |
| 394 | |
| 395 | # Used by phonehome stats to group together related servers. |
| 396 | #server_context: context |
| 397 | |
| 398 | # Resource-constrained homeserver settings |
| 399 | # |
| 400 | # When this is enabled, the room "complexity" will be checked before a user |
| 401 | # joins a new remote room. If it is above the complexity limit, the server will |
| 402 | # disallow joining, or will instantly leave. |
| 403 | # |
| 404 | # Room complexity is an arbitrary measure based on factors such as the number of |
| 405 | # users in the room. |
| 406 | # |
| 407 | limit_remote_rooms: |
| 408 | # Uncomment to enable room complexity checking. |
| 409 | # |
| 410 | #enabled: true |
| 411 | |
| 412 | # the limit above which rooms cannot be joined. The default is 1.0. |
| 413 | # |
| 414 | #complexity: 0.5 |
| 415 | |
| 416 | # override the error which is returned when the room is too complex. |
| 417 | # |
| 418 | #complexity_error: "This room is too complex." |
| 419 | |
| 420 | # allow server admins to join complex rooms. Default is false. |
| 421 | # |
| 422 | #admins_can_join: true |
| 423 | |
| 424 | # Whether to require a user to be in the room to add an alias to it. |
| 425 | # Defaults to 'true'. |
| 426 | # |
| 427 | #require_membership_for_aliases: false |
| 428 | |
| 429 | # Whether to allow per-room membership profiles through the send of membership |
| 430 | # events with profile information that differ from the target's global profile. |
| 431 | # Defaults to 'true'. |
| 432 | # |
| 433 | #allow_per_room_profiles: false |
| 434 | |
| 435 | # How long to keep redacted events in unredacted form in the database. After |
| 436 | # this period redacted events get replaced with their redacted form in the DB. |
| 437 | # |
| 438 | # Defaults to `7d`. Set to `null` to disable. |
| 439 | # |
| 440 | #redaction_retention_period: 28d |
| 441 | |
| 442 | # How long to track users' last seen time and IPs in the database. |
| 443 | # |
| 444 | # Defaults to `28d`. Set to `null` to disable clearing out of old rows. |
| 445 | # |
| 446 | #user_ips_max_age: 14d |
| 447 | |
| 448 | # Message retention policy at the server level. |
| 449 | # |
| 450 | # Room admins and mods can define a retention period for their rooms using the |
| 451 | # 'm.room.retention' state event, and server admins can cap this period by setting |
| 452 | # the 'allowed_lifetime_min' and 'allowed_lifetime_max' config options. |
| 453 | # |
| 454 | # If this feature is enabled, Synapse will regularly look for and purge events |
| 455 | # which are older than the room's maximum retention period. Synapse will also |
| 456 | # filter events received over federation so that events that should have been |
| 457 | # purged are ignored and not stored again. |
| 458 | # |
| 459 | retention: |
| 460 | # The message retention policies feature is disabled by default. Uncomment the |
| 461 | # following line to enable it. |
| 462 | # |
| 463 | #enabled: true |
| 464 | |
| 465 | # Default retention policy. If set, Synapse will apply it to rooms that lack the |
| 466 | # 'm.room.retention' state event. Currently, the value of 'min_lifetime' doesn't |
| 467 | # matter much because Synapse doesn't take it into account yet. |
| 468 | # |
| 469 | #default_policy: |
| 470 | # min_lifetime: 1d |
| 471 | # max_lifetime: 1y |
| 472 | |
| 473 | # Retention policy limits. If set, and the state of a room contains a |
| 474 | # 'm.room.retention' event in its state which contains a 'min_lifetime' or a |
| 475 | # 'max_lifetime' that's out of these bounds, Synapse will cap the room's policy |
| 476 | # to these limits when running purge jobs. |
| 477 | # |
| 478 | #allowed_lifetime_min: 1d |
| 479 | #allowed_lifetime_max: 1y |
| 480 | |
| 481 | # Server admins can define the settings of the background jobs purging the |
| 482 | # events which lifetime has expired under the 'purge_jobs' section. |
| 483 | # |
| 484 | # If no configuration is provided, a single job will be set up to delete expired |
| 485 | # events in every room daily. |
| 486 | # |
| 487 | # Each job's configuration defines which range of message lifetimes the job |
| 488 | # takes care of. For example, if 'shortest_max_lifetime' is '2d' and |
| 489 | # 'longest_max_lifetime' is '3d', the job will handle purging expired events in |
| 490 | # rooms whose state defines a 'max_lifetime' that's both higher than 2 days, and |
| 491 | # lower than or equal to 3 days. Both the minimum and the maximum value of a |
| 492 | # range are optional, e.g. a job with no 'shortest_max_lifetime' and a |
| 493 | # 'longest_max_lifetime' of '3d' will handle every room with a retention policy |
| 494 | # which 'max_lifetime' is lower than or equal to three days. |
| 495 | # |
| 496 | # The rationale for this per-job configuration is that some rooms might have a |
| 497 | # retention policy with a low 'max_lifetime', where history needs to be purged |
| 498 | # of outdated messages on a more frequent basis than for the rest of the rooms |
| 499 | # (e.g. every 12h), but not want that purge to be performed by a job that's |
| 500 | # iterating over every room it knows, which could be heavy on the server. |
| 501 | # |
| 502 | # If any purge job is configured, it is strongly recommended to have at least |
| 503 | # a single job with neither 'shortest_max_lifetime' nor 'longest_max_lifetime' |
| 504 | # set, or one job without 'shortest_max_lifetime' and one job without |
| 505 | # 'longest_max_lifetime' set. Otherwise some rooms might be ignored, even if |
| 506 | # 'allowed_lifetime_min' and 'allowed_lifetime_max' are set, because capping a |
| 507 | # room's policy to these values is done after the policies are retrieved from |
| 508 | # Synapse's database (which is done using the range specified in a purge job's |
| 509 | # configuration). |
| 510 | # |
| 511 | #purge_jobs: |
| 512 | # - longest_max_lifetime: 3d |
| 513 | # interval: 12h |
| 514 | # - shortest_max_lifetime: 3d |
| 515 | # interval: 1d |
| 516 | |
| 517 | # Inhibits the /requestToken endpoints from returning an error that might leak |
| 518 | # information about whether an e-mail address is in use or not on this |
| 519 | # homeserver. |
| 520 | # Note that for some endpoints the error situation is the e-mail already being |
| 521 | # used, and for others the error is entering the e-mail being unused. |
| 522 | # If this option is enabled, instead of returning an error, these endpoints will |
| 523 | # act as if no error happened and return a fake session ID ('sid') to clients. |
| 524 | # |
| 525 | #request_token_inhibit_3pid_errors: true |
| 526 | |
| 527 | # A list of domains that the domain portion of 'next_link' parameters |
| 528 | # must match. |
| 529 | # |
| 530 | # This parameter is optionally provided by clients while requesting |
| 531 | # validation of an email or phone number, and maps to a link that |
| 532 | # users will be automatically redirected to after validation |
| 533 | # succeeds. Clients can make use this parameter to aid the validation |
| 534 | # process. |
| 535 | # |
| 536 | # The whitelist is applied whether the homeserver or an |
| 537 | # identity server is handling validation. |
| 538 | # |
| 539 | # The default value is no whitelist functionality; all domains are |
| 540 | # allowed. Setting this value to an empty list will instead disallow |
| 541 | # all domains. |
| 542 | # |
| 543 | #next_link_domain_whitelist: ["matrix.org"] |
| 544 | |
| 545 | # Templates to use when generating email or HTML page contents. |
| 546 | # |
| 547 | templates: |
| 548 | # Directory in which Synapse will try to find template files to use to generate |
| 549 | # email or HTML page contents. |
| 550 | # If not set, or a file is not found within the template directory, a default |
| 551 | # template from within the Synapse package will be used. |
| 552 | # |
| 553 | # See https://matrix-org.github.io/synapse/latest/templates.html for more |
| 554 | # information about using custom templates. |
| 555 | # |
| 556 | #custom_template_directory: /path/to/custom/templates/ |
| 557 | |
| 558 | |
| 559 | ## TLS ## |
| 560 | |
| 561 | # PEM-encoded X509 certificate for TLS. |
| 562 | # This certificate, as of Synapse 1.0, will need to be a valid and verifiable |
| 563 | # certificate, signed by a recognised Certificate Authority. |
| 564 | # |
| 565 | # Be sure to use a `.pem` file that includes the full certificate chain including |
| 566 | # any intermediate certificates (for instance, if using certbot, use |
| 567 | # `fullchain.pem` as your certificate, not `cert.pem`). |
| 568 | # |
| 569 | #tls_certificate_path: "/data/lekva.me.tls.crt" |
| 570 | |
| 571 | # PEM-encoded private key for TLS |
| 572 | # |
| 573 | #tls_private_key_path: "/data/lekva.me.tls.key" |
| 574 | |
| 575 | # Whether to verify TLS server certificates for outbound federation requests. |
| 576 | # |
| 577 | # Defaults to `true`. To disable certificate verification, uncomment the |
| 578 | # following line. |
| 579 | # |
| 580 | #federation_verify_certificates: false |
| 581 | |
| 582 | # The minimum TLS version that will be used for outbound federation requests. |
| 583 | # |
| 584 | # Defaults to `1`. Configurable to `1`, `1.1`, `1.2`, or `1.3`. Note |
| 585 | # that setting this value higher than `1.2` will prevent federation to most |
| 586 | # of the public Matrix network: only configure it to `1.3` if you have an |
| 587 | # entirely private federation setup and you can ensure TLS 1.3 support. |
| 588 | # |
| 589 | #federation_client_minimum_tls_version: 1.2 |
| 590 | |
| 591 | # Skip federation certificate verification on the following whitelist |
| 592 | # of domains. |
| 593 | # |
| 594 | # This setting should only be used in very specific cases, such as |
| 595 | # federation over Tor hidden services and similar. For private networks |
| 596 | # of homeservers, you likely want to use a private CA instead. |
| 597 | # |
| 598 | # Only effective if federation_verify_certicates is `true`. |
| 599 | # |
| 600 | #federation_certificate_verification_whitelist: |
| 601 | # - lon.example.com |
| 602 | # - *.domain.com |
| 603 | # - *.onion |
| 604 | |
| 605 | # List of custom certificate authorities for federation traffic. |
| 606 | # |
| 607 | # This setting should only normally be used within a private network of |
| 608 | # homeservers. |
| 609 | # |
| 610 | # Note that this list will replace those that are provided by your |
| 611 | # operating environment. Certificates must be in PEM format. |
| 612 | # |
| 613 | #federation_custom_ca_list: |
| 614 | # - myCA1.pem |
| 615 | # - myCA2.pem |
| 616 | # - myCA3.pem |
| 617 | |
| 618 | |
| 619 | ## Federation ## |
| 620 | |
| 621 | # Restrict federation to the following whitelist of domains. |
| 622 | # N.B. we recommend also firewalling your federation listener to limit |
| 623 | # inbound federation traffic as early as possible, rather than relying |
| 624 | # purely on this application-layer restriction. If not specified, the |
| 625 | # default is to whitelist everything. |
| 626 | # |
| 627 | #federation_domain_whitelist: |
| 628 | # - lon.example.com |
| 629 | # - nyc.example.com |
| 630 | # - syd.example.com |
| 631 | |
| 632 | # Report prometheus metrics on the age of PDUs being sent to and received from |
| 633 | # the following domains. This can be used to give an idea of "delay" on inbound |
| 634 | # and outbound federation, though be aware that any delay can be due to problems |
| 635 | # at either end or with the intermediate network. |
| 636 | # |
| 637 | # By default, no domains are monitored in this way. |
| 638 | # |
| 639 | #federation_metrics_domains: |
| 640 | # - matrix.org |
| 641 | # - example.com |
| 642 | |
| 643 | # Uncomment to disable profile lookup over federation. By default, the |
| 644 | # Federation API allows other homeservers to obtain profile data of any user |
| 645 | # on this homeserver. Defaults to 'true'. |
| 646 | # |
| 647 | #allow_profile_lookup_over_federation: false |
| 648 | |
| 649 | # Uncomment to disable device display name lookup over federation. By default, the |
| 650 | # Federation API allows other homeservers to obtain device display names of any user |
| 651 | # on this homeserver. Defaults to 'true'. |
| 652 | # |
| 653 | #allow_device_name_lookup_over_federation: false |
| 654 | |
| 655 | |
| 656 | ## Caching ## |
| 657 | |
| 658 | # Caching can be configured through the following options. |
| 659 | # |
| 660 | # A cache 'factor' is a multiplier that can be applied to each of |
| 661 | # Synapse's caches in order to increase or decrease the maximum |
| 662 | # number of entries that can be stored. |
| 663 | |
| 664 | # The number of events to cache in memory. Not affected by |
| 665 | # caches.global_factor. |
| 666 | # |
| 667 | #event_cache_size: 10K |
| 668 | |
| 669 | caches: |
| 670 | # Controls the global cache factor, which is the default cache factor |
| 671 | # for all caches if a specific factor for that cache is not otherwise |
| 672 | # set. |
| 673 | # |
| 674 | # This can also be set by the "SYNAPSE_CACHE_FACTOR" environment |
| 675 | # variable. Setting by environment variable takes priority over |
| 676 | # setting through the config file. |
| 677 | # |
| 678 | # Defaults to 0.5, which will half the size of all caches. |
| 679 | # |
| 680 | #global_factor: 1.0 |
| 681 | |
| 682 | # A dictionary of cache name to cache factor for that individual |
| 683 | # cache. Overrides the global cache factor for a given cache. |
| 684 | # |
| 685 | # These can also be set through environment variables comprised |
| 686 | # of "SYNAPSE_CACHE_FACTOR_" + the name of the cache in capital |
| 687 | # letters and underscores. Setting by environment variable |
| 688 | # takes priority over setting through the config file. |
| 689 | # Ex. SYNAPSE_CACHE_FACTOR_GET_USERS_WHO_SHARE_ROOM_WITH_USER=2.0 |
| 690 | # |
| 691 | # Some caches have '*' and other characters that are not |
| 692 | # alphanumeric or underscores. These caches can be named with or |
| 693 | # without the special characters stripped. For example, to specify |
| 694 | # the cache factor for `*stateGroupCache*` via an environment |
| 695 | # variable would be `SYNAPSE_CACHE_FACTOR_STATEGROUPCACHE=2.0`. |
| 696 | # |
| 697 | per_cache_factors: |
| 698 | #get_users_who_share_room_with_user: 2.0 |
| 699 | |
| 700 | # Controls how long an entry can be in a cache without having been |
| 701 | # accessed before being evicted. Defaults to None, which means |
| 702 | # entries are never evicted based on time. |
| 703 | # |
| 704 | #expiry_time: 30m |
| 705 | |
| 706 | # Controls how long the results of a /sync request are cached for after |
| 707 | # a successful response is returned. A higher duration can help clients with |
| 708 | # intermittent connections, at the cost of higher memory usage. |
| 709 | # |
| 710 | # By default, this is zero, which means that sync responses are not cached |
| 711 | # at all. |
| 712 | # |
| 713 | #sync_response_cache_duration: 2m |
| 714 | |
| 715 | |
| 716 | ## Database ## |
| 717 | |
| 718 | # The 'database' setting defines the database that synapse uses to store all of |
| 719 | # its data. |
| 720 | # |
| 721 | # 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or |
| 722 | # 'psycopg2' (for PostgreSQL). |
| 723 | # |
| 724 | # 'txn_limit' gives the maximum number of transactions to run per connection |
| 725 | # before reconnecting. Defaults to 0, which means no limit. |
| 726 | # |
| 727 | # 'args' gives options which are passed through to the database engine, |
| 728 | # except for options starting 'cp_', which are used to configure the Twisted |
| 729 | # connection pool. For a reference to valid arguments, see: |
| 730 | # * for sqlite: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect |
| 731 | # * for postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS |
| 732 | # * for the connection pool: https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__ |
| 733 | # |
| 734 | # |
| 735 | # Example SQLite configuration: |
| 736 | # |
| 737 | #database: |
| 738 | # name: sqlite3 |
| 739 | # args: |
| 740 | # database: /path/to/homeserver.db |
| 741 | # |
| 742 | # |
| 743 | # Example Postgres configuration: |
| 744 | # |
| 745 | #database: |
| 746 | # name: psycopg2 |
| 747 | # txn_limit: 10000 |
| 748 | # args: |
| 749 | # user: synapse_user |
| 750 | # password: secretpassword |
| 751 | # database: synapse |
| 752 | # host: localhost |
| 753 | # port: 5432 |
| 754 | # cp_min: 5 |
| 755 | # cp_max: 10 |
| 756 | # |
| 757 | # For more information on using Synapse with Postgres, |
| 758 | # see https://matrix-org.github.io/synapse/latest/postgres.html. |
| 759 | # |
| 760 | database: |
| 761 | name: sqlite3 |
| 762 | args: |
| 763 | database: /data/homeserver.db |
| 764 | |
| 765 | |
| 766 | ## Logging ## |
| 767 | |
| 768 | # A yaml python logging config file as described by |
| 769 | # https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema |
| 770 | # |
| 771 | log_config: "/data/lekva.me.log.config" |
| 772 | |
| 773 | |
| 774 | ## Ratelimiting ## |
| 775 | |
| 776 | # Ratelimiting settings for client actions (registration, login, messaging). |
| 777 | # |
| 778 | # Each ratelimiting configuration is made of two parameters: |
| 779 | # - per_second: number of requests a client can send per second. |
| 780 | # - burst_count: number of requests a client can send before being throttled. |
| 781 | # |
| 782 | # Synapse currently uses the following configurations: |
| 783 | # - one for messages that ratelimits sending based on the account the client |
| 784 | # is using |
| 785 | # - one for registration that ratelimits registration requests based on the |
| 786 | # client's IP address. |
| 787 | # - one for checking the validity of registration tokens that ratelimits |
| 788 | # requests based on the client's IP address. |
| 789 | # - one for login that ratelimits login requests based on the client's IP |
| 790 | # address. |
| 791 | # - one for login that ratelimits login requests based on the account the |
| 792 | # client is attempting to log into. |
| 793 | # - one for login that ratelimits login requests based on the account the |
| 794 | # client is attempting to log into, based on the amount of failed login |
| 795 | # attempts for this account. |
| 796 | # - one for ratelimiting redactions by room admins. If this is not explicitly |
| 797 | # set then it uses the same ratelimiting as per rc_message. This is useful |
| 798 | # to allow room admins to deal with abuse quickly. |
| 799 | # - two for ratelimiting number of rooms a user can join, "local" for when |
| 800 | # users are joining rooms the server is already in (this is cheap) vs |
| 801 | # "remote" for when users are trying to join rooms not on the server (which |
| 802 | # can be more expensive) |
| 803 | # - one for ratelimiting how often a user or IP can attempt to validate a 3PID. |
| 804 | # - two for ratelimiting how often invites can be sent in a room or to a |
| 805 | # specific user. |
| 806 | # |
| 807 | # The defaults are as shown below. |
| 808 | # |
| 809 | #rc_message: |
| 810 | # per_second: 0.2 |
| 811 | # burst_count: 10 |
| 812 | # |
| 813 | #rc_registration: |
| 814 | # per_second: 0.17 |
| 815 | # burst_count: 3 |
| 816 | # |
| 817 | #rc_registration_token_validity: |
| 818 | # per_second: 0.1 |
| 819 | # burst_count: 5 |
| 820 | # |
| 821 | #rc_login: |
| 822 | # address: |
| 823 | # per_second: 0.17 |
| 824 | # burst_count: 3 |
| 825 | # account: |
| 826 | # per_second: 0.17 |
| 827 | # burst_count: 3 |
| 828 | # failed_attempts: |
| 829 | # per_second: 0.17 |
| 830 | # burst_count: 3 |
| 831 | # |
| 832 | #rc_admin_redaction: |
| 833 | # per_second: 1 |
| 834 | # burst_count: 50 |
| 835 | # |
| 836 | #rc_joins: |
| 837 | # local: |
| 838 | # per_second: 0.1 |
| 839 | # burst_count: 10 |
| 840 | # remote: |
| 841 | # per_second: 0.01 |
| 842 | # burst_count: 10 |
| 843 | # |
| 844 | #rc_3pid_validation: |
| 845 | # per_second: 0.003 |
| 846 | # burst_count: 5 |
| 847 | # |
| 848 | #rc_invites: |
| 849 | # per_room: |
| 850 | # per_second: 0.3 |
| 851 | # burst_count: 10 |
| 852 | # per_user: |
| 853 | # per_second: 0.003 |
| 854 | # burst_count: 5 |
| 855 | |
| 856 | # Ratelimiting settings for incoming federation |
| 857 | # |
| 858 | # The rc_federation configuration is made up of the following settings: |
| 859 | # - window_size: window size in milliseconds |
| 860 | # - sleep_limit: number of federation requests from a single server in |
| 861 | # a window before the server will delay processing the request. |
| 862 | # - sleep_delay: duration in milliseconds to delay processing events |
| 863 | # from remote servers by if they go over the sleep limit. |
| 864 | # - reject_limit: maximum number of concurrent federation requests |
| 865 | # allowed from a single server |
| 866 | # - concurrent: number of federation requests to concurrently process |
| 867 | # from a single server |
| 868 | # |
| 869 | # The defaults are as shown below. |
| 870 | # |
| 871 | #rc_federation: |
| 872 | # window_size: 1000 |
| 873 | # sleep_limit: 10 |
| 874 | # sleep_delay: 500 |
| 875 | # reject_limit: 50 |
| 876 | # concurrent: 3 |
| 877 | |
| 878 | # Target outgoing federation transaction frequency for sending read-receipts, |
| 879 | # per-room. |
| 880 | # |
| 881 | # If we end up trying to send out more read-receipts, they will get buffered up |
| 882 | # into fewer transactions. |
| 883 | # |
| 884 | #federation_rr_transactions_per_room_per_second: 50 |
| 885 | |
| 886 | |
| 887 | |
| 888 | ## Media Store ## |
| 889 | |
| 890 | # Enable the media store service in the Synapse master. Uncomment the |
| 891 | # following if you are using a separate media store worker. |
| 892 | # |
| 893 | #enable_media_repo: false |
| 894 | |
| 895 | # Directory where uploaded images and attachments are stored. |
| 896 | # |
| 897 | media_store_path: "/data/media_store" |
| 898 | |
| 899 | # Media storage providers allow media to be stored in different |
| 900 | # locations. |
| 901 | # |
| 902 | #media_storage_providers: |
| 903 | # - module: file_system |
| 904 | # # Whether to store newly uploaded local files |
| 905 | # store_local: false |
| 906 | # # Whether to store newly downloaded remote files |
| 907 | # store_remote: false |
| 908 | # # Whether to wait for successful storage for local uploads |
| 909 | # store_synchronous: false |
| 910 | # config: |
| 911 | # directory: /mnt/some/other/directory |
| 912 | |
| 913 | # The largest allowed upload size in bytes |
| 914 | # |
| 915 | # If you are using a reverse proxy you may also need to set this value in |
| 916 | # your reverse proxy's config. Notably Nginx has a small max body size by default. |
| 917 | # See https://matrix-org.github.io/synapse/latest/reverse_proxy.html. |
| 918 | # |
| 919 | #max_upload_size: 50M |
| 920 | |
| 921 | # Maximum number of pixels that will be thumbnailed |
| 922 | # |
| 923 | #max_image_pixels: 32M |
| 924 | |
| 925 | # Whether to generate new thumbnails on the fly to precisely match |
| 926 | # the resolution requested by the client. If true then whenever |
| 927 | # a new resolution is requested by the client the server will |
| 928 | # generate a new thumbnail. If false the server will pick a thumbnail |
| 929 | # from a precalculated list. |
| 930 | # |
| 931 | #dynamic_thumbnails: false |
| 932 | |
| 933 | # List of thumbnails to precalculate when an image is uploaded. |
| 934 | # |
| 935 | #thumbnail_sizes: |
| 936 | # - width: 32 |
| 937 | # height: 32 |
| 938 | # method: crop |
| 939 | # - width: 96 |
| 940 | # height: 96 |
| 941 | # method: crop |
| 942 | # - width: 320 |
| 943 | # height: 240 |
| 944 | # method: scale |
| 945 | # - width: 640 |
| 946 | # height: 480 |
| 947 | # method: scale |
| 948 | # - width: 800 |
| 949 | # height: 600 |
| 950 | # method: scale |
| 951 | |
| 952 | # Is the preview URL API enabled? |
| 953 | # |
| 954 | # 'false' by default: uncomment the following to enable it (and specify a |
| 955 | # url_preview_ip_range_blacklist blacklist). |
| 956 | # |
| 957 | #url_preview_enabled: true |
| 958 | |
| 959 | # List of IP address CIDR ranges that the URL preview spider is denied |
| 960 | # from accessing. There are no defaults: you must explicitly |
| 961 | # specify a list for URL previewing to work. You should specify any |
| 962 | # internal services in your network that you do not want synapse to try |
| 963 | # to connect to, otherwise anyone in any Matrix room could cause your |
| 964 | # synapse to issue arbitrary GET requests to your internal services, |
| 965 | # causing serious security issues. |
| 966 | # |
| 967 | # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly |
| 968 | # listed here, since they correspond to unroutable addresses.) |
| 969 | # |
| 970 | # This must be specified if url_preview_enabled is set. It is recommended that |
| 971 | # you uncomment the following list as a starting point. |
| 972 | # |
| 973 | # Note: The value is ignored when an HTTP proxy is in use |
| 974 | # |
| 975 | #url_preview_ip_range_blacklist: |
| 976 | # - '127.0.0.0/8' |
| 977 | # - '10.0.0.0/8' |
| 978 | # - '172.16.0.0/12' |
| 979 | # - '192.168.0.0/16' |
| 980 | # - '100.64.0.0/10' |
| 981 | # - '192.0.0.0/24' |
| 982 | # - '169.254.0.0/16' |
| 983 | # - '192.88.99.0/24' |
| 984 | # - '198.18.0.0/15' |
| 985 | # - '192.0.2.0/24' |
| 986 | # - '198.51.100.0/24' |
| 987 | # - '203.0.113.0/24' |
| 988 | # - '224.0.0.0/4' |
| 989 | # - '::1/128' |
| 990 | # - 'fe80::/10' |
| 991 | # - 'fc00::/7' |
| 992 | # - '2001:db8::/32' |
| 993 | # - 'ff00::/8' |
| 994 | # - 'fec0::/10' |
| 995 | |
| 996 | # List of IP address CIDR ranges that the URL preview spider is allowed |
| 997 | # to access even if they are specified in url_preview_ip_range_blacklist. |
| 998 | # This is useful for specifying exceptions to wide-ranging blacklisted |
| 999 | # target IP ranges - e.g. for enabling URL previews for a specific private |
| 1000 | # website only visible in your network. |
| 1001 | # |
| 1002 | #url_preview_ip_range_whitelist: |
| 1003 | # - '192.168.1.1' |
| 1004 | |
| 1005 | # Optional list of URL matches that the URL preview spider is |
| 1006 | # denied from accessing. You should use url_preview_ip_range_blacklist |
| 1007 | # in preference to this, otherwise someone could define a public DNS |
| 1008 | # entry that points to a private IP address and circumvent the blacklist. |
| 1009 | # This is more useful if you know there is an entire shape of URL that |
| 1010 | # you know that will never want synapse to try to spider. |
| 1011 | # |
| 1012 | # Each list entry is a dictionary of url component attributes as returned |
| 1013 | # by urlparse.urlsplit as applied to the absolute form of the URL. See |
| 1014 | # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit |
| 1015 | # The values of the dictionary are treated as an filename match pattern |
| 1016 | # applied to that component of URLs, unless they start with a ^ in which |
| 1017 | # case they are treated as a regular expression match. If all the |
| 1018 | # specified component matches for a given list item succeed, the URL is |
| 1019 | # blacklisted. |
| 1020 | # |
| 1021 | #url_preview_url_blacklist: |
| 1022 | # # blacklist any URL with a username in its URI |
| 1023 | # - username: '*' |
| 1024 | # |
| 1025 | # # blacklist all *.google.com URLs |
| 1026 | # - netloc: 'google.com' |
| 1027 | # - netloc: '*.google.com' |
| 1028 | # |
| 1029 | # # blacklist all plain HTTP URLs |
| 1030 | # - scheme: 'http' |
| 1031 | # |
| 1032 | # # blacklist http(s)://www.acme.com/foo |
| 1033 | # - netloc: 'www.acme.com' |
| 1034 | # path: '/foo' |
| 1035 | # |
| 1036 | # # blacklist any URL with a literal IPv4 address |
| 1037 | # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' |
| 1038 | |
| 1039 | # The largest allowed URL preview spidering size in bytes |
| 1040 | # |
| 1041 | #max_spider_size: 10M |
| 1042 | |
| 1043 | # A list of values for the Accept-Language HTTP header used when |
| 1044 | # downloading webpages during URL preview generation. This allows |
| 1045 | # Synapse to specify the preferred languages that URL previews should |
| 1046 | # be in when communicating with remote servers. |
| 1047 | # |
| 1048 | # Each value is a IETF language tag; a 2-3 letter identifier for a |
| 1049 | # language, optionally followed by subtags separated by '-', specifying |
| 1050 | # a country or region variant. |
| 1051 | # |
| 1052 | # Multiple values can be provided, and a weight can be added to each by |
| 1053 | # using quality value syntax (;q=). '*' translates to any language. |
| 1054 | # |
| 1055 | # Defaults to "en". |
| 1056 | # |
| 1057 | # Example: |
| 1058 | # |
| 1059 | # url_preview_accept_language: |
| 1060 | # - en-UK |
| 1061 | # - en-US;q=0.9 |
| 1062 | # - fr;q=0.8 |
| 1063 | # - *;q=0.7 |
| 1064 | # |
| 1065 | url_preview_accept_language: |
| 1066 | # - en |
| 1067 | |
| 1068 | |
| 1069 | # oEmbed allows for easier embedding content from a website. It can be |
| 1070 | # used for generating URLs previews of services which support it. |
| 1071 | # |
| 1072 | oembed: |
| 1073 | # A default list of oEmbed providers is included with Synapse. |
| 1074 | # |
| 1075 | # Uncomment the following to disable using these default oEmbed URLs. |
| 1076 | # Defaults to 'false'. |
| 1077 | # |
| 1078 | #disable_default_providers: true |
| 1079 | |
| 1080 | # Additional files with oEmbed configuration (each should be in the |
| 1081 | # form of providers.json). |
| 1082 | # |
| 1083 | # By default, this list is empty (so only the default providers.json |
| 1084 | # is used). |
| 1085 | # |
| 1086 | #additional_providers: |
| 1087 | # - oembed/my_providers.json |
| 1088 | |
| 1089 | |
| 1090 | ## Captcha ## |
| 1091 | # See docs/CAPTCHA_SETUP.md for full details of configuring this. |
| 1092 | |
| 1093 | # This homeserver's ReCAPTCHA public key. Must be specified if |
| 1094 | # enable_registration_captcha is enabled. |
| 1095 | # |
| 1096 | #recaptcha_public_key: "YOUR_PUBLIC_KEY" |
| 1097 | |
| 1098 | # This homeserver's ReCAPTCHA private key. Must be specified if |
| 1099 | # enable_registration_captcha is enabled. |
| 1100 | # |
| 1101 | #recaptcha_private_key: "YOUR_PRIVATE_KEY" |
| 1102 | |
| 1103 | # Uncomment to enable ReCaptcha checks when registering, preventing signup |
| 1104 | # unless a captcha is answered. Requires a valid ReCaptcha |
| 1105 | # public/private key. Defaults to 'false'. |
| 1106 | # |
| 1107 | #enable_registration_captcha: true |
| 1108 | |
| 1109 | # The API endpoint to use for verifying m.login.recaptcha responses. |
| 1110 | # Defaults to "https://www.recaptcha.net/recaptcha/api/siteverify". |
| 1111 | # |
| 1112 | #recaptcha_siteverify_api: "https://my.recaptcha.site" |
| 1113 | |
| 1114 | |
| 1115 | ## TURN ## |
| 1116 | |
| 1117 | # The public URIs of the TURN server to give to clients |
| 1118 | # |
| 1119 | #turn_uris: [] |
| 1120 | |
| 1121 | # The shared secret used to compute passwords for the TURN server |
| 1122 | # |
| 1123 | #turn_shared_secret: "YOUR_SHARED_SECRET" |
| 1124 | |
| 1125 | # The Username and password if the TURN server needs them and |
| 1126 | # does not use a token |
| 1127 | # |
| 1128 | #turn_username: "TURNSERVER_USERNAME" |
| 1129 | #turn_password: "TURNSERVER_PASSWORD" |
| 1130 | |
| 1131 | # How long generated TURN credentials last |
| 1132 | # |
| 1133 | #turn_user_lifetime: 1h |
| 1134 | |
| 1135 | # Whether guests should be allowed to use the TURN server. |
| 1136 | # This defaults to True, otherwise VoIP will be unreliable for guests. |
| 1137 | # However, it does introduce a slight security risk as it allows users to |
| 1138 | # connect to arbitrary endpoints without having first signed up for a |
| 1139 | # valid account (e.g. by passing a CAPTCHA). |
| 1140 | # |
| 1141 | #turn_allow_guests: true |
| 1142 | |
| 1143 | |
| 1144 | ## Registration ## |
| 1145 | # |
| 1146 | # Registration can be rate-limited using the parameters in the "Ratelimiting" |
| 1147 | # section of this file. |
| 1148 | |
| 1149 | # Enable registration for new users. |
| 1150 | # |
| 1151 | enable_registration: false |
| 1152 | |
| 1153 | # Time that a user's session remains valid for, after they log in. |
| 1154 | # |
| 1155 | # Note that this is not currently compatible with guest logins. |
| 1156 | # |
| 1157 | # Note also that this is calculated at login time: changes are not applied |
| 1158 | # retrospectively to users who have already logged in. |
| 1159 | # |
| 1160 | # By default, this is infinite. |
| 1161 | # |
| 1162 | #session_lifetime: 24h |
| 1163 | |
| 1164 | # The user must provide all of the below types of 3PID when registering. |
| 1165 | # |
| 1166 | #registrations_require_3pid: |
| 1167 | # - email |
| 1168 | # - msisdn |
| 1169 | |
| 1170 | # Explicitly disable asking for MSISDNs from the registration |
| 1171 | # flow (overrides registrations_require_3pid if MSISDNs are set as required) |
| 1172 | # |
| 1173 | #disable_msisdn_registration: true |
| 1174 | |
| 1175 | # Mandate that users are only allowed to associate certain formats of |
| 1176 | # 3PIDs with accounts on this server. |
| 1177 | # |
| 1178 | #allowed_local_3pids: |
| 1179 | # - medium: email |
| 1180 | # pattern: '^[^@]+@matrix\.org$' |
| 1181 | # - medium: email |
| 1182 | # pattern: '^[^@]+@vector\.im$' |
| 1183 | # - medium: msisdn |
| 1184 | # pattern: '\+44' |
| 1185 | |
| 1186 | # Enable 3PIDs lookup requests to identity servers from this server. |
| 1187 | # |
| 1188 | #enable_3pid_lookup: true |
| 1189 | |
| 1190 | # Require users to submit a token during registration. |
| 1191 | # Tokens can be managed using the admin API: |
| 1192 | # https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/registration_tokens.html |
| 1193 | # Note that `enable_registration` must be set to `true`. |
| 1194 | # Disabling this option will not delete any tokens previously generated. |
| 1195 | # Defaults to false. Uncomment the following to require tokens: |
| 1196 | # |
| 1197 | #registration_requires_token: true |
| 1198 | |
| 1199 | # If set, allows registration of standard or admin accounts by anyone who |
| 1200 | # has the shared secret, even if registration is otherwise disabled. |
| 1201 | # |
| 1202 | registration_shared_secret: "GEny_DPO:TPeFlsUXyEP.T2KWcCzS~FEfxE3EewqfsGp5vR5Gi" |
| 1203 | |
| 1204 | # Set the number of bcrypt rounds used to generate password hash. |
| 1205 | # Larger numbers increase the work factor needed to generate the hash. |
| 1206 | # The default number is 12 (which equates to 2^12 rounds). |
| 1207 | # N.B. that increasing this will exponentially increase the time required |
| 1208 | # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins. |
| 1209 | # |
| 1210 | #bcrypt_rounds: 12 |
| 1211 | |
| 1212 | # Allows users to register as guests without a password/email/etc, and |
| 1213 | # participate in rooms hosted on this server which have been made |
| 1214 | # accessible to anonymous users. |
| 1215 | # |
| 1216 | #allow_guest_access: false |
| 1217 | |
| 1218 | # The identity server which we suggest that clients should use when users log |
| 1219 | # in on this server. |
| 1220 | # |
| 1221 | # (By default, no suggestion is made, so it is left up to the client. |
| 1222 | # This setting is ignored unless public_baseurl is also set.) |
| 1223 | # |
| 1224 | #default_identity_server: https://matrix.org |
| 1225 | |
| 1226 | # Handle threepid (email/phone etc) registration and password resets through a set of |
| 1227 | # *trusted* identity servers. Note that this allows the configured identity server to |
| 1228 | # reset passwords for accounts! |
| 1229 | # |
| 1230 | # Be aware that if `email` is not set, and SMTP options have not been |
| 1231 | # configured in the email config block, registration and user password resets via |
| 1232 | # email will be globally disabled. |
| 1233 | # |
| 1234 | # Additionally, if `msisdn` is not set, registration and password resets via msisdn |
| 1235 | # will be disabled regardless, and users will not be able to associate an msisdn |
| 1236 | # identifier to their account. This is due to Synapse currently not supporting |
| 1237 | # any method of sending SMS messages on its own. |
| 1238 | # |
| 1239 | # To enable using an identity server for operations regarding a particular third-party |
| 1240 | # identifier type, set the value to the URL of that identity server as shown in the |
| 1241 | # examples below. |
| 1242 | # |
| 1243 | # Servers handling the these requests must answer the `/requestToken` endpoints defined |
| 1244 | # by the Matrix Identity Service API specification: |
| 1245 | # https://matrix.org/docs/spec/identity_service/latest |
| 1246 | # |
| 1247 | # If a delegate is specified, the config option public_baseurl must also be filled out. |
| 1248 | # |
| 1249 | account_threepid_delegates: |
| 1250 | #email: https://example.com # Delegate email sending to example.com |
| 1251 | #msisdn: http://localhost:8090 # Delegate SMS sending to this local process |
| 1252 | |
| 1253 | # Whether users are allowed to change their displayname after it has |
| 1254 | # been initially set. Useful when provisioning users based on the |
| 1255 | # contents of a third-party directory. |
| 1256 | # |
| 1257 | # Does not apply to server administrators. Defaults to 'true' |
| 1258 | # |
| 1259 | #enable_set_displayname: false |
| 1260 | |
| 1261 | # Whether users are allowed to change their avatar after it has been |
| 1262 | # initially set. Useful when provisioning users based on the contents |
| 1263 | # of a third-party directory. |
| 1264 | # |
| 1265 | # Does not apply to server administrators. Defaults to 'true' |
| 1266 | # |
| 1267 | #enable_set_avatar_url: false |
| 1268 | |
| 1269 | # Whether users can change the 3PIDs associated with their accounts |
| 1270 | # (email address and msisdn). |
| 1271 | # |
| 1272 | # Defaults to 'true' |
| 1273 | # |
| 1274 | #enable_3pid_changes: false |
| 1275 | |
| 1276 | # Users who register on this homeserver will automatically be joined |
| 1277 | # to these rooms. |
| 1278 | # |
| 1279 | # By default, any room aliases included in this list will be created |
| 1280 | # as a publicly joinable room when the first user registers for the |
| 1281 | # homeserver. This behaviour can be customised with the settings below. |
| 1282 | # If the room already exists, make certain it is a publicly joinable |
| 1283 | # room. The join rule of the room must be set to 'public'. |
| 1284 | # |
| 1285 | #auto_join_rooms: |
| 1286 | # - "#example:example.com" |
| 1287 | |
| 1288 | # Where auto_join_rooms are specified, setting this flag ensures that the |
| 1289 | # the rooms exist by creating them when the first user on the |
| 1290 | # homeserver registers. |
| 1291 | # |
| 1292 | # By default the auto-created rooms are publicly joinable from any federated |
| 1293 | # server. Use the autocreate_auto_join_rooms_federated and |
| 1294 | # autocreate_auto_join_room_preset settings below to customise this behaviour. |
| 1295 | # |
| 1296 | # Setting to false means that if the rooms are not manually created, |
| 1297 | # users cannot be auto-joined since they do not exist. |
| 1298 | # |
| 1299 | # Defaults to true. Uncomment the following line to disable automatically |
| 1300 | # creating auto-join rooms. |
| 1301 | # |
| 1302 | #autocreate_auto_join_rooms: false |
| 1303 | |
| 1304 | # Whether the auto_join_rooms that are auto-created are available via |
| 1305 | # federation. Only has an effect if autocreate_auto_join_rooms is true. |
| 1306 | # |
| 1307 | # Note that whether a room is federated cannot be modified after |
| 1308 | # creation. |
| 1309 | # |
| 1310 | # Defaults to true: the room will be joinable from other servers. |
| 1311 | # Uncomment the following to prevent users from other homeservers from |
| 1312 | # joining these rooms. |
| 1313 | # |
| 1314 | #autocreate_auto_join_rooms_federated: false |
| 1315 | |
| 1316 | # The room preset to use when auto-creating one of auto_join_rooms. Only has an |
| 1317 | # effect if autocreate_auto_join_rooms is true. |
| 1318 | # |
| 1319 | # This can be one of "public_chat", "private_chat", or "trusted_private_chat". |
| 1320 | # If a value of "private_chat" or "trusted_private_chat" is used then |
| 1321 | # auto_join_mxid_localpart must also be configured. |
| 1322 | # |
| 1323 | # Defaults to "public_chat", meaning that the room is joinable by anyone, including |
| 1324 | # federated servers if autocreate_auto_join_rooms_federated is true (the default). |
| 1325 | # Uncomment the following to require an invitation to join these rooms. |
| 1326 | # |
| 1327 | #autocreate_auto_join_room_preset: private_chat |
| 1328 | |
| 1329 | # The local part of the user id which is used to create auto_join_rooms if |
| 1330 | # autocreate_auto_join_rooms is true. If this is not provided then the |
| 1331 | # initial user account that registers will be used to create the rooms. |
| 1332 | # |
| 1333 | # The user id is also used to invite new users to any auto-join rooms which |
| 1334 | # are set to invite-only. |
| 1335 | # |
| 1336 | # It *must* be configured if autocreate_auto_join_room_preset is set to |
| 1337 | # "private_chat" or "trusted_private_chat". |
| 1338 | # |
| 1339 | # Note that this must be specified in order for new users to be correctly |
| 1340 | # invited to any auto-join rooms which have been set to invite-only (either |
| 1341 | # at the time of creation or subsequently). |
| 1342 | # |
| 1343 | # Note that, if the room already exists, this user must be joined and |
| 1344 | # have the appropriate permissions to invite new members. |
| 1345 | # |
| 1346 | #auto_join_mxid_localpart: system |
| 1347 | |
| 1348 | # When auto_join_rooms is specified, setting this flag to false prevents |
| 1349 | # guest accounts from being automatically joined to the rooms. |
| 1350 | # |
| 1351 | # Defaults to true. |
| 1352 | # |
| 1353 | #auto_join_rooms_for_guests: false |
| 1354 | |
| 1355 | |
| 1356 | ## Metrics ### |
| 1357 | |
| 1358 | # Enable collection and rendering of performance metrics |
| 1359 | # |
| 1360 | #enable_metrics: false |
| 1361 | |
| 1362 | # Enable sentry integration |
| 1363 | # NOTE: While attempts are made to ensure that the logs don't contain |
| 1364 | # any sensitive information, this cannot be guaranteed. By enabling |
| 1365 | # this option the sentry server may therefore receive sensitive |
| 1366 | # information, and it in turn may then diseminate sensitive information |
| 1367 | # through insecure notification channels if so configured. |
| 1368 | # |
| 1369 | #sentry: |
| 1370 | # dsn: "..." |
| 1371 | |
| 1372 | # Flags to enable Prometheus metrics which are not suitable to be |
| 1373 | # enabled by default, either for performance reasons or limited use. |
| 1374 | # |
| 1375 | metrics_flags: |
| 1376 | # Publish synapse_federation_known_servers, a gauge of the number of |
| 1377 | # servers this homeserver knows about, including itself. May cause |
| 1378 | # performance problems on large homeservers. |
| 1379 | # |
| 1380 | #known_servers: true |
| 1381 | |
| 1382 | # Whether or not to report anonymized homeserver usage statistics. |
| 1383 | # |
| 1384 | report_stats: false |
| 1385 | |
| 1386 | # The endpoint to report the anonymized homeserver usage statistics to. |
| 1387 | # Defaults to https://matrix.org/report-usage-stats/push |
| 1388 | # |
| 1389 | #report_stats_endpoint: https://example.com/report-usage-stats/push |
| 1390 | |
| 1391 | |
| 1392 | ## API Configuration ## |
| 1393 | |
| 1394 | # Controls for the state that is shared with users who receive an invite |
| 1395 | # to a room |
| 1396 | # |
| 1397 | room_prejoin_state: |
| 1398 | # By default, the following state event types are shared with users who |
| 1399 | # receive invites to the room: |
| 1400 | # |
| 1401 | # - m.room.join_rules |
| 1402 | # - m.room.canonical_alias |
| 1403 | # - m.room.avatar |
| 1404 | # - m.room.encryption |
| 1405 | # - m.room.name |
| 1406 | # - m.room.create |
| 1407 | # |
| 1408 | # Uncomment the following to disable these defaults (so that only the event |
| 1409 | # types listed in 'additional_event_types' are shared). Defaults to 'false'. |
| 1410 | # |
| 1411 | #disable_default_event_types: true |
| 1412 | |
| 1413 | # Additional state event types to share with users when they are invited |
| 1414 | # to a room. |
| 1415 | # |
| 1416 | # By default, this list is empty (so only the default event types are shared). |
| 1417 | # |
| 1418 | #additional_event_types: |
| 1419 | # - org.example.custom.event.type |
| 1420 | |
| 1421 | |
| 1422 | # A list of application service config files to use |
| 1423 | # |
| 1424 | #app_service_config_files: |
| 1425 | # - app_service_1.yaml |
| 1426 | # - app_service_2.yaml |
| 1427 | |
| 1428 | # Uncomment to enable tracking of application service IP addresses. Implicitly |
| 1429 | # enables MAU tracking for application service users. |
| 1430 | # |
| 1431 | #track_appservice_user_ips: true |
| 1432 | |
| 1433 | |
| 1434 | # a secret which is used to sign access tokens. If none is specified, |
| 1435 | # the registration_shared_secret is used, if one is given; otherwise, |
| 1436 | # a secret key is derived from the signing key. |
| 1437 | # |
| 1438 | macaroon_secret_key: "fZKtQV48EPAGg:k&#K1U-Q-CHY6wyaiY@UpvGwVz-^i+_t,Mcq" |
| 1439 | |
| 1440 | # a secret which is used to calculate HMACs for form values, to stop |
| 1441 | # falsification of values. Must be specified for the User Consent |
| 1442 | # forms to work. |
| 1443 | # |
| 1444 | form_secret: "_o;aphJt@h*.He2y0rmpKt+y_uycKcl7aLfV5wtw9Ro~Bu~SW." |
| 1445 | |
| 1446 | ## Signing Keys ## |
| 1447 | |
| 1448 | # Path to the signing key to sign messages with |
| 1449 | # |
| 1450 | signing_key_path: "/data/lekva.me.signing.key" |
| 1451 | |
| 1452 | # The keys that the server used to sign messages with but won't use |
| 1453 | # to sign new messages. |
| 1454 | # |
| 1455 | old_signing_keys: |
| 1456 | # For each key, `key` should be the base64-encoded public key, and |
| 1457 | # `expired_ts`should be the time (in milliseconds since the unix epoch) that |
| 1458 | # it was last used. |
| 1459 | # |
| 1460 | # It is possible to build an entry from an old signing.key file using the |
| 1461 | # `export_signing_key` script which is provided with synapse. |
| 1462 | # |
| 1463 | # For example: |
| 1464 | # |
| 1465 | #"ed25519:id": { key: "base64string", expired_ts: 123456789123 } |
| 1466 | |
| 1467 | # How long key response published by this server is valid for. |
| 1468 | # Used to set the valid_until_ts in /key/v2 APIs. |
| 1469 | # Determines how quickly servers will query to check which keys |
| 1470 | # are still valid. |
| 1471 | # |
| 1472 | #key_refresh_interval: 1d |
| 1473 | |
| 1474 | # The trusted servers to download signing keys from. |
| 1475 | # |
| 1476 | # When we need to fetch a signing key, each server is tried in parallel. |
| 1477 | # |
| 1478 | # Normally, the connection to the key server is validated via TLS certificates. |
| 1479 | # Additional security can be provided by configuring a `verify key`, which |
| 1480 | # will make synapse check that the response is signed by that key. |
| 1481 | # |
| 1482 | # This setting supercedes an older setting named `perspectives`. The old format |
| 1483 | # is still supported for backwards-compatibility, but it is deprecated. |
| 1484 | # |
| 1485 | # 'trusted_key_servers' defaults to matrix.org, but using it will generate a |
| 1486 | # warning on start-up. To suppress this warning, set |
| 1487 | # 'suppress_key_server_warning' to true. |
| 1488 | # |
| 1489 | # Options for each entry in the list include: |
| 1490 | # |
| 1491 | # server_name: the name of the server. required. |
| 1492 | # |
| 1493 | # verify_keys: an optional map from key id to base64-encoded public key. |
| 1494 | # If specified, we will check that the response is signed by at least |
| 1495 | # one of the given keys. |
| 1496 | # |
| 1497 | # accept_keys_insecurely: a boolean. Normally, if `verify_keys` is unset, |
| 1498 | # and federation_verify_certificates is not `true`, synapse will refuse |
| 1499 | # to start, because this would allow anyone who can spoof DNS responses |
| 1500 | # to masquerade as the trusted key server. If you know what you are doing |
| 1501 | # and are sure that your network environment provides a secure connection |
| 1502 | # to the key server, you can set this to `true` to override this |
| 1503 | # behaviour. |
| 1504 | # |
| 1505 | # An example configuration might look like: |
| 1506 | # |
| 1507 | #trusted_key_servers: |
| 1508 | # - server_name: "my_trusted_server.example.com" |
| 1509 | # verify_keys: |
| 1510 | # "ed25519:auto": "abcdefghijklmnopqrstuvwxyzabcdefghijklmopqr" |
| 1511 | # - server_name: "my_other_trusted_server.example.com" |
| 1512 | # |
| 1513 | trusted_key_servers: |
| 1514 | - server_name: "matrix.org" |
| 1515 | |
| 1516 | # Uncomment the following to disable the warning that is emitted when the |
| 1517 | # trusted_key_servers include 'matrix.org'. See above. |
| 1518 | # |
| 1519 | #suppress_key_server_warning: true |
| 1520 | |
| 1521 | # The signing keys to use when acting as a trusted key server. If not specified |
| 1522 | # defaults to the server signing key. |
| 1523 | # |
| 1524 | # Can contain multiple keys, one per line. |
| 1525 | # |
| 1526 | #key_server_signing_keys_path: "key_server_signing_keys.key" |
| 1527 | |
| 1528 | |
| 1529 | ## Single sign-on integration ## |
| 1530 | |
| 1531 | # The following settings can be used to make Synapse use a single sign-on |
| 1532 | # provider for authentication, instead of its internal password database. |
| 1533 | # |
| 1534 | # You will probably also want to set the following options to `false` to |
| 1535 | # disable the regular login/registration flows: |
| 1536 | # * enable_registration |
| 1537 | # * password_config.enabled |
| 1538 | # |
| 1539 | # You will also want to investigate the settings under the "sso" configuration |
| 1540 | # section below. |
| 1541 | |
| 1542 | # Enable SAML2 for registration and login. Uses pysaml2. |
| 1543 | # |
| 1544 | # At least one of `sp_config` or `config_path` must be set in this section to |
| 1545 | # enable SAML login. |
| 1546 | # |
| 1547 | # Once SAML support is enabled, a metadata file will be exposed at |
| 1548 | # https://<server>:<port>/_synapse/client/saml2/metadata.xml, which you may be able to |
| 1549 | # use to configure your SAML IdP with. Alternatively, you can manually configure |
| 1550 | # the IdP to use an ACS location of |
| 1551 | # https://<server>:<port>/_synapse/client/saml2/authn_response. |
| 1552 | # |
| 1553 | saml2_config: |
| 1554 | # `sp_config` is the configuration for the pysaml2 Service Provider. |
| 1555 | # See pysaml2 docs for format of config. |
| 1556 | # |
| 1557 | # Default values will be used for the 'entityid' and 'service' settings, |
| 1558 | # so it is not normally necessary to specify them unless you need to |
| 1559 | # override them. |
| 1560 | # |
| 1561 | sp_config: |
| 1562 | # Point this to the IdP's metadata. You must provide either a local |
| 1563 | # file via the `local` attribute or (preferably) a URL via the |
| 1564 | # `remote` attribute. |
| 1565 | # |
| 1566 | #metadata: |
| 1567 | # local: ["saml2/idp.xml"] |
| 1568 | # remote: |
| 1569 | # - url: https://our_idp/metadata.xml |
| 1570 | |
| 1571 | # Allowed clock difference in seconds between the homeserver and IdP. |
| 1572 | # |
| 1573 | # Uncomment the below to increase the accepted time difference from 0 to 3 seconds. |
| 1574 | # |
| 1575 | #accepted_time_diff: 3 |
| 1576 | |
| 1577 | # By default, the user has to go to our login page first. If you'd like |
| 1578 | # to allow IdP-initiated login, set 'allow_unsolicited: true' in a |
| 1579 | # 'service.sp' section: |
| 1580 | # |
| 1581 | #service: |
| 1582 | # sp: |
| 1583 | # allow_unsolicited: true |
| 1584 | |
| 1585 | # The examples below are just used to generate our metadata xml, and you |
| 1586 | # may well not need them, depending on your setup. Alternatively you |
| 1587 | # may need a whole lot more detail - see the pysaml2 docs! |
| 1588 | |
| 1589 | #description: ["My awesome SP", "en"] |
| 1590 | #name: ["Test SP", "en"] |
| 1591 | |
| 1592 | #ui_info: |
| 1593 | # display_name: |
| 1594 | # - lang: en |
| 1595 | # text: "Display Name is the descriptive name of your service." |
| 1596 | # description: |
| 1597 | # - lang: en |
| 1598 | # text: "Description should be a short paragraph explaining the purpose of the service." |
| 1599 | # information_url: |
| 1600 | # - lang: en |
| 1601 | # text: "https://example.com/terms-of-service" |
| 1602 | # privacy_statement_url: |
| 1603 | # - lang: en |
| 1604 | # text: "https://example.com/privacy-policy" |
| 1605 | # keywords: |
| 1606 | # - lang: en |
| 1607 | # text: ["Matrix", "Element"] |
| 1608 | # logo: |
| 1609 | # - lang: en |
| 1610 | # text: "https://example.com/logo.svg" |
| 1611 | # width: "200" |
| 1612 | # height: "80" |
| 1613 | |
| 1614 | #organization: |
| 1615 | # name: Example com |
| 1616 | # display_name: |
| 1617 | # - ["Example co", "en"] |
| 1618 | # url: "http://example.com" |
| 1619 | |
| 1620 | #contact_person: |
| 1621 | # - given_name: Bob |
| 1622 | # sur_name: "the Sysadmin" |
| 1623 | # email_address": ["admin@example.com"] |
| 1624 | # contact_type": technical |
| 1625 | |
| 1626 | # Instead of putting the config inline as above, you can specify a |
| 1627 | # separate pysaml2 configuration file: |
| 1628 | # |
| 1629 | #config_path: "/data/sp_conf.py" |
| 1630 | |
| 1631 | # The lifetime of a SAML session. This defines how long a user has to |
| 1632 | # complete the authentication process, if allow_unsolicited is unset. |
| 1633 | # The default is 15 minutes. |
| 1634 | # |
| 1635 | #saml_session_lifetime: 5m |
| 1636 | |
| 1637 | # An external module can be provided here as a custom solution to |
| 1638 | # mapping attributes returned from a saml provider onto a matrix user. |
| 1639 | # |
| 1640 | user_mapping_provider: |
| 1641 | # The custom module's class. Uncomment to use a custom module. |
| 1642 | # |
| 1643 | #module: mapping_provider.SamlMappingProvider |
| 1644 | |
| 1645 | # Custom configuration values for the module. Below options are |
| 1646 | # intended for the built-in provider, they should be changed if |
| 1647 | # using a custom module. This section will be passed as a Python |
| 1648 | # dictionary to the module's `parse_config` method. |
| 1649 | # |
| 1650 | config: |
| 1651 | # The SAML attribute (after mapping via the attribute maps) to use |
| 1652 | # to derive the Matrix ID from. 'uid' by default. |
| 1653 | # |
| 1654 | # Note: This used to be configured by the |
| 1655 | # saml2_config.mxid_source_attribute option. If that is still |
| 1656 | # defined, its value will be used instead. |
| 1657 | # |
| 1658 | #mxid_source_attribute: displayName |
| 1659 | |
| 1660 | # The mapping system to use for mapping the saml attribute onto a |
| 1661 | # matrix ID. |
| 1662 | # |
| 1663 | # Options include: |
| 1664 | # * 'hexencode' (which maps unpermitted characters to '=xx') |
| 1665 | # * 'dotreplace' (which replaces unpermitted characters with |
| 1666 | # '.'). |
| 1667 | # The default is 'hexencode'. |
| 1668 | # |
| 1669 | # Note: This used to be configured by the |
| 1670 | # saml2_config.mxid_mapping option. If that is still defined, its |
| 1671 | # value will be used instead. |
| 1672 | # |
| 1673 | #mxid_mapping: dotreplace |
| 1674 | |
| 1675 | # In previous versions of synapse, the mapping from SAML attribute to |
| 1676 | # MXID was always calculated dynamically rather than stored in a |
| 1677 | # table. For backwards- compatibility, we will look for user_ids |
| 1678 | # matching such a pattern before creating a new account. |
| 1679 | # |
| 1680 | # This setting controls the SAML attribute which will be used for this |
| 1681 | # backwards-compatibility lookup. Typically it should be 'uid', but if |
| 1682 | # the attribute maps are changed, it may be necessary to change it. |
| 1683 | # |
| 1684 | # The default is 'uid'. |
| 1685 | # |
| 1686 | #grandfathered_mxid_source_attribute: upn |
| 1687 | |
| 1688 | # It is possible to configure Synapse to only allow logins if SAML attributes |
| 1689 | # match particular values. The requirements can be listed under |
| 1690 | # `attribute_requirements` as shown below. All of the listed attributes must |
| 1691 | # match for the login to be permitted. |
| 1692 | # |
| 1693 | #attribute_requirements: |
| 1694 | # - attribute: userGroup |
| 1695 | # value: "staff" |
| 1696 | # - attribute: department |
| 1697 | # value: "sales" |
| 1698 | |
| 1699 | # If the metadata XML contains multiple IdP entities then the `idp_entityid` |
| 1700 | # option must be set to the entity to redirect users to. |
| 1701 | # |
| 1702 | # Most deployments only have a single IdP entity and so should omit this |
| 1703 | # option. |
| 1704 | # |
| 1705 | #idp_entityid: 'https://our_idp/entityid' |
| 1706 | |
| 1707 | |
| 1708 | # List of OpenID Connect (OIDC) / OAuth 2.0 identity providers, for registration |
| 1709 | # and login. |
| 1710 | # |
| 1711 | # Options for each entry include: |
| 1712 | # |
| 1713 | # idp_id: a unique identifier for this identity provider. Used internally |
| 1714 | # by Synapse; should be a single word such as 'github'. |
| 1715 | # |
| 1716 | # Note that, if this is changed, users authenticating via that provider |
| 1717 | # will no longer be recognised as the same user! |
| 1718 | # |
| 1719 | # (Use "oidc" here if you are migrating from an old "oidc_config" |
| 1720 | # configuration.) |
| 1721 | # |
| 1722 | # idp_name: A user-facing name for this identity provider, which is used to |
| 1723 | # offer the user a choice of login mechanisms. |
| 1724 | # |
| 1725 | # idp_icon: An optional icon for this identity provider, which is presented |
| 1726 | # by clients and Synapse's own IdP picker page. If given, must be an |
| 1727 | # MXC URI of the format mxc://<server-name>/<media-id>. (An easy way to |
| 1728 | # obtain such an MXC URI is to upload an image to an (unencrypted) room |
| 1729 | # and then copy the "url" from the source of the event.) |
| 1730 | # |
| 1731 | # idp_brand: An optional brand for this identity provider, allowing clients |
| 1732 | # to style the login flow according to the identity provider in question. |
| 1733 | # See the spec for possible options here. |
| 1734 | # |
| 1735 | # discover: set to 'false' to disable the use of the OIDC discovery mechanism |
| 1736 | # to discover endpoints. Defaults to true. |
| 1737 | # |
| 1738 | # issuer: Required. The OIDC issuer. Used to validate tokens and (if discovery |
| 1739 | # is enabled) to discover the provider's endpoints. |
| 1740 | # |
| 1741 | # client_id: Required. oauth2 client id to use. |
| 1742 | # |
| 1743 | # client_secret: oauth2 client secret to use. May be omitted if |
| 1744 | # client_secret_jwt_key is given, or if client_auth_method is 'none'. |
| 1745 | # |
| 1746 | # client_secret_jwt_key: Alternative to client_secret: details of a key used |
| 1747 | # to create a JSON Web Token to be used as an OAuth2 client secret. If |
| 1748 | # given, must be a dictionary with the following properties: |
| 1749 | # |
| 1750 | # key: a pem-encoded signing key. Must be a suitable key for the |
| 1751 | # algorithm specified. Required unless 'key_file' is given. |
| 1752 | # |
| 1753 | # key_file: the path to file containing a pem-encoded signing key file. |
| 1754 | # Required unless 'key' is given. |
| 1755 | # |
| 1756 | # jwt_header: a dictionary giving properties to include in the JWT |
| 1757 | # header. Must include the key 'alg', giving the algorithm used to |
| 1758 | # sign the JWT, such as "ES256", using the JWA identifiers in |
| 1759 | # RFC7518. |
| 1760 | # |
| 1761 | # jwt_payload: an optional dictionary giving properties to include in |
| 1762 | # the JWT payload. Normally this should include an 'iss' key. |
| 1763 | # |
| 1764 | # client_auth_method: auth method to use when exchanging the token. Valid |
| 1765 | # values are 'client_secret_basic' (default), 'client_secret_post' and |
| 1766 | # 'none'. |
| 1767 | # |
| 1768 | # scopes: list of scopes to request. This should normally include the "openid" |
| 1769 | # scope. Defaults to ["openid"]. |
| 1770 | # |
| 1771 | # authorization_endpoint: the oauth2 authorization endpoint. Required if |
| 1772 | # provider discovery is disabled. |
| 1773 | # |
| 1774 | # token_endpoint: the oauth2 token endpoint. Required if provider discovery is |
| 1775 | # disabled. |
| 1776 | # |
| 1777 | # userinfo_endpoint: the OIDC userinfo endpoint. Required if discovery is |
| 1778 | # disabled and the 'openid' scope is not requested. |
| 1779 | # |
| 1780 | # jwks_uri: URI where to fetch the JWKS. Required if discovery is disabled and |
| 1781 | # the 'openid' scope is used. |
| 1782 | # |
| 1783 | # skip_verification: set to 'true' to skip metadata verification. Use this if |
| 1784 | # you are connecting to a provider that is not OpenID Connect compliant. |
| 1785 | # Defaults to false. Avoid this in production. |
| 1786 | # |
| 1787 | # user_profile_method: Whether to fetch the user profile from the userinfo |
| 1788 | # endpoint. Valid values are: 'auto' or 'userinfo_endpoint'. |
| 1789 | # |
| 1790 | # Defaults to 'auto', which fetches the userinfo endpoint if 'openid' is |
| 1791 | # included in 'scopes'. Set to 'userinfo_endpoint' to always fetch the |
| 1792 | # userinfo endpoint. |
| 1793 | # |
| 1794 | # allow_existing_users: set to 'true' to allow a user logging in via OIDC to |
| 1795 | # match a pre-existing account instead of failing. This could be used if |
| 1796 | # switching from password logins to OIDC. Defaults to false. |
| 1797 | # |
| 1798 | # user_mapping_provider: Configuration for how attributes returned from a OIDC |
| 1799 | # provider are mapped onto a matrix user. This setting has the following |
| 1800 | # sub-properties: |
| 1801 | # |
| 1802 | # module: The class name of a custom mapping module. Default is |
| 1803 | # 'synapse.handlers.oidc.JinjaOidcMappingProvider'. |
| 1804 | # See https://matrix-org.github.io/synapse/latest/sso_mapping_providers.html#openid-mapping-providers |
| 1805 | # for information on implementing a custom mapping provider. |
| 1806 | # |
| 1807 | # config: Configuration for the mapping provider module. This section will |
| 1808 | # be passed as a Python dictionary to the user mapping provider |
| 1809 | # module's `parse_config` method. |
| 1810 | # |
| 1811 | # For the default provider, the following settings are available: |
| 1812 | # |
| 1813 | # subject_claim: name of the claim containing a unique identifier |
| 1814 | # for the user. Defaults to 'sub', which OpenID Connect |
| 1815 | # compliant providers should provide. |
| 1816 | # |
| 1817 | # localpart_template: Jinja2 template for the localpart of the MXID. |
| 1818 | # If this is not set, the user will be prompted to choose their |
| 1819 | # own username (see 'sso_auth_account_details.html' in the 'sso' |
| 1820 | # section of this file). |
| 1821 | # |
| 1822 | # display_name_template: Jinja2 template for the display name to set |
| 1823 | # on first login. If unset, no displayname will be set. |
| 1824 | # |
| 1825 | # email_template: Jinja2 template for the email address of the user. |
| 1826 | # If unset, no email address will be added to the account. |
| 1827 | # |
| 1828 | # extra_attributes: a map of Jinja2 templates for extra attributes |
| 1829 | # to send back to the client during login. |
| 1830 | # Note that these are non-standard and clients will ignore them |
| 1831 | # without modifications. |
| 1832 | # |
| 1833 | # When rendering, the Jinja2 templates are given a 'user' variable, |
| 1834 | # which is set to the claims returned by the UserInfo Endpoint and/or |
| 1835 | # in the ID Token. |
| 1836 | # |
| 1837 | # It is possible to configure Synapse to only allow logins if certain attributes |
| 1838 | # match particular values in the OIDC userinfo. The requirements can be listed under |
| 1839 | # `attribute_requirements` as shown below. All of the listed attributes must |
| 1840 | # match for the login to be permitted. Additional attributes can be added to |
| 1841 | # userinfo by expanding the `scopes` section of the OIDC config to retrieve |
| 1842 | # additional information from the OIDC provider. |
| 1843 | # |
| 1844 | # If the OIDC claim is a list, then the attribute must match any value in the list. |
| 1845 | # Otherwise, it must exactly match the value of the claim. Using the example |
| 1846 | # below, the `family_name` claim MUST be "Stephensson", but the `groups` |
| 1847 | # claim MUST contain "admin". |
| 1848 | # |
| 1849 | # attribute_requirements: |
| 1850 | # - attribute: family_name |
| 1851 | # value: "Stephensson" |
| 1852 | # - attribute: groups |
| 1853 | # value: "admin" |
| 1854 | # |
| 1855 | # See https://matrix-org.github.io/synapse/latest/openid.html |
| 1856 | # for information on how to configure these options. |
| 1857 | # |
| 1858 | # For backwards compatibility, it is also possible to configure a single OIDC |
| 1859 | # provider via an 'oidc_config' setting. This is now deprecated and admins are |
| 1860 | # advised to migrate to the 'oidc_providers' format. (When doing that migration, |
| 1861 | # use 'oidc' for the idp_id to ensure that existing users continue to be |
| 1862 | # recognised.) |
| 1863 | # |
| 1864 | oidc_providers: |
| 1865 | # Generic example |
| 1866 | # |
| 1867 | #- idp_id: my_idp |
| 1868 | # idp_name: "My OpenID provider" |
| 1869 | # idp_icon: "mxc://example.com/mediaid" |
| 1870 | # discover: false |
| 1871 | # issuer: "https://accounts.example.com/" |
| 1872 | # client_id: "provided-by-your-issuer" |
| 1873 | # client_secret: "provided-by-your-issuer" |
| 1874 | # client_auth_method: client_secret_post |
| 1875 | # scopes: ["openid", "profile"] |
| 1876 | # authorization_endpoint: "https://accounts.example.com/oauth2/auth" |
| 1877 | # token_endpoint: "https://accounts.example.com/oauth2/token" |
| 1878 | # userinfo_endpoint: "https://accounts.example.com/userinfo" |
| 1879 | # jwks_uri: "https://accounts.example.com/.well-known/jwks.json" |
| 1880 | # skip_verification: true |
| 1881 | # user_mapping_provider: |
| 1882 | # config: |
| 1883 | # subject_claim: "id" |
| 1884 | # localpart_template: "{{ user.login }}" |
| 1885 | # display_name_template: "{{ user.name }}" |
| 1886 | # email_template: "{{ user.email }}" |
| 1887 | # attribute_requirements: |
| 1888 | # - attribute: userGroup |
| 1889 | # value: "synapseUsers" |
| 1890 | |
| 1891 | |
| 1892 | # Enable Central Authentication Service (CAS) for registration and login. |
| 1893 | # |
| 1894 | cas_config: |
| 1895 | # Uncomment the following to enable authorization against a CAS server. |
| 1896 | # Defaults to false. |
| 1897 | # |
| 1898 | #enabled: true |
| 1899 | |
| 1900 | # The URL of the CAS authorization endpoint. |
| 1901 | # |
| 1902 | #server_url: "https://cas-server.com" |
| 1903 | |
| 1904 | # The attribute of the CAS response to use as the display name. |
| 1905 | # |
| 1906 | # If unset, no displayname will be set. |
| 1907 | # |
| 1908 | #displayname_attribute: name |
| 1909 | |
| 1910 | # It is possible to configure Synapse to only allow logins if CAS attributes |
| 1911 | # match particular values. All of the keys in the mapping below must exist |
| 1912 | # and the values must match the given value. Alternately if the given value |
| 1913 | # is None then any value is allowed (the attribute just must exist). |
| 1914 | # All of the listed attributes must match for the login to be permitted. |
| 1915 | # |
| 1916 | #required_attributes: |
| 1917 | # userGroup: "staff" |
| 1918 | # department: None |
| 1919 | |
| 1920 | |
| 1921 | # Additional settings to use with single-sign on systems such as OpenID Connect, |
| 1922 | # SAML2 and CAS. |
| 1923 | # |
| 1924 | # Server admins can configure custom templates for pages related to SSO. See |
| 1925 | # https://matrix-org.github.io/synapse/latest/templates.html for more information. |
| 1926 | # |
| 1927 | sso: |
| 1928 | # A list of client URLs which are whitelisted so that the user does not |
| 1929 | # have to confirm giving access to their account to the URL. Any client |
| 1930 | # whose URL starts with an entry in the following list will not be subject |
| 1931 | # to an additional confirmation step after the SSO login is completed. |
| 1932 | # |
| 1933 | # WARNING: An entry such as "https://my.client" is insecure, because it |
| 1934 | # will also match "https://my.client.evil.site", exposing your users to |
| 1935 | # phishing attacks from evil.site. To avoid this, include a slash after the |
| 1936 | # hostname: "https://my.client/". |
| 1937 | # |
| 1938 | # If public_baseurl is set, then the login fallback page (used by clients |
| 1939 | # that don't natively support the required login flows) is whitelisted in |
| 1940 | # addition to any URLs in this list. |
| 1941 | # |
| 1942 | # By default, this list is empty. |
| 1943 | # |
| 1944 | #client_whitelist: |
| 1945 | # - https://riot.im/develop |
| 1946 | # - https://my.custom.client/ |
| 1947 | |
| 1948 | # Uncomment to keep a user's profile fields in sync with information from |
| 1949 | # the identity provider. Currently only syncing the displayname is |
| 1950 | # supported. Fields are checked on every SSO login, and are updated |
| 1951 | # if necessary. |
| 1952 | # |
| 1953 | # Note that enabling this option will override user profile information, |
| 1954 | # regardless of whether users have opted-out of syncing that |
| 1955 | # information when first signing in. Defaults to false. |
| 1956 | # |
| 1957 | #update_profile_information: true |
| 1958 | |
| 1959 | |
| 1960 | # JSON web token integration. The following settings can be used to make |
| 1961 | # Synapse JSON web tokens for authentication, instead of its internal |
| 1962 | # password database. |
| 1963 | # |
| 1964 | # Each JSON Web Token needs to contain a "sub" (subject) claim, which is |
| 1965 | # used as the localpart of the mxid. |
| 1966 | # |
| 1967 | # Additionally, the expiration time ("exp"), not before time ("nbf"), |
| 1968 | # and issued at ("iat") claims are validated if present. |
| 1969 | # |
| 1970 | # Note that this is a non-standard login type and client support is |
| 1971 | # expected to be non-existent. |
| 1972 | # |
| 1973 | # See https://matrix-org.github.io/synapse/latest/jwt.html. |
| 1974 | # |
| 1975 | #jwt_config: |
| 1976 | # Uncomment the following to enable authorization using JSON web |
| 1977 | # tokens. Defaults to false. |
| 1978 | # |
| 1979 | #enabled: true |
| 1980 | |
| 1981 | # This is either the private shared secret or the public key used to |
| 1982 | # decode the contents of the JSON web token. |
| 1983 | # |
| 1984 | # Required if 'enabled' is true. |
| 1985 | # |
| 1986 | #secret: "provided-by-your-issuer" |
| 1987 | |
| 1988 | # The algorithm used to sign the JSON web token. |
| 1989 | # |
| 1990 | # Supported algorithms are listed at |
| 1991 | # https://pyjwt.readthedocs.io/en/latest/algorithms.html |
| 1992 | # |
| 1993 | # Required if 'enabled' is true. |
| 1994 | # |
| 1995 | #algorithm: "provided-by-your-issuer" |
| 1996 | |
| 1997 | # The issuer to validate the "iss" claim against. |
| 1998 | # |
| 1999 | # Optional, if provided the "iss" claim will be required and |
| 2000 | # validated for all JSON web tokens. |
| 2001 | # |
| 2002 | #issuer: "provided-by-your-issuer" |
| 2003 | |
| 2004 | # A list of audiences to validate the "aud" claim against. |
| 2005 | # |
| 2006 | # Optional, if provided the "aud" claim will be required and |
| 2007 | # validated for all JSON web tokens. |
| 2008 | # |
| 2009 | # Note that if the "aud" claim is included in a JSON web token then |
| 2010 | # validation will fail without configuring audiences. |
| 2011 | # |
| 2012 | #audiences: |
| 2013 | # - "provided-by-your-issuer" |
| 2014 | |
| 2015 | |
| 2016 | password_config: |
| 2017 | # Uncomment to disable password login |
| 2018 | # |
| 2019 | #enabled: false |
| 2020 | |
| 2021 | # Uncomment to disable authentication against the local password |
| 2022 | # database. This is ignored if `enabled` is false, and is only useful |
| 2023 | # if you have other password_providers. |
| 2024 | # |
| 2025 | #localdb_enabled: false |
| 2026 | |
| 2027 | # Uncomment and change to a secret random string for extra security. |
| 2028 | # DO NOT CHANGE THIS AFTER INITIAL SETUP! |
| 2029 | # |
| 2030 | #pepper: "EVEN_MORE_SECRET" |
| 2031 | |
| 2032 | # Define and enforce a password policy. Each parameter is optional. |
| 2033 | # This is an implementation of MSC2000. |
| 2034 | # |
| 2035 | policy: |
| 2036 | # Whether to enforce the password policy. |
| 2037 | # Defaults to 'false'. |
| 2038 | # |
| 2039 | #enabled: true |
| 2040 | |
| 2041 | # Minimum accepted length for a password. |
| 2042 | # Defaults to 0. |
| 2043 | # |
| 2044 | #minimum_length: 15 |
| 2045 | |
| 2046 | # Whether a password must contain at least one digit. |
| 2047 | # Defaults to 'false'. |
| 2048 | # |
| 2049 | #require_digit: true |
| 2050 | |
| 2051 | # Whether a password must contain at least one symbol. |
| 2052 | # A symbol is any character that's not a number or a letter. |
| 2053 | # Defaults to 'false'. |
| 2054 | # |
| 2055 | #require_symbol: true |
| 2056 | |
| 2057 | # Whether a password must contain at least one lowercase letter. |
| 2058 | # Defaults to 'false'. |
| 2059 | # |
| 2060 | #require_lowercase: true |
| 2061 | |
| 2062 | # Whether a password must contain at least one uppercase letter. |
| 2063 | # Defaults to 'false'. |
| 2064 | # |
| 2065 | #require_uppercase: true |
| 2066 | |
| 2067 | ui_auth: |
| 2068 | # The amount of time to allow a user-interactive authentication session |
| 2069 | # to be active. |
| 2070 | # |
| 2071 | # This defaults to 0, meaning the user is queried for their credentials |
| 2072 | # before every action, but this can be overridden to allow a single |
| 2073 | # validation to be re-used. This weakens the protections afforded by |
| 2074 | # the user-interactive authentication process, by allowing for multiple |
| 2075 | # (and potentially different) operations to use the same validation session. |
| 2076 | # |
| 2077 | # This is ignored for potentially "dangerous" operations (including |
| 2078 | # deactivating an account, modifying an account password, and |
| 2079 | # adding a 3PID). |
| 2080 | # |
| 2081 | # Uncomment below to allow for credential validation to last for 15 |
| 2082 | # seconds. |
| 2083 | # |
| 2084 | #session_timeout: "15s" |
| 2085 | |
| 2086 | |
| 2087 | # Configuration for sending emails from Synapse. |
| 2088 | # |
| 2089 | # Server admins can configure custom templates for email content. See |
| 2090 | # https://matrix-org.github.io/synapse/latest/templates.html for more information. |
| 2091 | # |
| 2092 | email: |
| 2093 | # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'. |
| 2094 | # |
| 2095 | #smtp_host: mail.server |
| 2096 | |
| 2097 | # The port on the mail server for outgoing SMTP. Defaults to 25. |
| 2098 | # |
| 2099 | #smtp_port: 587 |
| 2100 | |
| 2101 | # Username/password for authentication to the SMTP server. By default, no |
| 2102 | # authentication is attempted. |
| 2103 | # |
| 2104 | #smtp_user: "exampleusername" |
| 2105 | #smtp_pass: "examplepassword" |
| 2106 | |
| 2107 | # Uncomment the following to require TLS transport security for SMTP. |
| 2108 | # By default, Synapse will connect over plain text, and will then switch to |
| 2109 | # TLS via STARTTLS *if the SMTP server supports it*. If this option is set, |
| 2110 | # Synapse will refuse to connect unless the server supports STARTTLS. |
| 2111 | # |
| 2112 | #require_transport_security: true |
| 2113 | |
| 2114 | # Uncomment the following to disable TLS for SMTP. |
| 2115 | # |
| 2116 | # By default, if the server supports TLS, it will be used, and the server |
| 2117 | # must present a certificate that is valid for 'smtp_host'. If this option |
| 2118 | # is set to false, TLS will not be used. |
| 2119 | # |
| 2120 | #enable_tls: false |
| 2121 | |
| 2122 | # notif_from defines the "From" address to use when sending emails. |
| 2123 | # It must be set if email sending is enabled. |
| 2124 | # |
| 2125 | # The placeholder '%(app)s' will be replaced by the application name, |
| 2126 | # which is normally 'app_name' (below), but may be overridden by the |
| 2127 | # Matrix client application. |
| 2128 | # |
| 2129 | # Note that the placeholder must be written '%(app)s', including the |
| 2130 | # trailing 's'. |
| 2131 | # |
| 2132 | #notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>" |
| 2133 | |
| 2134 | # app_name defines the default value for '%(app)s' in notif_from and email |
| 2135 | # subjects. It defaults to 'Matrix'. |
| 2136 | # |
| 2137 | #app_name: my_branded_matrix_server |
| 2138 | |
| 2139 | # Uncomment the following to enable sending emails for messages that the user |
| 2140 | # has missed. Disabled by default. |
| 2141 | # |
| 2142 | #enable_notifs: true |
| 2143 | |
| 2144 | # Uncomment the following to disable automatic subscription to email |
| 2145 | # notifications for new users. Enabled by default. |
| 2146 | # |
| 2147 | #notif_for_new_users: false |
| 2148 | |
| 2149 | # Custom URL for client links within the email notifications. By default |
| 2150 | # links will be based on "https://matrix.to". |
| 2151 | # |
| 2152 | # (This setting used to be called riot_base_url; the old name is still |
| 2153 | # supported for backwards-compatibility but is now deprecated.) |
| 2154 | # |
| 2155 | #client_base_url: "http://localhost/riot" |
| 2156 | |
| 2157 | # Configure the time that a validation email will expire after sending. |
| 2158 | # Defaults to 1h. |
| 2159 | # |
| 2160 | #validation_token_lifetime: 15m |
| 2161 | |
| 2162 | # The web client location to direct users to during an invite. This is passed |
| 2163 | # to the identity server as the org.matrix.web_client_location key. Defaults |
| 2164 | # to unset, giving no guidance to the identity server. |
| 2165 | # |
| 2166 | #invite_client_location: https://app.element.io |
| 2167 | |
| 2168 | # Subjects to use when sending emails from Synapse. |
| 2169 | # |
| 2170 | # The placeholder '%(app)s' will be replaced with the value of the 'app_name' |
| 2171 | # setting above, or by a value dictated by the Matrix client application. |
| 2172 | # |
| 2173 | # If a subject isn't overridden in this configuration file, the value used as |
| 2174 | # its example will be used. |
| 2175 | # |
| 2176 | #subjects: |
| 2177 | |
| 2178 | # Subjects for notification emails. |
| 2179 | # |
| 2180 | # On top of the '%(app)s' placeholder, these can use the following |
| 2181 | # placeholders: |
| 2182 | # |
| 2183 | # * '%(person)s', which will be replaced by the display name of the user(s) |
| 2184 | # that sent the message(s), e.g. "Alice and Bob". |
| 2185 | # * '%(room)s', which will be replaced by the name of the room the |
| 2186 | # message(s) have been sent to, e.g. "My super room". |
| 2187 | # |
| 2188 | # See the example provided for each setting to see which placeholder can be |
| 2189 | # used and how to use them. |
| 2190 | # |
| 2191 | # Subject to use to notify about one message from one or more user(s) in a |
| 2192 | # room which has a name. |
| 2193 | #message_from_person_in_room: "[%(app)s] You have a message on %(app)s from %(person)s in the %(room)s room..." |
| 2194 | # |
| 2195 | # Subject to use to notify about one message from one or more user(s) in a |
| 2196 | # room which doesn't have a name. |
| 2197 | #message_from_person: "[%(app)s] You have a message on %(app)s from %(person)s..." |
| 2198 | # |
| 2199 | # Subject to use to notify about multiple messages from one or more users in |
| 2200 | # a room which doesn't have a name. |
| 2201 | #messages_from_person: "[%(app)s] You have messages on %(app)s from %(person)s..." |
| 2202 | # |
| 2203 | # Subject to use to notify about multiple messages in a room which has a |
| 2204 | # name. |
| 2205 | #messages_in_room: "[%(app)s] You have messages on %(app)s in the %(room)s room..." |
| 2206 | # |
| 2207 | # Subject to use to notify about multiple messages in multiple rooms. |
| 2208 | #messages_in_room_and_others: "[%(app)s] You have messages on %(app)s in the %(room)s room and others..." |
| 2209 | # |
| 2210 | # Subject to use to notify about multiple messages from multiple persons in |
| 2211 | # multiple rooms. This is similar to the setting above except it's used when |
| 2212 | # the room in which the notification was triggered has no name. |
| 2213 | #messages_from_person_and_others: "[%(app)s] You have messages on %(app)s from %(person)s and others..." |
| 2214 | # |
| 2215 | # Subject to use to notify about an invite to a room which has a name. |
| 2216 | #invite_from_person_to_room: "[%(app)s] %(person)s has invited you to join the %(room)s room on %(app)s..." |
| 2217 | # |
| 2218 | # Subject to use to notify about an invite to a room which doesn't have a |
| 2219 | # name. |
| 2220 | #invite_from_person: "[%(app)s] %(person)s has invited you to chat on %(app)s..." |
| 2221 | |
| 2222 | # Subject for emails related to account administration. |
| 2223 | # |
| 2224 | # On top of the '%(app)s' placeholder, these one can use the |
| 2225 | # '%(server_name)s' placeholder, which will be replaced by the value of the |
| 2226 | # 'server_name' setting in your Synapse configuration. |
| 2227 | # |
| 2228 | # Subject to use when sending a password reset email. |
| 2229 | #password_reset: "[%(server_name)s] Password reset" |
| 2230 | # |
| 2231 | # Subject to use when sending a verification email to assert an address's |
| 2232 | # ownership. |
| 2233 | #email_validation: "[%(server_name)s] Validate your email" |
| 2234 | |
| 2235 | |
| 2236 | # Password providers allow homeserver administrators to integrate |
| 2237 | # their Synapse installation with existing authentication methods |
| 2238 | # ex. LDAP, external tokens, etc. |
| 2239 | # |
| 2240 | # For more information and known implementations, please see |
| 2241 | # https://matrix-org.github.io/synapse/latest/password_auth_providers.html |
| 2242 | # |
| 2243 | # Note: instances wishing to use SAML or CAS authentication should |
| 2244 | # instead use the `saml2_config` or `cas_config` options, |
| 2245 | # respectively. |
| 2246 | # |
| 2247 | password_providers: |
| 2248 | # # Example config for an LDAP auth provider |
| 2249 | # - module: "ldap_auth_provider.LdapAuthProvider" |
| 2250 | # config: |
| 2251 | # enabled: true |
| 2252 | # uri: "ldap://ldap.example.com:389" |
| 2253 | # start_tls: true |
| 2254 | # base: "ou=users,dc=example,dc=com" |
| 2255 | # attributes: |
| 2256 | # uid: "cn" |
| 2257 | # mail: "email" |
| 2258 | # name: "givenName" |
| 2259 | # #bind_dn: |
| 2260 | # #bind_password: |
| 2261 | # #filter: "(objectClass=posixAccount)" |
| 2262 | |
| 2263 | |
| 2264 | |
| 2265 | ## Push ## |
| 2266 | |
| 2267 | push: |
| 2268 | # Clients requesting push notifications can either have the body of |
| 2269 | # the message sent in the notification poke along with other details |
| 2270 | # like the sender, or just the event ID and room ID (`event_id_only`). |
| 2271 | # If clients choose the former, this option controls whether the |
| 2272 | # notification request includes the content of the event (other details |
| 2273 | # like the sender are still included). For `event_id_only` push, it |
| 2274 | # has no effect. |
| 2275 | # |
| 2276 | # For modern android devices the notification content will still appear |
| 2277 | # because it is loaded by the app. iPhone, however will send a |
| 2278 | # notification saying only that a message arrived and who it came from. |
| 2279 | # |
| 2280 | # The default value is "true" to include message details. Uncomment to only |
| 2281 | # include the event ID and room ID in push notification payloads. |
| 2282 | # |
| 2283 | #include_content: false |
| 2284 | |
| 2285 | # When a push notification is received, an unread count is also sent. |
| 2286 | # This number can either be calculated as the number of unread messages |
| 2287 | # for the user, or the number of *rooms* the user has unread messages in. |
| 2288 | # |
| 2289 | # The default value is "true", meaning push clients will see the number of |
| 2290 | # rooms with unread messages in them. Uncomment to instead send the number |
| 2291 | # of unread messages. |
| 2292 | # |
| 2293 | #group_unread_count_by_room: false |
| 2294 | |
| 2295 | |
| 2296 | ## Rooms ## |
| 2297 | |
| 2298 | # Controls whether locally-created rooms should be end-to-end encrypted by |
| 2299 | # default. |
| 2300 | # |
| 2301 | # Possible options are "all", "invite", and "off". They are defined as: |
| 2302 | # |
| 2303 | # * "all": any locally-created room |
| 2304 | # * "invite": any room created with the "private_chat" or "trusted_private_chat" |
| 2305 | # room creation presets |
| 2306 | # * "off": this option will take no effect |
| 2307 | # |
| 2308 | # The default value is "off". |
| 2309 | # |
| 2310 | # Note that this option will only affect rooms created after it is set. It |
| 2311 | # will also not affect rooms created by other servers. |
| 2312 | # |
| 2313 | #encryption_enabled_by_default_for_room_type: invite |
| 2314 | |
| 2315 | |
| 2316 | # Uncomment to allow non-server-admin users to create groups on this server |
| 2317 | # |
| 2318 | #enable_group_creation: true |
| 2319 | |
| 2320 | # If enabled, non server admins can only create groups with local parts |
| 2321 | # starting with this prefix |
| 2322 | # |
| 2323 | #group_creation_prefix: "unofficial_" |
| 2324 | |
| 2325 | |
| 2326 | |
| 2327 | # User Directory configuration |
| 2328 | # |
| 2329 | user_directory: |
| 2330 | # Defines whether users can search the user directory. If false then |
| 2331 | # empty responses are returned to all queries. Defaults to true. |
| 2332 | # |
| 2333 | # Uncomment to disable the user directory. |
| 2334 | # |
| 2335 | #enabled: false |
| 2336 | |
| 2337 | # Defines whether to search all users visible to your HS when searching |
| 2338 | # the user directory, rather than limiting to users visible in public |
| 2339 | # rooms. Defaults to false. |
| 2340 | # |
| 2341 | # If you set it true, you'll have to rebuild the user_directory search |
| 2342 | # indexes, see: |
| 2343 | # https://matrix-org.github.io/synapse/latest/user_directory.html |
| 2344 | # |
| 2345 | # Uncomment to return search results containing all known users, even if that |
| 2346 | # user does not share a room with the requester. |
| 2347 | # |
| 2348 | #search_all_users: true |
| 2349 | |
| 2350 | # Defines whether to prefer local users in search query results. |
| 2351 | # If True, local users are more likely to appear above remote users |
| 2352 | # when searching the user directory. Defaults to false. |
| 2353 | # |
| 2354 | # Uncomment to prefer local over remote users in user directory search |
| 2355 | # results. |
| 2356 | # |
| 2357 | #prefer_local_users: true |
| 2358 | |
| 2359 | |
| 2360 | # User Consent configuration |
| 2361 | # |
| 2362 | # for detailed instructions, see |
| 2363 | # https://matrix-org.github.io/synapse/latest/consent_tracking.html |
| 2364 | # |
| 2365 | # Parts of this section are required if enabling the 'consent' resource under |
| 2366 | # 'listeners', in particular 'template_dir' and 'version'. |
| 2367 | # |
| 2368 | # 'template_dir' gives the location of the templates for the HTML forms. |
| 2369 | # This directory should contain one subdirectory per language (eg, 'en', 'fr'), |
| 2370 | # and each language directory should contain the policy document (named as |
| 2371 | # '<version>.html') and a success page (success.html). |
| 2372 | # |
| 2373 | # 'version' specifies the 'current' version of the policy document. It defines |
| 2374 | # the version to be served by the consent resource if there is no 'v' |
| 2375 | # parameter. |
| 2376 | # |
| 2377 | # 'server_notice_content', if enabled, will send a user a "Server Notice" |
| 2378 | # asking them to consent to the privacy policy. The 'server_notices' section |
| 2379 | # must also be configured for this to work. Notices will *not* be sent to |
| 2380 | # guest users unless 'send_server_notice_to_guests' is set to true. |
| 2381 | # |
| 2382 | # 'block_events_error', if set, will block any attempts to send events |
| 2383 | # until the user consents to the privacy policy. The value of the setting is |
| 2384 | # used as the text of the error. |
| 2385 | # |
| 2386 | # 'require_at_registration', if enabled, will add a step to the registration |
| 2387 | # process, similar to how captcha works. Users will be required to accept the |
| 2388 | # policy before their account is created. |
| 2389 | # |
| 2390 | # 'policy_name' is the display name of the policy users will see when registering |
| 2391 | # for an account. Has no effect unless `require_at_registration` is enabled. |
| 2392 | # Defaults to "Privacy Policy". |
| 2393 | # |
| 2394 | #user_consent: |
| 2395 | # template_dir: res/templates/privacy |
| 2396 | # version: 1.0 |
| 2397 | # server_notice_content: |
| 2398 | # msgtype: m.text |
| 2399 | # body: >- |
| 2400 | # To continue using this homeserver you must review and agree to the |
| 2401 | # terms and conditions at %(consent_uri)s |
| 2402 | # send_server_notice_to_guests: true |
| 2403 | # block_events_error: >- |
| 2404 | # To continue using this homeserver you must review and agree to the |
| 2405 | # terms and conditions at %(consent_uri)s |
| 2406 | # require_at_registration: false |
| 2407 | # policy_name: Privacy Policy |
| 2408 | # |
| 2409 | |
| 2410 | |
| 2411 | |
| 2412 | # Settings for local room and user statistics collection. See |
| 2413 | # https://matrix-org.github.io/synapse/latest/room_and_user_statistics.html. |
| 2414 | # |
| 2415 | stats: |
| 2416 | # Uncomment the following to disable room and user statistics. Note that doing |
| 2417 | # so may cause certain features (such as the room directory) not to work |
| 2418 | # correctly. |
| 2419 | # |
| 2420 | #enabled: false |
| 2421 | |
| 2422 | |
| 2423 | # Server Notices room configuration |
| 2424 | # |
| 2425 | # Uncomment this section to enable a room which can be used to send notices |
| 2426 | # from the server to users. It is a special room which cannot be left; notices |
| 2427 | # come from a special "notices" user id. |
| 2428 | # |
| 2429 | # If you uncomment this section, you *must* define the system_mxid_localpart |
| 2430 | # setting, which defines the id of the user which will be used to send the |
| 2431 | # notices. |
| 2432 | # |
| 2433 | # It's also possible to override the room name, the display name of the |
| 2434 | # "notices" user, and the avatar for the user. |
| 2435 | # |
| 2436 | #server_notices: |
| 2437 | # system_mxid_localpart: notices |
| 2438 | # system_mxid_display_name: "Server Notices" |
| 2439 | # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ" |
| 2440 | # room_name: "Server Notices" |
| 2441 | |
| 2442 | |
| 2443 | |
| 2444 | # Uncomment to disable searching the public room list. When disabled |
| 2445 | # blocks searching local and remote room lists for local and remote |
| 2446 | # users by always returning an empty list for all queries. |
| 2447 | # |
| 2448 | #enable_room_list_search: false |
| 2449 | |
| 2450 | # The `alias_creation` option controls who's allowed to create aliases |
| 2451 | # on this server. |
| 2452 | # |
| 2453 | # The format of this option is a list of rules that contain globs that |
| 2454 | # match against user_id, room_id and the new alias (fully qualified with |
| 2455 | # server name). The action in the first rule that matches is taken, |
| 2456 | # which can currently either be "allow" or "deny". |
| 2457 | # |
| 2458 | # Missing user_id/room_id/alias fields default to "*". |
| 2459 | # |
| 2460 | # If no rules match the request is denied. An empty list means no one |
| 2461 | # can create aliases. |
| 2462 | # |
| 2463 | # Options for the rules include: |
| 2464 | # |
| 2465 | # user_id: Matches against the creator of the alias |
| 2466 | # alias: Matches against the alias being created |
| 2467 | # room_id: Matches against the room ID the alias is being pointed at |
| 2468 | # action: Whether to "allow" or "deny" the request if the rule matches |
| 2469 | # |
| 2470 | # The default is: |
| 2471 | # |
| 2472 | #alias_creation_rules: |
| 2473 | # - user_id: "*" |
| 2474 | # alias: "*" |
| 2475 | # room_id: "*" |
| 2476 | # action: allow |
| 2477 | |
| 2478 | # The `room_list_publication_rules` option controls who can publish and |
| 2479 | # which rooms can be published in the public room list. |
| 2480 | # |
| 2481 | # The format of this option is the same as that for |
| 2482 | # `alias_creation_rules`. |
| 2483 | # |
| 2484 | # If the room has one or more aliases associated with it, only one of |
| 2485 | # the aliases needs to match the alias rule. If there are no aliases |
| 2486 | # then only rules with `alias: *` match. |
| 2487 | # |
| 2488 | # If no rules match the request is denied. An empty list means no one |
| 2489 | # can publish rooms. |
| 2490 | # |
| 2491 | # Options for the rules include: |
| 2492 | # |
| 2493 | # user_id: Matches against the creator of the alias |
| 2494 | # room_id: Matches against the room ID being published |
| 2495 | # alias: Matches against any current local or canonical aliases |
| 2496 | # associated with the room |
| 2497 | # action: Whether to "allow" or "deny" the request if the rule matches |
| 2498 | # |
| 2499 | # The default is: |
| 2500 | # |
| 2501 | #room_list_publication_rules: |
| 2502 | # - user_id: "*" |
| 2503 | # alias: "*" |
| 2504 | # room_id: "*" |
| 2505 | # action: allow |
| 2506 | |
| 2507 | |
| 2508 | ## Opentracing ## |
| 2509 | |
| 2510 | # These settings enable opentracing, which implements distributed tracing. |
| 2511 | # This allows you to observe the causal chains of events across servers |
| 2512 | # including requests, key lookups etc., across any server running |
| 2513 | # synapse or any other other services which supports opentracing |
| 2514 | # (specifically those implemented with Jaeger). |
| 2515 | # |
| 2516 | opentracing: |
| 2517 | # tracing is disabled by default. Uncomment the following line to enable it. |
| 2518 | # |
| 2519 | #enabled: true |
| 2520 | |
| 2521 | # The list of homeservers we wish to send and receive span contexts and span baggage. |
| 2522 | # See https://matrix-org.github.io/synapse/latest/opentracing.html. |
| 2523 | # |
| 2524 | # This is a list of regexes which are matched against the server_name of the |
| 2525 | # homeserver. |
| 2526 | # |
| 2527 | # By default, it is empty, so no servers are matched. |
| 2528 | # |
| 2529 | #homeserver_whitelist: |
| 2530 | # - ".*" |
| 2531 | |
| 2532 | # A list of the matrix IDs of users whose requests will always be traced, |
| 2533 | # even if the tracing system would otherwise drop the traces due to |
| 2534 | # probabilistic sampling. |
| 2535 | # |
| 2536 | # By default, the list is empty. |
| 2537 | # |
| 2538 | #force_tracing_for_users: |
| 2539 | # - "@user1:server_name" |
| 2540 | # - "@user2:server_name" |
| 2541 | |
| 2542 | # Jaeger can be configured to sample traces at different rates. |
| 2543 | # All configuration options provided by Jaeger can be set here. |
| 2544 | # Jaeger's configuration is mostly related to trace sampling which |
| 2545 | # is documented here: |
| 2546 | # https://www.jaegertracing.io/docs/latest/sampling/. |
| 2547 | # |
| 2548 | #jaeger_config: |
| 2549 | # sampler: |
| 2550 | # type: const |
| 2551 | # param: 1 |
| 2552 | # logging: |
| 2553 | # false |
| 2554 | |
| 2555 | |
| 2556 | ## Workers ## |
| 2557 | |
| 2558 | # Disables sending of outbound federation transactions on the main process. |
| 2559 | # Uncomment if using a federation sender worker. |
| 2560 | # |
| 2561 | #send_federation: false |
| 2562 | |
| 2563 | # It is possible to run multiple federation sender workers, in which case the |
| 2564 | # work is balanced across them. |
| 2565 | # |
| 2566 | # This configuration must be shared between all federation sender workers, and if |
| 2567 | # changed all federation sender workers must be stopped at the same time and then |
| 2568 | # started, to ensure that all instances are running with the same config (otherwise |
| 2569 | # events may be dropped). |
| 2570 | # |
| 2571 | #federation_sender_instances: |
| 2572 | # - federation_sender1 |
| 2573 | |
| 2574 | # When using workers this should be a map from `worker_name` to the |
| 2575 | # HTTP replication listener of the worker, if configured. |
| 2576 | # |
| 2577 | #instance_map: |
| 2578 | # worker1: |
| 2579 | # host: localhost |
| 2580 | # port: 8034 |
| 2581 | |
| 2582 | # Experimental: When using workers you can define which workers should |
| 2583 | # handle event persistence and typing notifications. Any worker |
| 2584 | # specified here must also be in the `instance_map`. |
| 2585 | # |
| 2586 | #stream_writers: |
| 2587 | # events: worker1 |
| 2588 | # typing: worker1 |
| 2589 | |
| 2590 | # The worker that is used to run background tasks (e.g. cleaning up expired |
| 2591 | # data). If not provided this defaults to the main process. |
| 2592 | # |
| 2593 | #run_background_tasks_on: worker1 |
| 2594 | |
| 2595 | # A shared secret used by the replication APIs to authenticate HTTP requests |
| 2596 | # from workers. |
| 2597 | # |
| 2598 | # By default this is unused and traffic is not authenticated. |
| 2599 | # |
| 2600 | #worker_replication_secret: "" |
| 2601 | |
| 2602 | |
| 2603 | # Configuration for Redis when using workers. This *must* be enabled when |
| 2604 | # using workers (unless using old style direct TCP configuration). |
| 2605 | # |
| 2606 | redis: |
| 2607 | # Uncomment the below to enable Redis support. |
| 2608 | # |
| 2609 | #enabled: true |
| 2610 | |
| 2611 | # Optional host and port to use to connect to redis. Defaults to |
| 2612 | # localhost and 6379 |
| 2613 | # |
| 2614 | #host: localhost |
| 2615 | #port: 6379 |
| 2616 | |
| 2617 | # Optional password if configured on the Redis instance |
| 2618 | # |
| 2619 | #password: <secret_password> |
| 2620 | |
| 2621 | |
| 2622 | # vim:ft=yaml |