---
modificationDate: February 24, 2026
title: Using environment variables without EAS
description: Learn about non-EAS ways to manage environment variables in Expo and React Native projects.
---

<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/without-eas/","feedback":"🤖 Agent feedback: <specific, actionable description>"}'

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

</AgentInstructions>

# Using environment variables without EAS

Learn about non-EAS ways to manage environment variables in Expo and React Native projects.

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

Using [EAS Environment Variables](/eas/environment-variables) is the recommended way to manage environment variables for cloud builds and updates, but you can still work locally or with other tooling.

## Managing environment variables without EAS

If you want to manage environment variables without EAS, you can use tools like [`dotenv`](https://www.npmjs.com/package/dotenv) (Node-based loaders) or services such as [Doppler](https://www.doppler.com/) that inject environment variables. These utilities allow you to create a **.env** file in which you can store your environment variables.

> **Note:** Avoid committing secrets to **.env** files if you are managing your environment variables without EAS.

## How environment variables are loaded

After creating the **.env** file, you need to ensure that the file is not listed inside your **.gitignore** or **.easignore** files. Then it can be picked up by EAS commands like `eas build`, `eas update`, and so on.

The **.env** files load according to the [standard **.env** file](https://github.com/bkeepers/dotenv/blob/c6e583a/README.md#what-other-env-files-can-i-use) resolution and then replaces all references in your code to `process.env.EXPO_PUBLIC_[VARIABLE_NAME]` with the corresponding value set in the **.env** files. Code inside **node_modules** directory is not affected for security purposes.

[Reading environment variables from .env files](/guides/environment-variables#reading-environment-variables-from-env-files) — For more information, see how to read environment variables from .env files in Expo CLI.

## Using .env files with EAS Hosting

When using **.env** files with EAS Hosting, environment variables prefixed with `EXPO_PUBLIC_` are all available in the client-side code and the server-side code. The variables not prefixed with `EXPO_PUBLIC_` are only available in the server-side code.

The [steps for including client-side and server-side environment variables](/eas/environment-variables/usage#storing-environment-variables) are the same as when using EAS environment variables. So you need to ensure that your local **.env** files include the correct environment variables before running the `npx expo export` command.
