Skip to content
Node.js Apps

Environment variables for your Node.js app

API keys, passwords and settings your app reads from process.env, encrypted and with secret values.

Variables are loaded when your app starts. Manage them in your app → Variables: add, edit, remove, paste a whole .env or download it.

How they work

  • They're stored encrypted. Values you mark as secret are never shown again: to change one, click Replace.
  • Save keeps them for the next restart or deployment; Save and restart applies them now (a few seconds without responses).
  • With Paste a .env you import several at once (KEY=value per line). Ones that look like keys or passwords are marked secret.
  • Download .env exports the variables; secret ones are left empty because they can't be read.

The ones we set

PORT
the port your app must listen on
DATA_DIR
a folder kept between deployments (uploads, files)
NODE_ENV
production (you can change it)

PORT and DATA_DIR can't be changed. The rest of the app's disk is rebuilt from scratch on every deployment: store anything that must persist in DATA_DIR.

Limits: up to 100 variables and 32 KB in total. Names use letters, numbers and underscores, not starting with a number.

Ask the assistant

Still have a question about this? Ask the assistant.

Was this article helpful?

Related articles