Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
docs(gateways): frame the section around running both modes
bernie-g2af4324b945a
diff --git a/docs/cli/commands/gateway.mdx b/docs/cli/commands/gateway.mdxindex 2b7116ae30..7261178baa 100644--- a/docs/cli/commands/gateway.mdx+++ b/docs/cli/commands/gateway.mdx@@ -159,7 +159,7 @@ In direct listen mode it also:infisical gateway start my-gateway --listen-address=gateway.internal:8443 --enroll-method=token --token=<token> --domain=<domain>```- Pass it alongside `--target-relay-name` to run both modes, so Infisical uses the listen address first and falls back to the relay. This is how you switch an existing gateway between modes without an outage, and [Switching modes without an outage](/documentation/platform/gateways/gateway-deployment#switching-modes-without-an-outage) covers when to keep both:+ Pass it alongside `--target-relay-name` to run both modes, so Infisical uses the listen address first and falls back to the relay. [Running both modes](/documentation/platform/gateways/gateway-deployment#running-both-modes) covers when to keep both, and how to use it to switch modes without an outage:```bashinfisical gateway start my-gateway --listen-address=gateway.internal:8443 --target-relay-name=my-relay --enroll-method=token --token=<token> --domain=<domain>diff --git a/docs/documentation/platform/gateways/gateway-deployment.mdx b/docs/documentation/platform/gateways/gateway-deployment.mdxindex 2c3f530d51..96a3dfd070 100644--- a/docs/documentation/platform/gateways/gateway-deployment.mdx+++ b/docs/documentation/platform/gateways/gateway-deployment.mdx@@ -28,7 +28,7 @@ There are two ways to connect a Gateway, and your network usually decides whichThe difference underneath is which side opens the connection, and that's what drives every row above.-You can also run both at once, which is how you move an existing Gateway from one mode to the other without an outage. See [Switching modes without an outage](#switching-modes-without-an-outage).+You can also run both at once. See [Running both modes](#running-both-modes).For the ports, certificates, and traffic flow behind each mode, see [Network architecture](/documentation/platform/gateways/network-architecture).@@ -334,21 +334,19 @@ From the gateway's detail page (select the gateway row in the list):To migrate a gateway to a different host with zero downtime: select **Generate deploy command** to generate a fresh token, run it on the new host, and the new login will rotate credentials away from the old host.-## Switching modes without an outage+## Running both modes-A Gateway can run both modes at once. Pass `--target-relay-name` and `--listen-address` together, and Infisical uses the listen address first, falling back to the relay when that address stops answering. Health checks probe each mode separately. The Gateway stays healthy while either one works.+A Gateway can run both modes at once. Pass `--target-relay-name` and `--listen-address` together, and Infisical uses the listen address first, falling back to the relay when that address stops answering. Health checks probe each mode separately, so the Gateway stays healthy while either one works.-Running both is mainly how you switch an existing Gateway between modes without an outage. A Gateway declares its transports every time it registers, so the move is a flag change and a restart:+A Gateway declares its transports every time it registers, so its mode is set by which flags it starts with:| Flags | Mode ||---|---|| `--target-relay-name=my-relay` | Relay only |-| `--target-relay-name=my-relay --listen-address=gateway.internal:8443` | Both || `--listen-address=gateway.internal:8443` | Direct only |+| `--target-relay-name=my-relay --listen-address=gateway.internal:8443` | Both |-Stop at the middle step and check the Gateway's health. A wrong address costs you nothing there: operations keep completing over the relay, and the Gateway page reports the direct path as unreachable. Drop `--target-relay-name` once direct is healthy, or drop `--listen-address` to go back.--Running both permanently only helps clients that can reach the listen address. PAM CLI sessions dial the Gateway from the user's own machine. A user outside the network waits for that attempt to time out before the session falls back to the relay. If most of your CLI users are outside the network, relay mode alone serves them better.+Running both permanently only helps clients that can reach the listen address. PAM CLI sessions dial the Gateway from the user's own machine, so a user outside the network waits for that attempt to time out before the session falls back to the relay. If most of your CLI users are outside the network, relay mode alone serves them better.## Frequently asked questions@@ -369,7 +367,7 @@ In direct listen mode, one inbound port has to be open: the port in your listen<Accordion title="Can I switch a gateway between relay and direct listen?">Yes. Open the gateway's detail page, choose the mode you want under **Connection Mode**, and re-run the generated command on the host. The gateway re-registers with the new mode and is issued the certificate it needs for it.-Switching away from a mode drops it. To keep both, pass `--target-relay-name` and `--listen-address` together.+The new mode replaces the old one. To switch without an outage, start the Gateway with both flags first. If the listen address is wrong, the relay keeps serving and the Gateway page shows the direct path as unreachable. Once direct is healthy, drop `--target-relay-name`.</Accordion>diff --git a/docs/documentation/platform/gateways/relay-deployment/overview.mdx b/docs/documentation/platform/gateways/relay-deployment/overview.mdxindex b8566a10c5..52d6111c44 100644--- a/docs/documentation/platform/gateways/relay-deployment/overview.mdx+++ b/docs/documentation/platform/gateways/relay-deployment/overview.mdx@@ -19,7 +19,7 @@ A relay is what you need when:- You're on Infisical Cloud, which runs outside your network and has no route into it, so a gateway there can't be dialed- PAM CLI users connect from outside the gateway's network, since the CLI dials the gateway from their own machine-A gateway can also run both, which is mainly how you switch an existing gateway between modes without an outage. See [Switching modes without an outage](/documentation/platform/gateways/gateway-deployment#switching-modes-without-an-outage).+A gateway can also run both. See [Running both modes](/documentation/platform/gateways/gateway-deployment#running-both-modes).## Do you need to deploy your own relay?