25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

README.rst 12 KiB

5 ay önce
5 ay önce
5 ay önce
5 ay önce
8 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. =========================================================================
  2. Synapse |support| |development| |documentation| |license| |pypi| |python|
  3. =========================================================================
  4. Synapse is now actively maintained at `vector-im/synapse <https://github.com/element-hq/synapse>`_
  5. =================================================================================================
  6. Synapse is an open-source `Matrix <https://matrix.org/>`_ homeserver developed
  7. from 2019 through 2023 as part of the Matrix.org Foundation. The Matrix.org
  8. Foundation is not able to resource maintenance of Synapse and it
  9. `continues to be developed by Element <https://github.com/element-hq/synapse>`_;
  10. additionally you have the choice of `other Matrix homeservers <https://matrix.org/ecosystem/servers/>`_.
  11. See `The future of Synapse and Dendrite <https://matrix.org/blog/2023/11/06/future-of-synapse-dendrite/>`_
  12. blog post for more information.
  13. Briefly, Matrix is an open standard for communications on the internet, supporting
  14. federation, encryption and VoIP. Matrix.org has more to say about the `goals of the
  15. Matrix project <https://matrix.org/docs/guides/introduction>`_, and the `formal specification
  16. <https://spec.matrix.org/>`_ describes the technical details.
  17. .. contents::
  18. Installing and configuration
  19. ============================
  20. The Synapse documentation describes `how to install Synapse <https://matrix-org.github.io/synapse/latest/setup/installation.html>`_. We recommend using
  21. `Docker images <https://matrix-org.github.io/synapse/latest/setup/installation.html#docker-images-and-ansible-playbooks>`_ or `Debian packages from Matrix.org
  22. <https://matrix-org.github.io/synapse/latest/setup/installation.html#matrixorg-packages>`_.
  23. .. _federation:
  24. Synapse has a variety of `config options
  25. <https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html>`_
  26. which can be used to customise its behaviour after installation.
  27. There are additional details on how to `configure Synapse for federation here
  28. <https://matrix-org.github.io/synapse/latest/federate.html>`_.
  29. .. _reverse-proxy:
  30. Using a reverse proxy with Synapse
  31. ----------------------------------
  32. It is recommended to put a reverse proxy such as
  33. `nginx <https://nginx.org/en/docs/http/ngx_http_proxy_module.html>`_,
  34. `Apache <https://httpd.apache.org/docs/current/mod/mod_proxy_http.html>`_,
  35. `Caddy <https://caddyserver.com/docs/quick-starts/reverse-proxy>`_,
  36. `HAProxy <https://www.haproxy.org/>`_ or
  37. `relayd <https://man.openbsd.org/relayd.8>`_ in front of Synapse. One advantage of
  38. doing so is that it means that you can expose the default https port (443) to
  39. Matrix clients without needing to run Synapse with root privileges.
  40. For information on configuring one, see `the reverse proxy docs
  41. <https://matrix-org.github.io/synapse/latest/reverse_proxy.html>`_.
  42. Upgrading an existing Synapse
  43. -----------------------------
  44. The instructions for upgrading Synapse are in `the upgrade notes`_.
  45. Please check these instructions as upgrading may require extra steps for some
  46. versions of Synapse.
  47. .. _the upgrade notes: https://matrix-org.github.io/synapse/develop/upgrade.html
  48. Platform dependencies
  49. ---------------------
  50. Synapse uses a number of platform dependencies such as Python and PostgreSQL,
  51. and aims to follow supported upstream versions. See the
  52. `deprecation policy <https://matrix-org.github.io/synapse/latest/deprecation_policy.html>`_
  53. for more details.
  54. Security note
  55. -------------
  56. Matrix serves raw, user-supplied data in some APIs -- specifically the `content
  57. repository endpoints`_.
  58. .. _content repository endpoints: https://matrix.org/docs/spec/client_server/latest.html#get-matrix-media-r0-download-servername-mediaid
  59. Whilst we make a reasonable effort to mitigate against XSS attacks (for
  60. instance, by using `CSP`_), a Matrix homeserver should not be hosted on a
  61. domain hosting other web applications. This especially applies to sharing
  62. the domain with Matrix web clients and other sensitive applications like
  63. webmail. See
  64. https://developer.github.com/changes/2014-04-25-user-content-security for more
  65. information.
  66. .. _CSP: https://github.com/matrix-org/synapse/pull/1021
  67. Ideally, the homeserver should not simply be on a different subdomain, but on
  68. a completely different `registered domain`_ (also known as top-level site or
  69. eTLD+1). This is because `some attacks`_ are still possible as long as the two
  70. applications share the same registered domain.
  71. .. _registered domain: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-2.3
  72. .. _some attacks: https://en.wikipedia.org/wiki/Session_fixation#Attacks_using_cross-subdomain_cookie
  73. To illustrate this with an example, if your Element Web or other sensitive web
  74. application is hosted on ``A.example1.com``, you should ideally host Synapse on
  75. ``example2.com``. Some amount of protection is offered by hosting on
  76. ``B.example1.com`` instead, so this is also acceptable in some scenarios.
  77. However, you should *not* host your Synapse on ``A.example1.com``.
  78. Note that all of the above refers exclusively to the domain used in Synapse's
  79. ``public_baseurl`` setting. In particular, it has no bearing on the domain
  80. mentioned in MXIDs hosted on that server.
  81. Following this advice ensures that even if an XSS is found in Synapse, the
  82. impact to other applications will be minimal.
  83. Testing a new installation
  84. ==========================
  85. The easiest way to try out your new Synapse installation is by connecting to it
  86. from a web client.
  87. Unless you are running a test instance of Synapse on your local machine, in
  88. general, you will need to enable TLS support before you can successfully
  89. connect from a client: see
  90. `TLS certificates <https://matrix-org.github.io/synapse/latest/setup/installation.html#tls-certificates>`_.
  91. An easy way to get started is to login or register via Element at
  92. https://app.element.io/#/login or https://app.element.io/#/register respectively.
  93. You will need to change the server you are logging into from ``matrix.org``
  94. and instead specify a Homeserver URL of ``https://<server_name>:8448``
  95. (or just ``https://<server_name>`` if you are using a reverse proxy).
  96. If you prefer to use another client, refer to our
  97. `client breakdown <https://matrix.org/ecosystem/clients/>`_.
  98. If all goes well you should at least be able to log in, create a room, and
  99. start sending messages.
  100. .. _`client-user-reg`:
  101. Registering a new user from a client
  102. ------------------------------------
  103. By default, registration of new users via Matrix clients is disabled. To enable
  104. it:
  105. 1. In the
  106. `registration config section <https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#registration>`_
  107. set ``enable_registration: true`` in ``homeserver.yaml``.
  108. 2. Then **either**:
  109. a. set up a `CAPTCHA <https://matrix-org.github.io/synapse/latest/CAPTCHA_SETUP.html>`_, or
  110. b. set ``enable_registration_without_verification: true`` in ``homeserver.yaml``.
  111. We **strongly** recommend using a CAPTCHA, particularly if your homeserver is exposed to
  112. the public internet. Without it, anyone can freely register accounts on your homeserver.
  113. This can be exploited by attackers to create spambots targetting the rest of the Matrix
  114. federation.
  115. Your new user name will be formed partly from the ``server_name``, and partly
  116. from a localpart you specify when you create the account. Your name will take
  117. the form of::
  118. @localpart:my.domain.name
  119. (pronounced "at localpart on my dot domain dot name").
  120. As when logging in, you will need to specify a "Custom server". Specify your
  121. desired ``localpart`` in the 'User name' box.
  122. Troubleshooting and support
  123. ===========================
  124. The `Admin FAQ <https://matrix-org.github.io/synapse/latest/usage/administration/admin_faq.html>`_
  125. includes tips on dealing with some common problems. For more details, see
  126. `Synapse's wider documentation <https://matrix-org.github.io/synapse/latest/>`_.
  127. For additional support installing or managing Synapse, please ask in the community
  128. support room |room|_ (from a matrix.org account if necessary). We do not use GitHub
  129. issues for support requests, only for bug reports and feature requests.
  130. .. |room| replace:: ``#synapse:matrix.org``
  131. .. _room: https://matrix.to/#/#synapse:matrix.org
  132. .. |docs| replace:: ``docs``
  133. .. _docs: docs
  134. Identity Servers
  135. ================
  136. Identity servers have the job of mapping email addresses and other 3rd Party
  137. IDs (3PIDs) to Matrix user IDs, as well as verifying the ownership of 3PIDs
  138. before creating that mapping.
  139. **They are not where accounts or credentials are stored - these live on home
  140. servers. Identity Servers are just for mapping 3rd party IDs to matrix IDs.**
  141. This process is very security-sensitive, as there is obvious risk of spam if it
  142. is too easy to sign up for Matrix accounts or harvest 3PID data. In the longer
  143. term, we hope to create a decentralised system to manage it (`matrix-doc #712
  144. <https://github.com/matrix-org/matrix-doc/issues/712>`_), but in the meantime,
  145. the role of managing trusted identity in the Matrix ecosystem is farmed out to
  146. a cluster of known trusted ecosystem partners, who run 'Matrix Identity
  147. Servers' such as `Sydent <https://github.com/matrix-org/sydent>`_, whose role
  148. is purely to authenticate and track 3PID logins and publish end-user public
  149. keys.
  150. You can host your own copy of Sydent, but this will prevent you reaching other
  151. users in the Matrix ecosystem via their email address, and prevent them finding
  152. you. We therefore recommend that you use one of the centralised identity servers
  153. at ``https://matrix.org`` or ``https://vector.im`` for now.
  154. To reiterate: the Identity server will only be used if you choose to associate
  155. an email address with your account, or send an invite to another user via their
  156. email address.
  157. Development
  158. ===========
  159. We welcome contributions to Synapse from the community!
  160. The best place to get started is our
  161. `guide for contributors <https://matrix-org.github.io/synapse/latest/development/contributing_guide.html>`_.
  162. This is part of our larger `documentation <https://matrix-org.github.io/synapse/latest>`_, which includes
  163. information for Synapse developers as well as Synapse administrators.
  164. Developers might be particularly interested in:
  165. * `Synapse's database schema <https://matrix-org.github.io/synapse/latest/development/database_schema.html>`_,
  166. * `notes on Synapse's implementation details <https://matrix-org.github.io/synapse/latest/development/internal_documentation/index.html>`_, and
  167. * `how we use git <https://matrix-org.github.io/synapse/latest/development/git.html>`_.
  168. Alongside all that, join our developer community on Matrix:
  169. `#synapse-dev:matrix.org <https://matrix.to/#/#synapse-dev:matrix.org>`_, featuring real humans!
  170. .. |support| image:: https://img.shields.io/matrix/synapse:matrix.org?label=support&logo=matrix
  171. :alt: (get support on #synapse:matrix.org)
  172. :target: https://matrix.to/#/#synapse:matrix.org
  173. .. |development| image:: https://img.shields.io/matrix/synapse-dev:matrix.org?label=development&logo=matrix
  174. :alt: (discuss development on #synapse-dev:matrix.org)
  175. :target: https://matrix.to/#/#synapse-dev:matrix.org
  176. .. |documentation| image:: https://img.shields.io/badge/documentation-%E2%9C%93-success
  177. :alt: (Rendered documentation on GitHub Pages)
  178. :target: https://matrix-org.github.io/synapse/latest/
  179. .. |license| image:: https://img.shields.io/github/license/matrix-org/synapse
  180. :alt: (check license in LICENSE file)
  181. :target: LICENSE
  182. .. |pypi| image:: https://img.shields.io/pypi/v/matrix-synapse
  183. :alt: (latest version released on PyPi)
  184. :target: https://pypi.org/project/matrix-synapse
  185. .. |python| image:: https://img.shields.io/pypi/pyversions/matrix-synapse
  186. :alt: (supported python versions)
  187. :target: https://pypi.org/project/matrix-synapse