Skip to main content
Load the team’s shared secrets with Infisical. Most contributors don’t need it.
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

Other platforms: Infisical CLI docs.
2

Log in

Use infisical login -i inside containers or WSL2.
3

Run a task

This runs the task with every secret from the 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 your ENV 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.
When ENV is unset, the Python apps (API, voice agent) default to production and refuse to boot without Infisical. Copy apps/api/.env.example, which sets ENV=development. The bots default to development.
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.
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 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.
Its environment is the 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:
Under 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

ENV resolved to production without Infisical credentials. Provide the machine identity credentials, or set ENV=development.
Only some of the three INFISICAL_* variables are set. Set all three or remove all three.
Check the client ID and secret, that the identity is enabled with read access, and that the environment slug matches ENV.
A local variable with the same name is set. Unset it in your shell and .env files.
Startup logs show connection, fetch, and injection timing, plus any Infisical error.

Next

Environment Variables

Every variable the apps read

Manual install with Docker

Self-host with docker compose, without the CLI