Skip to content

Environment configuration

Where configuration lives and how to keep secrets out of the bundle.

Each template ships an `.env.example`. Copy it to `.env` and fill in your values. Expo inlines any variable prefixed `EXPO_PUBLIC_` into the JavaScript bundle at build time.

cp .env.example .env

Never put a secret in EXPO_PUBLIC_

A variable prefixed `EXPO_PUBLIC_` is embedded in the shipped app and can be extracted from the binary by anyone who downloads it. API keys, database credentials and signing secrets must live on a server you control, with the app calling an endpoint rather than holding the key.

The templates use `EXPO_PUBLIC_` only for values that are genuinely public, such as an API base URL.

Environment configuration — Documentation — Custom Theme