Deployment Steps
To successfully deploy an Infisical Gateway for use, follow these steps in order.Provision a Machine Identity
Universal Auth
Universal Auth
INFISICAL_AUTH_METHOD=universal-authINFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<client-id>INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<client-secret>
Token Auth
Token Auth
INFISICAL_TOKEN=<token>
Native Kubernetes
Native Kubernetes
INFISICAL_AUTH_METHOD=kubernetesINFISICAL_MACHINE_IDENTITY_ID=<machine-identity-id>
Native AWS IAM
Native AWS IAM
INFISICAL_AUTH_METHOD=aws-iamINFISICAL_MACHINE_IDENTITY_ID=<machine-identity-id>
Native GCP ID Token
Native GCP ID Token
INFISICAL_AUTH_METHOD=gcp-id-tokenINFISICAL_MACHINE_IDENTITY_ID=<machine-identity-id>
GCP IAM
GCP IAM
INFISICAL_AUTH_METHOD=gcp-iamINFISICAL_MACHINE_IDENTITY_ID=<machine-identity-id>INFISICAL_GCP_SERVICE_ACCOUNT_KEY_FILE_PATH=<path-to-key-file>
Native Azure
Native Azure
INFISICAL_AUTH_METHOD=azureINFISICAL_MACHINE_IDENTITY_ID=<machine-identity-id>
OIDC Auth
OIDC Auth
INFISICAL_AUTH_METHOD=oidc-authINFISICAL_MACHINE_IDENTITY_ID=<machine-identity-id>INFISICAL_JWT=<oidc-jwt>
JWT Auth
JWT Auth
INFISICAL_AUTH_METHOD=jwt-authINFISICAL_MACHINE_IDENTITY_ID=<machine-identity-id>INFISICAL_JWT=<jwt>
Set Up a Relay Server
- Managed relay (Infisical Cloud, US/EU only): Managed relays are only available for Infisical Cloud instances in the US and EU regions. If you are using Infisical Cloud in these regions, you can use the provided managed relay.
- Self-hosted relay: For all other cases, including all self-hosted and dedicated enterprise instances of Infisical, you must deploy your own relay server. You can also choose to deploy your own relay server when using Infisical Cloud if you require reduced geographic proximity to your target resources for lower latency or to reduce network congestion. For setup instructions, see the Relay Deployment Guide.
Install the Infisical CLI
Configure Network & Firewall
| Protocol | Destination | Port | Purpose |
|---|---|---|---|
| TCP | Relay Server IP/Hostname | 2222 | SSH reverse tunnel establishment |
| TCP | Infisical instance host (US/EU, other) | 443 | API communication and certificate requests |
Select a Deployment Method
- Linux Server (Production)
- Kubernetes (Production)
- Development & Testing
--target-relay-name flag to manually specify a different relay server.Verify Your Gateway Deployment
- Check logs for “Gateway started successfully” message indicating the gateway is running and connected to the relay
- Verify registration in the Infisical by visiting the Gateways section of your organization. The new gateway should appear with a recent heartbeat timestamp.
- Test connectivity by creating a resource in Infisical that uses the gateway to access a private service. Verify the resource can successfully connect through the gateway.
Frequently Asked Questions
Do I need to open any inbound ports on my firewall?
Do I need to open any inbound ports on my firewall?
- Outbound SSH to relay servers on port 2222
- Outbound HTTPS to Infisical API endpoints on port 443
- SSH reverse tunnels handle all communication - no return traffic configuration needed
How do I test network connectivity from the gateway?
How do I test network connectivity from the gateway?
- Test SSH port to relay:
- Test outbound API access (replace with your Infisical domain if different):
How do I troubleshoot relay connectivity issues?
How do I troubleshoot relay connectivity issues?
- Verify the relay server is running and accessible
- Check firewall rules allow outbound connections on port 2222
- Confirm the relay name matches exactly
- Test SSH port to relay:
How do I troubleshoot authentication failures?
How do I troubleshoot authentication failures?
- Verify machine identity credentials are correct
- Check token expiration and renewal
- Ensure authentication method is properly configured
Where can I find gateway logs?
Where can I find gateway logs?
- systemd service:
- Kubernetes:
- Local installation: Logs appear in the terminal where you started the gateway
Where is the gateway configuration file stored?
Where is the gateway configuration file stored?
/etc/infisical/gateway.conf. You may reference or inspect this file for troubleshooting advanced configuration issues.Can I run the gateway on the same machine as my self-hosted Infisical server?
Can I run the gateway on the same machine as my self-hosted Infisical server?
infisical CLI package (used for gateway and relay commands) conflicts with the infisical-core Linux package (the self-hosted server). Installing the CLI via apt-get or yum will remove infisical-core.To run both on the same machine, install the CLI using an alternative method such as NPM (npm install -g @infisical/cli). This avoids the package conflict and allows you to use both the Infisical server and the gateway CLI on the same host.For production environments, we recommend deploying the gateway on a separate machine from your Infisical server for better isolation and reliability.What happens if there is a network interruption?
What happens if there is a network interruption?
- Automatic reconnection: The gateway will automatically attempt to reconnect to relay servers if the SSH connection is lost
- Connection retry logic: Built-in retry mechanisms handle temporary network outages without manual intervention
- Persistent SSH tunnels: SSH connections are automatically re-established when connectivity is restored
- Certificate rotation: The gateway handles certificate renewal automatically during reconnection
- Graceful degradation: The gateway logs connection issues and continues attempting to restore connectivity