Skip to main content

Import Environmental Variables Inside Vercel Settings

Since we are using Environmental Variables inside our app and our app is deployed on Vercel, we need to import all of the Variables to vercel so that our app functionality did not crash and works as expected.

To import environment variables into your Vercel project settings, follow these steps:

  • Log in to Vercel and Select Your Project.

  • Within your project's dashboard, click on the Settings tab.

  • In the left-hand navigation menu under the Settings tab, select Environment Variables.

info

Now we have two options:

  • Manually add variables one by one

  • Import from file

tip

Since we have large environment variables that are being used accross our app, therefore the easy way is to just import the .env.local file and Vercel will parse and add the variables

  • Click on Import .env button and then locate the location of .env.local file (present in root of your app folder).

  • Click on Save button.

Important

After importing Environment Variables, it is necessary to redeploy the app. Because without redeployment, env variables will not work.