Generally, the intention is that
unleash-server should always provide support for clients one major version lower than the current one. This should make it possible to upgrade
Upgrading directly from v3.x to v5.x
Ivar Østhus, Unleash CTO and Co-Founder, demonstrates how to update Unleash 3.x to Unleash 5.x in just a few minutes with no downtime. You can also watch this on YouTube with a transcript.
Upgrading from v4.x to v5.x
Unleash v5 was released on April 27th, 2023. It contains a few breaking changes.
Requires Node.js version 18+
Unleash v5 drops support Node.js versions below 18, which is the current active LTS at the time of release. Unleash v4 officially supported Node.js v14 and v16, but both of these will reach end of life in 2023.
The Google Authenticator provider for SSO has been removed
The Google Authenticator provider is now hidden by default. We recommend using OpenID Connect instead.
However, if you are running a self hosted version of Unleash and you need to temporarily re-enable Google SSO, you can do so by setting the
GOOGLE_AUTH_ENABLED environment variable to
true. If you're running a hosted version of Unleash, you'll need to reach out to us and ask us to re-enable the flag. However, the ability to do this will be removed in a future release and this is not safe to depend on.
This provider was deprecated in v4.
Default database password
The Unleash default database password is now
password instead of
passord. Turns out that the Norwegian word for password is too similar to the English word, and that people would think it was a typo.
This should only impact dev builds and initial setup. You should never use the default password in any production environments.
The /api/admin/features API is gone
Most of the old features API was deprecated in v4.3 and superseded by the project API instead. In v5, the deprecated parts have been completely removed. The only operations on that API that are still active are the operations to add or remove a tag from a feature toggle.
Error message structure
Some of Unleash's API error messages have changed their structure. Specifically, this applies to error messages generated by our OpenAPI validation layer. However, only their structure has changed (and they now contain more human-friendly messages); the error codes should still be the same.
Previously, they would look like this:
"error": "Request validation failed",
"message": "should be object"
Now they look like this instead, and are more in line with the rest of Unleash's error messages.
"message": "Request validation failed: the payload you provided doesn't conform to the schema. Check the `details` property for a list of errors that we found.",
"description": "The .parameters property should be object. You sent .",
As such, if you're relying on the specifics of the error structure for those API errors, you might need to update your handling.
Upgrading from v3.x to v4.x
Before you upgrade we strongly recommend that you take a full database backup, to make sure you can downgrade to version 3.
You can also read the highlights of what's new in v4.
1. All API calls now require a token.
If you are upgrading from Unleash Open-Source v3 client SDKs did not need to use an API token in order to connect to Unleash-server. Starting from v4 we have back-ported the API token handling for Enterprise in to the Open-Source version. This means that all client SDKs now need to use a client token in order to connect to Unleash.
Read more in the API token documentation.
2. Configuring Unleash
We have done a lot of changes to the options you can pass in to Unleash. If you are manually configuring Unleash you should have a look on the updated configuring Unleash documentation
3. Role-based Access Control (RBAC)
We have implemented RBAC in Unleash v4. This has totally changed the permission system in Unleash.
Required actions: If you have implemented "custom authentication" for your users you will need to make changes to your integration:
- extendedPermissions option has been removed. You can no longer specify custom permission per-user basis. All "logged_in users" must belong to a "root" role. This can be "Admin", "Editor" or "Viewer". This is taken care of when you create new users via userService.
- All "logged-in users" needs to be defined in Unleash and have a unique ID. This can be achieved by calling "createUser" on "userService".
const user = userService.loginUserWithoutPassword(
false, // autoCreateUser. Set to true if you want to create users on the fly.
// The user needs to be set on the current active session
req.session.user = user;
4. Legacy v2 routes removed
Only relevant if you use the
In v2 you could query feature toggles on
/api/features. This was deprecated in v4 and we introduced two different endpoints (
/api/client/features) to be able to optimize performance and security. In v3 you could still enable the legacy routes via the
enableLegacyRoutes option. This was removed in v4.
5. Unleash CLI has been removed
Unleash no longer ships with a binary that allows you to start Unleash directly from the command line. From v4 you need to either use Unleash via docker or programmatically.
Read more in our getting started documentation
Upgrading from v2.x to v3.x
The notable change introduced in Unleash v3.x is a strict separation of API paths for client requests and admin requests. This makes it easier to implement different authentication mechanisms for the admin UI and all unleash-clients. You can read more about securing unleash.
The recommended approach is to first upgrade the
unleash-server to v3 (which still supports v2 clients). After this is done, you should upgrade all your clients to v3.
After upgrading all your clients, you should consider turning off legacy routes, used by v2 clients. To do this, set the configuration option
false as described in the page on configuring Unleash v3.
Upgrading from v1.0 to v2.0
Caveat 1: Not used db-migrate to migrate the Unleash database?
In FINN we used liquibase, for internal reasons, to migrate our database. Because unleash from version 2.0 migrates the database internally, with db-migrate, you need to make sure that all previous migrations for version 1 exist, so that Unleash does not try to create already existing tables.
How to check?
If you don't have a "migrations" table with 7 unique migrations you are affected by this.
How to fix?
Before starting unleash version 2 you have to run the SQL located under
Caveat 2: databaseUrl (not databaseUri)
Using Unleash as a library and injecting your own config? Then you should know that we changed the
databaseUri config param name to databaseUrl. This is to make sure the param is aligned with the environment variable
DATABASE_URL and avoid multiple names for the same config param.