.env.local < 2K >

In the root directory of your project, create a new file named exactly .env.local .

The .env.local file is a specific "flavor" of these environment files. Its primary characteristics are: .env.local

This prevents .env.local , .env.development.local , and others from being tracked by Git. In the root directory of your project, create

It overrides defaults set in .env or .env.development . .env.local

Forgetting to add NEXT_PUBLIC_ or VITE_ can lead to frustrating "undefined" errors when trying to access variables in your React/Vue components.

You might be using a local Docker database, while your teammate prefers a cloud-based dev database. By using .env.local , you can both have different DATABASE_URL values without conflicting with each other’s code.