Title: Node.js environment variables
Author: WordPress VIP Documentation
Published: March 24, 2022
Last modified: January 1, 2026

---

 1. [Node.js on VIP](https://docs.wpvip.com/node-js/)
 2. Node.js environment variables

#  Node.js environment variables

Environment variables are used to provide information to an application. This circumvents
the need to hardcode configuration values and allows an application to have environment-
specific behavior. On the VIP Platform, environment variables are provided when 
a Node.js application is built and at runtime.

[Custom environment variables](https://docs.wpvip.com/infrastructure/environments/manage-environment-variables/)
can be added and managed with VIP-CLI.

[Valkey](https://docs.wpvip.com/node-js/integrating-redis/) environment variables
and New Relic environment variables can be used on Node.js environments as well.

## `NODE_ENV` environment variable

The value for `NODE_ENV` is always set to “`production`” for all Node.js environments
on the VIP Platform, even non-production environments. The [purpose of the production value](https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production)
is to indicate that an environment is “not a local development environment”, and
forces important optimizations.

Overriding the `NODE_ENV` value is strongly discouraged and can have negative effects.
The behavior of many Node.js libraries is based on the `NODE_ENV` variable and may
no longer work as expected if this value is changed.

## VIP environment variables

VIP environment variables are set per environment and can be used to customize environment-
specific behavior.

 * `VIP_GO_APP_BRANCH`: The Git branch deploying to an environment (e.g. `main`)
 * `VIP_GO_APP_CURRENT_COMMIT_HASH`: The Git commit SHA1 hash of the currently deployed
   code (e.g. `e7ba94e2a07dc8f70e247660692164ce016b39ef`)
 * `VIP_GO_APP_ID`: An application’s unique ID (e.g. `8886`)
 * `VIP_GO_APP_NAME`: An application’s name (e.g. `example-app`)
 * `VIP_GO_APP_ENVIRONMENT`: The name of an application’s environment (e.g. `production`
   or `preprod`)  

Last updated: January 01, 2026