Create and enroll a proxy
1
In Agent Vault, go to Proxies and select Create Proxy.
2
Enter a Name. To set the traffic policy, exceptions, or poll interval now, expand Advanced Options. You can change them later.

3
Select Create. The Enrollment Token dialog shows a one-time token that expires in an hour, and commands for the CLI, Docker, and systemd with your token and instance filled in.

4
Run one of the commands on the machine where the proxy will run.
- CLI
- Docker
- systemd
Command flags
Here’s a list of available flags for theinfisical agent-vault proxy command:
Other users on the machine can read anything on a command line. To keep the enrollment token off it, put
INFISICAL_AGENT_VAULT_ENROLLMENT_TOKEN=<enrollment-token> in a file with mode 0600, and pass the file with --env-file for Docker or EnvironmentFile= for systemd. You can delete the file once the proxy has enrolled.State directory
When the proxy enrolls, it generates its own certificate authority and saves it with its enrollment in a state directory at~/.infisical/agent-vault (or /etc/infisical/agent-vault if you run the proxy as the root user on the machine).
The enrollment token only works once. After the first run, the proxy reads its enrollment from the state directory, so you can restart the proxy without --enrollment-token:
Settings
To change a setting, select Edit Settings on the proxy’s menu. If the proxy is running, it applies the change within one poll interval (60 seconds by default).Traffic policy
The Traffic Policy setting controls which hosts agents can reach through the proxy:- Any host (default): the proxy forwards every request, and attaches a credential only for hosts covered by a service
- Access bundle hosts only: the proxy refuses requests to hosts that no service in the session’s access bundle covers, unless the host is an exception
Blocked requests
If the policy blocks a request, the proxy still accepts the connection and completes the TLS handshake, so the agent gets a 403 response instead of a connection error:- A request to a port the service’s host pattern doesn’t name, such as
example.com:8443for a service onexample.com, which only covers port443 - A request that breaks the service’s method or path rules, under either traffic policy
Exceptions
Exceptions allow your agents to access hosts that aren’t covered by any service in an access bundle, even when your proxy uses Access bundle hosts only. Use exceptions for hosts every agent needs, such as a package registry or a documentation site. To add exceptions, select the policy and enter the hosts in Exceptions as a comma-separated list. The field doesn’t appear under Any host, because that policy already lets every host through. Exception hosts behave differently from hosts that are covered by services:- Credentials: The proxy never attaches a credential to requests to an exception host
- Ports: An exception with no port matches the host on every port, while a service’s host pattern with no port only matches port
443 - Interception: The proxy still decrypts requests to an exception host, but doesn’t block them
- Scope: An exception applies to every agent that uses the proxy
Poll interval
The poll interval is how often, in seconds, the proxy re-checks each active session with Infisical and applies settings changes. It defaults to 60 and can be set from 10 to 300. If the proxy can’t reach Infisical:- The proxy keeps using the session data it last fetched for five poll intervals
- After that, the proxy refuses the affected requests with a 502 until it reaches Infisical again, instead of forwarding them without their credentials
- The Proxies page marks the proxy Unreachable after three missed check-ins
Certificate trust
The proxy decrypts HTTPS traffic to attach the credential, so each agent has to trust the proxy’s certificate authority (CA). Each proxy generates its own self-signed CA when it enrolls.- With the CLI
- Without the CLI
If you start the agent with
infisical agent-vault run, the CLI sets up trust for you. On every run, it fetches the certificate from the proxy and sets these variables for the agent: SSL_CERT_FILE, NODE_EXTRA_CA_CERTS, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE, GIT_SSL_CAINFO, and DENO_CERT.On macOS, if you run the CLI in a terminal, it also adds the certificate to your login keychain for tools such as gh and docker that read the system trust store. macOS asks you to approve the change. To skip this step on a machine that already trusts the proxy, pass --no-ca-trust.Pin the proxy’s certificate
If the agent runs on a network you don’t fully control, pin the proxy’s certificate so the agent only talks to your proxy. Copy the fingerprint from the Certificate Authority column on the Proxies page, and pass it with--ca-fingerprint:

APIs with a private certificate authority
The proxy checks the certificate of each API it connects to, the way any HTTPS client does. If an API uses a private certificate authority, the machine running the proxy has to trust that authority. The agent’s machine doesn’t need to trust it.Re-enroll a proxy
To re-enroll a proxy, select New Enrollment Token on the proxy’s menu and run the new command. The proxy keeps its name, settings, and history, but gets a new certificate authority. After you re-enroll a proxy:- Restart every agent that uses the proxy, because those agents still trust the old certificate
- Update any
--ca-fingerprintpin - Replace any mounted copy of the certificate
- On macOS, replace the certificate in your login keychain
Revoke or delete a proxy
Both actions are on the proxy’s menu:
Revoke access if you think the proxy’s host is compromised. To bring a revoked proxy back, re-enroll it.