Skip to main content

Some env-only configuration options are handled by the server configuration

In Strapi 5, some configuration options that were only handled by environment variables in Strapi v4 are now handled in the server configuration file.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?No
🤖 Is this breaking change automatically handled by a codemod?No

Breaking change description

In Strapi v4

The following list of configurations are only available from the environment:

  • STRAPI_DISABLE_REMOTE_DATA_TRANSFER
  • STRAPI_DISABLE_UPDATE_NOTIFICATION
  • STRAPI_HIDE_STARTUP_MESSAGE

In Strapi 5

These configuration options have been moved to the server configuration file (see table in the notes for details).


Migration

This section regroups useful notes and procedures about the introduced breaking change.

Notes

The following environment variable names in Strapi v4 should now be defined in the /config/server.js configuration file:

Environment variable name in Strapi v4Server configuration option in Strapi 5
STRAPI_DISABLE_REMOTE_DATA_TRANSFERtransfer.remote.enabled
STRAPI_HIDE_STARTUP_MESSAGElogger.startup.enabled
STRAPI_DISABLE_UPDATE_NOTIFICATIONlogger.updates.enabled

Migration steps

If you previously disabled one of the listed environment variables in your environment, update the /config/server.js by adding the appropriate values:

/config/server.js
module.exports = ({ env }) => ({
// … other configuration options
transfer: {
remote: {
enabled: false, // disable remote data transfers instead of STRAPI_DISABLE_REMOTE_DATA_TRANSFER
},
},
logger: {
updates: {
enabled: false, // disable update notification logging instead of STRAPI_DISABLE_UPDATE_NOTIFICATION
},
startup: {
enabled: false, // disable startup message instead of STRAPI_HIDE_STARTUP_MESSAGE
},
},
});