Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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