Docs · Environment variables

Environment variables and shared env groups

On Makofy you set environment variables per app in the dashboard, or put shared ones in an env group that several apps link to. Values are encrypted at rest and shown masked, app variables override group variables, and changes take effect on the next deploy (or rollback or instance-type change) rather than restarting a running app.

Last updated · By the Makofy team (Muncar Ventures LLC)

Per-app variables

Open the app in the dashboard and add variables as key/value pairs. Use them for anything that changes between environments or must stay out of your repository: API keys, bot tokens, database URLs, feature flags.

  • Encrypted at rest. Values are stored encrypted (AES-256-GCM).
  • Masked. The dashboard shows **** plus the last 4 characters of each value, so you can tell variables apart without exposing them. Keep your own copy of secrets you may need to read again.
  • Read them like any environment variable. Your running app reads them like any environment variable: process.env.API_KEY in Node.js, os.environ["API_KEY"] in Python, os.Getenv("API_KEY") in Go.

Env groups

An env group is a named set of variables that belongs to your workspace. Link it to every app that needs the same settings, for example a web app, its worker and its cron job that all use the same database and API keys. Change the group once and every linked app picks up the new value on its next deploy.

Merge order

  1. Env groups are applied first, in order of their names; if two groups set the same key, the group whose name sorts later wins.
  2. The app’s own variables are applied last and override any group.

This lets you keep shared defaults in a group and override a single key for one app without copying the rest.

When changes take effect

Variables are written into the app when it is deployed. Saving a variable does not restart a running app. The new values apply on the next:

  • deploy (a push to the connected branch, makofy deploy, or a manual deploy in the dashboard),
  • rollback to an earlier deploy, or
  • change of the app’s instance type.

Variables Makofy sets for you

VariableSet forValue
PORTWeb and private servicesThe app’s port, 8080 by default. Not overridden if you set PORT yourself.
NODE_ENVBuildsproduction

Database and Redis URLs

Makofy does not inject database credentials automatically. After adding the Postgres or Redis add-on, copy its connection URL from the dashboard into a variable (by convention DATABASE_URL and REDIS_URL), ideally in an env group so every app that uses the database gets the same value.

DATABASE_URL=postgres://<user>:<password>@<host>:5432/<database>?sslmode=disable
REDIS_URL=redis://:<password>@<host>:6379/0

Use the exact URLs from the dashboard; the placeholders above only show the shape.

FAQ

Frequently asked questions

Do I need to redeploy after changing an environment variable on Makofy?

Yes. Changes apply on the next deploy, rollback or instance-type change; saving a variable doesn’t restart the running app.

What is an env group?

A named set of variables in your workspace that several apps can link to, so shared settings live in one place.

If a key is in an env group and in the app, which value wins?

The app’s own variable. Groups are applied first (a later-named group beats an earlier one), then app variables override them.

Are environment variables encrypted?

Yes. Values are encrypted at rest with AES-256-GCM and shown masked in the dashboard, with only the last 4 characters visible.

Does Makofy set DATABASE_URL for me?

No. Copy the add-on’s connection URL from the dashboard into DATABASE_URL (or an env group) yourself.

Related

Deploy your app in a few minutes.

Connect a GitHub repo or run makofy deploy. Flat price per app, 7-day free trial, card required.

Start free trial