Skip to main content
Version: 1.0.0

Environment Variables

An environment variable is a key-value pair that your Project can access while it runs. They are useful for configuring applications, storing sensitive information, and adding feature flags.

Through your Project's dashboard, you can add, edit, and remove environment variables within your Project.

Note that saving your changes to the environment variables re-deploys your Project and creates a new deployment.

Upload a .env File

If you have too many environment variables to copy and paste by hand, use the "Upload .env file" button to add environment variables in bulk.

While .env files are a convenient way to store and transfer environment variables, be vigilant in ensuring that sensitive information like passwords, tokens, and private keys are not stored in files that get committed to your code's version control or are publicly accessible.

Copy Environment Variables from Another Project

If you have another Project on Zeet with environment variables that you wish to use, you can copy them over with the "Copy variables from another Project" button. This is an all-or-nothing operation, it will copy in every variable from the source Project and overwrite any existing variables in the current Project.

Hiding Environment Variables

If you have sensitive information in your Environment Variables, you can choose to hide or seal the variable by using the Lockpad button next to the variable. Once sealed, nobody in your team can read the value. However, sealed secrets can be overridden with new values by unsealing it. Unsealing a variable will not reveal the old value.

Default Environment Variables

Zeet provides a series of environment variables to your Resources by default, for use with scripting or other Zeet-centric workflows. A table of Zeet-provided environment variables is below:

ZEET_DEPLOYMENT_URLThe fully-qualified domain that your application will be accessible will only contain the URL, no custom domains. This does not include a protocol
ZEET_PROJECT_NAMEThe name of the Zeet Projectteam-zeet-example-nextjs-demo
ZEET_ENVIRONMENTThe name of the environment this Deployment is deployed within.mainIn most situations, this is equivalent to the actively deployed branch.
ZEET_VERSIONThe version of the currently deployed code42ae5b42c29e75ccfb5c21dc725f612734c52942In a Github-based Project, this will mirror the Git Commit SHA
ZEET_DEPLOYMENT_IDThe internal ID for this Deployment. This can be used for Zeet scripting57a0e557-bb90-4b04-9d3c-b4e78909b959This may be asked for by Zeet Support Staff for debugging purposes.
ZEET_DEPLOYED_ATThe timestamp for when this Deployment was created.2022-06-14T19:28:39ZThis references when the Deployment was created, it will not update in case of a restart / crash within the same Deployment.