AI termBrowse the neighboring terms

Build Basics / Standard term

Environment variable

A named value supplied to a process through its execution environment, often used for configuration and references to secrets.

An environment variable is a named setting kept outside your code that the running project reads when it starts, so the value stays out of the files you commit and share. Say your password reset feature emails a link through an outside service that requires a secret key. Instead of typing that key into a file in your repository, you store it as an environment variable named something like RESET_EMAIL_KEY. On your own machine it holds a test key, and on the deployed server it holds the live one. The code asks for RESET_EMAIL_KEY by name and gets whichever value that location supplies, so the same code runs everywhere while each environment supplies its own settings.

Builder example

Environment variables separate configuration from committed source, but they are not a full secret-management system. Values can leak through process inspection, debug output, crash reports, build steps, client-side bundling, or overly broad host access. Managed secret stores can inject or rotate them without placing plaintext in project files.

Common confusion: An environment variable holds a value; it does not encrypt or hide it on the server itself. Anyone with access to that running environment can read the value, so it keeps secrets out of shared code without making them secret from the host. What it protects against is the key leaking through your repository.