Skip to content

Environment variables

Per-site environment variables inject configuration into PHP-FPM, Node, Python, and Dockerfile runtimes. Values are encrypted at rest in the panel database.

Who can use this page? Site manage. Reveal of sensitive values requires re-authentication and is audited.

Open the editor

Site Actions → Environment Variables

Normal View

Edit one variable at a time:

PropertyMeaning
KeyVariable name (DATABASE_URL, APP_KEY, …)
ValueStored encrypted if sensitive
SensitiveMasked after save; excluded from builds; reveal is gated
Available at build timeInjected into Node build containers / Docker build args
Only enable Available at build time for non-sensitive frontend configuration. Credentials, API secrets, database URLs, and signing keys must stay runtime-only — image history and build caches can expose build args.

Revealing a sensitive value

  1. Choose reveal / Developer View for a sensitive key.
  2. Re-enter your NitHost password (or 2FA code).
  3. The value is shown for a short window (about 90 seconds), non-cacheable, scoped to your user and site, and recorded for account security.

Developer View

Bulk paste KEY=VALUE lines (safe .env import):

  • Saves are transactional: add/update only — omitted keys are not deleted
  • Existing sensitivity and build-time flags are preserved
  • New imported keys default to Sensitive and runtime-only
  • Saved sensitive values are never exported back into the editor as plaintext

Use Normal View afterwards to flip flags on individual keys.

Migration tip

When moving from another host, paste production variables in Developer View, preview the change set, save, then adjust sensitivity in Normal View.

Linking databases

When you create a database with a linked site, NitHost can add:

EngineDefault keys
PostgreSQLDATABASE_URL (sensitive, runtime), DB_NAME
MongoDBMONGO_URL (sensitive, runtime), DB_NAME

Existing keys are never overwritten — resolve collisions or disable auto variables and copy the one-time credentials yourself.

After changing variables

  • PHP — next request picks them up (FPM pool)
  • Node / Python / DockerfileRestart the app from Site actions
  • Git builds — redeploy so the new runtime env applies

Customer documentation · Nusite IT Consulting Limited