25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

201 lines
4.4 KiB

  1. # vim:ft=yaml
  2. ## TLS ##
  3. {% if not SYNAPSE_NO_TLS %}
  4. tls_certificate_path: "/data/{{ SYNAPSE_SERVER_NAME }}.tls.crt"
  5. tls_private_key_path: "/data/{{ SYNAPSE_SERVER_NAME }}.tls.key"
  6. {% if SYNAPSE_ACME %}
  7. acme:
  8. enabled: true
  9. port: 8009
  10. {% endif %}
  11. {% endif %}
  12. ## Server ##
  13. server_name: "{{ SYNAPSE_SERVER_NAME }}"
  14. pid_file: /homeserver.pid
  15. web_client: False
  16. soft_file_limit: 0
  17. log_config: "{{ SYNAPSE_LOG_CONFIG }}"
  18. ## Ports ##
  19. listeners:
  20. {% if not SYNAPSE_NO_TLS %}
  21. -
  22. port: 8448
  23. bind_addresses: ['::']
  24. type: http
  25. tls: true
  26. x_forwarded: false
  27. resources:
  28. - names: [client]
  29. compress: true
  30. - names: [federation] # Federation APIs
  31. compress: false
  32. {% endif %}
  33. # Allow configuring in case we want to reverse proxy 8008
  34. # using another process in the same container
  35. - port: {{ SYNAPSE_HTTP_PORT or 8008 }}
  36. tls: false
  37. bind_addresses: ['::']
  38. type: http
  39. x_forwarded: false
  40. resources:
  41. - names: [client]
  42. compress: true
  43. - names: [federation]
  44. compress: false
  45. ## Database ##
  46. {% if POSTGRES_PASSWORD %}
  47. database:
  48. name: "psycopg2"
  49. args:
  50. user: "{{ POSTGRES_USER or "synapse" }}"
  51. password: "{{ POSTGRES_PASSWORD }}"
  52. database: "{{ POSTGRES_DB or "synapse" }}"
  53. host: "{{ POSTGRES_HOST or "db" }}"
  54. port: "{{ POSTGRES_PORT or "5432" }}"
  55. cp_min: 5
  56. cp_max: 10
  57. {% else %}
  58. database:
  59. name: "sqlite3"
  60. args:
  61. database: "/data/homeserver.db"
  62. {% endif %}
  63. ## Performance ##
  64. event_cache_size: "{{ SYNAPSE_EVENT_CACHE_SIZE or "10K" }}"
  65. ## Ratelimiting ##
  66. rc_messages_per_second: 0.2
  67. rc_message_burst_count: 10.0
  68. federation_rc_window_size: 1000
  69. federation_rc_sleep_limit: 10
  70. federation_rc_sleep_delay: 500
  71. federation_rc_reject_limit: 50
  72. federation_rc_concurrent: 3
  73. ## Files ##
  74. media_store_path: "/data/media"
  75. max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "50M" }}"
  76. max_image_pixels: "32M"
  77. dynamic_thumbnails: false
  78. # List of thumbnail to precalculate when an image is uploaded.
  79. thumbnail_sizes:
  80. - width: 32
  81. height: 32
  82. method: crop
  83. - width: 96
  84. height: 96
  85. method: crop
  86. - width: 320
  87. height: 240
  88. method: scale
  89. - width: 640
  90. height: 480
  91. method: scale
  92. - width: 800
  93. height: 600
  94. method: scale
  95. url_preview_enabled: False
  96. max_spider_size: "10M"
  97. ## Captcha ##
  98. {% if SYNAPSE_RECAPTCHA_PUBLIC_KEY %}
  99. recaptcha_public_key: "{{ SYNAPSE_RECAPTCHA_PUBLIC_KEY }}"
  100. recaptcha_private_key: "{{ SYNAPSE_RECAPTCHA_PRIVATE_KEY }}"
  101. enable_registration_captcha: True
  102. recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
  103. {% else %}
  104. recaptcha_public_key: "YOUR_PUBLIC_KEY"
  105. recaptcha_private_key: "YOUR_PRIVATE_KEY"
  106. enable_registration_captcha: False
  107. recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
  108. {% endif %}
  109. ## Turn ##
  110. {% if SYNAPSE_TURN_URIS %}
  111. turn_uris:
  112. {% for uri in SYNAPSE_TURN_URIS.split(',') %} - "{{ uri }}"
  113. {% endfor %}
  114. turn_shared_secret: "{{ SYNAPSE_TURN_SECRET }}"
  115. turn_user_lifetime: "1h"
  116. turn_allow_guests: True
  117. {% else %}
  118. turn_uris: []
  119. turn_shared_secret: "YOUR_SHARED_SECRET"
  120. turn_user_lifetime: "1h"
  121. turn_allow_guests: True
  122. {% endif %}
  123. ## Registration ##
  124. enable_registration: {{ "True" if SYNAPSE_ENABLE_REGISTRATION else "False" }}
  125. registration_shared_secret: "{{ SYNAPSE_REGISTRATION_SHARED_SECRET }}"
  126. bcrypt_rounds: 12
  127. allow_guest_access: {{ "True" if SYNAPSE_ALLOW_GUEST else "False" }}
  128. enable_group_creation: true
  129. # The list of identity servers trusted to verify third party
  130. # identifiers by this server.
  131. #
  132. # Also defines the ID server which will be called when an account is
  133. # deactivated (one will be picked arbitrarily).
  134. trusted_third_party_id_servers:
  135. - matrix.org
  136. - vector.im
  137. ## Metrics ###
  138. {% if SYNAPSE_REPORT_STATS.lower() == "yes" %}
  139. enable_metrics: True
  140. report_stats: True
  141. {% else %}
  142. enable_metrics: False
  143. report_stats: False
  144. {% endif %}
  145. ## API Configuration ##
  146. {% if SYNAPSE_APPSERVICES %}
  147. app_service_config_files:
  148. {% for appservice in SYNAPSE_APPSERVICES %} - "{{ appservice }}"
  149. {% endfor %}
  150. {% endif %}
  151. macaroon_secret_key: "{{ SYNAPSE_MACAROON_SECRET_KEY }}"
  152. expire_access_token: False
  153. ## Signing Keys ##
  154. signing_key_path: "/data/{{ SYNAPSE_SERVER_NAME }}.signing.key"
  155. old_signing_keys: {}
  156. key_refresh_interval: "1d" # 1 Day.
  157. # The trusted servers to download signing keys from.
  158. trusted_key_servers:
  159. - server_name: matrix.org
  160. verify_keys:
  161. "ed25519:auto": "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
  162. password_config:
  163. enabled: true