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
- MySQL database for your Node.js appCreate one in a click: we show the connection details once and give you a ready DATABASE_URL.
- Create your first Node.js app from GitHubConnect your repository, pick the branch and we'll put your app online with HTTPS in minutes.
- Automatic deploys and rolling backEvery push ships a new version with zero downtime; if something breaks, roll back in one click.