Guest User

Homeserver Configuration

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