Guest User

homeserver.yaml

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