Zynnode logoZynnode

Environment Variables

Manage secrets, API keys, and configuration for your deployments.

Environment variables let you store secrets and configuration values that your application needs — things like database URLs, API keys, and third-party service credentials. Zynnode encrypts these values and injects them during your build and deployment.

Adding Environment Variables

During Project Creation

When you're setting up a new project in the new project wizard, the configuration step includes an Environment Variables section. Click Add Variable, enter a key and value, and repeat for each variable you need.

After Project Creation

  1. Open the Zynnode dashboard.
  2. Click on your project to open the project detail page.
  3. Scroll down to the Environment Variables section.
  4. Click the Add button.
  5. Enter the key (e.g., DATABASE_URL) and the value (e.g., postgresql://...).
  6. Click Save to store the variables.

Your new values will take effect on the next deployment. Push a commit or use the Redeploy button to apply them immediately.

Editing and Deleting Variables

On the project detail page:

  • To view a value, click the eye icon next to the variable. Values are hidden by default for security.
  • To copy a value, click the copy icon — the value is copied to your clipboard without revealing it on screen.
  • To delete a variable, click the trash icon next to it.
  • Don't forget to click Save after making changes.

Pasting Multiple Variables at Once

If you have a .env file or a list of key-value pairs, you can paste them all at once:

  1. Copy the contents of your .env file (e.g., from your code editor).
  2. Click into the key input in the environment variables section and paste.
  3. Zynnode will automatically parse multiple lines in KEY=VALUE format and create separate entries for each one.

This is a quick way to migrate your local environment configuration to Zynnode.

Reserved Variables

Zynnode automatically sets the following variables for every deployment. You don't need to add these yourself:

VariableDescription
ZYNNODEAlways true when running on Zynnode
ZYNNODE_ENVproduction or preview
ZYNNODE_URLThe URL of this deployment
ZYNNODE_GIT_COMMIT_SHAThe Git commit SHA that triggered the build

Best Practices

  • Never put secrets in your code or repository. Use environment variables instead. Even private repositories can be compromised.
  • Use different values for local and production. For local development, create a .env.local file in your project root (and add it to your .gitignore). For production, configure them in the Zynnode dashboard.
  • Keep keys descriptive. Use clear names like STRIPE_SECRET_KEY or DATABASE_URL so other team members understand what each variable is for.

Changing environment variables does not trigger a new deployment. Push a commit or click Redeploy to apply your changes.

Was this page helpful?