Run gateway Install service infisical gateway --token= < token >
Description
Run the Infisical gateway in the foreground or manage its systemd service installation. The gateway allows secure communication between your self-hosted Infisical instance and client applications.
Subcommands & flags
Run the Infisical gateway in the foreground. The gateway will connect to the relay service and maintain a persistent connection.
infisical gateway --domain= < domain > --auth-method= < auth-method >
Authentication The Infisical CLI supports multiple authentication methods. Below are the available authentication methods, with their respective flags.
The Universal Auth method is a simple and secure way to authenticate with Infisical. It requires a client ID and a client secret to authenticate with Infisical.
Your machine identity client ID.
Your machine identity client secret.
The authentication method to use. Must be universal-auth
when using Universal Auth.
infisical gateway --auth-method=universal-auth --client-id= < client-id > --client-secret= < client-secret >
The Native Kubernetes method is used to authenticate with Infisical when running in a Kubernetes environment. It requires a service account token to authenticate with Infisical.
Your machine identity ID.
service-account-token-path
Path to the Kubernetes service account token to use. Default: /var/run/secrets/kubernetes.io/serviceaccount/token
.
The authentication method to use. Must be kubernetes
when using Native Kubernetes.
infisical gateway --auth-method=kubernetes --machine-identity-id= < machine-identity-id >
The Native Azure method is used to authenticate with Infisical when running in an Azure environment.
Your machine identity ID.
The authentication method to use. Must be azure
when using Native Azure.
infisical gateway --auth-method=azure --machine-identity-id= < machine-identity-id >
The Native GCP ID Token method is used to authenticate with Infisical when running in a GCP environment.
Your machine identity ID.
The authentication method to use. Must be gcp-id-token
when using Native GCP ID Token.
infisical gateway --auth-method=gcp-id-token --machine-identity-id= < machine-identity-id >
The GCP IAM method is used to authenticate with Infisical with a GCP service account key.
Your machine identity ID.
service-account-key-file-path
Path to your GCP service account key file (Must be in JSON format!)
The authentication method to use. Must be gcp-iam
when using GCP IAM.
infisical gateway --auth-method=gcp-iam --machine-identity-id= < machine-identity-id > --service-account-key-file-path= < service-account-key-file-path >
The AWS IAM method is used to authenticate with Infisical with an AWS IAM role while running in an AWS environment like EC2, Lambda, etc.
Your machine identity ID.
The authentication method to use. Must be aws-iam
when using Native AWS IAM.
infisical gateway --auth-method=aws-iam --machine-identity-id= < machine-identity-id >
The OIDC Auth method is used to authenticate with Infisical via identity tokens with OIDC.
Your machine identity ID.
The OIDC JWT from the identity provider.
The authentication method to use. Must be oidc-auth
when using OIDC Auth.
infisical gateway --auth-method=oidc-auth --machine-identity-id= < machine-identity-id > --jwt= < oidc-jwt >
The JWT Auth method is used to authenticate with Infisical via a JWT token.
The JWT token to use for authentication.
Your machine identity ID.
The authentication method to use. Must be jwt-auth
when using JWT Auth.
infisical gateway --auth-method=jwt-auth --jwt= < jwt > --machine-identity-id= < machine-identity-id >
You can use the INFISICAL_TOKEN
environment variable to authenticate with Infisical with a raw machine identity access token.
The machine identity access token to use for authentication.
infisical gateway --token= < token >
Other Flags
Domain of your self-hosted Infisical instance.
# Example
infisical gateway --domain=https://app.your-domain.com
infisical gateway install
Install and enable the gateway as a systemd service. This command must be run with sudo on Linux.
sudo infisical gateway install --token= < token > --domain= < domain >
Requirements
Must be run on Linux
Must be run with root/sudo privileges
Requires systemd
Flags
The machine identity access token to authenticate with Infisical.
# Example
sudo infisical gateway install --token= < token >
You may also expose the token to the CLI by setting the environment variable INFISICAL_TOKEN
before executing the install command.
Domain of your self-hosted Infisical instance.
# Example
sudo infisical gateway install --domain=https://app.your-domain.com
Service Details The systemd service is installed with secure defaults:
Service file: /etc/systemd/system/infisical-gateway.service
Config file: /etc/infisical/gateway.conf
Runs with restricted privileges:
InaccessibleDirectories=/home
PrivateTmp=yes
Resource limits configured for stability
Automatically restarts on failure
Enabled to start on boot
After installation, manage the service with standard systemd commands:
sudo systemctl start infisical-gateway # Start the service
sudo systemctl stop infisical-gateway # Stop the service
sudo systemctl status infisical-gateway # Check service status
sudo systemctl disable infisical-gateway # Disable auto-start on boot