Skip to main content

Applying Upgrades

This guide covers basics to consider when upgrading Ory Kratos, please also visit CHANGELOG.md for more technical details.

Generally upgrading Ory Kratos can be split into three main steps:

  • Make a backup.
  • Install the new version (depending on how you run Ory Kratos).
  • Run kratos migrate sql to run the appropriate SQL queries.

Ory Kratos will run the migrate sql command for all versions. For example when upgrading from v0.6 to v0.8, the migrations will be run for v0.6 to v0.7 and then for v0.7 to v0.8. As such upgrading from any version to the latest version directly is possible. Should you run into problems with a direct upgrade, consider a stepped upgrade and please visit the community chat or discussions.

warning

Back up your data! Applying upgrades can lead to data loss if handled incorrectly.

Upgrading Tips​

We recommend taking the following steps to ensure that no data is lost:

Please note: These are recommendations and should be used in accordance with other Ops best practices. The steps required for a smooth and secure upgrade process may vary with different setups, tech stacks, and environments.

  1. Write down a high-level upgrade plan
    • Who will perform the upgrade?
    • How will the upgrade be performed?
    • What components are affected?
  2. Devise roll-out plan
    • When will the upgrade be performed?
    • Will there be an outage?
    • How long will it be?
    • What is your rollback plan?
  3. Back up everything!
  4. Run a trial upgrade on a local environment.
  5. Run an upgrade on a staging environment.
  6. Perform tests on staging & prepare production environment.
  7. Run the upgrade on production.

Breaking changes overview​

note

Skip the hassle of applying upgrades to Ory Kratos? Take a look at Ory Cloud.