docs/documentation/platform/agent-proxy/deployment.mdx
The Agent Proxy is a single long-running process started with infisical secrets agent-proxy start. This page covers where to place it in your network, how to run it, and how it behaves at scale. For a first run, the Quickstart is enough; read this before going to production.
The Agent Proxy is built for private-network deployment. A well-placed one looks like this:
+---- Your private network -------------------+
| |
| +--------------+ |
| | Agent host |----+ | +------------------+
| +--------------+ | | +-->| External APIs |
| | +----------------+ | | +------------------+
| +-->| Agent Proxy |-------+
| | | its own host |-------+
| +--------------+ | +----------------+ | | +------------------+
| | Agent host |----+ | +-->| Infisical |
| +--------------+ port 17322, | +------------------+
| agents only |
+---------------------------------------------+
Outbound, the Agent Proxy only needs to reach your Infisical instance and the APIs your proxied services define.
However you run the Agent Proxy, provide its identity's credentials, publish port 17322 to your agent machines only, and set INFISICAL_DOMAIN for EU Cloud or self-hosted.
```bash
export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<agent-proxy-client-id>
export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<agent-proxy-client-secret>
# export INFISICAL_DOMAIN=https://eu.infisical.com # EU Cloud or self-hosted
infisical secrets agent-proxy start
```
```bash
docker run -p 17322:17322 \
-e INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<agent-proxy-client-id> \
-e INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<agent-proxy-client-secret> \
infisical/cli:latest secrets agent-proxy start
```
Add `-e INFISICAL_DOMAIN=https://eu.infisical.com` for EU Cloud or a self-hosted instance.
- **Image:** `infisical/cli:latest`
- **Start command:** `secrets agent-proxy start`
- **Environment:** `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`, `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`, and `INFISICAL_DOMAIN` if not on US Cloud
- **Port:** `17322`, exposed on a private network your agents can reach, not the public internet
On Render, this is a private service pointed at the image with the start command above.
The Agent Proxy keeps everything it needs in memory, so steady-state requests involve no Infisical calls:
--poll-interval), the Agent Proxy re-fetches services, permissions, and secret values for active agents. Changes such as a rotated secret or an edited service take effect within one poll interval, with no agent restart. Authorization fails closed on the same cycle. If an agent's identity, role, or Proxy grant is revoked, or its token expires, the Agent Proxy drops that agent's cached credentials on the next poll and stops applying them.--poll-interval, factor in your instance's API rate limits; a longer interval reduces load at the cost of slower propagation.When an agent requests a host no proxied service matches, the --unmatched-host flag decides what happens:
allow (default): the request is forwarded untouched, with no credentials applied. This is the normal mode, because much of an agent's traffic does not need a brokered credential at all: reading documentation, cloning public repos, installing packages, or calling services the agent legitimately authenticates to itself. All of that flows through untouched, while matched hosts still get credentials applied.block: the request is rejected with 403. Use this to restrict agents to an allowlist of exactly the services you have defined.Run multiple Agent Proxy instances with the same machine identity behind a TCP load balancer. Instances coordinate through Infisical rather than with each other: