Connect a Gateway
With either AISIX Enterprise or AISIX Cloud, the AISIX gateway runs as the data plane in your infrastructure. Add a gateway to an environment so it can receive configuration and report heartbeats and telemetry. Live AI requests go directly to the gateway and do not pass through the selected product's control plane.
The gateway initiates outbound management connections authenticated with a certificate bundle issued for one AISIX Enterprise or AISIX Cloud environment.
How the Connection Works
The certificate bundle contains a client certificate, private key, and CA certificate. The client certificate identifies the gateway and the environment it serves.
AISIX uses the same certificate identity for the configuration watch and the gateway management APIs. The configured management endpoint is also the base for heartbeat and telemetry requests. The gateway derives the configuration-store endpoint from that URL unless the deployment supplies a separate endpoint.
Prerequisites
Before connecting the gateway, prepare:
- An AISIX Enterprise or AISIX Cloud environment for the gateway.
- Outbound network access from the gateway host or cluster to the gateway management endpoint.
- A secret store for the client certificate and private key.
- Writable local storage for the gateway identity and materialized mTLS files. AISIX stores these under
/var/lib/aisixby default. - Permission in the AISIX Enterprise or AISIX Cloud Dashboard to issue gateway certificates and view registered data planes.
The state directory must be writable so the gateway can materialize its certificate bundle and identity. The generated container and Kubernetes instructions provide the bundle again at each start, so those files do not require persistent storage. To recover a successfully persisted configuration snapshot without first reconnecting to the control plane, enable the snapshot cache and mount its state directory on persistent storage. A persistent volume alone does not enable the cache. For this recovery, give each gateway instance its own volume and follow Restart from Cached Configuration.
Issue a Gateway Certificate
- In the Dashboard for AISIX Enterprise or AISIX Cloud, select the environment the gateway should serve.
- Open Data planes. If it already lists registered gateways, select Add a data plane to open the certificate form.
- Select a Validity period and enter Hostname (optional) when the gateway needs a specific identity.

- Select Issue certificate.
- Open the tab for the target runtime and copy the generated install snippet.
The private key appears only in the certificate-issuance response. Copy the bundle immediately, store it in your deployment secret system, and do not commit or share the generated snippet.
The AISIX Enterprise and AISIX Cloud Dashboards provide Docker, Docker Compose, Kubernetes (Helm), and systemd installation tabs. The systemd tab generates the service and credential configuration, but it does not install the executable or the managed startup configuration.
Deploy on Kubernetes
Use the Kubernetes (Helm) tab to install the api7/aisix chart. This is the only Kubernetes path the Dashboard generates. It includes a preStop pause and a termination grace period sized for connection draining, instead of leaving those settings at Kubernetes defaults.
For a chart-managed production deployment with autoscaling, disruption budgets, and Prometheus integration, follow the Kubernetes deployment and operations guide.
Start the Gateway
For Docker or Docker Compose, run the generated command on the gateway host. For Kubernetes, use the Helm instructions described above.
Prepare a systemd Host
The generated systemd unit does not install or update the gateway executable. Prepare the host before starting the service:
- Obtain an
aisix-dpexecutable for the target gateway version, operating system, and CPU architecture from API7 Support. - Install it at
/usr/local/bin/aisix-dp, then record its version and checksum. - Copy
config.managed.yamlto/etc/aisix/config.managed.yaml. - In the generated unit, remove the
AISIX_CONFIG_PATHenvironment assignment. - Append
--config /etc/aisix/config.managed.yamltoExecStart.
AISIX_CONFIG_PATH belongs to the container entrypoint and is not a binary option.
Container upgrade commands do not update a systemd-managed executable. Before an upgrade, confirm the replacement executable and rollback procedure with API7 Support. Keep the previous executable, unit, configuration, and persistent state, and validate the replacement on a test host.
Check Ports and State Storage
The generated configuration uses these defaults:
- Port
3000for proxy traffic. - Port
9090for metrics and status. /var/lib/aisixfor the gateway identity, materialized mTLS files, and the snapshot cache when enabled.
Make /var/lib/aisix writable by the user that runs the gateway. Mounting only /var/lib/aisix/mtls leaves the gateway identity and optional snapshot cache outside the mount. See the Port Reference for listener exposure and outbound control-plane connectivity.
Verify the Connection
Verify the initial connection before configuring traffic:
- Confirm that the process starts without certificate, trust-chain, or configuration-store connection errors.
- Open Data planes and find the gateway under Registered data planes. Confirm that its status is Healthy and review Last heartbeat. Select Refresh if needed.
- Confirm the hostname and check that the abbreviated Certificate value matches the start of the Data plane ID shown when you issued the bundle.

After configuring a provider, model alias, and caller API key, verify the end-to-end data path. Confirm that projected resources reach the gateway, a live request succeeds, and its usage or telemetry appears in the control plane.
If the gateway does not appear, check the management endpoint, certificate bundle, trust root, file permissions, state directory, and outbound network access. A healthy heartbeat confirms the management API path, but it does not prove that a resource change has reached every gateway instance. Use Resource Projection after saving the first provider key, model, and caller API key.
Customize the Managed Connection
The generated instructions contain the settings required for a standard connection. Change them only when the deployment needs different credential injection, endpoints, or state storage:
- Use file-path variables when the certificate bundle is mounted as files. Use inline variables when the deployment system injects PEM content. Do not configure both forms for the same certificate, key, or CA bundle.
- Set
AISIX_MANAGED__CP_ETCD_ENDPOINTonly when the control plane provides a configuration-store endpoint that differs from the gateway management URL. Usehost:portwithout a URL scheme. - Set
AISIX_MANAGED__SNAPSHOT_CACHE_ENABLED=trueto enable the on-disk configuration snapshot cache. Setting only a cache path does not enable it.
See Managed Connection Variables for the complete variable catalog, formats, and defaults.
Next Steps
Continue with Choose a Provider Upstream. Each provider guide creates a provider key, model alias, and caller API key, then verifies the configuration with a live request through the connected gateway.
If a saved resource does not affect live traffic as expected, use Resource Projection to trace how environment configuration reaches the gateway.