infisical bootstrap
Automate the initial setup of a new Infisical instance for headless deployment and infrastructure-as-code workflows
Description
The infisical bootstrap
command is used when deploying Infisical in automated environments where manual UI setup is not feasible. It’s ideal for:
- Containerized deployments in Kubernetes or Docker environments
- Infrastructure-as-code pipelines with Terraform or similar tools
- Continuous deployment workflows
- DevOps automation scenarios
The command initializes a fresh Infisical instance by creating an admin user, organization, and instance admin machine identity, enabling subsequent programmatic configuration without human intervention.
This command creates an instance admin machine identity with the highest level of privileges. The returned token should be treated with the utmost security, similar to a root credential. Unauthorized access to this token could compromise your entire Infisical instance.
Flags
The URL of your Infisical instance. This can be set using the INFISICAL_API_URL
environment variable.
This flag is required.
Response
The command returns a JSON response with details about the created user, organization, and machine identity:
Usage with Automation
For automation purposes, you can extract just the machine identity token from the response:
This extracts only the token, which can be captured in a variable or piped to other commands.
Example: Capture Token in a Variable
Notes
- The bootstrap process can only be performed once on a fresh Infisical instance
- All flags are required for the bootstrap process to complete successfully
- Security controls prevent privilege escalation: instance admin identities cannot be managed by non-instance admin users and identities
- The generated admin user account can be used to log in via the UI if needed
Was this page helpful?