Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

441 lines
13 KiB

7 years ago
7 years ago
7 years ago
  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: "/etc/letsencrypt/live/{{ ansible_hostname }}.lilik.it/cert.pem"
  8. # PEM encoded private key for TLS
  9. #tls_private_key_path: "/etc/matrix-synapse/homeserver.tls.key"
  10. # PEM dh parameters for ephemeral keys
  11. tls_dh_params_path: "/etc/nginx/dhparam.pem"
  12. # Don't bind to the https port
  13. #no_tls: False
  14. no_tls: True
  15. ## Server ##
  16. # When running as a daemon, the file to store the pid in
  17. pid_file: "/var/run/matrix-synapse.pid"
  18. # Whether to serve a web client from the HTTP/HTTPS root resource.
  19. web_client: False
  20. # The public-facing base URL for the client API (not including _matrix/...)
  21. #public_baseurl: https://example.com:8448/
  22. public_baseurl: https://{{ ansible_hostname }}.lilik.it/
  23. # Set the soft limit on the number of file descriptors synapse can use
  24. # Zero is used to indicate synapse should set the soft limit to the
  25. # hard limit.
  26. soft_file_limit: 0
  27. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  28. # gc_thresholds: [700, 10, 10]
  29. # A list of other Home Servers to fetch the public room directory from
  30. # and include in the public room directory of this home server
  31. # This is a temporary stopgap solution to populate new server with a
  32. # list of rooms until there exists a good solution of a decentralized
  33. # room directory.
  34. # secondary_directory_servers:
  35. # - matrix.org
  36. # - vector.im
  37. # List of ports that Synapse should listen on, their purpose and their
  38. # configuration.
  39. listeners:
  40. # Main HTTPS listener
  41. # For when matrix traffic is sent directly to synapse.
  42. # -
  43. # # The port to listen for HTTPS requests on.
  44. # port: 8448
  45. #
  46. # # Local interface to listen on.
  47. # # The empty string will cause synapse to listen on all interfaces.
  48. # bind_address: 127.0.0.1
  49. #
  50. # # This is a 'http' listener, allows us to specify 'resources'.
  51. # type: http
  52. #
  53. # tls: false
  54. #
  55. # # Use the X-Forwarded-For (XFF) header as the client IP and not the
  56. # # actual client IP.
  57. # x_forwarded: true
  58. #
  59. # # List of HTTP resources to serve on this listener.
  60. # resources:
  61. # -
  62. # # List of resources to host on this listener.
  63. # names:
  64. # - client # The client-server APIs, both v1 and v2
  65. # # - webclient # The bundled webclient.
  66. #
  67. # # Should synapse compress HTTP responses to clients that support it?
  68. # # This should be disabled if running synapse behind a load balancer
  69. # # that can do automatic compression.
  70. # compress: false
  71. #
  72. # - names: [federation] # Federation APIs
  73. # compress: false
  74. # Unsecure HTTP listener,
  75. # For when matrix traffic passes through loadbalancer that unwraps TLS.
  76. - port: 8008
  77. tls: false
  78. bind_address: 127.0.0.1
  79. type: http
  80. x_forwarded: true
  81. resources:
  82. - names: [client]
  83. compress: false
  84. - names: [federation]
  85. compress: false
  86. # Turn on the twisted ssh manhole service on localhost on the given
  87. # port.
  88. # - port: 9000
  89. # bind_address: 127.0.0.1
  90. # type: manhole
  91. # Database configuration
  92. database:
  93. # The database engine name
  94. name: "sqlite3"
  95. # Arguments to pass to the engine
  96. args:
  97. # Path to the database
  98. database: "/var/lib/matrix-synapse/homeserver.db"
  99. # Number of events to cache in memory.
  100. event_cache_size: "10K"
  101. # A yaml python logging config file
  102. log_config: "/etc/matrix-synapse/log.yaml"
  103. # Stop twisted from discarding the stack traces of exceptions in
  104. # deferreds by waiting a reactor tick before running a deferred's
  105. # callbacks.
  106. # full_twisted_stacktraces: true
  107. ## Ratelimiting ##
  108. # Number of messages a client can send per second
  109. rc_messages_per_second: 0.2
  110. # Number of message a client can send before being throttled
  111. rc_message_burst_count: 10.0
  112. # The federation window size in milliseconds
  113. federation_rc_window_size: 1000
  114. # The number of federation requests from a single server in a window
  115. # before the server will delay processing the request.
  116. federation_rc_sleep_limit: 10
  117. # The duration in milliseconds to delay processing events from
  118. # remote servers by if they go over the sleep limit.
  119. federation_rc_sleep_delay: 500
  120. # The maximum number of concurrent federation requests allowed
  121. # from a single server
  122. federation_rc_reject_limit: 50
  123. # The number of federation requests to concurrently process from a
  124. # single server
  125. federation_rc_concurrent: 3
  126. # Directory where uploaded images and attachments are stored.
  127. media_store_path: "/var/lib/matrix-synapse/media"
  128. # The largest allowed upload size in bytes
  129. max_upload_size: "10M"
  130. # Maximum number of pixels that will be thumbnailed
  131. max_image_pixels: "32M"
  132. # Whether to generate new thumbnails on the fly to precisely match
  133. # the resolution requested by the client. If true then whenever
  134. # a new resolution is requested by the client the server will
  135. # generate a new thumbnail. If false the server will pick a thumbnail
  136. # from a precalculated list.
  137. dynamic_thumbnails: false
  138. # List of thumbnail to precalculate when an image is uploaded.
  139. thumbnail_sizes:
  140. - width: 32
  141. height: 32
  142. method: crop
  143. - width: 96
  144. height: 96
  145. method: crop
  146. - width: 320
  147. height: 240
  148. method: scale
  149. - width: 640
  150. height: 480
  151. method: scale
  152. - width: 800
  153. height: 600
  154. method: scale
  155. # Is the preview URL API enabled? If enabled, you *must* specify
  156. # an explicit url_preview_ip_range_blacklist of IPs that the spider is
  157. # denied from accessing.
  158. url_preview_enabled: False
  159. # List of IP address CIDR ranges that the URL preview spider is denied
  160. # from accessing. There are no defaults: you must explicitly
  161. # specify a list for URL previewing to work. You should specify any
  162. # internal services in your network that you do not want synapse to try
  163. # to connect to, otherwise anyone in any Matrix room could cause your
  164. # synapse to issue arbitrary GET requests to your internal services,
  165. # causing serious security issues.
  166. #
  167. # url_preview_ip_range_blacklist:
  168. # - '127.0.0.0/8'
  169. # - '10.0.0.0/8'
  170. # - '172.16.0.0/12'
  171. # - '192.168.0.0/16'
  172. #
  173. # List of IP address CIDR ranges that the URL preview spider is allowed
  174. # to access even if they are specified in url_preview_ip_range_blacklist.
  175. # This is useful for specifying exceptions to wide-ranging blacklisted
  176. # target IP ranges - e.g. for enabling URL previews for a specific private
  177. # website only visible in your network.
  178. #
  179. # url_preview_ip_range_whitelist:
  180. # - '192.168.1.1'
  181. # Optional list of URL matches that the URL preview spider is
  182. # denied from accessing. You should use url_preview_ip_range_blacklist
  183. # in preference to this, otherwise someone could define a public DNS
  184. # entry that points to a private IP address and circumvent the blacklist.
  185. # This is more useful if you know there is an entire shape of URL that
  186. # you know that will never want synapse to try to spider.
  187. #
  188. # Each list entry is a dictionary of url component attributes as returned
  189. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  190. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  191. # The values of the dictionary are treated as an filename match pattern
  192. # applied to that component of URLs, unless they start with a ^ in which
  193. # case they are treated as a regular expression match. If all the
  194. # specified component matches for a given list item succeed, the URL is
  195. # blacklisted.
  196. #
  197. # url_preview_url_blacklist:
  198. # # blacklist any URL with a username in its URI
  199. # - username: '*'
  200. #
  201. # # blacklist all *.google.com URLs
  202. # - netloc: 'google.com'
  203. # - netloc: '*.google.com'
  204. #
  205. # # blacklist all plain HTTP URLs
  206. # - scheme: 'http'
  207. #
  208. # # blacklist http(s)://www.acme.com/foo
  209. # - netloc: 'www.acme.com'
  210. # path: '/foo'
  211. #
  212. # # blacklist any URL with a literal IPv4 address
  213. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  214. # The largest allowed URL preview spidering size in bytes
  215. max_spider_size: "10M"
  216. ## Captcha ##
  217. # This Home Server's ReCAPTCHA public key.
  218. recaptcha_public_key: "YOUR_PUBLIC_KEY"
  219. # This Home Server's ReCAPTCHA private key.
  220. recaptcha_private_key: "YOUR_PRIVATE_KEY"
  221. # Enables ReCaptcha checks when registering, preventing signup
  222. # unless a captcha is answered. Requires a valid ReCaptcha
  223. # public/private key.
  224. enable_registration_captcha: False
  225. # A secret key used to bypass the captcha test entirely.
  226. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  227. # The API endpoint to use for verifying m.login.recaptcha responses.
  228. recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
  229. ## Turn ##
  230. # The public URIs of the TURN server to give to clients
  231. turn_uris: []
  232. # The shared secret used to compute passwords for the TURN server
  233. turn_shared_secret: "YOUR_SHARED_SECRET"
  234. # How long generated TURN credentials last
  235. turn_user_lifetime: "1h"
  236. ## Registration ##
  237. # Enable registration for new users.
  238. enable_registration: False
  239. # If set, allows registration by anyone who also has the shared
  240. # secret, even if registration is otherwise disabled.
  241. # registration_shared_secret: <PRIVATE STRING>
  242. # Sets the expiry for the short term user creation in
  243. # milliseconds. For instance the bellow duration is two weeks
  244. # in milliseconds.
  245. user_creation_max_duration: 1209600000
  246. # Set the number of bcrypt rounds used to generate password hash.
  247. # Larger numbers increase the work factor needed to generate the hash.
  248. # The default number of rounds is 12.
  249. bcrypt_rounds: 12
  250. # Allows users to register as guests without a password/email/etc, and
  251. # participate in rooms hosted on this server which have been made
  252. # accessible to anonymous users.
  253. allow_guest_access: False
  254. # The list of identity servers trusted to verify third party
  255. # identifiers by this server.
  256. trusted_third_party_id_servers:
  257. - matrix.org
  258. - vector.im
  259. ## Metrics ###
  260. # Enable collection and rendering of performance metrics
  261. enable_metrics: False
  262. ## API Configuration ##
  263. # A list of event types that will be included in the room_invite_state
  264. room_invite_state_types:
  265. - "m.room.join_rules"
  266. - "m.room.canonical_alias"
  267. - "m.room.avatar"
  268. - "m.room.name"
  269. # A list of application service config file to use
  270. app_service_config_files: []
  271. # macaroon_secret_key: <PRIVATE STRING>
  272. # Used to enable access token expiration.
  273. expire_access_token: False
  274. ## Signing Keys ##
  275. # Path to the signing key to sign messages with
  276. signing_key_path: "/etc/matrix-synapse/homeserver.signing.key"
  277. # The keys that the server used to sign messages with but won't use
  278. # to sign new messages. E.g. it has lost its private key
  279. old_signing_keys: {}
  280. # "ed25519:auto":
  281. # # Base64 encoded public key
  282. # key: "The public part of your old signing key."
  283. # # Millisecond POSIX timestamp when the key expired.
  284. # expired_ts: 123456789123
  285. # How long key response published by this server is valid for.
  286. # Used to set the valid_until_ts in /key/v2 APIs.
  287. # Determines how quickly servers will query to check which keys
  288. # are still valid.
  289. key_refresh_interval: "1d" # 1 Day.
  290. # The trusted servers to download signing keys from.
  291. perspectives:
  292. servers:
  293. "matrix.org":
  294. verify_keys:
  295. "ed25519:auto":
  296. key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
  297. # Enable SAML2 for registration and login. Uses pysaml2
  298. # config_path: Path to the sp_conf.py configuration file
  299. # idp_redirect_url: Identity provider URL which will redirect
  300. # the user back to /login/saml2 with proper info.
  301. # See pysaml2 docs for format of config.
  302. #saml2_config:
  303. # enabled: true
  304. # config_path: "/home/erikj/git/synapse/sp_conf.py"
  305. # idp_redirect_url: "http://test/idp"
  306. # Enable CAS for registration and login.
  307. #cas_config:
  308. # enabled: true
  309. # server_url: "https://cas-server.com"
  310. # service_url: "https://homesever.domain.com:8448"
  311. # #required_attributes:
  312. # # name: value
  313. # The JWT needs to contain a globally unique "sub" (subject) claim.
  314. #
  315. # jwt_config:
  316. # enabled: true
  317. # secret: "a secret"
  318. # algorithm: "HS256"
  319. password_providers:
  320. - module: "ldap_auth_provider.LdapAuthProvider"
  321. config:
  322. enabled: true
  323. uri: "ldap://ldap.dmz.lilik"
  324. port: 389
  325. start_tls: false
  326. base: "o=People,dc=lilik,dc=it"
  327. attributes:
  328. uid: "uid"
  329. mail: "mail"
  330. name: "givenName"
  331. bind_dn:
  332. bind_password:
  333. filter: "(memberOf=cn=im,o=Group,dc=lilik,dc=it)"
  334. # Enable password for login.
  335. password_config:
  336. enabled: true
  337. # Enable sending emails for notification events
  338. #email:
  339. # enable_notifs: false
  340. # smtp_host: "localhost"
  341. # smtp_port: 25
  342. # notif_from: "Your Friendly %(app)s Home Server <noreply@example.com>"
  343. # app_name: Matrix
  344. # template_dir: res/templates
  345. # notif_template_html: notif_mail.html
  346. # notif_template_text: notif_mail.txt
  347. # notif_for_new_users: True