RimbraDocs

Environment variables

Give your app API keys, secrets and settings without putting them in your code.

Add variables

  1. 1Open the project and choose Variables.
  2. 2Add a key and value, such as STRIPE_SECRET_KEY. Mark it secret to hide the value in the dashboard.
  3. 3Or choose Import .env file to add many at once.
  4. 4Redeploy so the running app picks them up.

Read them in your app

examples
// Node.js
const key = process.env.STRIPE_SECRET_KEY

# Python
import os
key = os.environ["STRIPE_SECRET_KEY"]

// PHP
$key = getenv('STRIPE_SECRET_KEY');

Set by Rimbra

  • PORT: the port your server must listen on.
  • Database variables such as DATABASE_URL or REDIS_URL, added when you connect a database.