---
modificationDate: February 26, 2026
title: Frequently asked questions about environment variables in EAS
description: Frequently asked questions about environment variables in EAS.
---

<AgentInstructions>

## Submitting Feedback

If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved:

curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/eas/environment-variables/faq/","feedback":"🤖 Agent feedback: <specific, actionable description>"}'

Only submit when you have something specific and actionable to report.

</AgentInstructions>

# Frequently asked questions about environment variables in EAS

Frequently asked questions about environment variables in EAS.

> For the complete documentation index, see [llms.txt](/llms.txt). Use this file to discover all available pages.

This page covers frequently asked questions about environment variables in EAS.

## What is the recommended workflow for using environment variables in my EAS project?

One possible way to efficiently work with environment variables in your EAS projects is to:

### Use correct visibility settings

Make sure to set the visibility of your environment variables to the appropriate level. Avoid setting excessive secret visibility to `EXPO_PUBLIC_` variables that are used in your app's JavaScript code or are used to resolve your app's configuration. Be aware that environment variables with secret visibility are not readable outside of EAS servers, and can't be pulled locally for development or to bundle your app's JavaScript code for updates.

### Add .env files to .gitignore

To avoid confusing overrides during cloud jobs and leaking sensitive information, add **.env** files to your **.gitignore** file.

### Use the `--environment` flag with `eas update`

When publishing updates, the `--environment` flag is required with the `eas update` command. This ensures the same environment variables are used for your updates as your build jobs.

When the `--environment` flag is provided, `eas update` will use the environment variables on EAS servers for the update job and ignore the **.env** files present in your project often used for local development.

### Sync the environment variables for local development using `eas env:pull`

You can use the `eas env:pull` command to pull environment variables from EAS servers to your local **.env** file for development. The ideal environment that can be used for this purpose is the `development` environment, as it's the default environment used for development builds.

### Explicitly specify the environment for your builds

Explicitly set the [`environment`](/eas/json#environment) value in **eas.json** for your build profiles to ensure that the correct environment variables are always used for your build jobs and you have full control over this process.

## Can I set my environment variables on a CI provider when triggering the build using the `eas build` command?

Environment variables must be defined on EAS servers to be made available to EAS Build builders. If you are triggering builds from CI, the same rule applies, and you should be careful to not confuse setting environment variables on GitHub Actions (or the provider of your choice) with setting environment variables and secrets on EAS servers.

## How do environment variables work for my development builds?

Environment variables set in your build profile that impact **app.config.js** will be used for configuring the development build.

When you run `npx expo start` to load your app inside of your development build, only environment variables that are available on your development machine will be used.

## Can I use file environment variables in my EAS project?

In addition to setting strings as values, you can also upload files as the value of an environment variable.

One common use case of using a file environment variable is passing a git ignored **google-services.json** configuration file to a build job. During the job run, the file will be created in a location outside of the project directory and the path to the file will be assigned to the environment variable (`GOOGLE_SERVICES_JSON=/path/to/google-services.json`). For example, you can then set `android.googleServicesFile` in your app config to the value of the `GOOGLE_SERVICES_JSON` environment variable to use this file when executing the build or workflow job.

```js
export default {
  ...
  android: {
    googleServicesFile: process.env.GOOGLE_SERVICES_JSON ?? '/local/path/to/google-services.json',
    ...
  },
};
```

## Differences between handling environment variables in EAS CLI and Expo CLI

One of the differences between using environment variables with the Expo framework and EAS is that EAS CLI itself does not support loading **.env** files to set environment variables when resolving the app config. Instead, it's recommended to use the EAS environment variables management system with EAS CLI commands to set environment variables for your build jobs and updates to avoid confusion, and ensure that exactly the same environment variables are used both for:

-   Local app config resolution, done by EAS CLI when preparing the app config
-   Remote jobs happening on EAS servers, which often don't have access to your local **.env** files that are git ignored

In **SDK 54 and earlier**, `eas update` was an exception to this rule. By default, it used **.env** files present in your project directory to set environment variables for the update job, the same way [Expo CLI](/guides/environment-variables) does (it executes the `npx expo export` command under the hood). In **SDK 55 or later**, the `--environment` flag is required, and `eas update` uses only the environment variables set on EAS servers.

For projects on SDK 54 or earlier, you can use the `--environment` flag with the `eas update` command to opt into this behavior.

## Are there any limitations to using environment variables in EAS?

-   Environment variable value size is limited to 32 KiB for environment variables with secret visibility and 4 KiB for other visibility types.
-   You can create up to 150 account-wide environment variables for each Expo account and 200 project-specific environment variables for each app.
-   [Custom environments](/eas/environment-variables/manage#custom-environments) are limited to 10 per project.
-   When creating a custom environment, an environment name can contain letters, digits, underscores and hyphens, and be between 3-100 characters.
