UPGRADE.rst 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272
  1. Upgrading Synapse
  2. =================
  3. Before upgrading check if any special steps are required to upgrade from the
  4. version you currently have installed to the current version of Synapse. The extra
  5. instructions that may be required are listed later in this document.
  6. * Check that your versions of Python and PostgreSQL are still supported.
  7. Synapse follows upstream lifecycles for `Python`_ and `PostgreSQL`_, and
  8. removes support for versions which are no longer maintained.
  9. The website https://endoflife.date also offers convenient summaries.
  10. .. _Python: https://devguide.python.org/devcycle/#end-of-life-branches
  11. .. _PostgreSQL: https://www.postgresql.org/support/versioning/
  12. * If Synapse was installed using `prebuilt packages
  13. <INSTALL.md#prebuilt-packages>`_, you will need to follow the normal process
  14. for upgrading those packages.
  15. * If Synapse was installed from source, then:
  16. 1. Activate the virtualenv before upgrading. For example, if Synapse is
  17. installed in a virtualenv in ``~/synapse/env`` then run:
  18. .. code:: bash
  19. source ~/synapse/env/bin/activate
  20. 2. If Synapse was installed using pip then upgrade to the latest version by
  21. running:
  22. .. code:: bash
  23. pip install --upgrade matrix-synapse
  24. If Synapse was installed using git then upgrade to the latest version by
  25. running:
  26. .. code:: bash
  27. git pull
  28. pip install --upgrade .
  29. 3. Restart Synapse:
  30. .. code:: bash
  31. ./synctl restart
  32. To check whether your update was successful, you can check the running server
  33. version with:
  34. .. code:: bash
  35. # you may need to replace 'localhost:8008' if synapse is not configured
  36. # to listen on port 8008.
  37. curl http://localhost:8008/_synapse/admin/v1/server_version
  38. Rolling back to older versions
  39. ------------------------------
  40. Rolling back to previous releases can be difficult, due to database schema
  41. changes between releases. Where we have been able to test the rollback process,
  42. this will be noted below.
  43. In general, you will need to undo any changes made during the upgrade process,
  44. for example:
  45. * pip:
  46. .. code:: bash
  47. source env/bin/activate
  48. # replace `1.3.0` accordingly:
  49. pip install matrix-synapse==1.3.0
  50. * Debian:
  51. .. code:: bash
  52. # replace `1.3.0` and `stretch` accordingly:
  53. wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
  54. dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
  55. Upgrading to v1.32.0
  56. ====================
  57. Regression causing connected Prometheus instances to become overwhelmed
  58. -----------------------------------------------------------------------
  59. This release introduces `a regression <https://githubcom/matrix-org/synapse/issues/9853>`_
  60. that can overwhelm connected Prometheus instances. This issue was not present in
  61. Synapse v1.32.0rc1. It is recommended not to update to this release. If you have
  62. upgraded to v1.32.0 already, please downgrade to v1.31.0. This issue will be
  63. resolved in a subsequent release version shortly.
  64. Dropping support for old Python, Postgres and SQLite versions
  65. -------------------------------------------------------------
  66. In line with our `deprecation policy <https://github.com/matrix-org/synapse/blob/release-v1.32.0/docs/deprecation_policy.md>`_,
  67. we've dropped support for Python 3.5 and PostgreSQL 9.5, as they are no longer supported upstream.
  68. This release of Synapse requires Python 3.6+ and PostgresSQL 9.6+ or SQLite 3.22+.
  69. Removal of old List Accounts Admin API
  70. --------------------------------------
  71. The deprecated v1 "list accounts" admin API (``GET /_synapse/admin/v1/users/<user_id>``) has been removed in this version.
  72. The `v2 list accounts API <https://github.com/matrix-org/synapse/blob/master/docs/admin_api/user_admin_api.rst#list-accounts>`_
  73. has been available since Synapse 1.7.0 (2019-12-13), and is accessible under ``GET /_synapse/admin/v2/users``.
  74. The deprecation of the old endpoint was announced with Synapse 1.28.0 (released on 2021-02-25).
  75. Application Services must use type ``m.login.application_service`` when registering users
  76. -----------------------------------------------------------------------------------------
  77. In compliance with the
  78. `Application Service spec <https://matrix.org/docs/spec/application_service/r0.1.2#server-admin-style-permissions>`_,
  79. Application Services are now required to use the ``m.login.application_service`` type when registering users via the
  80. ``/_matrix/client/r0/register`` endpoint. This behaviour was deprecated in Synapse v1.30.0.
  81. Please ensure your Application Services are up to date.
  82. Upgrading to v1.29.0
  83. ====================
  84. Requirement for X-Forwarded-Proto header
  85. ----------------------------------------
  86. When using Synapse with a reverse proxy (in particular, when using the
  87. `x_forwarded` option on an HTTP listener), Synapse now expects to receive an
  88. `X-Forwarded-Proto` header on incoming HTTP requests. If it is not set, Synapse
  89. will log a warning on each received request.
  90. To avoid the warning, administrators using a reverse proxy should ensure that
  91. the reverse proxy sets `X-Forwarded-Proto` header to `https` or `http` to
  92. indicate the protocol used by the client.
  93. Synapse also requires the `Host` header to be preserved.
  94. See the `reverse proxy documentation <docs/reverse_proxy.md>`_, where the
  95. example configurations have been updated to show how to set these headers.
  96. (Users of `Caddy <https://caddyserver.com/>`_ are unaffected, since we believe it
  97. sets `X-Forwarded-Proto` by default.)
  98. Upgrading to v1.27.0
  99. ====================
  100. Changes to callback URI for OAuth2 / OpenID Connect and SAML2
  101. -------------------------------------------------------------
  102. This version changes the URI used for callbacks from OAuth2 and SAML2 identity providers:
  103. * If your server is configured for single sign-on via an OpenID Connect or OAuth2 identity
  104. provider, you will need to add ``[synapse public baseurl]/_synapse/client/oidc/callback``
  105. to the list of permitted "redirect URIs" at the identity provider.
  106. See `docs/openid.md <docs/openid.md>`_ for more information on setting up OpenID
  107. Connect.
  108. * If your server is configured for single sign-on via a SAML2 identity provider, you will
  109. need to add ``[synapse public baseurl]/_synapse/client/saml2/authn_response`` as a permitted
  110. "ACS location" (also known as "allowed callback URLs") at the identity provider.
  111. The "Issuer" in the "AuthnRequest" to the SAML2 identity provider is also updated to
  112. ``[synapse public baseurl]/_synapse/client/saml2/metadata.xml``. If your SAML2 identity
  113. provider uses this property to validate or otherwise identify Synapse, its configuration
  114. will need to be updated to use the new URL. Alternatively you could create a new, separate
  115. "EntityDescriptor" in your SAML2 identity provider with the new URLs and leave the URLs in
  116. the existing "EntityDescriptor" as they were.
  117. Changes to HTML templates
  118. -------------------------
  119. The HTML templates for SSO and email notifications now have `Jinja2's autoescape <https://jinja.palletsprojects.com/en/2.11.x/api/#autoescaping>`_
  120. enabled for files ending in ``.html``, ``.htm``, and ``.xml``. If you have customised
  121. these templates and see issues when viewing them you might need to update them.
  122. It is expected that most configurations will need no changes.
  123. If you have customised the templates *names* for these templates, it is recommended
  124. to verify they end in ``.html`` to ensure autoescape is enabled.
  125. The above applies to the following templates:
  126. * ``add_threepid.html``
  127. * ``add_threepid_failure.html``
  128. * ``add_threepid_success.html``
  129. * ``notice_expiry.html``
  130. * ``notice_expiry.html``
  131. * ``notif_mail.html`` (which, by default, includes ``room.html`` and ``notif.html``)
  132. * ``password_reset.html``
  133. * ``password_reset_confirmation.html``
  134. * ``password_reset_failure.html``
  135. * ``password_reset_success.html``
  136. * ``registration.html``
  137. * ``registration_failure.html``
  138. * ``registration_success.html``
  139. * ``sso_account_deactivated.html``
  140. * ``sso_auth_bad_user.html``
  141. * ``sso_auth_confirm.html``
  142. * ``sso_auth_success.html``
  143. * ``sso_error.html``
  144. * ``sso_login_idp_picker.html``
  145. * ``sso_redirect_confirm.html``
  146. Upgrading to v1.26.0
  147. ====================
  148. Rolling back to v1.25.0 after a failed upgrade
  149. ----------------------------------------------
  150. v1.26.0 includes a lot of large changes. If something problematic occurs, you
  151. may want to roll-back to a previous version of Synapse. Because v1.26.0 also
  152. includes a new database schema version, reverting that version is also required
  153. alongside the generic rollback instructions mentioned above. In short, to roll
  154. back to v1.25.0 you need to:
  155. 1. Stop the server
  156. 2. Decrease the schema version in the database:
  157. .. code:: sql
  158. UPDATE schema_version SET version = 58;
  159. 3. Delete the ignored users & chain cover data:
  160. .. code:: sql
  161. DROP TABLE IF EXISTS ignored_users;
  162. UPDATE rooms SET has_auth_chain_index = false;
  163. For PostgreSQL run:
  164. .. code:: sql
  165. TRUNCATE event_auth_chain_links;
  166. TRUNCATE event_auth_chains;
  167. For SQLite run:
  168. .. code:: sql
  169. DELETE FROM event_auth_chain_links;
  170. DELETE FROM event_auth_chains;
  171. 4. Mark the deltas as not run (so they will re-run on upgrade).
  172. .. code:: sql
  173. DELETE FROM applied_schema_deltas WHERE version = 59 AND file = "59/01ignored_user.py";
  174. DELETE FROM applied_schema_deltas WHERE version = 59 AND file = "59/06chain_cover_index.sql";
  175. 5. Downgrade Synapse by following the instructions for your installation method
  176. in the "Rolling back to older versions" section above.
  177. Upgrading to v1.25.0
  178. ====================
  179. Last release supporting Python 3.5
  180. ----------------------------------
  181. This is the last release of Synapse which guarantees support with Python 3.5,
  182. which passed its upstream End of Life date several months ago.
  183. We will attempt to maintain support through March 2021, but without guarantees.
  184. In the future, Synapse will follow upstream schedules for ending support of
  185. older versions of Python and PostgreSQL. Please upgrade to at least Python 3.6
  186. and PostgreSQL 9.6 as soon as possible.
  187. Blacklisting IP ranges
  188. ----------------------
  189. Synapse v1.25.0 includes new settings, ``ip_range_blacklist`` and
  190. ``ip_range_whitelist``, for controlling outgoing requests from Synapse for federation,
  191. identity servers, push, and for checking key validity for third-party invite events.
  192. The previous setting, ``federation_ip_range_blacklist``, is deprecated. The new
  193. ``ip_range_blacklist`` defaults to private IP ranges if it is not defined.
  194. If you have never customised ``federation_ip_range_blacklist`` it is recommended
  195. that you remove that setting.
  196. If you have customised ``federation_ip_range_blacklist`` you should update the
  197. setting name to ``ip_range_blacklist``.
  198. If you have a custom push server that is reached via private IP space you may
  199. need to customise ``ip_range_blacklist`` or ``ip_range_whitelist``.
  200. Upgrading to v1.24.0
  201. ====================
  202. Custom OpenID Connect mapping provider breaking change
  203. ------------------------------------------------------
  204. This release allows the OpenID Connect mapping provider to perform normalisation
  205. of the localpart of the Matrix ID. This allows for the mapping provider to
  206. specify different algorithms, instead of the [default way](https://matrix.org/docs/spec/appendices#mapping-from-other-character-sets).
  207. If your Synapse configuration uses a custom mapping provider
  208. (`oidc_config.user_mapping_provider.module` is specified and not equal to
  209. `synapse.handlers.oidc_handler.JinjaOidcMappingProvider`) then you *must* ensure
  210. that `map_user_attributes` of the mapping provider performs some normalisation
  211. of the `localpart` returned. To match previous behaviour you can use the
  212. `map_username_to_mxid_localpart` function provided by Synapse. An example is
  213. shown below:
  214. .. code-block:: python
  215. from synapse.types import map_username_to_mxid_localpart
  216. class MyMappingProvider:
  217. def map_user_attributes(self, userinfo, token):
  218. # ... your custom logic ...
  219. sso_user_id = ...
  220. localpart = map_username_to_mxid_localpart(sso_user_id)
  221. return {"localpart": localpart}
  222. Removal historical Synapse Admin API
  223. ------------------------------------
  224. Historically, the Synapse Admin API has been accessible under:
  225. * ``/_matrix/client/api/v1/admin``
  226. * ``/_matrix/client/unstable/admin``
  227. * ``/_matrix/client/r0/admin``
  228. * ``/_synapse/admin/v1``
  229. The endpoints with ``/_matrix/client/*`` prefixes have been removed as of v1.24.0.
  230. The Admin API is now only accessible under:
  231. * ``/_synapse/admin/v1``
  232. The only exception is the `/admin/whois` endpoint, which is
  233. `also available via the client-server API <https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-admin-whois-userid>`_.
  234. The deprecation of the old endpoints was announced with Synapse 1.20.0 (released
  235. on 2020-09-22) and makes it easier for homeserver admins to lock down external
  236. access to the Admin API endpoints.
  237. Upgrading to v1.23.0
  238. ====================
  239. Structured logging configuration breaking changes
  240. -------------------------------------------------
  241. This release deprecates use of the ``structured: true`` logging configuration for
  242. structured logging. If your logging configuration contains ``structured: true``
  243. then it should be modified based on the `structured logging documentation
  244. <https://github.com/matrix-org/synapse/blob/master/docs/structured_logging.md>`_.
  245. The ``structured`` and ``drains`` logging options are now deprecated and should
  246. be replaced by standard logging configuration of ``handlers`` and ``formatters``.
  247. A future will release of Synapse will make using ``structured: true`` an error.
  248. Upgrading to v1.22.0
  249. ====================
  250. ThirdPartyEventRules breaking changes
  251. -------------------------------------
  252. This release introduces a backwards-incompatible change to modules making use of
  253. ``ThirdPartyEventRules`` in Synapse. If you make use of a module defined under the
  254. ``third_party_event_rules`` config option, please make sure it is updated to handle
  255. the below change:
  256. The ``http_client`` argument is no longer passed to modules as they are initialised. Instead,
  257. modules are expected to make use of the ``http_client`` property on the ``ModuleApi`` class.
  258. Modules are now passed a ``module_api`` argument during initialisation, which is an instance of
  259. ``ModuleApi``. ``ModuleApi`` instances have a ``http_client`` property which acts the same as
  260. the ``http_client`` argument previously passed to ``ThirdPartyEventRules`` modules.
  261. Upgrading to v1.21.0
  262. ====================
  263. Forwarding ``/_synapse/client`` through your reverse proxy
  264. ----------------------------------------------------------
  265. The `reverse proxy documentation
  266. <https://github.com/matrix-org/synapse/blob/develop/docs/reverse_proxy.md>`_ has been updated
  267. to include reverse proxy directives for ``/_synapse/client/*`` endpoints. As the user password
  268. reset flow now uses endpoints under this prefix, **you must update your reverse proxy
  269. configurations for user password reset to work**.
  270. Additionally, note that the `Synapse worker documentation
  271. <https://github.com/matrix-org/synapse/blob/develop/docs/workers.md>`_ has been updated to
  272. state that the ``/_synapse/client/password_reset/email/submit_token`` endpoint can be handled
  273. by all workers. If you make use of Synapse's worker feature, please update your reverse proxy
  274. configuration to reflect this change.
  275. New HTML templates
  276. ------------------
  277. A new HTML template,
  278. `password_reset_confirmation.html <https://github.com/matrix-org/synapse/blob/develop/synapse/res/templates/password_reset_confirmation.html>`_,
  279. has been added to the ``synapse/res/templates`` directory. If you are using a
  280. custom template directory, you may want to copy the template over and modify it.
  281. Note that as of v1.20.0, templates do not need to be included in custom template
  282. directories for Synapse to start. The default templates will be used if a custom
  283. template cannot be found.
  284. This page will appear to the user after clicking a password reset link that has
  285. been emailed to them.
  286. To complete password reset, the page must include a way to make a `POST`
  287. request to
  288. ``/_synapse/client/password_reset/{medium}/submit_token``
  289. with the query parameters from the original link, presented as a URL-encoded form. See the file
  290. itself for more details.
  291. Updated Single Sign-on HTML Templates
  292. -------------------------------------
  293. The ``saml_error.html`` template was removed from Synapse and replaced with the
  294. ``sso_error.html`` template. If your Synapse is configured to use SAML and a
  295. custom ``sso_redirect_confirm_template_dir`` configuration then any customisations
  296. of the ``saml_error.html`` template will need to be merged into the ``sso_error.html``
  297. template. These templates are similar, but the parameters are slightly different:
  298. * The ``msg`` parameter should be renamed to ``error_description``.
  299. * There is no longer a ``code`` parameter for the response code.
  300. * A string ``error`` parameter is available that includes a short hint of why a
  301. user is seeing the error page.
  302. Upgrading to v1.18.0
  303. ====================
  304. Docker `-py3` suffix will be removed in future versions
  305. -------------------------------------------------------
  306. From 10th August 2020, we will no longer publish Docker images with the `-py3` tag suffix. The images tagged with the `-py3` suffix have been identical to the non-suffixed tags since release 0.99.0, and the suffix is obsolete.
  307. On 10th August, we will remove the `latest-py3` tag. Existing per-release tags (such as `v1.18.0-py3`) will not be removed, but no new `-py3` tags will be added.
  308. Scripts relying on the `-py3` suffix will need to be updated.
  309. Redis replication is now recommended in lieu of TCP replication
  310. ---------------------------------------------------------------
  311. When setting up worker processes, we now recommend the use of a Redis server for replication. **The old direct TCP connection method is deprecated and will be removed in a future release.**
  312. See `docs/workers.md <docs/workers.md>`_ for more details.
  313. Upgrading to v1.14.0
  314. ====================
  315. This version includes a database update which is run as part of the upgrade,
  316. and which may take a couple of minutes in the case of a large server. Synapse
  317. will not respond to HTTP requests while this update is taking place.
  318. Upgrading to v1.13.0
  319. ====================
  320. Incorrect database migration in old synapse versions
  321. ----------------------------------------------------
  322. A bug was introduced in Synapse 1.4.0 which could cause the room directory to
  323. be incomplete or empty if Synapse was upgraded directly from v1.2.1 or
  324. earlier, to versions between v1.4.0 and v1.12.x.
  325. This will *not* be a problem for Synapse installations which were:
  326. * created at v1.4.0 or later,
  327. * upgraded via v1.3.x, or
  328. * upgraded straight from v1.2.1 or earlier to v1.13.0 or later.
  329. If completeness of the room directory is a concern, installations which are
  330. affected can be repaired as follows:
  331. 1. Run the following sql from a `psql` or `sqlite3` console:
  332. .. code:: sql
  333. INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
  334. ('populate_stats_process_rooms', '{}', 'current_state_events_membership');
  335. INSERT INTO background_updates (update_name, progress_json, depends_on) VALUES
  336. ('populate_stats_process_users', '{}', 'populate_stats_process_rooms');
  337. 2. Restart synapse.
  338. New Single Sign-on HTML Templates
  339. ---------------------------------
  340. New templates (``sso_auth_confirm.html``, ``sso_auth_success.html``, and
  341. ``sso_account_deactivated.html``) were added to Synapse. If your Synapse is
  342. configured to use SSO and a custom ``sso_redirect_confirm_template_dir``
  343. configuration then these templates will need to be copied from
  344. `synapse/res/templates <synapse/res/templates>`_ into that directory.
  345. Synapse SSO Plugins Method Deprecation
  346. --------------------------------------
  347. Plugins using the ``complete_sso_login`` method of
  348. ``synapse.module_api.ModuleApi`` should update to using the async/await
  349. version ``complete_sso_login_async`` which includes additional checks. The
  350. non-async version is considered deprecated.
  351. Rolling back to v1.12.4 after a failed upgrade
  352. ----------------------------------------------
  353. v1.13.0 includes a lot of large changes. If something problematic occurs, you
  354. may want to roll-back to a previous version of Synapse. Because v1.13.0 also
  355. includes a new database schema version, reverting that version is also required
  356. alongside the generic rollback instructions mentioned above. In short, to roll
  357. back to v1.12.4 you need to:
  358. 1. Stop the server
  359. 2. Decrease the schema version in the database:
  360. .. code:: sql
  361. UPDATE schema_version SET version = 57;
  362. 3. Downgrade Synapse by following the instructions for your installation method
  363. in the "Rolling back to older versions" section above.
  364. Upgrading to v1.12.0
  365. ====================
  366. This version includes a database update which is run as part of the upgrade,
  367. and which may take some time (several hours in the case of a large
  368. server). Synapse will not respond to HTTP requests while this update is taking
  369. place.
  370. This is only likely to be a problem in the case of a server which is
  371. participating in many rooms.
  372. 0. As with all upgrades, it is recommended that you have a recent backup of
  373. your database which can be used for recovery in the event of any problems.
  374. 1. As an initial check to see if you will be affected, you can try running the
  375. following query from the `psql` or `sqlite3` console. It is safe to run it
  376. while Synapse is still running.
  377. .. code:: sql
  378. SELECT MAX(q.v) FROM (
  379. SELECT (
  380. SELECT ej.json AS v
  381. FROM state_events se INNER JOIN event_json ej USING (event_id)
  382. WHERE se.room_id=rooms.room_id AND se.type='m.room.create' AND se.state_key=''
  383. LIMIT 1
  384. ) FROM rooms WHERE rooms.room_version IS NULL
  385. ) q;
  386. This query will take about the same amount of time as the upgrade process: ie,
  387. if it takes 5 minutes, then it is likely that Synapse will be unresponsive for
  388. 5 minutes during the upgrade.
  389. If you consider an outage of this duration to be acceptable, no further
  390. action is necessary and you can simply start Synapse 1.12.0.
  391. If you would prefer to reduce the downtime, continue with the steps below.
  392. 2. The easiest workaround for this issue is to manually
  393. create a new index before upgrading. On PostgreSQL, his can be done as follows:
  394. .. code:: sql
  395. CREATE INDEX CONCURRENTLY tmp_upgrade_1_12_0_index
  396. ON state_events(room_id) WHERE type = 'm.room.create';
  397. The above query may take some time, but is also safe to run while Synapse is
  398. running.
  399. We assume that no SQLite users have databases large enough to be
  400. affected. If you *are* affected, you can run a similar query, omitting the
  401. ``CONCURRENTLY`` keyword. Note however that this operation may in itself cause
  402. Synapse to stop running for some time. Synapse admins are reminded that
  403. `SQLite is not recommended for use outside a test
  404. environment <https://github.com/matrix-org/synapse/blob/master/README.rst#using-postgresql>`_.
  405. 3. Once the index has been created, the ``SELECT`` query in step 1 above should
  406. complete quickly. It is therefore safe to upgrade to Synapse 1.12.0.
  407. 4. Once Synapse 1.12.0 has successfully started and is responding to HTTP
  408. requests, the temporary index can be removed:
  409. .. code:: sql
  410. DROP INDEX tmp_upgrade_1_12_0_index;
  411. Upgrading to v1.10.0
  412. ====================
  413. Synapse will now log a warning on start up if used with a PostgreSQL database
  414. that has a non-recommended locale set.
  415. See `docs/postgres.md <docs/postgres.md>`_ for details.
  416. Upgrading to v1.8.0
  417. ===================
  418. Specifying a ``log_file`` config option will now cause Synapse to refuse to
  419. start, and should be replaced by with the ``log_config`` option. Support for
  420. the ``log_file`` option was removed in v1.3.0 and has since had no effect.
  421. Upgrading to v1.7.0
  422. ===================
  423. In an attempt to configure Synapse in a privacy preserving way, the default
  424. behaviours of ``allow_public_rooms_without_auth`` and
  425. ``allow_public_rooms_over_federation`` have been inverted. This means that by
  426. default, only authenticated users querying the Client/Server API will be able
  427. to query the room directory, and relatedly that the server will not share
  428. room directory information with other servers over federation.
  429. If your installation does not explicitly set these settings one way or the other
  430. and you want either setting to be ``true`` then it will necessary to update
  431. your homeserver configuration file accordingly.
  432. For more details on the surrounding context see our `explainer
  433. <https://matrix.org/blog/2019/11/09/avoiding-unwelcome-visitors-on-private-matrix-servers>`_.
  434. Upgrading to v1.5.0
  435. ===================
  436. This release includes a database migration which may take several minutes to
  437. complete if there are a large number (more than a million or so) of entries in
  438. the ``devices`` table. This is only likely to a be a problem on very large
  439. installations.
  440. Upgrading to v1.4.0
  441. ===================
  442. New custom templates
  443. --------------------
  444. If you have configured a custom template directory with the
  445. ``email.template_dir`` option, be aware that there are new templates regarding
  446. registration and threepid management (see below) that must be included.
  447. * ``registration.html`` and ``registration.txt``
  448. * ``registration_success.html`` and ``registration_failure.html``
  449. * ``add_threepid.html`` and ``add_threepid.txt``
  450. * ``add_threepid_failure.html`` and ``add_threepid_success.html``
  451. Synapse will expect these files to exist inside the configured template
  452. directory, and **will fail to start** if they are absent.
  453. To view the default templates, see `synapse/res/templates
  454. <https://github.com/matrix-org/synapse/tree/master/synapse/res/templates>`_.
  455. 3pid verification changes
  456. -------------------------
  457. **Note: As of this release, users will be unable to add phone numbers or email
  458. addresses to their accounts, without changes to the Synapse configuration. This
  459. includes adding an email address during registration.**
  460. It is possible for a user to associate an email address or phone number
  461. with their account, for a number of reasons:
  462. * for use when logging in, as an alternative to the user id.
  463. * in the case of email, as an alternative contact to help with account recovery.
  464. * in the case of email, to receive notifications of missed messages.
  465. Before an email address or phone number can be added to a user's account,
  466. or before such an address is used to carry out a password-reset, Synapse must
  467. confirm the operation with the owner of the email address or phone number.
  468. It does this by sending an email or text giving the user a link or token to confirm
  469. receipt. This process is known as '3pid verification'. ('3pid', or 'threepid',
  470. stands for third-party identifier, and we use it to refer to external
  471. identifiers such as email addresses and phone numbers.)
  472. Previous versions of Synapse delegated the task of 3pid verification to an
  473. identity server by default. In most cases this server is ``vector.im`` or
  474. ``matrix.org``.
  475. In Synapse 1.4.0, for security and privacy reasons, the homeserver will no
  476. longer delegate this task to an identity server by default. Instead,
  477. the server administrator will need to explicitly decide how they would like the
  478. verification messages to be sent.
  479. In the medium term, the ``vector.im`` and ``matrix.org`` identity servers will
  480. disable support for delegated 3pid verification entirely. However, in order to
  481. ease the transition, they will retain the capability for a limited
  482. period. Delegated email verification will be disabled on Monday 2nd December
  483. 2019 (giving roughly 2 months notice). Disabling delegated SMS verification
  484. will follow some time after that once SMS verification support lands in
  485. Synapse.
  486. Once delegated 3pid verification support has been disabled in the ``vector.im`` and
  487. ``matrix.org`` identity servers, all Synapse versions that depend on those
  488. instances will be unable to verify email and phone numbers through them. There
  489. are no imminent plans to remove delegated 3pid verification from Sydent
  490. generally. (Sydent is the identity server project that backs the ``vector.im`` and
  491. ``matrix.org`` instances).
  492. Email
  493. ~~~~~
  494. Following upgrade, to continue verifying email (e.g. as part of the
  495. registration process), admins can either:-
  496. * Configure Synapse to use an email server.
  497. * Run or choose an identity server which allows delegated email verification
  498. and delegate to it.
  499. Configure SMTP in Synapse
  500. +++++++++++++++++++++++++
  501. To configure an SMTP server for Synapse, modify the configuration section
  502. headed ``email``, and be sure to have at least the ``smtp_host, smtp_port``
  503. and ``notif_from`` fields filled out.
  504. You may also need to set ``smtp_user``, ``smtp_pass``, and
  505. ``require_transport_security``.
  506. See the `sample configuration file <docs/sample_config.yaml>`_ for more details
  507. on these settings.
  508. Delegate email to an identity server
  509. ++++++++++++++++++++++++++++++++++++
  510. Some admins will wish to continue using email verification as part of the
  511. registration process, but will not immediately have an appropriate SMTP server
  512. at hand.
  513. To this end, we will continue to support email verification delegation via the
  514. ``vector.im`` and ``matrix.org`` identity servers for two months. Support for
  515. delegated email verification will be disabled on Monday 2nd December.
  516. The ``account_threepid_delegates`` dictionary defines whether the homeserver
  517. should delegate an external server (typically an `identity server
  518. <https://matrix.org/docs/spec/identity_service/r0.2.1>`_) to handle sending
  519. confirmation messages via email and SMS.
  520. So to delegate email verification, in ``homeserver.yaml``, set
  521. ``account_threepid_delegates.email`` to the base URL of an identity server. For
  522. example:
  523. .. code:: yaml
  524. account_threepid_delegates:
  525. email: https://example.com # Delegate email sending to example.com
  526. Note that ``account_threepid_delegates.email`` replaces the deprecated
  527. ``email.trust_identity_server_for_password_resets``: if
  528. ``email.trust_identity_server_for_password_resets`` is set to ``true``, and
  529. ``account_threepid_delegates.email`` is not set, then the first entry in
  530. ``trusted_third_party_id_servers`` will be used as the
  531. ``account_threepid_delegate`` for email. This is to ensure compatibility with
  532. existing Synapse installs that set up external server handling for these tasks
  533. before v1.4.0. If ``email.trust_identity_server_for_password_resets`` is
  534. ``true`` and no trusted identity server domains are configured, Synapse will
  535. report an error and refuse to start.
  536. If ``email.trust_identity_server_for_password_resets`` is ``false`` or absent
  537. and no ``email`` delegate is configured in ``account_threepid_delegates``,
  538. then Synapse will send email verification messages itself, using the configured
  539. SMTP server (see above).
  540. that type.
  541. Phone numbers
  542. ~~~~~~~~~~~~~
  543. Synapse does not support phone-number verification itself, so the only way to
  544. maintain the ability for users to add phone numbers to their accounts will be
  545. by continuing to delegate phone number verification to the ``matrix.org`` and
  546. ``vector.im`` identity servers (or another identity server that supports SMS
  547. sending).
  548. The ``account_threepid_delegates`` dictionary defines whether the homeserver
  549. should delegate an external server (typically an `identity server
  550. <https://matrix.org/docs/spec/identity_service/r0.2.1>`_) to handle sending
  551. confirmation messages via email and SMS.
  552. So to delegate phone number verification, in ``homeserver.yaml``, set
  553. ``account_threepid_delegates.msisdn`` to the base URL of an identity
  554. server. For example:
  555. .. code:: yaml
  556. account_threepid_delegates:
  557. msisdn: https://example.com # Delegate sms sending to example.com
  558. The ``matrix.org`` and ``vector.im`` identity servers will continue to support
  559. delegated phone number verification via SMS until such time as it is possible
  560. for admins to configure their servers to perform phone number verification
  561. directly. More details will follow in a future release.
  562. Rolling back to v1.3.1
  563. ----------------------
  564. If you encounter problems with v1.4.0, it should be possible to roll back to
  565. v1.3.1, subject to the following:
  566. * The 'room statistics' engine was heavily reworked in this release (see
  567. `#5971 <https://github.com/matrix-org/synapse/pull/5971>`_), including
  568. significant changes to the database schema, which are not easily
  569. reverted. This will cause the room statistics engine to stop updating when
  570. you downgrade.
  571. The room statistics are essentially unused in v1.3.1 (in future versions of
  572. Synapse, they will be used to populate the room directory), so there should
  573. be no loss of functionality. However, the statistics engine will write errors
  574. to the logs, which can be avoided by setting the following in
  575. `homeserver.yaml`:
  576. .. code:: yaml
  577. stats:
  578. enabled: false
  579. Don't forget to re-enable it when you upgrade again, in preparation for its
  580. use in the room directory!
  581. Upgrading to v1.2.0
  582. ===================
  583. Some counter metrics have been renamed, with the old names deprecated. See
  584. `the metrics documentation <docs/metrics-howto.md#renaming-of-metrics--deprecation-of-old-names-in-12>`_
  585. for details.
  586. Upgrading to v1.1.0
  587. ===================
  588. Synapse v1.1.0 removes support for older Python and PostgreSQL versions, as
  589. outlined in `our deprecation notice <https://matrix.org/blog/2019/04/08/synapse-deprecating-postgres-9-4-and-python-2-x>`_.
  590. Minimum Python Version
  591. ----------------------
  592. Synapse v1.1.0 has a minimum Python requirement of Python 3.5. Python 3.6 or
  593. Python 3.7 are recommended as they have improved internal string handling,
  594. significantly reducing memory usage.
  595. If you use current versions of the Matrix.org-distributed Debian packages or
  596. Docker images, action is not required.
  597. If you install Synapse in a Python virtual environment, please see "Upgrading to
  598. v0.34.0" for notes on setting up a new virtualenv under Python 3.
  599. Minimum PostgreSQL Version
  600. --------------------------
  601. If using PostgreSQL under Synapse, you will need to use PostgreSQL 9.5 or above.
  602. Please see the
  603. `PostgreSQL documentation <https://www.postgresql.org/docs/11/upgrading.html>`_
  604. for more details on upgrading your database.
  605. Upgrading to v1.0
  606. =================
  607. Validation of TLS certificates
  608. ------------------------------
  609. Synapse v1.0 is the first release to enforce
  610. validation of TLS certificates for the federation API. It is therefore
  611. essential that your certificates are correctly configured. See the `FAQ
  612. <docs/MSC1711_certificates_FAQ.md>`_ for more information.
  613. Note, v1.0 installations will also no longer be able to federate with servers
  614. that have not correctly configured their certificates.
  615. In rare cases, it may be desirable to disable certificate checking: for
  616. example, it might be essential to be able to federate with a given legacy
  617. server in a closed federation. This can be done in one of two ways:-
  618. * Configure the global switch ``federation_verify_certificates`` to ``false``.
  619. * Configure a whitelist of server domains to trust via ``federation_certificate_verification_whitelist``.
  620. See the `sample configuration file <docs/sample_config.yaml>`_
  621. for more details on these settings.
  622. Email
  623. -----
  624. When a user requests a password reset, Synapse will send an email to the
  625. user to confirm the request.
  626. Previous versions of Synapse delegated the job of sending this email to an
  627. identity server. If the identity server was somehow malicious or became
  628. compromised, it would be theoretically possible to hijack an account through
  629. this means.
  630. Therefore, by default, Synapse v1.0 will send the confirmation email itself. If
  631. Synapse is not configured with an SMTP server, password reset via email will be
  632. disabled.
  633. To configure an SMTP server for Synapse, modify the configuration section
  634. headed ``email``, and be sure to have at least the ``smtp_host``, ``smtp_port``
  635. and ``notif_from`` fields filled out. You may also need to set ``smtp_user``,
  636. ``smtp_pass``, and ``require_transport_security``.
  637. If you are absolutely certain that you wish to continue using an identity
  638. server for password resets, set ``trust_identity_server_for_password_resets`` to ``true``.
  639. See the `sample configuration file <docs/sample_config.yaml>`_
  640. for more details on these settings.
  641. New email templates
  642. ---------------
  643. Some new templates have been added to the default template directory for the purpose of the
  644. homeserver sending its own password reset emails. If you have configured a custom
  645. ``template_dir`` in your Synapse config, these files will need to be added.
  646. ``password_reset.html`` and ``password_reset.txt`` are HTML and plain text templates
  647. respectively that contain the contents of what will be emailed to the user upon attempting to
  648. reset their password via email. ``password_reset_success.html`` and
  649. ``password_reset_failure.html`` are HTML files that the content of which (assuming no redirect
  650. URL is set) will be shown to the user after they attempt to click the link in the email sent
  651. to them.
  652. Upgrading to v0.99.0
  653. ====================
  654. Please be aware that, before Synapse v1.0 is released around March 2019, you
  655. will need to replace any self-signed certificates with those verified by a
  656. root CA. Information on how to do so can be found at `the ACME docs
  657. <docs/ACME.md>`_.
  658. For more information on configuring TLS certificates see the `FAQ <docs/MSC1711_certificates_FAQ.md>`_.
  659. Upgrading to v0.34.0
  660. ====================
  661. 1. This release is the first to fully support Python 3. Synapse will now run on
  662. Python versions 3.5, or 3.6 (as well as 2.7). We recommend switching to
  663. Python 3, as it has been shown to give performance improvements.
  664. For users who have installed Synapse into a virtualenv, we recommend doing
  665. this by creating a new virtualenv. For example::
  666. virtualenv -p python3 ~/synapse/env3
  667. source ~/synapse/env3/bin/activate
  668. pip install matrix-synapse
  669. You can then start synapse as normal, having activated the new virtualenv::
  670. cd ~/synapse
  671. source env3/bin/activate
  672. synctl start
  673. Users who have installed from distribution packages should see the relevant
  674. package documentation. See below for notes on Debian packages.
  675. * When upgrading to Python 3, you **must** make sure that your log files are
  676. configured as UTF-8, by adding ``encoding: utf8`` to the
  677. ``RotatingFileHandler`` configuration (if you have one) in your
  678. ``<server>.log.config`` file. For example, if your ``log.config`` file
  679. contains::
  680. handlers:
  681. file:
  682. class: logging.handlers.RotatingFileHandler
  683. formatter: precise
  684. filename: homeserver.log
  685. maxBytes: 104857600
  686. backupCount: 10
  687. filters: [context]
  688. console:
  689. class: logging.StreamHandler
  690. formatter: precise
  691. filters: [context]
  692. Then you should update this to be::
  693. handlers:
  694. file:
  695. class: logging.handlers.RotatingFileHandler
  696. formatter: precise
  697. filename: homeserver.log
  698. maxBytes: 104857600
  699. backupCount: 10
  700. filters: [context]
  701. encoding: utf8
  702. console:
  703. class: logging.StreamHandler
  704. formatter: precise
  705. filters: [context]
  706. There is no need to revert this change if downgrading to Python 2.
  707. We are also making available Debian packages which will run Synapse on
  708. Python 3. You can switch to these packages with ``apt-get install
  709. matrix-synapse-py3``, however, please read `debian/NEWS
  710. <https://github.com/matrix-org/synapse/blob/release-v0.34.0/debian/NEWS>`_
  711. before doing so. The existing ``matrix-synapse`` packages will continue to
  712. use Python 2 for the time being.
  713. 2. This release removes the ``riot.im`` from the default list of trusted
  714. identity servers.
  715. If ``riot.im`` is in your homeserver's list of
  716. ``trusted_third_party_id_servers``, you should remove it. It was added in
  717. case a hypothetical future identity server was put there. If you don't
  718. remove it, users may be unable to deactivate their accounts.
  719. 3. This release no longer installs the (unmaintained) Matrix Console web client
  720. as part of the default installation. It is possible to re-enable it by
  721. installing it separately and setting the ``web_client_location`` config
  722. option, but please consider switching to another client.
  723. Upgrading to v0.33.7
  724. ====================
  725. This release removes the example email notification templates from
  726. ``res/templates`` (they are now internal to the python package). This should
  727. only affect you if you (a) deploy your Synapse instance from a git checkout or
  728. a github snapshot URL, and (b) have email notifications enabled.
  729. If you have email notifications enabled, you should ensure that
  730. ``email.template_dir`` is either configured to point at a directory where you
  731. have installed customised templates, or leave it unset to use the default
  732. templates.
  733. Upgrading to v0.27.3
  734. ====================
  735. This release expands the anonymous usage stats sent if the opt-in
  736. ``report_stats`` configuration is set to ``true``. We now capture RSS memory
  737. and cpu use at a very coarse level. This requires administrators to install
  738. the optional ``psutil`` python module.
  739. We would appreciate it if you could assist by ensuring this module is available
  740. and ``report_stats`` is enabled. This will let us see if performance changes to
  741. synapse are having an impact to the general community.
  742. Upgrading to v0.15.0
  743. ====================
  744. If you want to use the new URL previewing API (/_matrix/media/r0/preview_url)
  745. then you have to explicitly enable it in the config and update your dependencies
  746. dependencies. See README.rst for details.
  747. Upgrading to v0.11.0
  748. ====================
  749. This release includes the option to send anonymous usage stats to matrix.org,
  750. and requires that administrators explictly opt in or out by setting the
  751. ``report_stats`` option to either ``true`` or ``false``.
  752. We would really appreciate it if you could help our project out by reporting
  753. anonymized usage statistics from your homeserver. Only very basic aggregate
  754. data (e.g. number of users) will be reported, but it helps us to track the
  755. growth of the Matrix community, and helps us to make Matrix a success, as well
  756. as to convince other networks that they should peer with us.
  757. Upgrading to v0.9.0
  758. ===================
  759. Application services have had a breaking API change in this version.
  760. They can no longer register themselves with a home server using the AS HTTP API. This
  761. decision was made because a compromised application service with free reign to register
  762. any regex in effect grants full read/write access to the home server if a regex of ``.*``
  763. is used. An attack where a compromised AS re-registers itself with ``.*`` was deemed too
  764. big of a security risk to ignore, and so the ability to register with the HS remotely has
  765. been removed.
  766. It has been replaced by specifying a list of application service registrations in
  767. ``homeserver.yaml``::
  768. app_service_config_files: ["registration-01.yaml", "registration-02.yaml"]
  769. Where ``registration-01.yaml`` looks like::
  770. url: <String> # e.g. "https://my.application.service.com"
  771. as_token: <String>
  772. hs_token: <String>
  773. sender_localpart: <String> # This is a new field which denotes the user_id localpart when using the AS token
  774. namespaces:
  775. users:
  776. - exclusive: <Boolean>
  777. regex: <String> # e.g. "@prefix_.*"
  778. aliases:
  779. - exclusive: <Boolean>
  780. regex: <String>
  781. rooms:
  782. - exclusive: <Boolean>
  783. regex: <String>
  784. Upgrading to v0.8.0
  785. ===================
  786. Servers which use captchas will need to add their public key to::
  787. static/client/register/register_config.js
  788. window.matrixRegistrationConfig = {
  789. recaptcha_public_key: "YOUR_PUBLIC_KEY"
  790. };
  791. This is required in order to support registration fallback (typically used on
  792. mobile devices).
  793. Upgrading to v0.7.0
  794. ===================
  795. New dependencies are:
  796. - pydenticon
  797. - simplejson
  798. - syutil
  799. - matrix-angular-sdk
  800. To pull in these dependencies in a virtual env, run::
  801. python synapse/python_dependencies.py | xargs -n 1 pip install
  802. Upgrading to v0.6.0
  803. ===================
  804. To pull in new dependencies, run::
  805. python setup.py develop --user
  806. This update includes a change to the database schema. To upgrade you first need
  807. to upgrade the database by running::
  808. python scripts/upgrade_db_to_v0.6.0.py <db> <server_name> <signing_key>
  809. Where `<db>` is the location of the database, `<server_name>` is the
  810. server name as specified in the synapse configuration, and `<signing_key>` is
  811. the location of the signing key as specified in the synapse configuration.
  812. This may take some time to complete. Failures of signatures and content hashes
  813. can safely be ignored.
  814. Upgrading to v0.5.1
  815. ===================
  816. Depending on precisely when you installed v0.5.0 you may have ended up with
  817. a stale release of the reference matrix webclient installed as a python module.
  818. To uninstall it and ensure you are depending on the latest module, please run::
  819. $ pip uninstall syweb
  820. Upgrading to v0.5.0
  821. ===================
  822. The webclient has been split out into a seperate repository/pacakage in this
  823. release. Before you restart your homeserver you will need to pull in the
  824. webclient package by running::
  825. python setup.py develop --user
  826. This release completely changes the database schema and so requires upgrading
  827. it before starting the new version of the homeserver.
  828. The script "database-prepare-for-0.5.0.sh" should be used to upgrade the
  829. database. This will save all user information, such as logins and profiles,
  830. but will otherwise purge the database. This includes messages, which
  831. rooms the home server was a member of and room alias mappings.
  832. If you would like to keep your history, please take a copy of your database
  833. file and ask for help in #matrix:matrix.org. The upgrade process is,
  834. unfortunately, non trivial and requires human intervention to resolve any
  835. resulting conflicts during the upgrade process.
  836. Before running the command the homeserver should be first completely
  837. shutdown. To run it, simply specify the location of the database, e.g.:
  838. ./scripts/database-prepare-for-0.5.0.sh "homeserver.db"
  839. Once this has successfully completed it will be safe to restart the
  840. homeserver. You may notice that the homeserver takes a few seconds longer to
  841. restart than usual as it reinitializes the database.
  842. On startup of the new version, users can either rejoin remote rooms using room
  843. aliases or by being reinvited. Alternatively, if any other homeserver sends a
  844. message to a room that the homeserver was previously in the local HS will
  845. automatically rejoin the room.
  846. Upgrading to v0.4.0
  847. ===================
  848. This release needs an updated syutil version. Run::
  849. python setup.py develop
  850. You will also need to upgrade your configuration as the signing key format has
  851. changed. Run::
  852. python -m synapse.app.homeserver --config-path <CONFIG> --generate-config
  853. Upgrading to v0.3.0
  854. ===================
  855. This registration API now closely matches the login API. This introduces a bit
  856. more backwards and forwards between the HS and the client, but this improves
  857. the overall flexibility of the API. You can now GET on /register to retrieve a list
  858. of valid registration flows. Upon choosing one, they are submitted in the same
  859. way as login, e.g::
  860. {
  861. type: m.login.password,
  862. user: foo,
  863. password: bar
  864. }
  865. The default HS supports 2 flows, with and without Identity Server email
  866. authentication. Enabling captcha on the HS will add in an extra step to all
  867. flows: ``m.login.recaptcha`` which must be completed before you can transition
  868. to the next stage. There is a new login type: ``m.login.email.identity`` which
  869. contains the ``threepidCreds`` key which were previously sent in the original
  870. register request. For more information on this, see the specification.
  871. Web Client
  872. ----------
  873. The VoIP specification has changed between v0.2.0 and v0.3.0. Users should
  874. refresh any browser tabs to get the latest web client code. Users on
  875. v0.2.0 of the web client will not be able to call those on v0.3.0 and
  876. vice versa.
  877. Upgrading to v0.2.0
  878. ===================
  879. The home server now requires setting up of SSL config before it can run. To
  880. automatically generate default config use::
  881. $ python synapse/app/homeserver.py \
  882. --server-name machine.my.domain.name \
  883. --bind-port 8448 \
  884. --config-path homeserver.config \
  885. --generate-config
  886. This config can be edited if desired, for example to specify a different SSL
  887. certificate to use. Once done you can run the home server using::
  888. $ python synapse/app/homeserver.py --config-path homeserver.config
  889. See the README.rst for more information.
  890. Also note that some config options have been renamed, including:
  891. - "host" to "server-name"
  892. - "database" to "database-path"
  893. - "port" to "bind-port" and "unsecure-port"
  894. Upgrading to v0.0.1
  895. ===================
  896. This release completely changes the database schema and so requires upgrading
  897. it before starting the new version of the homeserver.
  898. The script "database-prepare-for-0.0.1.sh" should be used to upgrade the
  899. database. This will save all user information, such as logins and profiles,
  900. but will otherwise purge the database. This includes messages, which
  901. rooms the home server was a member of and room alias mappings.
  902. Before running the command the homeserver should be first completely
  903. shutdown. To run it, simply specify the location of the database, e.g.:
  904. ./scripts/database-prepare-for-0.0.1.sh "homeserver.db"
  905. Once this has successfully completed it will be safe to restart the
  906. homeserver. You may notice that the homeserver takes a few seconds longer to
  907. restart than usual as it reinitializes the database.
  908. On startup of the new version, users can either rejoin remote rooms using room
  909. aliases or by being reinvited. Alternatively, if any other homeserver sends a
  910. message to a room that the homeserver was previously in the local HS will
  911. automatically rejoin the room.