Node.js CLI Environment & Config

Node.js CLI environment and config cheat sheets for NODE_OPTIONS, runtime environment variables, proxy settings, CA certificates, and launch patterns.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Environment Variables and NODE_OPTIONS

Control runtime behavior from shell env vars.

Preload with NODE_OPTIONS

Apply CLI flags through the environment.

bashANYnodeenvnode_options
bash
NODE_OPTIONS="--require dotenv/config" node app.js

Useful in CI, Docker, and shell profiles. Command-line flags still win.

Run with NODE_ENV=production

Set common production mode.

bashANYnodeenvproduction
bash
NODE_ENV=production node app.js

Frequently used by frameworks and libraries to alter runtime behavior.

Suppress warnings

Disable warning output.

bashANYnodewarnings
bash
NODE_NO_WARNINGS=1 node app.js

Use sparingly because it can hide useful diagnostics.

Set timezone

Run process in a chosen timezone.

bashANYnodetimezone
bash
TZ=UTC node app.js

Helpful in tests, cron jobs, and reproducible scripts.

Set libuv threadpool size

Tune worker threadpool size.

bashANYnodeperformancelibuv
bash
UV_THREADPOOL_SIZE=16 node app.js

Can matter for fs, crypto, and other libuv-backed async work.

Add extra CA certificates

Trust additional certificate authorities.

bashANYnodetlsca
bash
NODE_EXTRA_CA_CERTS=./internal-ca.pem node app.js

Useful in enterprise environments with internal PKI.

Honor HTTP proxy env vars

Tell Node to use HTTP_PROXY and related vars.

bashANYnodeproxy
bash
NODE_USE_ENV_PROXY=1 node app.js

Useful in corporate proxy environments and CI jobs.

Use system CA store

Load trusted CA certs from the OS store.

bashANYnodetlssystem-ca
bash
NODE_USE_SYSTEM_CA=1 node app.js

Helpful when relying on system-managed certificates.

Recommended next

No recommendations yet.