Skip to main content

Environment Variables

Environment variables are the primary way to configure your app. They are encrypted at rest and injected into your container at runtime.

Setting variables

From the dashboard

  1. Open your app
  2. Go to the Env tab or Settings tab
  3. Enter the key and value
  4. Click Save

From the API

curl -X PUT https://api.makofy.com/api/v1/apps/{appID}/env \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"vars": {"DATABASE_URL": "postgres://...", "NODE_ENV": "production"}}'

Detected variables

When you deploy, Makofy scans your source code for environment variable references:

LanguagePattern detected
Node.jsprocess.env.VAR_NAME
Goos.Getenv("VAR_NAME")
Pythonos.getenv("VAR_NAME"), os.environ["VAR_NAME"]
RubyENV["VAR_NAME"]

Detected variables appear in the Env tab with a green DETECTED badge. Variables that appear in crash logs are highlighted in red.

Auto-provisioned variables

Makofy automatically provisions certain infrastructure when it detects your app needs it:

VariableWhat happens
DATABASE_URLAn isolated Postgres database is created with a unique user and password
REDIS_URLConnected to the shared Redis instance
JWT_SECRETA random 48-character secret is generated
SESSION_SECRETA random 48-character secret is generated
ENCRYPTION_KEYA random 48-character secret is generated
NODE_ENVSet to production

Auto-provisioned variables are marked with a purple AUTO badge in the dashboard.

info

Auto-provisioned values are only set if the variable is detected in your code AND not already configured. Your manual values always take precedence.

Security

  • All values are encrypted at rest using AES-256-GCM
  • Values are masked in the dashboard (shown as ••••••••)
  • Values are injected as Kubernetes secrets at deploy time
  • Values are never logged or exposed in build output

Common variables

VariableDescription
PORTThe port your app listens on (default: 8080)
NODE_ENVSet to production for Node.js apps
DATABASE_URLPostgreSQL connection string
REDIS_URLRedis connection string
JWT_SECRETSecret key for JWT signing