.env file.
Prerequisites
- An Infisical account on Infisical Cloud or a self-hosted instance
- An application or script you run locally
1
Create a Project
A project holds all secrets for one application or service, split across environments.
- Log in to Infisical
- Click Create Project and give it a name (e.g.,
orders-service)
2
Add a Secret
- On the Secrets Overview page, click into the Development environment
- Click Add Secret and enter a key and value (e.g.,
DB_PASSWORD)
3
Install the CLI and Log In
Install the Infisical CLI for your platform, then authenticate:Your browser opens to complete the login.
In a containerized environment such as WSL 2 or Codespaces, run
infisical login -i to avoid browser-based login.4
Connect Your Project
In your application’s directory, link it to the Infisical project you created:This writes a
.infisical.json file with local project settings. It contains no secrets and is safe to commit.5
Inject Secrets into Your App
Start your application through the CLI. Infisical fetches the secrets for the environment and injects them as environment variables:Your application reads
DB_PASSWORD from its environment like any other variable. No .env file needed.Next Steps
Core Concepts
Understand how projects, environments, folders, and secrets fit together.
Secrets Delivery
Deliver secrets to production with SDKs, agents, Kubernetes, and CI/CD.
Local Development Guide
Set up a secure local development workflow for your whole team.
Access Control
Scope who can access which environments and paths.