Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

685 wiersze
22 KiB

  1. # vim:ft=yaml
  2. # PEM encoded X509 certificate for TLS.
  3. # You can replace the self-signed certificate that synapse
  4. # autogenerates on launch with your own SSL certificate + key pair
  5. # if you like. Any required intermediary certificates can be
  6. # appended after the primary certificate in hierarchical order.
  7. tls_certificate_path: "/data/{{ hostname_matrix }}.tls.crt"
  8. # PEM encoded private key for TLS
  9. tls_private_key_path: "/data/{{ hostname_matrix }}.tls.key"
  10. # PEM dh parameters for ephemeral keys
  11. tls_dh_params_path: "/data/{{ hostname_matrix }}.tls.dh"
  12. # Don't bind to the https port
  13. no_tls: False
  14. # List of allowed TLS fingerprints for this server to publish along
  15. # with the signing keys for this server. Other matrix servers that
  16. # make HTTPS requests to this server will check that the TLS
  17. # certificates returned by this server match one of the fingerprints.
  18. #
  19. # Synapse automatically adds the fingerprint of its own certificate
  20. # to the list. So if federation traffic is handled directly by synapse
  21. # then no modification to the list is required.
  22. #
  23. # If synapse is run behind a load balancer that handles the TLS then it
  24. # will be necessary to add the fingerprints of the certificates used by
  25. # the loadbalancers to this list if they are different to the one
  26. # synapse is using.
  27. #
  28. # Homeservers are permitted to cache the list of TLS fingerprints
  29. # returned in the key responses up to the "valid_until_ts" returned in
  30. # key. It may be necessary to publish the fingerprints of a new
  31. # certificate and wait until the "valid_until_ts" of the previous key
  32. # responses have passed before deploying it.
  33. #
  34. # You can calculate a fingerprint from a given TLS listener via:
  35. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  36. # openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  37. # or by checking matrix.org/federationtester/api/report?server_name=$host
  38. #
  39. tls_fingerprints: []
  40. # tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  41. ## Server ##
  42. # The domain name of the server, with optional explicit port.
  43. # This is used by remote servers to connect to this server,
  44. # e.g. matrix.org, localhost:8080, etc.
  45. # This is also the last part of your UserID.
  46. server_name: "{{ hostname_identity }}"
  47. # When running as a daemon, the file to store the pid in
  48. pid_file: /homeserver.pid
  49. # CPU affinity mask. Setting this restricts the CPUs on which the
  50. # process will be scheduled. It is represented as a bitmask, with the
  51. # lowest order bit corresponding to the first logical CPU and the
  52. # highest order bit corresponding to the last logical CPU. Not all CPUs
  53. # may exist on a given system but a mask may specify more CPUs than are
  54. # present.
  55. #
  56. # For example:
  57. # 0x00000001 is processor #0,
  58. # 0x00000003 is processors #0 and #1,
  59. # 0xFFFFFFFF is all processors (#0 through #31).
  60. #
  61. # Pinning a Python process to a single CPU is desirable, because Python
  62. # is inherently single-threaded due to the GIL, and can suffer a
  63. # 30-40% slowdown due to cache blow-out and thread context switching
  64. # if the scheduler happens to schedule the underlying threads across
  65. # different cores. See
  66. # https://www.mirantis.com/blog/improve-performance-python-programs-restricting-single-cpu/.
  67. #
  68. # cpu_affinity: 0xFFFFFFFF
  69. # Whether to serve a web client from the HTTP/HTTPS root resource.
  70. web_client: False
  71. # The root directory to server for the above web client.
  72. # If left undefined, synapse will serve the matrix-angular-sdk web client.
  73. # Make sure matrix-angular-sdk is installed with pip if web_client is True
  74. # and web_client_location is undefined
  75. # web_client_location: "/path/to/web/root"
  76. # The public-facing base URL for the client API (not including _matrix/...)
  77. public_baseurl: https://{{ hostname_matrix }}/
  78. # Set the soft limit on the number of file descriptors synapse can use
  79. # Zero is used to indicate synapse should set the soft limit to the
  80. # hard limit.
  81. soft_file_limit: 0
  82. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  83. # gc_thresholds: [700, 10, 10]
  84. # Set the limit on the returned events in the timeline in the get
  85. # and sync operations. The default value is -1, means no upper limit.
  86. # filter_timeline_limit: 5000
  87. # Whether room invites to users on this server should be blocked
  88. # (except those sent by local server admins). The default is False.
  89. # block_non_admin_invites: True
  90. # Restrict federation to the following whitelist of domains.
  91. # N.B. we recommend also firewalling your federation listener to limit
  92. # inbound federation traffic as early as possible, rather than relying
  93. # purely on this application-layer restriction. If not specified, the
  94. # default is to whitelist everything.
  95. #
  96. # federation_domain_whitelist:
  97. # - lon.example.com
  98. # - nyc.example.com
  99. # - syd.example.com
  100. # List of ports that Synapse should listen on, their purpose and their
  101. # configuration.
  102. listeners:
  103. # Main HTTPS listener
  104. # For when matrix traffic is sent directly to synapse.
  105. -
  106. # The port to listen for HTTPS requests on.
  107. port: 8448
  108. # Local addresses to listen on.
  109. # On Linux and Mac OS, `::` will listen on all IPv4 and IPv6
  110. # addresses by default. For most other OSes, this will only listen
  111. # on IPv6.
  112. bind_addresses:
  113. - '::'
  114. - '0.0.0.0'
  115. # This is a 'http' listener, allows us to specify 'resources'.
  116. type: http
  117. tls: true
  118. # Use the X-Forwarded-For (XFF) header as the client IP and not the
  119. # actual client IP.
  120. x_forwarded: false
  121. # List of HTTP resources to serve on this listener.
  122. resources:
  123. - names: [federation] # Federation APIs
  124. compress: false
  125. # optional list of additional endpoints which can be loaded via
  126. # dynamic modules
  127. # additional_resources:
  128. # "/_matrix/my/custom/endpoint":
  129. # module: my_module.CustomRequestHandler
  130. # config: {}
  131. # Unsecure HTTP listener,
  132. # For when matrix traffic passes through loadbalancer that unwraps TLS.
  133. - port: 8008
  134. tls: false
  135. bind_addresses: ['::', '0.0.0.0']
  136. type: http
  137. x_forwarded: true
  138. resources:
  139. - names: [client]
  140. compress: false
  141. # Turn on the twisted ssh manhole service on localhost on the given
  142. # port.
  143. # - port: 9000
  144. # bind_addresses: ['::1', '127.0.0.1']
  145. # type: manhole
  146. # Database configuration
  147. database:
  148. # The database engine name
  149. name: "psycopg2"
  150. args:
  151. user: "{{ matrix_postgres_connection_username }}"
  152. password: "{{ matrix_postgres_connection_password }}"
  153. database: "{{ matrix_postgres_db_name }}"
  154. host: "{{ matrix_postgres_connection_hostname }}"
  155. cp_min: 5
  156. cp_max: 10
  157. # Number of events to cache in memory.
  158. event_cache_size: "10K"
  159. # A yaml python logging config file
  160. log_config: "/data/{{ hostname_matrix }}.log.config"
  161. ## Ratelimiting ##
  162. # Number of messages a client can send per second
  163. rc_messages_per_second: 0.2
  164. # Number of message a client can send before being throttled
  165. rc_message_burst_count: 10.0
  166. # The federation window size in milliseconds
  167. federation_rc_window_size: 1000
  168. # The number of federation requests from a single server in a window
  169. # before the server will delay processing the request.
  170. federation_rc_sleep_limit: 10
  171. # The duration in milliseconds to delay processing events from
  172. # remote servers by if they go over the sleep limit.
  173. federation_rc_sleep_delay: 500
  174. # The maximum number of concurrent federation requests allowed
  175. # from a single server
  176. federation_rc_reject_limit: 50
  177. # The number of federation requests to concurrently process from a
  178. # single server
  179. federation_rc_concurrent: 3
  180. # Directory where uploaded images and attachments are stored.
  181. media_store_path: "/matrix-storage/media-store"
  182. # Media storage providers allow media to be stored in different
  183. # locations.
  184. # media_storage_providers:
  185. # - module: file_system
  186. # # Whether to write new local files.
  187. # store_local: false
  188. # # Whether to write new remote media
  189. # store_remote: false
  190. # # Whether to block upload requests waiting for write to this
  191. # # provider to complete
  192. # store_synchronous: false
  193. # config:
  194. # directory: /mnt/some/other/directory
  195. # Directory where in-progress uploads are stored.
  196. uploads_path: "/matrix-run/uploads"
  197. # The largest allowed upload size in bytes
  198. max_upload_size: "{{ matrix_synapse_max_upload_size_mb }}M"
  199. # Maximum number of pixels that will be thumbnailed
  200. max_image_pixels: "32M"
  201. # Whether to generate new thumbnails on the fly to precisely match
  202. # the resolution requested by the client. If true then whenever
  203. # a new resolution is requested by the client the server will
  204. # generate a new thumbnail. If false the server will pick a thumbnail
  205. # from a precalculated list.
  206. dynamic_thumbnails: false
  207. # List of thumbnail to precalculate when an image is uploaded.
  208. thumbnail_sizes:
  209. - width: 32
  210. height: 32
  211. method: crop
  212. - width: 96
  213. height: 96
  214. method: crop
  215. - width: 320
  216. height: 240
  217. method: scale
  218. - width: 640
  219. height: 480
  220. method: scale
  221. - width: 800
  222. height: 600
  223. method: scale
  224. # Is the preview URL API enabled? If enabled, you *must* specify
  225. # an explicit url_preview_ip_range_blacklist of IPs that the spider is
  226. # denied from accessing.
  227. url_preview_enabled: True
  228. # List of IP address CIDR ranges that the URL preview spider is denied
  229. # from accessing. There are no defaults: you must explicitly
  230. # specify a list for URL previewing to work. You should specify any
  231. # internal services in your network that you do not want synapse to try
  232. # to connect to, otherwise anyone in any Matrix room could cause your
  233. # synapse to issue arbitrary GET requests to your internal services,
  234. # causing serious security issues.
  235. #
  236. url_preview_ip_range_blacklist:
  237. - '127.0.0.0/8'
  238. - '10.0.0.0/8'
  239. - '172.16.0.0/12'
  240. - '192.168.0.0/16'
  241. - '100.64.0.0/10'
  242. - '169.254.0.0/16'
  243. - '::1/128'
  244. - 'fe80::/64'
  245. - 'fc00::/7'
  246. #
  247. # List of IP address CIDR ranges that the URL preview spider is allowed
  248. # to access even if they are specified in url_preview_ip_range_blacklist.
  249. # This is useful for specifying exceptions to wide-ranging blacklisted
  250. # target IP ranges - e.g. for enabling URL previews for a specific private
  251. # website only visible in your network.
  252. #
  253. # url_preview_ip_range_whitelist:
  254. # - '192.168.1.1'
  255. # Optional list of URL matches that the URL preview spider is
  256. # denied from accessing. You should use url_preview_ip_range_blacklist
  257. # in preference to this, otherwise someone could define a public DNS
  258. # entry that points to a private IP address and circumvent the blacklist.
  259. # This is more useful if you know there is an entire shape of URL that
  260. # you know that will never want synapse to try to spider.
  261. #
  262. # Each list entry is a dictionary of url component attributes as returned
  263. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  264. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  265. # The values of the dictionary are treated as an filename match pattern
  266. # applied to that component of URLs, unless they start with a ^ in which
  267. # case they are treated as a regular expression match. If all the
  268. # specified component matches for a given list item succeed, the URL is
  269. # blacklisted.
  270. #
  271. # url_preview_url_blacklist:
  272. # # blacklist any URL with a username in its URI
  273. # - username: '*'
  274. #
  275. # # blacklist all *.google.com URLs
  276. # - netloc: 'google.com'
  277. # - netloc: '*.google.com'
  278. #
  279. # # blacklist all plain HTTP URLs
  280. # - scheme: 'http'
  281. #
  282. # # blacklist http(s)://www.acme.com/foo
  283. # - netloc: 'www.acme.com'
  284. # path: '/foo'
  285. #
  286. # # blacklist any URL with a literal IPv4 address
  287. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  288. # The largest allowed URL preview spidering size in bytes
  289. max_spider_size: "10M"
  290. ## Captcha ##
  291. # See docs/CAPTCHA_SETUP for full details of configuring this.
  292. # This Home Server's ReCAPTCHA public key.
  293. recaptcha_public_key: "YOUR_PUBLIC_KEY"
  294. # This Home Server's ReCAPTCHA private key.
  295. recaptcha_private_key: "YOUR_PRIVATE_KEY"
  296. # Enables ReCaptcha checks when registering, preventing signup
  297. # unless a captcha is answered. Requires a valid ReCaptcha
  298. # public/private key.
  299. enable_registration_captcha: False
  300. # A secret key used to bypass the captcha test entirely.
  301. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  302. # The API endpoint to use for verifying m.login.recaptcha responses.
  303. recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
  304. ## Turn ##
  305. # The public URIs of the TURN server to give to clients
  306. turn_uris: ["turn:{{ hostname_matrix }}:3478?transport=udp", "turn:{{ hostname_matrix }}:3478?transport=tcp"]
  307. # The shared secret used to compute passwords for the TURN server
  308. turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret }}"
  309. # The Username and password if the TURN server needs them and
  310. # does not use a token
  311. #turn_username: "TURNSERVER_USERNAME"
  312. #turn_password: "TURNSERVER_PASSWORD"
  313. # How long generated TURN credentials last
  314. turn_user_lifetime: "1h"
  315. # Whether guests should be allowed to use the TURN server.
  316. # This defaults to True, otherwise VoIP will be unreliable for guests.
  317. # However, it does introduce a slight security risk as it allows users to
  318. # connect to arbitrary endpoints without having first signed up for a
  319. # valid account (e.g. by passing a CAPTCHA).
  320. turn_allow_guests: False
  321. ## Registration ##
  322. # Enable registration for new users.
  323. enable_registration: False
  324. # The user must provide all of the below types of 3PID when registering.
  325. #
  326. # registrations_require_3pid:
  327. # - email
  328. # - msisdn
  329. # Mandate that users are only allowed to associate certain formats of
  330. # 3PIDs with accounts on this server.
  331. #
  332. # allowed_local_3pids:
  333. # - medium: email
  334. # pattern: ".*@matrix\.org"
  335. # - medium: email
  336. # pattern: ".*@vector\.im"
  337. # - medium: msisdn
  338. # pattern: "\+44"
  339. # If set, allows registration by anyone who also has the shared
  340. # secret, even if registration is otherwise disabled.
  341. registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  342. # Set the number of bcrypt rounds used to generate password hash.
  343. # Larger numbers increase the work factor needed to generate the hash.
  344. # The default number is 12 (which equates to 2^12 rounds).
  345. # N.B. that increasing this will exponentially increase the time required
  346. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  347. bcrypt_rounds: 12
  348. # Allows users to register as guests without a password/email/etc, and
  349. # participate in rooms hosted on this server which have been made
  350. # accessible to anonymous users.
  351. allow_guest_access: False
  352. # The list of identity servers trusted to verify third party
  353. # identifiers by this server.
  354. trusted_third_party_id_servers:
  355. {% for server in matrix_synapse_trusted_third_party_id_servers %}
  356. - {{ server }}
  357. {% endfor %}
  358. # Users who register on this homeserver will automatically be joined
  359. # to these rooms
  360. #auto_join_rooms:
  361. # - "#example:example.com"
  362. ## Metrics ###
  363. # Enable collection and rendering of performance metrics
  364. enable_metrics: False
  365. report_stats: False
  366. ## API Configuration ##
  367. # A list of event types that will be included in the room_invite_state
  368. room_invite_state_types:
  369. - "m.room.join_rules"
  370. - "m.room.canonical_alias"
  371. - "m.room.avatar"
  372. - "m.room.name"
  373. # A list of application service config file to use
  374. app_service_config_files: []
  375. macaroon_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"
  376. # Used to enable access token expiration.
  377. expire_access_token: False
  378. # a secret which is used to calculate HMACs for form values, to stop
  379. # falsification of values
  380. form_secret: "{{ matrix_synapse_form_secret }}"
  381. ## Signing Keys ##
  382. # Path to the signing key to sign messages with
  383. signing_key_path: "/data/{{ hostname_matrix }}.signing.key"
  384. # The keys that the server used to sign messages with but won't use
  385. # to sign new messages. E.g. it has lost its private key
  386. old_signing_keys: {}
  387. # "ed25519:auto":
  388. # # Base64 encoded public key
  389. # key: "The public part of your old signing key."
  390. # # Millisecond POSIX timestamp when the key expired.
  391. # expired_ts: 123456789123
  392. # How long key response published by this server is valid for.
  393. # Used to set the valid_until_ts in /key/v2 APIs.
  394. # Determines how quickly servers will query to check which keys
  395. # are still valid.
  396. key_refresh_interval: "1d" # 1 Day.
  397. # The trusted servers to download signing keys from.
  398. perspectives:
  399. servers:
  400. "matrix.org":
  401. verify_keys:
  402. "ed25519:auto":
  403. key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
  404. # Enable SAML2 for registration and login. Uses pysaml2
  405. # config_path: Path to the sp_conf.py configuration file
  406. # idp_redirect_url: Identity provider URL which will redirect
  407. # the user back to /login/saml2 with proper info.
  408. # See pysaml2 docs for format of config.
  409. #saml2_config:
  410. # enabled: true
  411. # config_path: "/data/sp_conf.py"
  412. # idp_redirect_url: "http://{{ hostname_matrix }}/idp"
  413. # Enable CAS for registration and login.
  414. #cas_config:
  415. # enabled: true
  416. # server_url: "https://cas-server.com"
  417. # service_url: "https://homeserver.domain.com:8448"
  418. # #required_attributes:
  419. # # name: value
  420. # The JWT needs to contain a globally unique "sub" (subject) claim.
  421. #
  422. # jwt_config:
  423. # enabled: true
  424. # secret: "a secret"
  425. # algorithm: "HS256"
  426. # Enable password for login.
  427. password_config:
  428. enabled: true
  429. # Uncomment and change to a secret random string for extra security.
  430. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  431. #pepper: ""
  432. # Enable sending emails for notification events
  433. # Defining a custom URL for Riot is only needed if email notifications
  434. # should contain links to a self-hosted installation of Riot; when set
  435. # the "app_name" setting is ignored.
  436. #
  437. # If your SMTP server requires authentication, the optional smtp_user &
  438. # smtp_pass variables should be used
  439. #
  440. {% if matrix_mailer_enabled %}
  441. email:
  442. enable_notifs: true
  443. smtp_host: "matrix-mailer"
  444. smtp_port: 587
  445. require_transport_security: false
  446. notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  447. app_name: Matrix
  448. template_dir: /synapse/res/templates
  449. notif_template_html: notif_mail.html
  450. notif_template_text: notif_mail.txt
  451. notif_for_new_users: True
  452. riot_base_url: "https://{{ hostname_riot }}"
  453. {% endif %}
  454. # password_providers:
  455. # - module: "ldap_auth_provider.LdapAuthProvider"
  456. # config:
  457. # enabled: true
  458. # uri: "ldap://ldap.example.com:389"
  459. # start_tls: true
  460. # base: "ou=users,dc=example,dc=com"
  461. # attributes:
  462. # uid: "cn"
  463. # mail: "email"
  464. # name: "givenName"
  465. # #bind_dn:
  466. # #bind_password:
  467. # #filter: "(objectClass=posixAccount)"
  468. # Clients requesting push notifications can either have the body of
  469. # the message sent in the notification poke along with other details
  470. # like the sender, or just the event ID and room ID (`event_id_only`).
  471. # If clients choose the former, this option controls whether the
  472. # notification request includes the content of the event (other details
  473. # like the sender are still included). For `event_id_only` push, it
  474. # has no effect.
  475. # For modern android devices the notification content will still appear
  476. # because it is loaded by the app. iPhone, however will send a
  477. # notification saying only that a message arrived and who it came from.
  478. #
  479. #push:
  480. # include_content: true
  481. # spam_checker:
  482. # module: "my_custom_project.SuperSpamChecker"
  483. # config:
  484. # example_option: 'things'
  485. # Whether to allow non server admins to create groups on this server
  486. enable_group_creation: false
  487. # If enabled, non server admins can only create groups with local parts
  488. # starting with this prefix
  489. # group_creation_prefix: "unofficial/"
  490. # User Directory configuration
  491. #
  492. # 'search_all_users' defines whether to search all users visible to your HS
  493. # when searching the user directory, rather than limiting to users visible
  494. # in public rooms. Defaults to false. If you set it True, you'll have to run
  495. # UPDATE user_directory_stream_pos SET stream_id = NULL;
  496. # on your database to tell it to rebuild the user_directory search indexes.
  497. #
  498. #user_directory:
  499. # search_all_users: false
  500. # User Consent configuration
  501. #
  502. # Parts of this section are required if enabling the 'consent' resource under
  503. # 'listeners', in particular 'template_dir' and 'version'.
  504. #
  505. # 'template_dir' gives the location of the templates for the HTML forms.
  506. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  507. # and each language directory should contain the policy document (named as
  508. # '<version>.html') and a success page (success.html).
  509. #
  510. # 'version' specifies the 'current' version of the policy document. It defines
  511. # the version to be served by the consent resource if there is no 'v'
  512. # parameter.
  513. #
  514. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  515. # asking them to consent to the privacy policy. The 'server_notices' section
  516. # must also be configured for this to work. Notices will *not* be sent to
  517. # guest users unless 'send_server_notice_to_guests' is set to true.
  518. #
  519. # 'block_events_error', if set, will block any attempts to send events
  520. # until the user consents to the privacy policy. The value of the setting is
  521. # used as the text of the error.
  522. #
  523. # user_consent:
  524. # template_dir: res/templates/privacy
  525. # version: 1.0
  526. # server_notice_content:
  527. # msgtype: m.text
  528. # body: >-
  529. # To continue using this homeserver you must review and agree to the
  530. # terms and conditions at %(consent_uri)s
  531. # send_server_notice_to_guests: True
  532. # block_events_error: >-
  533. # To continue using this homeserver you must review and agree to the
  534. # terms and conditions at %(consent_uri)s
  535. #
  536. # Server Notices room configuration
  537. #
  538. # Uncomment this section to enable a room which can be used to send notices
  539. # from the server to users. It is a special room which cannot be left; notices
  540. # come from a special "notices" user id.
  541. #
  542. # If you uncomment this section, you *must* define the system_mxid_localpart
  543. # setting, which defines the id of the user which will be used to send the
  544. # notices.
  545. #
  546. # It's also possible to override the room name, the display name of the
  547. # "notices" user, and the avatar for the user.
  548. #
  549. # server_notices:
  550. # system_mxid_localpart: notices
  551. # system_mxid_display_name: "Server Notices"
  552. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  553. # room_name: "Server Notices"