Guest User

homeserver.yaml

a guest
Feb 26th, 2019
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 30.33 KB | None | 0 0
  1. # vim:ft=yaml
  2. ## Server ##
  3.  
  4. # The domain name of the server, with optional explicit port.
  5. # This is used by remote servers to connect to this server,
  6. # e.g. matrix.org, localhost:8080, etc.
  7. # This is also the last part of your UserID.
  8. server_name: "SERVERNAME"
  9.  
  10. # When running as a daemon, the file to store the pid in
  11. pid_file: DATADIR/homeserver.pid
  12.  
  13. # CPU affinity mask. Setting this restricts the CPUs on which the
  14. # process will be scheduled. It is represented as a bitmask, with the
  15. # lowest order bit corresponding to the first logical CPU and the
  16. # highest order bit corresponding to the last logical CPU. Not all CPUs
  17. # may exist on a given system but a mask may specify more CPUs than are
  18. # present.
  19. #
  20. # For example:
  21. #    0x00000001  is processor #0,
  22. #    0x00000003  is processors #0 and #1,
  23. #    0xFFFFFFFF  is all processors (#0 through #31).
  24. #
  25. # Pinning a Python process to a single CPU is desirable, because Python
  26. # is inherently single-threaded due to the GIL, and can suffer a
  27. # 30-40% slowdown due to cache blow-out and thread context switching
  28. # if the scheduler happens to schedule the underlying threads across
  29. # different cores. See
  30. # https://www.mirantis.com/blog/improve-performance-python-programs-restricting-single-cpu/.
  31. #
  32. # This setting requires the affinity package to be installed!
  33. #
  34. # cpu_affinity: 0xFFFFFFFF
  35.  
  36. # The path to the web client which will be served at /_matrix/client/
  37. # if 'webclient' is configured under the 'listeners' configuration.
  38. #
  39. # web_client_location: "/path/to/web/root"
  40.  
  41. # The public-facing base URL that clients use to access this HS
  42. # (not including _matrix/...). This is the same URL a user would
  43. # enter into the 'custom HS URL' field on their client. If you
  44. # use synapse with a reverse proxy, this should be the URL to reach
  45. # synapse via the proxy.
  46. # public_baseurl: https://example.com/
  47.  
  48. # Set the soft limit on the number of file descriptors synapse can use
  49. # Zero is used to indicate synapse should set the soft limit to the
  50. # hard limit.
  51. soft_file_limit: 0
  52.  
  53. # Set to false to disable presence tracking on this homeserver.
  54. use_presence: true
  55.  
  56. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  57. # gc_thresholds: [700, 10, 10]
  58.  
  59. # Set the limit on the returned events in the timeline in the get
  60. # and sync operations. The default value is -1, means no upper limit.
  61. # filter_timeline_limit: 5000
  62.  
  63. # Whether room invites to users on this server should be blocked
  64. # (except those sent by local server admins). The default is False.
  65. # block_non_admin_invites: True
  66.  
  67. # Restrict federation to the following whitelist of domains.
  68. # N.B. we recommend also firewalling your federation listener to limit
  69. # inbound federation traffic as early as possible, rather than relying
  70. # purely on this application-layer restriction.  If not specified, the
  71. # default is to whitelist everything.
  72. #
  73. # federation_domain_whitelist:
  74. #  - lon.example.com
  75. #  - nyc.example.com
  76. #  - syd.example.com
  77.  
  78. # List of ports that Synapse should listen on, their purpose and their
  79. # configuration.
  80. #
  81. # Options for each listener include:
  82. #
  83. #   port: the TCP port to bind to
  84. #
  85. #   bind_addresses: a list of local addresses to listen on. The default is
  86. #       'all local interfaces'.
  87. #
  88. #   type: the type of listener. Normally 'http', but other valid options are:
  89. #       'manhole' (see docs/manhole.md),
  90. #       'metrics' (see docs/metrics-howto.rst),
  91. #       'replication' (see docs/workers.rst).
  92. #
  93. #   tls: set to true to enable TLS for this listener. Will use the TLS
  94. #       key/cert specified in tls_private_key_path / tls_certificate_path.
  95. #
  96. #   x_forwarded: Only valid for an 'http' listener. Set to true to use the
  97. #       X-Forwarded-For header as the client IP. Useful when Synapse is
  98. #       behind a reverse-proxy.
  99. #
  100. #   resources: Only valid for an 'http' listener. A list of resources to host
  101. #       on this port. Options for each resource are:
  102. #
  103. #       names: a list of names of HTTP resources. See below for a list of
  104. #           valid resource names.
  105. #
  106. #       compress: set to true to enable HTTP comression for this resource.
  107. #
  108. #   additional_resources: Only valid for an 'http' listener. A map of
  109. #        additional endpoints which should be loaded via dynamic modules.
  110. #
  111. # Valid resource names are:
  112. #
  113. #   client: the client-server API (/_matrix/client). Also implies 'media' and
  114. #       'static'.
  115. #
  116. #   consent: user consent forms (/_matrix/consent). See
  117. #       docs/consent_tracking.md.
  118. #
  119. #   federation: the server-server API (/_matrix/federation). Also implies
  120. #       'media', 'keys', 'openid'
  121. #
  122. #   keys: the key discovery API (/_matrix/keys).
  123. #
  124. #   media: the media API (/_matrix/media).
  125. #
  126. #   metrics: the metrics interface. See docs/metrics-howto.rst.
  127. #
  128. #   openid: OpenID authentication.
  129. #
  130. #   replication: the HTTP replication API (/_synapse/replication). See
  131. #       docs/workers.rst.
  132. #
  133. #   static: static resources under synapse/static (/_matrix/static). (Mostly
  134. #       useful for 'fallback authentication'.)
  135. #
  136. #   webclient: A web client. Requires web_client_location to be set.
  137. #
  138. listeners:
  139.  # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  140.   #
  141.   # Disabled by default. To enable it, uncomment the following. (Note that you
  142.   # will also need to give Synapse a TLS key and certificate: see the TLS section
  143.   # below.)
  144.   #
  145.   # - port: 8448
  146.   #   type: http
  147.   #   tls: true
  148.   #   resources:
  149.   #     - names: [client, federation]
  150.  
  151.   # Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
  152.   # that unwraps TLS.
  153.   #
  154.   # If you plan to use a reverse proxy, please see
  155.   # https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.rst.
  156.   #
  157.   - port: 8008
  158.     tls: false
  159.     bind_addresses: ['::1', '127.0.0.1']
  160.     type: http
  161.     x_forwarded: true
  162.  
  163.     resources:
  164.       - names: [client, federation]
  165.         compress: false
  166.  
  167.     # example additonal_resources:
  168.     #
  169.     # additional_resources:
  170.     #   "/_matrix/my/custom/endpoint":
  171.     #     module: my_module.CustomRequestHandler
  172.     #     config: {}
  173.  
  174.   # Turn on the twisted ssh manhole service on localhost on the given
  175.   # port.
  176.   # - port: 9000
  177.   #   bind_addresses: ['::1', '127.0.0.1']
  178.   #   type: manhole
  179.  
  180. # Homeserver blocking
  181. #
  182. # How to reach the server admin, used in ResourceLimitError
  183. # admin_contact: 'mailto:admin@server.com'
  184. #
  185. # Global block config
  186. #
  187. # hs_disabled: False
  188. # hs_disabled_message: 'Human readable reason for why the HS is blocked'
  189. # hs_disabled_limit_type: 'error code(str), to help clients decode reason'
  190. #
  191. # Monthly Active User Blocking
  192. #
  193. # Enables monthly active user checking
  194. # limit_usage_by_mau: False
  195. # max_mau_value: 50
  196. # mau_trial_days: 2
  197. #
  198. # If enabled, the metrics for the number of monthly active users will
  199. # be populated, however no one will be limited. If limit_usage_by_mau
  200. # is true, this is implied to be true.
  201. # mau_stats_only: False
  202. #
  203. # Sometimes the server admin will want to ensure certain accounts are
  204. # never blocked by mau checking. These accounts are specified here.
  205. #
  206. # mau_limit_reserved_threepids:
  207. # - medium: 'email'
  208. #   address: 'reserved_user@example.com'
  209. #
  210. # Room searching
  211. #
  212. # If disabled, new messages will not be indexed for searching and users
  213. # will receive errors when searching for messages. Defaults to enabled.
  214. # enable_search: true
  215.  
  216.  
  217. ## TLS ##
  218.  
  219. # PEM-encoded X509 certificate for TLS.
  220. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  221. # certificate, signed by a recognised Certificate Authority.
  222. #
  223. # See 'ACME support' below to enable auto-provisioning this certificate via
  224. # Let's Encrypt.
  225. #
  226. # tls_certificate_path: "CONFDIR/SERVERNAME.tls.crt"
  227.  
  228. # PEM-encoded private key for TLS
  229. # tls_private_key_path: "CONFDIR/SERVERNAME.tls.key"
  230.  
  231. # ACME support: This will configure Synapse to request a valid TLS certificate
  232. # for your configured `server_name` via Let's Encrypt.
  233. #
  234. # Note that provisioning a certificate in this way requires port 80 to be
  235. # routed to Synapse so that it can complete the http-01 ACME challenge.
  236. # By default, if you enable ACME support, Synapse will attempt to listen on
  237. # port 80 for incoming http-01 challenges - however, this will likely fail
  238. # with 'Permission denied' or a similar error.
  239. #
  240. # There are a couple of potential solutions to this:
  241. #
  242. #  * If you already have an Apache, Nginx, or similar listening on port 80,
  243. #    you can configure Synapse to use an alternate port, and have your web
  244. #    server forward the requests. For example, assuming you set 'port: 8009'
  245. #    below, on Apache, you would write:
  246. #
  247. #    ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  248. #
  249. #  * Alternatively, you can use something like `authbind` to give Synapse
  250. #    permission to listen on port 80.
  251. #
  252. acme:
  253.    # ACME support is disabled by default. Uncomment the following line
  254.     # (and tls_certificate_path and tls_private_key_path above) to enable it.
  255.     #
  256.     # enabled: true
  257.  
  258.     # Endpoint to use to request certificates. If you only want to test,
  259.     # use Let's Encrypt's staging url:
  260.     #     https://acme-staging.api.letsencrypt.org/directory
  261.     #
  262.     # url: https://acme-v01.api.letsencrypt.org/directory
  263.  
  264.     # Port number to listen on for the HTTP-01 challenge. Change this if
  265.     # you are forwarding connections through Apache/Nginx/etc.
  266.     #
  267.     # port: 80
  268.  
  269.     # Local addresses to listen on for incoming connections.
  270.     # Again, you may want to change this if you are forwarding connections
  271.     # through Apache/Nginx/etc.
  272.     #
  273.     # bind_addresses: ['::', '0.0.0.0']
  274.  
  275.     # How many days remaining on a certificate before it is renewed.
  276.     #
  277.     # reprovision_threshold: 30
  278.  
  279. # List of allowed TLS fingerprints for this server to publish along
  280. # with the signing keys for this server. Other matrix servers that
  281. # make HTTPS requests to this server will check that the TLS
  282. # certificates returned by this server match one of the fingerprints.
  283. #
  284. # Synapse automatically adds the fingerprint of its own certificate
  285. # to the list. So if federation traffic is handled directly by synapse
  286. # then no modification to the list is required.
  287. #
  288. # If synapse is run behind a load balancer that handles the TLS then it
  289. # will be necessary to add the fingerprints of the certificates used by
  290. # the loadbalancers to this list if they are different to the one
  291. # synapse is using.
  292. #
  293. # Homeservers are permitted to cache the list of TLS fingerprints
  294. # returned in the key responses up to the "valid_until_ts" returned in
  295. # key. It may be necessary to publish the fingerprints of a new
  296. # certificate and wait until the "valid_until_ts" of the previous key
  297. # responses have passed before deploying it.
  298. #
  299. # You can calculate a fingerprint from a given TLS listener via:
  300. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  301. #   openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  302. # or by checking matrix.org/federationtester/api/report?server_name=$host
  303. #
  304. tls_fingerprints: []
  305. # tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  306.  
  307.  
  308.  
  309. # Database configuration
  310. database:
  311.  # The database engine name
  312.   name: "sqlite3"
  313.   # Arguments to pass to the engine
  314.   args:
  315.    # Path to the database
  316.     database: "DATADIR/homeserver.db"
  317.  
  318. # Number of events to cache in memory.
  319. event_cache_size: "10K"
  320.  
  321.  
  322.  
  323. # A yaml python logging config file
  324. log_config: "CONFDIR/SERVERNAME.log.config"
  325.  
  326.  
  327. ## Ratelimiting ##
  328.  
  329. # Number of messages a client can send per second
  330. rc_messages_per_second: 0.2
  331.  
  332. # Number of message a client can send before being throttled
  333. rc_message_burst_count: 10.0
  334.  
  335. # The federation window size in milliseconds
  336. federation_rc_window_size: 1000
  337.  
  338. # The number of federation requests from a single server in a window
  339. # before the server will delay processing the request.
  340. federation_rc_sleep_limit: 10
  341.  
  342. # The duration in milliseconds to delay processing events from
  343. # remote servers by if they go over the sleep limit.
  344. federation_rc_sleep_delay: 500
  345.  
  346. # The maximum number of concurrent federation requests allowed
  347. # from a single server
  348. federation_rc_reject_limit: 50
  349.  
  350. # The number of federation requests to concurrently process from a
  351. # single server
  352. federation_rc_concurrent: 3
  353.  
  354.  
  355.  
  356. # Directory where uploaded images and attachments are stored.
  357. media_store_path: "DATADIR/media_store"
  358.  
  359. # Media storage providers allow media to be stored in different
  360. # locations.
  361. # media_storage_providers:
  362. # - module: file_system
  363. #   # Whether to write new local files.
  364. #   store_local: false
  365. #   # Whether to write new remote media
  366. #   store_remote: false
  367. #   # Whether to block upload requests waiting for write to this
  368. #   # provider to complete
  369. #   store_synchronous: false
  370. #   config:
  371. #     directory: /mnt/some/other/directory
  372.  
  373. # Directory where in-progress uploads are stored.
  374. uploads_path: "DATADIR/uploads"
  375.  
  376. # The largest allowed upload size in bytes
  377. max_upload_size: "10M"
  378.  
  379. # Maximum number of pixels that will be thumbnailed
  380. max_image_pixels: "32M"
  381.  
  382. # Whether to generate new thumbnails on the fly to precisely match
  383. # the resolution requested by the client. If true then whenever
  384. # a new resolution is requested by the client the server will
  385. # generate a new thumbnail. If false the server will pick a thumbnail
  386. # from a precalculated list.
  387. dynamic_thumbnails: false
  388.  
  389. # List of thumbnail to precalculate when an image is uploaded.
  390. thumbnail_sizes:
  391. - width: 32
  392.   height: 32
  393.   method: crop
  394. - width: 96
  395.   height: 96
  396.   method: crop
  397. - width: 320
  398.   height: 240
  399.   method: scale
  400. - width: 640
  401.   height: 480
  402.   method: scale
  403. - width: 800
  404.   height: 600
  405.   method: scale
  406.  
  407. # Is the preview URL API enabled?  If enabled, you *must* specify
  408. # an explicit url_preview_ip_range_blacklist of IPs that the spider is
  409. # denied from accessing.
  410. url_preview_enabled: False
  411.  
  412. # List of IP address CIDR ranges that the URL preview spider is denied
  413. # from accessing.  There are no defaults: you must explicitly
  414. # specify a list for URL previewing to work.  You should specify any
  415. # internal services in your network that you do not want synapse to try
  416. # to connect to, otherwise anyone in any Matrix room could cause your
  417. # synapse to issue arbitrary GET requests to your internal services,
  418. # causing serious security issues.
  419. #
  420. # url_preview_ip_range_blacklist:
  421. # - '127.0.0.0/8'
  422. # - '10.0.0.0/8'
  423. # - '172.16.0.0/12'
  424. # - '192.168.0.0/16'
  425. # - '100.64.0.0/10'
  426. # - '169.254.0.0/16'
  427. # - '::1/128'
  428. # - 'fe80::/64'
  429. # - 'fc00::/7'
  430. #
  431. # List of IP address CIDR ranges that the URL preview spider is allowed
  432. # to access even if they are specified in url_preview_ip_range_blacklist.
  433. # This is useful for specifying exceptions to wide-ranging blacklisted
  434. # target IP ranges - e.g. for enabling URL previews for a specific private
  435. # website only visible in your network.
  436. #
  437. # url_preview_ip_range_whitelist:
  438. # - '192.168.1.1'
  439.  
  440. # Optional list of URL matches that the URL preview spider is
  441. # denied from accessing.  You should use url_preview_ip_range_blacklist
  442. # in preference to this, otherwise someone could define a public DNS
  443. # entry that points to a private IP address and circumvent the blacklist.
  444. # This is more useful if you know there is an entire shape of URL that
  445. # you know that will never want synapse to try to spider.
  446. #
  447. # Each list entry is a dictionary of url component attributes as returned
  448. # by urlparse.urlsplit as applied to the absolute form of the URL.  See
  449. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  450. # The values of the dictionary are treated as an filename match pattern
  451. # applied to that component of URLs, unless they start with a ^ in which
  452. # case they are treated as a regular expression match.  If all the
  453. # specified component matches for a given list item succeed, the URL is
  454. # blacklisted.
  455. #
  456. # url_preview_url_blacklist:
  457. # # blacklist any URL with a username in its URI
  458. # - username: '*'
  459. #
  460. # # blacklist all *.google.com URLs
  461. # - netloc: 'google.com'
  462. # - netloc: '*.google.com'
  463. #
  464. # # blacklist all plain HTTP URLs
  465. # - scheme: 'http'
  466. #
  467. # # blacklist http(s)://www.acme.com/foo
  468. # - netloc: 'www.acme.com'
  469. #   path: '/foo'
  470. #
  471. # # blacklist any URL with a literal IPv4 address
  472. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  473.  
  474. # The largest allowed URL preview spidering size in bytes
  475. max_spider_size: "10M"
  476.  
  477.  
  478.  
  479.  
  480. ## Captcha ##
  481. # See docs/CAPTCHA_SETUP for full details of configuring this.
  482.  
  483. # This Home Server's ReCAPTCHA public key.
  484. recaptcha_public_key: "YOUR_PUBLIC_KEY"
  485.  
  486. # This Home Server's ReCAPTCHA private key.
  487. recaptcha_private_key: "YOUR_PRIVATE_KEY"
  488.  
  489. # Enables ReCaptcha checks when registering, preventing signup
  490. # unless a captcha is answered. Requires a valid ReCaptcha
  491. # public/private key.
  492. enable_registration_captcha: False
  493.  
  494. # A secret key used to bypass the captcha test entirely.
  495. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  496.  
  497. # The API endpoint to use for verifying m.login.recaptcha responses.
  498. recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
  499.  
  500.  
  501. ## Turn ##
  502.  
  503. # The public URIs of the TURN server to give to clients
  504. #turn_uris: []
  505.  
  506. # The shared secret used to compute passwords for the TURN server
  507. #turn_shared_secret: "YOUR_SHARED_SECRET"
  508.  
  509. # The Username and password if the TURN server needs them and
  510. # does not use a token
  511. #turn_username: "TURNSERVER_USERNAME"
  512. #turn_password: "TURNSERVER_PASSWORD"
  513.  
  514. # How long generated TURN credentials last
  515. turn_user_lifetime: "1h"
  516.  
  517. # Whether guests should be allowed to use the TURN server.
  518. # This defaults to True, otherwise VoIP will be unreliable for guests.
  519. # However, it does introduce a slight security risk as it allows users to
  520. # connect to arbitrary endpoints without having first signed up for a
  521. # valid account (e.g. by passing a CAPTCHA).
  522. turn_allow_guests: True
  523.  
  524.  
  525. ## Registration ##
  526.  
  527. # Enable registration for new users.
  528. enable_registration: False
  529.  
  530. # The user must provide all of the below types of 3PID when registering.
  531. #
  532. # registrations_require_3pid:
  533. #     - email
  534. #     - msisdn
  535.  
  536. # Explicitly disable asking for MSISDNs from the registration
  537. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  538. #
  539. # disable_msisdn_registration = True
  540.  
  541. # Mandate that users are only allowed to associate certain formats of
  542. # 3PIDs with accounts on this server.
  543. #
  544. # allowed_local_3pids:
  545. #     - medium: email
  546. #       pattern: '.*@matrix\.org'
  547. #     - medium: email
  548. #       pattern: '.*@vector\.im'
  549. #     - medium: msisdn
  550. #       pattern: '\+44'
  551.  
  552. # If set, allows registration by anyone who also has the shared
  553. # secret, even if registration is otherwise disabled.
  554. # registration_shared_secret: <PRIVATE STRING>
  555.  
  556. # Set the number of bcrypt rounds used to generate password hash.
  557. # Larger numbers increase the work factor needed to generate the hash.
  558. # The default number is 12 (which equates to 2^12 rounds).
  559. # N.B. that increasing this will exponentially increase the time required
  560. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  561. bcrypt_rounds: 12
  562.  
  563. # Allows users to register as guests without a password/email/etc, and
  564. # participate in rooms hosted on this server which have been made
  565. # accessible to anonymous users.
  566. allow_guest_access: False
  567.  
  568. # The identity server which we suggest that clients should use when users log
  569. # in on this server.
  570. #
  571. # (By default, no suggestion is made, so it is left up to the client.
  572. # This setting is ignored unless public_baseurl is also set.)
  573. #
  574. # default_identity_server: https://matrix.org
  575.  
  576. # The list of identity servers trusted to verify third party
  577. # identifiers by this server.
  578. #
  579. # Also defines the ID server which will be called when an account is
  580. # deactivated (one will be picked arbitrarily).
  581. trusted_third_party_id_servers:
  582.    - matrix.org
  583.     - vector.im
  584.  
  585. # Users who register on this homeserver will automatically be joined
  586. # to these rooms
  587. #auto_join_rooms:
  588. #    - "#example:example.com"
  589.  
  590. # Where auto_join_rooms are specified, setting this flag ensures that the
  591. # the rooms exist by creating them when the first user on the
  592. # homeserver registers.
  593. # Setting to false means that if the rooms are not manually created,
  594. # users cannot be auto-joined since they do not exist.
  595. autocreate_auto_join_rooms: true
  596.  
  597.  
  598. ## Metrics ###
  599.  
  600. # Enable collection and rendering of performance metrics
  601. enable_metrics: False
  602. # report_stats: true|false
  603.  
  604.  
  605. ## API Configuration ##
  606.  
  607. # A list of event types that will be included in the room_invite_state
  608. room_invite_state_types:
  609.    - "m.room.join_rules"
  610.     - "m.room.canonical_alias"
  611.     - "m.room.avatar"
  612.     - "m.room.encryption"
  613.     - "m.room.name"
  614.  
  615.  
  616. # A list of application service config file to use
  617. app_service_config_files: []
  618.  
  619. # Whether or not to track application service IP addresses. Implicitly
  620. # enables MAU tracking for application service users.
  621. track_appservice_user_ips: False
  622.  
  623.  
  624. # a secret which is used to sign access tokens. If none is specified,
  625. # the registration_shared_secret is used, if one is given; otherwise,
  626. # a secret key is derived from the signing key.
  627. # macaroon_secret_key: <PRIVATE STRING>
  628.  
  629. # Used to enable access token expiration.
  630. expire_access_token: False
  631.  
  632. # a secret which is used to calculate HMACs for form values, to stop
  633. # falsification of values. Must be specified for the User Consent
  634. # forms to work.
  635. # form_secret: <PRIVATE STRING>
  636.  
  637. ## Signing Keys ##
  638.  
  639. # Path to the signing key to sign messages with
  640. signing_key_path: "CONFDIR/SERVERNAME.signing.key"
  641.  
  642. # The keys that the server used to sign messages with but won't use
  643. # to sign new messages. E.g. it has lost its private key
  644. old_signing_keys: {}
  645. #  "ed25519:auto":
  646. #    # Base64 encoded public key
  647. #    key: "The public part of your old signing key."
  648. #    # Millisecond POSIX timestamp when the key expired.
  649. #    expired_ts: 123456789123
  650.  
  651. # How long key response published by this server is valid for.
  652. # Used to set the valid_until_ts in /key/v2 APIs.
  653. # Determines how quickly servers will query to check which keys
  654. # are still valid.
  655. key_refresh_interval: "1d" # 1 Day.
  656.  
  657. # The trusted servers to download signing keys from.
  658. perspectives:
  659.   servers:
  660.     "matrix.org":
  661.       verify_keys:
  662.         "ed25519:auto":
  663.           key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
  664.  
  665.  
  666.  
  667. # Enable SAML2 for registration and login. Uses pysaml2.
  668. #
  669. # saml2_config:
  670. #
  671. #   # The following is the configuration for the pysaml2 Service Provider.
  672. #   # See pysaml2 docs for format of config.
  673. #   #
  674. #   # Default values will be used for the 'entityid' and 'service' settings,
  675. #   # so it is not normally necessary to specify them unless you need to
  676. #   # override them.
  677. #
  678. #   sp_config:
  679. #     # point this to the IdP's metadata. You can use either a local file or
  680. #     # (preferably) a URL.
  681. #     metadata:
  682. #       # local: ["saml2/idp.xml"]
  683. #       remote:
  684. #         - url: https://our_idp/metadata.xml
  685. #
  686. #     # The following is just used to generate our metadata xml, and you
  687. #     # may well not need it, depending on your setup. Alternatively you
  688. #     # may need a whole lot more detail - see the pysaml2 docs!
  689. #
  690. #     description: ["My awesome SP", "en"]
  691. #     name: ["Test SP", "en"]
  692. #
  693. #     organization:
  694. #       name: Example com
  695. #       display_name:
  696. #         - ["Example co", "en"]
  697. #       url: "http://example.com"
  698. #
  699. #     contact_person:
  700. #       - given_name: Bob
  701. #         sur_name: "the Sysadmin"
  702. #         email_address": ["admin@example.com"]
  703. #         contact_type": technical
  704. #
  705. #   # Instead of putting the config inline as above, you can specify a
  706. #   # separate pysaml2 configuration file:
  707. #   #
  708. #   # config_path: "CONFDIR/sp_conf.py"
  709.  
  710.  
  711.  
  712. # Enable CAS for registration and login.
  713. #cas_config:
  714. #   enabled: true
  715. #   server_url: "https://cas-server.com"
  716. #   service_url: "https://homeserver.domain.com:8448"
  717. #   #required_attributes:
  718. #   #    name: value
  719.  
  720.  
  721. # The JWT needs to contain a globally unique "sub" (subject) claim.
  722. #
  723. # jwt_config:
  724. #    enabled: true
  725. #    secret: "a secret"
  726. #    algorithm: "HS256"
  727.  
  728.  
  729.  
  730. # Enable password for login.
  731. password_config:
  732.    enabled: true
  733.    # Uncomment and change to a secret random string for extra security.
  734.    # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  735.    #pepper: ""
  736.  
  737.  
  738.  
  739. # Enable sending emails for notification events
  740. # Defining a custom URL for Riot is only needed if email notifications
  741. # should contain links to a self-hosted installation of Riot; when set
  742. # the "app_name" setting is ignored.
  743. #
  744. # If your SMTP server requires authentication, the optional smtp_user &
  745. # smtp_pass variables should be used
  746. #
  747. #email:
  748. #   enable_notifs: false
  749. #   smtp_host: "localhost"
  750. #   smtp_port: 25
  751. #   smtp_user: "exampleusername"
  752. #   smtp_pass: "examplepassword"
  753. #   require_transport_security: False
  754. #   notif_from: "Your Friendly %(app)s Home Server <noreply@example.com>"
  755. #   app_name: Matrix
  756. #   # if template_dir is unset, uses the example templates that are part of
  757. #   # the Synapse distribution.
  758. #   #template_dir: res/templates
  759. #   notif_template_html: notif_mail.html
  760. #   notif_template_text: notif_mail.txt
  761. #   notif_for_new_users: True
  762. #   riot_base_url: "http://localhost/riot"
  763.  
  764.  
  765. # password_providers:
  766. #     - module: "ldap_auth_provider.LdapAuthProvider"
  767. #       config:
  768. #         enabled: true
  769. #         uri: "ldap://ldap.example.com:389"
  770. #         start_tls: true
  771. #         base: "ou=users,dc=example,dc=com"
  772. #         attributes:
  773. #            uid: "cn"
  774. #            mail: "email"
  775. #            name: "givenName"
  776. #         #bind_dn:
  777. #         #bind_password:
  778. #         #filter: "(objectClass=posixAccount)"
  779.  
  780.  
  781.  
  782. # Clients requesting push notifications can either have the body of
  783. # the message sent in the notification poke along with other details
  784. # like the sender, or just the event ID and room ID (`event_id_only`).
  785. # If clients choose the former, this option controls whether the
  786. # notification request includes the content of the event (other details
  787. # like the sender are still included). For `event_id_only` push, it
  788. # has no effect.
  789.  
  790. # For modern android devices the notification content will still appear
  791. # because it is loaded by the app. iPhone, however will send a
  792. # notification saying only that a message arrived and who it came from.
  793. #
  794. #push:
  795. #   include_content: true
  796.  
  797.  
  798. # spam_checker:
  799. #     module: "my_custom_project.SuperSpamChecker"
  800. #     config:
  801. #         example_option: 'things'
  802.  
  803.  
  804. # Whether to allow non server admins to create groups on this server
  805. enable_group_creation: false
  806.  
  807. # If enabled, non server admins can only create groups with local parts
  808. # starting with this prefix
  809. # group_creation_prefix: "unofficial/"
  810.  
  811.  
  812.  
  813. # User Directory configuration
  814. #
  815. # 'search_all_users' defines whether to search all users visible to your HS
  816. # when searching the user directory, rather than limiting to users visible
  817. # in public rooms.  Defaults to false.  If you set it True, you'll have to run
  818. # UPDATE user_directory_stream_pos SET stream_id = NULL;
  819. # on your database to tell it to rebuild the user_directory search indexes.
  820. #
  821. #user_directory:
  822. #   search_all_users: false
  823.  
  824.  
  825. # User Consent configuration
  826. #
  827. # for detailed instructions, see
  828. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  829. #
  830. # Parts of this section are required if enabling the 'consent' resource under
  831. # 'listeners', in particular 'template_dir' and 'version'.
  832. #
  833. # 'template_dir' gives the location of the templates for the HTML forms.
  834. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  835. # and each language directory should contain the policy document (named as
  836. # '<version>.html') and a success page (success.html).
  837. #
  838. # 'version' specifies the 'current' version of the policy document. It defines
  839. # the version to be served by the consent resource if there is no 'v'
  840. # parameter.
  841. #
  842. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  843. # asking them to consent to the privacy policy. The 'server_notices' section
  844. # must also be configured for this to work. Notices will *not* be sent to
  845. # guest users unless 'send_server_notice_to_guests' is set to true.
  846. #
  847. # 'block_events_error', if set, will block any attempts to send events
  848. # until the user consents to the privacy policy. The value of the setting is
  849. # used as the text of the error.
  850. #
  851. # 'require_at_registration', if enabled, will add a step to the registration
  852. # process, similar to how captcha works. Users will be required to accept the
  853. # policy before their account is created.
  854. #
  855. # 'policy_name' is the display name of the policy users will see when registering
  856. # for an account. Has no effect unless `require_at_registration` is enabled.
  857. # Defaults to "Privacy Policy".
  858. #
  859. # user_consent:
  860. #   template_dir: res/templates/privacy
  861. #   version: 1.0
  862. #   server_notice_content:
  863. #     msgtype: m.text
  864. #     body: >-
  865. #       To continue using this homeserver you must review and agree to the
  866. #       terms and conditions at %(consent_uri)s
  867. #   send_server_notice_to_guests: True
  868. #   block_events_error: >-
  869. #     To continue using this homeserver you must review and agree to the
  870. #     terms and conditions at %(consent_uri)s
  871. #   require_at_registration: False
  872. #   policy_name: Privacy Policy
  873. #
  874.  
  875.  
  876. # Server Notices room configuration
  877. #
  878. # Uncomment this section to enable a room which can be used to send notices
  879. # from the server to users. It is a special room which cannot be left; notices
  880. # come from a special "notices" user id.
  881. #
  882. # If you uncomment this section, you *must* define the system_mxid_localpart
  883. # setting, which defines the id of the user which will be used to send the
  884. # notices.
  885. #
  886. # It's also possible to override the room name, the display name of the
  887. # "notices" user, and the avatar for the user.
  888. #
  889. # server_notices:
  890. #   system_mxid_localpart: notices
  891. #   system_mxid_display_name: "Server Notices"
  892. #   system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  893. #   room_name: "Server Notices"
  894.  
  895.  
  896.  
  897. # The `alias_creation` option controls who's allowed to create aliases
  898. # on this server.
  899. #
  900. # The format of this option is a list of rules that contain globs that
  901. # match against user_id and the new alias (fully qualified with server
  902. # name). The action in the first rule that matches is taken, which can
  903. # currently either be "allow" or "deny".
  904. #
  905. # If no rules match the request is denied.
  906. alias_creation_rules:
  907.     - user_id: "*"
  908.       alias: "*"
  909.       action: allow
Add Comment
Please, Sign In to add comment