UPGRADE.rst 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  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. * If Synapse was installed using `prebuilt packages
  7. <INSTALL.md#prebuilt-packages>`_, you will need to follow the normal process
  8. for upgrading those packages.
  9. * If Synapse was installed from source, then:
  10. 1. Activate the virtualenv before upgrading. For example, if Synapse is
  11. installed in a virtualenv in ``~/synapse/env`` then run:
  12. .. code:: bash
  13. source ~/synapse/env/bin/activate
  14. 2. If Synapse was installed using pip then upgrade to the latest version by
  15. running:
  16. .. code:: bash
  17. pip install --upgrade matrix-synapse
  18. If Synapse was installed using git then upgrade to the latest version by
  19. running:
  20. .. code:: bash
  21. git pull
  22. pip install --upgrade .
  23. 3. Restart Synapse:
  24. .. code:: bash
  25. ./synctl restart
  26. To check whether your update was successful, you can check the running server
  27. version with:
  28. .. code:: bash
  29. # you may need to replace 'localhost:8008' if synapse is not configured
  30. # to listen on port 8008.
  31. curl http://localhost:8008/_synapse/admin/v1/server_version
  32. Rolling back to older versions
  33. ------------------------------
  34. Rolling back to previous releases can be difficult, due to database schema
  35. changes between releases. Where we have been able to test the rollback process,
  36. this will be noted below.
  37. In general, you will need to undo any changes made during the upgrade process,
  38. for example:
  39. * pip:
  40. .. code:: bash
  41. source env/bin/activate
  42. # replace `1.3.0` accordingly:
  43. pip install matrix-synapse==1.3.0
  44. * Debian:
  45. .. code:: bash
  46. # replace `1.3.0` and `stretch` accordingly:
  47. wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
  48. dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
  49. Upgrading to v1.8.0
  50. ===================
  51. Specifying a ``log_file`` config option will now cause Synapse to refuse to
  52. start, and should be replaced by with the ``log_config`` option. Support for
  53. the ``log_file`` option was removed in v1.3.0 and has since had no effect.
  54. Upgrading to v1.7.0
  55. ===================
  56. In an attempt to configure Synapse in a privacy preserving way, the default
  57. behaviours of ``allow_public_rooms_without_auth`` and
  58. ``allow_public_rooms_over_federation`` have been inverted. This means that by
  59. default, only authenticated users querying the Client/Server API will be able
  60. to query the room directory, and relatedly that the server will not share
  61. room directory information with other servers over federation.
  62. If your installation does not explicitly set these settings one way or the other
  63. and you want either setting to be ``true`` then it will necessary to update
  64. your homeserver configuration file accordingly.
  65. For more details on the surrounding context see our `explainer
  66. <https://matrix.org/blog/2019/11/09/avoiding-unwelcome-visitors-on-private-matrix-servers>`_.
  67. Upgrading to v1.5.0
  68. ===================
  69. This release includes a database migration which may take several minutes to
  70. complete if there are a large number (more than a million or so) of entries in
  71. the ``devices`` table. This is only likely to a be a problem on very large
  72. installations.
  73. Upgrading to v1.4.0
  74. ===================
  75. New custom templates
  76. --------------------
  77. If you have configured a custom template directory with the
  78. ``email.template_dir`` option, be aware that there are new templates regarding
  79. registration and threepid management (see below) that must be included.
  80. * ``registration.html`` and ``registration.txt``
  81. * ``registration_success.html`` and ``registration_failure.html``
  82. * ``add_threepid.html`` and ``add_threepid.txt``
  83. * ``add_threepid_failure.html`` and ``add_threepid_success.html``
  84. Synapse will expect these files to exist inside the configured template
  85. directory, and **will fail to start** if they are absent.
  86. To view the default templates, see `synapse/res/templates
  87. <https://github.com/matrix-org/synapse/tree/master/synapse/res/templates>`_.
  88. 3pid verification changes
  89. -------------------------
  90. **Note: As of this release, users will be unable to add phone numbers or email
  91. addresses to their accounts, without changes to the Synapse configuration. This
  92. includes adding an email address during registration.**
  93. It is possible for a user to associate an email address or phone number
  94. with their account, for a number of reasons:
  95. * for use when logging in, as an alternative to the user id.
  96. * in the case of email, as an alternative contact to help with account recovery.
  97. * in the case of email, to receive notifications of missed messages.
  98. Before an email address or phone number can be added to a user's account,
  99. or before such an address is used to carry out a password-reset, Synapse must
  100. confirm the operation with the owner of the email address or phone number.
  101. It does this by sending an email or text giving the user a link or token to confirm
  102. receipt. This process is known as '3pid verification'. ('3pid', or 'threepid',
  103. stands for third-party identifier, and we use it to refer to external
  104. identifiers such as email addresses and phone numbers.)
  105. Previous versions of Synapse delegated the task of 3pid verification to an
  106. identity server by default. In most cases this server is ``vector.im`` or
  107. ``matrix.org``.
  108. In Synapse 1.4.0, for security and privacy reasons, the homeserver will no
  109. longer delegate this task to an identity server by default. Instead,
  110. the server administrator will need to explicitly decide how they would like the
  111. verification messages to be sent.
  112. In the medium term, the ``vector.im`` and ``matrix.org`` identity servers will
  113. disable support for delegated 3pid verification entirely. However, in order to
  114. ease the transition, they will retain the capability for a limited
  115. period. Delegated email verification will be disabled on Monday 2nd December
  116. 2019 (giving roughly 2 months notice). Disabling delegated SMS verification
  117. will follow some time after that once SMS verification support lands in
  118. Synapse.
  119. Once delegated 3pid verification support has been disabled in the ``vector.im`` and
  120. ``matrix.org`` identity servers, all Synapse versions that depend on those
  121. instances will be unable to verify email and phone numbers through them. There
  122. are no imminent plans to remove delegated 3pid verification from Sydent
  123. generally. (Sydent is the identity server project that backs the ``vector.im`` and
  124. ``matrix.org`` instances).
  125. Email
  126. ~~~~~
  127. Following upgrade, to continue verifying email (e.g. as part of the
  128. registration process), admins can either:-
  129. * Configure Synapse to use an email server.
  130. * Run or choose an identity server which allows delegated email verification
  131. and delegate to it.
  132. Configure SMTP in Synapse
  133. +++++++++++++++++++++++++
  134. To configure an SMTP server for Synapse, modify the configuration section
  135. headed ``email``, and be sure to have at least the ``smtp_host, smtp_port``
  136. and ``notif_from`` fields filled out.
  137. You may also need to set ``smtp_user``, ``smtp_pass``, and
  138. ``require_transport_security``.
  139. See the `sample configuration file <docs/sample_config.yaml>`_ for more details
  140. on these settings.
  141. Delegate email to an identity server
  142. ++++++++++++++++++++++++++++++++++++
  143. Some admins will wish to continue using email verification as part of the
  144. registration process, but will not immediately have an appropriate SMTP server
  145. at hand.
  146. To this end, we will continue to support email verification delegation via the
  147. ``vector.im`` and ``matrix.org`` identity servers for two months. Support for
  148. delegated email verification will be disabled on Monday 2nd December.
  149. The ``account_threepid_delegates`` dictionary defines whether the homeserver
  150. should delegate an external server (typically an `identity server
  151. <https://matrix.org/docs/spec/identity_service/r0.2.1>`_) to handle sending
  152. confirmation messages via email and SMS.
  153. So to delegate email verification, in ``homeserver.yaml``, set
  154. ``account_threepid_delegates.email`` to the base URL of an identity server. For
  155. example:
  156. .. code:: yaml
  157. account_threepid_delegates:
  158. email: https://example.com # Delegate email sending to example.com
  159. Note that ``account_threepid_delegates.email`` replaces the deprecated
  160. ``email.trust_identity_server_for_password_resets``: if
  161. ``email.trust_identity_server_for_password_resets`` is set to ``true``, and
  162. ``account_threepid_delegates.email`` is not set, then the first entry in
  163. ``trusted_third_party_id_servers`` will be used as the
  164. ``account_threepid_delegate`` for email. This is to ensure compatibility with
  165. existing Synapse installs that set up external server handling for these tasks
  166. before v1.4.0. If ``email.trust_identity_server_for_password_resets`` is
  167. ``true`` and no trusted identity server domains are configured, Synapse will
  168. report an error and refuse to start.
  169. If ``email.trust_identity_server_for_password_resets`` is ``false`` or absent
  170. and no ``email`` delegate is configured in ``account_threepid_delegates``,
  171. then Synapse will send email verification messages itself, using the configured
  172. SMTP server (see above).
  173. that type.
  174. Phone numbers
  175. ~~~~~~~~~~~~~
  176. Synapse does not support phone-number verification itself, so the only way to
  177. maintain the ability for users to add phone numbers to their accounts will be
  178. by continuing to delegate phone number verification to the ``matrix.org`` and
  179. ``vector.im`` identity servers (or another identity server that supports SMS
  180. sending).
  181. The ``account_threepid_delegates`` dictionary defines whether the homeserver
  182. should delegate an external server (typically an `identity server
  183. <https://matrix.org/docs/spec/identity_service/r0.2.1>`_) to handle sending
  184. confirmation messages via email and SMS.
  185. So to delegate phone number verification, in ``homeserver.yaml``, set
  186. ``account_threepid_delegates.msisdn`` to the base URL of an identity
  187. server. For example:
  188. .. code:: yaml
  189. account_threepid_delegates:
  190. msisdn: https://example.com # Delegate sms sending to example.com
  191. The ``matrix.org`` and ``vector.im`` identity servers will continue to support
  192. delegated phone number verification via SMS until such time as it is possible
  193. for admins to configure their servers to perform phone number verification
  194. directly. More details will follow in a future release.
  195. Rolling back to v1.3.1
  196. ----------------------
  197. If you encounter problems with v1.4.0, it should be possible to roll back to
  198. v1.3.1, subject to the following:
  199. * The 'room statistics' engine was heavily reworked in this release (see
  200. `#5971 <https://github.com/matrix-org/synapse/pull/5971>`_), including
  201. significant changes to the database schema, which are not easily
  202. reverted. This will cause the room statistics engine to stop updating when
  203. you downgrade.
  204. The room statistics are essentially unused in v1.3.1 (in future versions of
  205. Synapse, they will be used to populate the room directory), so there should
  206. be no loss of functionality. However, the statistics engine will write errors
  207. to the logs, which can be avoided by setting the following in
  208. `homeserver.yaml`:
  209. .. code:: yaml
  210. stats:
  211. enabled: false
  212. Don't forget to re-enable it when you upgrade again, in preparation for its
  213. use in the room directory!
  214. Upgrading to v1.2.0
  215. ===================
  216. Some counter metrics have been renamed, with the old names deprecated. See
  217. `the metrics documentation <docs/metrics-howto.md#renaming-of-metrics--deprecation-of-old-names-in-12>`_
  218. for details.
  219. Upgrading to v1.1.0
  220. ===================
  221. Synapse v1.1.0 removes support for older Python and PostgreSQL versions, as
  222. outlined in `our deprecation notice <https://matrix.org/blog/2019/04/08/synapse-deprecating-postgres-9-4-and-python-2-x>`_.
  223. Minimum Python Version
  224. ----------------------
  225. Synapse v1.1.0 has a minimum Python requirement of Python 3.5. Python 3.6 or
  226. Python 3.7 are recommended as they have improved internal string handling,
  227. significantly reducing memory usage.
  228. If you use current versions of the Matrix.org-distributed Debian packages or
  229. Docker images, action is not required.
  230. If you install Synapse in a Python virtual environment, please see "Upgrading to
  231. v0.34.0" for notes on setting up a new virtualenv under Python 3.
  232. Minimum PostgreSQL Version
  233. --------------------------
  234. If using PostgreSQL under Synapse, you will need to use PostgreSQL 9.5 or above.
  235. Please see the
  236. `PostgreSQL documentation <https://www.postgresql.org/docs/11/upgrading.html>`_
  237. for more details on upgrading your database.
  238. Upgrading to v1.0
  239. =================
  240. Validation of TLS certificates
  241. ------------------------------
  242. Synapse v1.0 is the first release to enforce
  243. validation of TLS certificates for the federation API. It is therefore
  244. essential that your certificates are correctly configured. See the `FAQ
  245. <docs/MSC1711_certificates_FAQ.md>`_ for more information.
  246. Note, v1.0 installations will also no longer be able to federate with servers
  247. that have not correctly configured their certificates.
  248. In rare cases, it may be desirable to disable certificate checking: for
  249. example, it might be essential to be able to federate with a given legacy
  250. server in a closed federation. This can be done in one of two ways:-
  251. * Configure the global switch ``federation_verify_certificates`` to ``false``.
  252. * Configure a whitelist of server domains to trust via ``federation_certificate_verification_whitelist``.
  253. See the `sample configuration file <docs/sample_config.yaml>`_
  254. for more details on these settings.
  255. Email
  256. -----
  257. When a user requests a password reset, Synapse will send an email to the
  258. user to confirm the request.
  259. Previous versions of Synapse delegated the job of sending this email to an
  260. identity server. If the identity server was somehow malicious or became
  261. compromised, it would be theoretically possible to hijack an account through
  262. this means.
  263. Therefore, by default, Synapse v1.0 will send the confirmation email itself. If
  264. Synapse is not configured with an SMTP server, password reset via email will be
  265. disabled.
  266. To configure an SMTP server for Synapse, modify the configuration section
  267. headed ``email``, and be sure to have at least the ``smtp_host``, ``smtp_port``
  268. and ``notif_from`` fields filled out. You may also need to set ``smtp_user``,
  269. ``smtp_pass``, and ``require_transport_security``.
  270. If you are absolutely certain that you wish to continue using an identity
  271. server for password resets, set ``trust_identity_server_for_password_resets`` to ``true``.
  272. See the `sample configuration file <docs/sample_config.yaml>`_
  273. for more details on these settings.
  274. New email templates
  275. ---------------
  276. Some new templates have been added to the default template directory for the purpose of the
  277. homeserver sending its own password reset emails. If you have configured a custom
  278. ``template_dir`` in your Synapse config, these files will need to be added.
  279. ``password_reset.html`` and ``password_reset.txt`` are HTML and plain text templates
  280. respectively that contain the contents of what will be emailed to the user upon attempting to
  281. reset their password via email. ``password_reset_success.html`` and
  282. ``password_reset_failure.html`` are HTML files that the content of which (assuming no redirect
  283. URL is set) will be shown to the user after they attempt to click the link in the email sent
  284. to them.
  285. Upgrading to v0.99.0
  286. ====================
  287. Please be aware that, before Synapse v1.0 is released around March 2019, you
  288. will need to replace any self-signed certificates with those verified by a
  289. root CA. Information on how to do so can be found at `the ACME docs
  290. <docs/ACME.md>`_.
  291. For more information on configuring TLS certificates see the `FAQ <docs/MSC1711_certificates_FAQ.md>`_.
  292. Upgrading to v0.34.0
  293. ====================
  294. 1. This release is the first to fully support Python 3. Synapse will now run on
  295. Python versions 3.5, or 3.6 (as well as 2.7). We recommend switching to
  296. Python 3, as it has been shown to give performance improvements.
  297. For users who have installed Synapse into a virtualenv, we recommend doing
  298. this by creating a new virtualenv. For example::
  299. virtualenv -p python3 ~/synapse/env3
  300. source ~/synapse/env3/bin/activate
  301. pip install matrix-synapse
  302. You can then start synapse as normal, having activated the new virtualenv::
  303. cd ~/synapse
  304. source env3/bin/activate
  305. synctl start
  306. Users who have installed from distribution packages should see the relevant
  307. package documentation. See below for notes on Debian packages.
  308. * When upgrading to Python 3, you **must** make sure that your log files are
  309. configured as UTF-8, by adding ``encoding: utf8`` to the
  310. ``RotatingFileHandler`` configuration (if you have one) in your
  311. ``<server>.log.config`` file. For example, if your ``log.config`` file
  312. contains::
  313. handlers:
  314. file:
  315. class: logging.handlers.RotatingFileHandler
  316. formatter: precise
  317. filename: homeserver.log
  318. maxBytes: 104857600
  319. backupCount: 10
  320. filters: [context]
  321. console:
  322. class: logging.StreamHandler
  323. formatter: precise
  324. filters: [context]
  325. Then you should update this to be::
  326. handlers:
  327. file:
  328. class: logging.handlers.RotatingFileHandler
  329. formatter: precise
  330. filename: homeserver.log
  331. maxBytes: 104857600
  332. backupCount: 10
  333. filters: [context]
  334. encoding: utf8
  335. console:
  336. class: logging.StreamHandler
  337. formatter: precise
  338. filters: [context]
  339. There is no need to revert this change if downgrading to Python 2.
  340. We are also making available Debian packages which will run Synapse on
  341. Python 3. You can switch to these packages with ``apt-get install
  342. matrix-synapse-py3``, however, please read `debian/NEWS
  343. <https://github.com/matrix-org/synapse/blob/release-v0.34.0/debian/NEWS>`_
  344. before doing so. The existing ``matrix-synapse`` packages will continue to
  345. use Python 2 for the time being.
  346. 2. This release removes the ``riot.im`` from the default list of trusted
  347. identity servers.
  348. If ``riot.im`` is in your homeserver's list of
  349. ``trusted_third_party_id_servers``, you should remove it. It was added in
  350. case a hypothetical future identity server was put there. If you don't
  351. remove it, users may be unable to deactivate their accounts.
  352. 3. This release no longer installs the (unmaintained) Matrix Console web client
  353. as part of the default installation. It is possible to re-enable it by
  354. installing it separately and setting the ``web_client_location`` config
  355. option, but please consider switching to another client.
  356. Upgrading to v0.33.7
  357. ====================
  358. This release removes the example email notification templates from
  359. ``res/templates`` (they are now internal to the python package). This should
  360. only affect you if you (a) deploy your Synapse instance from a git checkout or
  361. a github snapshot URL, and (b) have email notifications enabled.
  362. If you have email notifications enabled, you should ensure that
  363. ``email.template_dir`` is either configured to point at a directory where you
  364. have installed customised templates, or leave it unset to use the default
  365. templates.
  366. Upgrading to v0.27.3
  367. ====================
  368. This release expands the anonymous usage stats sent if the opt-in
  369. ``report_stats`` configuration is set to ``true``. We now capture RSS memory
  370. and cpu use at a very coarse level. This requires administrators to install
  371. the optional ``psutil`` python module.
  372. We would appreciate it if you could assist by ensuring this module is available
  373. and ``report_stats`` is enabled. This will let us see if performance changes to
  374. synapse are having an impact to the general community.
  375. Upgrading to v0.15.0
  376. ====================
  377. If you want to use the new URL previewing API (/_matrix/media/r0/preview_url)
  378. then you have to explicitly enable it in the config and update your dependencies
  379. dependencies. See README.rst for details.
  380. Upgrading to v0.11.0
  381. ====================
  382. This release includes the option to send anonymous usage stats to matrix.org,
  383. and requires that administrators explictly opt in or out by setting the
  384. ``report_stats`` option to either ``true`` or ``false``.
  385. We would really appreciate it if you could help our project out by reporting
  386. anonymized usage statistics from your homeserver. Only very basic aggregate
  387. data (e.g. number of users) will be reported, but it helps us to track the
  388. growth of the Matrix community, and helps us to make Matrix a success, as well
  389. as to convince other networks that they should peer with us.
  390. Upgrading to v0.9.0
  391. ===================
  392. Application services have had a breaking API change in this version.
  393. They can no longer register themselves with a home server using the AS HTTP API. This
  394. decision was made because a compromised application service with free reign to register
  395. any regex in effect grants full read/write access to the home server if a regex of ``.*``
  396. is used. An attack where a compromised AS re-registers itself with ``.*`` was deemed too
  397. big of a security risk to ignore, and so the ability to register with the HS remotely has
  398. been removed.
  399. It has been replaced by specifying a list of application service registrations in
  400. ``homeserver.yaml``::
  401. app_service_config_files: ["registration-01.yaml", "registration-02.yaml"]
  402. Where ``registration-01.yaml`` looks like::
  403. url: <String> # e.g. "https://my.application.service.com"
  404. as_token: <String>
  405. hs_token: <String>
  406. sender_localpart: <String> # This is a new field which denotes the user_id localpart when using the AS token
  407. namespaces:
  408. users:
  409. - exclusive: <Boolean>
  410. regex: <String> # e.g. "@prefix_.*"
  411. aliases:
  412. - exclusive: <Boolean>
  413. regex: <String>
  414. rooms:
  415. - exclusive: <Boolean>
  416. regex: <String>
  417. Upgrading to v0.8.0
  418. ===================
  419. Servers which use captchas will need to add their public key to::
  420. static/client/register/register_config.js
  421. window.matrixRegistrationConfig = {
  422. recaptcha_public_key: "YOUR_PUBLIC_KEY"
  423. };
  424. This is required in order to support registration fallback (typically used on
  425. mobile devices).
  426. Upgrading to v0.7.0
  427. ===================
  428. New dependencies are:
  429. - pydenticon
  430. - simplejson
  431. - syutil
  432. - matrix-angular-sdk
  433. To pull in these dependencies in a virtual env, run::
  434. python synapse/python_dependencies.py | xargs -n 1 pip install
  435. Upgrading to v0.6.0
  436. ===================
  437. To pull in new dependencies, run::
  438. python setup.py develop --user
  439. This update includes a change to the database schema. To upgrade you first need
  440. to upgrade the database by running::
  441. python scripts/upgrade_db_to_v0.6.0.py <db> <server_name> <signing_key>
  442. Where `<db>` is the location of the database, `<server_name>` is the
  443. server name as specified in the synapse configuration, and `<signing_key>` is
  444. the location of the signing key as specified in the synapse configuration.
  445. This may take some time to complete. Failures of signatures and content hashes
  446. can safely be ignored.
  447. Upgrading to v0.5.1
  448. ===================
  449. Depending on precisely when you installed v0.5.0 you may have ended up with
  450. a stale release of the reference matrix webclient installed as a python module.
  451. To uninstall it and ensure you are depending on the latest module, please run::
  452. $ pip uninstall syweb
  453. Upgrading to v0.5.0
  454. ===================
  455. The webclient has been split out into a seperate repository/pacakage in this
  456. release. Before you restart your homeserver you will need to pull in the
  457. webclient package by running::
  458. python setup.py develop --user
  459. This release completely changes the database schema and so requires upgrading
  460. it before starting the new version of the homeserver.
  461. The script "database-prepare-for-0.5.0.sh" should be used to upgrade the
  462. database. This will save all user information, such as logins and profiles,
  463. but will otherwise purge the database. This includes messages, which
  464. rooms the home server was a member of and room alias mappings.
  465. If you would like to keep your history, please take a copy of your database
  466. file and ask for help in #matrix:matrix.org. The upgrade process is,
  467. unfortunately, non trivial and requires human intervention to resolve any
  468. resulting conflicts during the upgrade process.
  469. Before running the command the homeserver should be first completely
  470. shutdown. To run it, simply specify the location of the database, e.g.:
  471. ./scripts/database-prepare-for-0.5.0.sh "homeserver.db"
  472. Once this has successfully completed it will be safe to restart the
  473. homeserver. You may notice that the homeserver takes a few seconds longer to
  474. restart than usual as it reinitializes the database.
  475. On startup of the new version, users can either rejoin remote rooms using room
  476. aliases or by being reinvited. Alternatively, if any other homeserver sends a
  477. message to a room that the homeserver was previously in the local HS will
  478. automatically rejoin the room.
  479. Upgrading to v0.4.0
  480. ===================
  481. This release needs an updated syutil version. Run::
  482. python setup.py develop
  483. You will also need to upgrade your configuration as the signing key format has
  484. changed. Run::
  485. python -m synapse.app.homeserver --config-path <CONFIG> --generate-config
  486. Upgrading to v0.3.0
  487. ===================
  488. This registration API now closely matches the login API. This introduces a bit
  489. more backwards and forwards between the HS and the client, but this improves
  490. the overall flexibility of the API. You can now GET on /register to retrieve a list
  491. of valid registration flows. Upon choosing one, they are submitted in the same
  492. way as login, e.g::
  493. {
  494. type: m.login.password,
  495. user: foo,
  496. password: bar
  497. }
  498. The default HS supports 2 flows, with and without Identity Server email
  499. authentication. Enabling captcha on the HS will add in an extra step to all
  500. flows: ``m.login.recaptcha`` which must be completed before you can transition
  501. to the next stage. There is a new login type: ``m.login.email.identity`` which
  502. contains the ``threepidCreds`` key which were previously sent in the original
  503. register request. For more information on this, see the specification.
  504. Web Client
  505. ----------
  506. The VoIP specification has changed between v0.2.0 and v0.3.0. Users should
  507. refresh any browser tabs to get the latest web client code. Users on
  508. v0.2.0 of the web client will not be able to call those on v0.3.0 and
  509. vice versa.
  510. Upgrading to v0.2.0
  511. ===================
  512. The home server now requires setting up of SSL config before it can run. To
  513. automatically generate default config use::
  514. $ python synapse/app/homeserver.py \
  515. --server-name machine.my.domain.name \
  516. --bind-port 8448 \
  517. --config-path homeserver.config \
  518. --generate-config
  519. This config can be edited if desired, for example to specify a different SSL
  520. certificate to use. Once done you can run the home server using::
  521. $ python synapse/app/homeserver.py --config-path homeserver.config
  522. See the README.rst for more information.
  523. Also note that some config options have been renamed, including:
  524. - "host" to "server-name"
  525. - "database" to "database-path"
  526. - "port" to "bind-port" and "unsecure-port"
  527. Upgrading to v0.0.1
  528. ===================
  529. This release completely changes the database schema and so requires upgrading
  530. it before starting the new version of the homeserver.
  531. The script "database-prepare-for-0.0.1.sh" should be used to upgrade the
  532. database. This will save all user information, such as logins and profiles,
  533. but will otherwise purge the database. This includes messages, which
  534. rooms the home server was a member of and room alias mappings.
  535. Before running the command the homeserver should be first completely
  536. shutdown. To run it, simply specify the location of the database, e.g.:
  537. ./scripts/database-prepare-for-0.0.1.sh "homeserver.db"
  538. Once this has successfully completed it will be safe to restart the
  539. homeserver. You may notice that the homeserver takes a few seconds longer to
  540. restart than usual as it reinitializes the database.
  541. On startup of the new version, users can either rejoin remote rooms using room
  542. aliases or by being reinvited. Alternatively, if any other homeserver sends a
  543. message to a room that the homeserver was previously in the local HS will
  544. automatically rejoin the room.