Ingen beskrivning
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

etc_matrix-synapse_homeserver.j2 32KB

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