Skip to content

Environment Variables

Volta respects several environment variables that control its behavior. This page serves as a reference for all available environment variables and their effects.

Core Environment Variables

VOLTA_HOME

Sets the directory where Volta stores its data, including downloaded tools and configuration.

  • Default:
    • Unix: $HOME/.volta
    • Windows: %LOCALAPPDATA%\Volta
  • Example: VOLTA_HOME=/opt/volta

VOLTA_LOGLEVEL

Controls the verbosity of Volta's logging output.

  • Valid values: error, warn, info, verbose, debug
  • Default: info
  • Example: VOLTA_LOGLEVEL=debug volta install node

VOLTA_SKIP_SETUP

When set to 1, prevents Volta from modifying shell profiles during installation.

  • Valid values: 0, 1
  • Default: 0
  • Example: VOLTA_SKIP_SETUP=1 bash -c "$(curl https://get.volta.sh)"

Feature Flags

VOLTA_FEATURE_PNPM

Enables pnpm support in Volta.

  • Valid values: 0, 1
  • Default: 0
  • Example: VOLTA_FEATURE_PNPM=1 volta install pnpm

Network Configuration

VOLTA_NETWORK_TIMEOUT_SECS

Sets the timeout in seconds for network operations.

  • Default: 60
  • Example: VOLTA_NETWORK_TIMEOUT_SECS=120 volta install node

HTTP_PROXY / HTTPS_PROXY

Standard proxy environment variables used by Volta for network requests.

  • Example:
    • HTTP_PROXY=http://proxy.example.com:8080
    • HTTPS_PROXY=http://proxy.example.com:8080

NO_PROXY

Comma-separated list of hosts that should bypass the proxy.

  • Example: NO_PROXY=localhost,127.0.0.1,.example.com

Installation Variables

VOLTA_LATEST_VERSION

Forces the Volta installer to use a specific version instead of the latest.

  • Example: VOLTA_LATEST_VERSION=1.0.5 bash -c "$(curl https://get.volta.sh)"

VOLTA_TARGET_PROFILE

Specifies which shell profile file the installer should modify.

  • Default: Detected based on the current shell
  • Example: VOLTA_TARGET_PROFILE=$HOME/.bashrc

Platform-Specific Variables

VOLTA_MIN_COMPATIBLE_VERSION_UPDATE_CHECK

The minimum Volta version for compatibility checking in update notifications.

  • Example: VOLTA_MIN_COMPATIBLE_VERSION_UPDATE_CHECK=1.0.5

Windows-Specific Variables

These variables are only used on Windows systems:

VOLTA_REDIRECT_STDERR

When set to 1, redirects stderr output to stdout on Windows.

  • Valid values: 0, 1
  • Default: 0

Advanced Usage

VOLTA_UNSAFE_DIAGNOSTIC

Used for debugging; enables advanced diagnostics that may be unstable.

  • Valid values: Any string
  • Example: VOLTA_UNSAFE_DIAGNOSTIC=timing volta install node

VOLTA_STDIN_FILE_PASSTHROUGH

When set, Volta will use this file path instead of stdin for script execution.

  • Example: VOLTA_STDIN_FILE_PASSTHROUGH=/tmp/script.js volta run node

Example Configurations

Development Environment

For a development setup with verbose logging:

bash
export VOLTA_HOME=$HOME/.volta
export VOLTA_LOGLEVEL=verbose
export PATH=$VOLTA_HOME/bin:$PATH

CI/CD Pipeline

For continuous integration environments:

bash
export VOLTA_HOME=$HOME/.volta
export VOLTA_LOGLEVEL=error
export VOLTA_NETWORK_TIMEOUT_SECS=300
export PATH=$VOLTA_HOME/bin:$PATH

Corporate Network

For environments with proxy servers:

bash
export VOLTA_HOME=$HOME/.volta
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1,.internal.example.com
export PATH=$VOLTA_HOME/bin:$PATH

Released under the BSD 2-Clause License.