Build-time vs runtime environment variables

Build-time variables are read while your app compiles, and their values get baked into the output.

Last updated November 25, 2026

The short version

Build-time variables are read while your app compiles, and their values get baked into the output. Runtime variables are read each time the server runs. Frameworks inline public variables, such as NEXT_PUBLIC_ ones, at build time, so changing them requires a rebuild. Never put secrets in a public variable, because they end up in browser code.

On Reverhost

Your variables are runtime env in the container. For build-time access, the Dockerfile build step mounts them as the appenv secret. Learn more.

Start for free

Install the skill, choose Global or Local, then tell your agent to deploy. No credit card, no config files.

$npx ezhst skill install