.env.development -

While this article focuses on .env.development , a complete setup includes .env.test .

This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later.

| File Name | Purpose | Should You Commit It? | |-----------|---------|------------------------| | .env | Default/base configuration for all environments | ❌ No (or optionally with safe defaults) | | .env.development | Development-specific settings (API URLs, debug modes, mock services) | ✅ Yes (safe defaults) | | .env.production | Production-specific settings (live API endpoints, performance configs) | ✅ Yes (safe defaults) | | .env.test | Testing-specific settings (isolated databases, mock services) | ✅ Yes (safe defaults) | | .env.local | Local overrides for personal machine preferences | ❌ No (gitignored) | | .env.development.local | Local overrides specific to development mode | ❌ No (gitignored) | | .env.example | Template listing all required variables (no real values) | ✅ Yes (always) | .env.development

The you are using (Next.js, Vite, Laravel, etc.) A template .gitignore for your project How to inject these variables into a Docker container Share public link

: It tells your application to use "local" settings when you run it on your machine. While this article focuses on

ENVIRONMENT=development DEV_DATABASE_URL=sqlite:///db.sqlite3 SECRET_KEY=dev-key-not-for-production

This fails fast with a clear error message, preventing cryptic failures later on. If you share with third parties, their policies apply

Machine-specific development overrides. This file is kept local to your computer and never committed to git.

Table of Contents