hosting_replaceNode_jsEnvironmentVariablesV1
Replace all Node.js environment variables for a domain with the provided set, then restart the process. Send an empty array to remove every variable; rebuild your app afterward if it bakes values at build time.
Instructions
Replaces the website's Node.js environment variables with the ones provided. This is a
full replace: any variable not in the request is deleted, and sending an empty env_vars
array deletes every variable. Saving writes the values and restarts the running Node.js
process.
A restart is enough for apps that read environment variables at process start, such as
Express or NestJS. It is not enough for frameworks that bake variables into the build.
Next.js standalone is one of those: build-time values (including NEXT_PUBLIC_*) need a
fresh build. After this call, use the Start Node.js build endpoint so those apps
pick up the new values.
The List Node.js environment variables endpoint returns masked values (********), so
never copy values from it into this request. Always send the full desired set with real
values taken from the project .env file or the user prompt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name | |
| env_vars | Yes | Environment variables to set. This is the full desired set: any variable not in this list is deleted, and an empty array deletes every variable. | |
| username | Yes | username parameter |