Infisical is optional. Self-hosters and contributors should use plain
.env files, see Environment Variables. It is only required when ENV=production.Team members: run tasks with your login
1
Install the CLI
2
Log in
infisical login -i inside containers or WSL2.3
Run a task
development environment injected. Pass flags after --:.infisical.json in the repo names the project. It holds no secrets.
How the apps load secrets
At startup the API, bots, and voice agent fetch secrets for yourENV and inject each one only if it isn’t already set. Local variables always win. The web app never calls Infisical.
If no Infisical variables are set, development continues with your local .env. Production refuses to start. Self-host (ENV=selfhost) never contacts Infisical.
Infra URLs and local tweaks
Infra URLs and local tweaks
The
development environment stores localhost URLs, because mise dev runs the API on the host and reaches Docker through published ports. Don’t put Docker hostnames there.For a local tweak, use personal overrides in the dashboard instead of editing .env. The CLI caches secrets, so infisical run also works offline.Use your own Infisical project (headless)
Use your own Infisical project (headless)
Create a machine identity with Universal Auth, grant it read access, then set these in the local environment. They can’t be stored in Infisical itself.Set all three or none. A partial set warns in development and fails the boot in production.
Production (Docker Swarm)
Production (Docker Swarm)
Production uses one machine identity shared by every service. The compose file lives in the private
gaia-infra repo. Store the credentials as Swarm secrets:scripts/docker-entrypoint.sh reads them from /run/secrets/ before starting the app.To limit the blast radius, create one identity per service and map each onto the canonical names with Compose’s long syntax. Only the compose file changes.Why the web app skips Infisical
Why the web app skips Infisical
Its environment is the Under
NEXT_PUBLIC_* variables in apps/web/.env.example, which are compiled into the browser bundle and are public anyway. The one server-only secret, BLOG_BEARER_TOKEN, goes in Cloudflare:mise infisical dev, Next still sees Infisical values because the CLI injects them before Next starts. Don’t bootstrap Infisical into the Worker: that ships a project-wide credential to the edge.Troubleshooting
Infisical is required in production
Infisical is required in production
ENV resolved to production without Infisical credentials. Provide the machine identity credentials, or set ENV=development.Incomplete Infisical config: missing ...
Incomplete Infisical config: missing ...
Only some of the three
INFISICAL_* variables are set. Set all three or remove all three.Authentication failed or secrets not loading
Authentication failed or secrets not loading
Check the client ID and secret, that the identity is enabled with read access, and that the environment slug matches
ENV.A value isn't applied
A value isn't applied
A local variable with the same name is set. Unset it in your shell and
.env files.Next
Environment Variables
Every variable the apps read
Manual install with Docker
Self-host with docker compose, without the CLI

