Environment Variables
Manage environment variables, secrets, and API keys for your Zynnode deployments — set values per environment, inject them at build time, and keep them secure.
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
- Open the Zynnode dashboard.
- Click on your project to open the project detail page.
- Scroll down to the Environment Variables section.
- Click the Add button.
- Enter the key (e.g.,
DATABASE_URL) and the value (e.g.,postgresql://...). - 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:
- Copy the contents of your
.envfile (e.g., from your code editor). - Click into the key input in the environment variables section and paste.
- Zynnode will automatically parse multiple lines in
KEY=VALUEformat 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:
| Variable | Description |
|---|---|
ZYNNODE | Always true when running on Zynnode |
ZYNNODE_ENV | production or preview |
ZYNNODE_URL | The URL of this deployment |
ZYNNODE_GIT_COMMIT_SHA | The 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.localfile 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_KEYorDATABASE_URLso 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.
Deploy to GCP
Deploy your application to Google Cloud through Zynnode — run containerized workloads on Cloud Run, deploy web apps via App Engine, or use Compute Engine VMs.
Custom Domains
Add your own domain to any Zynnode deployment with automatic SSL certificate provisioning and step-by-step DNS configuration for all supported cloud providers.