Installation
This guide lists the supported installation paths for Apache APISIX and the checks to run before you configure routes. For a short local walkthrough, start with Getting Started.
Choose an installation method#
| Method | Appropriate starting point |
|---|---|
| Docker Compose | Local evaluation or a reproducible container-based environment |
| Helm | Kubernetes deployment managed with the official APISIX chart |
| RPM or DEB | A supported Linux distribution managed by system packages |
| Source build | Development or a build that requires reviewed compile-time changes |
APISIX supports Linux for production. Confirm the supported architecture, distribution, and component versions for the release you intend to deploy. Do not copy a package filename or image tag from an older guide into production without verifying that release.
Install APISIX#
- Docker Compose
- Helm
- RPM
- DEB
- Source Code
Clone the apisix-docker repository:
git clone https://github.com/apache/apisix-docker.git
cd apisix-docker/example
Local example only
The example configuration is not safe to expose on a shared or untrusted network. Before starting it, bind the published Admin API (9180) and Control API (9092) ports to 127.0.0.1 or remove those host-port mappings. Never expose the Control API to public traffic. Restrict the metrics port (9091) to the intended monitoring path. If host access to etcd is required, bind 2379 to 127.0.0.1; otherwise remove its host-port mapping. Also restrict allow_admin to the intended operator address and replace the example Admin API keys. The bundled etcd is configured for an isolated example, not as a secured production configuration store.
Start the Compose file that matches the host architecture:
docker compose -p docker-apisix up -d
docker compose -p docker-apisix -f docker-compose-arm64.yml up -d
The example starts APISIX and its required configuration store. Review the Compose file, image tags, exposed ports, credentials, volumes, and network settings before every use and before adapting it to another environment.
Add the official chart repository and install APISIX in a dedicated namespace:
helm repo add apisix https://apache.github.io/apisix-helm-chart
helm repo update
helm install apisix apisix/apisix \
--namespace ingress-apisix \
--create-namespace
Production configuration
The chart's bundled etcd configuration is intended for development and testing, not as a production configuration store. For production, use a supported, version-pinned external etcd deployment with authentication, TLS, persistent storage, backup and recovery, and network isolation; configure the chart to use that deployment. Also review the rendered Services and network policies so the Admin API is reachable only from the intended operator path.
See the apisix-helm-chart repository for current values, supported Kubernetes versions, upgrade notes, and optional components. Pin the chart and image versions used by your deployment.
For a distribution supported by the APISIX RPM repository, add the repository and install the package:
sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo \
https://repos.apiseven.com/packages/redhat/apache-apisix.repo
sudo dnf install -y apisix
On releases that use yum rather than dnf, install the repository-management plugin supplied by that distribution before adding the repository. Do not start APISIX until you complete the configuration-source and Admin API steps below. Use apisix help to list the management commands available in the installed release.
The APISIX DEB repository supports selected Debian versions and architectures. Verify the current repository support before installation. The following example uses a dedicated keyring rather than the deprecated apt-key command:
sudo apt update
sudo apt install -y ca-certificates curl gnupg
curl -fsSL https://repos.apiseven.com/pubkey.gpg \
| sudo gpg --dearmor -o /usr/share/keyrings/apache-apisix.gpg
case "$(dpkg --print-architecture)" in
amd64) repo_url="https://repos.apiseven.com/packages/debian" ;;
arm64) repo_url="https://repos.apiseven.com/packages/arm64/debian" ;;
*) echo "Unsupported architecture" >&2; exit 1 ;;
esac
echo "deb [signed-by=/usr/share/keyrings/apache-apisix.gpg] ${repo_url} debian12 main" \
| sudo tee /etc/apt/sources.list.d/apache-apisix.list
sudo apt update
sudo apt install -y apisix
Do not start APISIX until you complete the configuration-source and Admin API steps below.
Follow Building APISIX from source. Record the source commit, OpenResty version, dependencies, build options, and generated package or image so the build can be reproduced.
Select the configuration source#
Choose the deployment mode before starting a production node:
- Traditional and decoupled modes use etcd as the configuration store. Secure a networked etcd deployment with authentication, TLS, and network isolation.
- Standalone file-driven mode loads a full YAML or JSON configuration from the local filesystem and does not use etcd as its configuration center.
- Standalone API-driven mode stores full configuration in memory and is intended for defined integrations such as the APISIX Ingress Controller and ADC. Review its full-replacement and versioning behavior before use.
Docker Compose and Helm examples can provision an example etcd instance for you; do not treat that as a production etcd design. For a production deployment or a package or source installation in an etcd-backed mode, install a supported etcd release by following the official etcd installation documentation. Confirm connectivity and version compatibility before starting APISIX.
Configure APISIX#
APISIX reads conf/config.yaml by default. Edit that file before running the configuration test:
apisix test
To start APISIX with a different configuration file, pass --config or -c to apisix start. The apisix test command does not accept this option:
apisix start -c /path/to/config.yaml
Only include values you need to override. APISIX uses its packaged defaults for other settings. Do not edit the generated conf/nginx.conf directly.
For example, an etcd-backed traditional node can set its listener and etcd endpoint as follows:
apisix:
node_listen: 9080
deployment:
role: traditional
role_traditional:
config_provider: etcd
etcd:
host:
- "https://etcd.example:2379"
Configure etcd authentication and TLS fields for the selected environment. A URL beginning with https:// alone is not sufficient proof that peer verification and credentials are correct.
Protect the Admin API#
Replace the documented development key, restrict allow_admin to operator networks, and deliver the key through the secret mechanism used by your deployment. The environment variable below must exist in the APISIX process environment; defining it only in an interactive shell does not configure a service managed by systemd or another supervisor.
For a local package evaluation, generate a key before writing the configuration:
export ADMIN_KEY="$(openssl rand -hex 32)"
Then reference that variable in conf/config.yaml:
deployment:
admin:
allow_admin:
- 127.0.0.0/24
admin_key:
- name: admin
key: ${{ADMIN_KEY}}
role: admin
The data-plane rate-limiting plugins do not protect the Admin API. Keep the Admin API off untrusted networks and apply the operational controls described in the Admin API documentation.
After configuring the selected mode and its actual configuration source, preserve the key across the first privileged APISIX commands:
sudo --preserve-env=ADMIN_KEY apisix init
sudo --preserve-env=ADMIN_KEY apisix test
sudo --preserve-env=ADMIN_KEY apisix start
For a managed installation, inject the same value through a restricted service environment file or secret manager instead of relying on a shell export. Configure and verify etcd first when using an etcd-backed mode. After any configuration change, run apisix test and then reload or restart APISIX in the same controlled environment.
Do not put an Admin API key in a URL. Once APISIX is running, send it in the required header:
curl "http://127.0.0.1:9180/apisix/admin/routes" \
-H "X-API-KEY: ${ADMIN_KEY}"
Verify the installation#
For a package or source installation, validate the generated NGINX configuration before start or reload:
apisix version
apisix test
curl -i "http://127.0.0.1:9080/"
Before a Route is configured, the data-plane request can return 404; the purpose of this check is to confirm that the intended listener responds. Use the Admin API check above to confirm control-plane access.
For a container or Kubernetes installation, use the corresponding container and workload status commands, then inspect the APISIX logs. Verify all of the following before configuring production traffic:
- the expected APISIX version and image or package digest are running;
- the data-plane and Admin API ports are exposed only where intended;
- the selected configuration source is reachable and updates are applied;
- the Admin API rejects missing or invalid credentials; and
- a test Route reaches its intended upstream and fails safely when that upstream is unavailable.
Continue with Getting Started to create and verify a Route.