.env.local Jun 2026
.env.local is similar to .env , but with some key differences:
Enter the .env.local file—your development environment's best friend. What is .env.local ? .env.local
# Only accessible on the server (Node.js) DATABASE_URL="postgresql://user:pass@localhost:5432/mydb" STRIPE_SECRET_KEY="sk_test_..." .env.local is similar to .env
Suppose you're building a web application that uses a third-party API. You can store the API key in .env.local : .env.local