Guest User

homeserver.yaml

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