Self-host apisix
3.19.0Dynamic NGINX-based gateway for APIs, traffic and LLMs
curl -sL https://run.api7.ai/apisix/quickstart | sh- Stars
- 17 310
- Ports
- 9080 (Data plane HTTP listener for proxied client requests (node_listen)), 9443 (HTTPS listener), 9180 (REST Admin API (localhost-only by default, key authenticated)), 9091 (Prometheus metrics endpoint), 9092 (Control API)
- Requires
- etcd
apache/apisixWhat is apisix?
Apache APISIX is a high-throughput, hot-configurable gateway for HTTP APIs and, increasingly, AI traffic, aimed at teams running microservices in cloud-native environments. Built from NGINX plus an etcd configuration store, it lets you change routes, upstreams, certificates and plugins on the fly rather than after a restart. Its traffic tooling covers weighted and hash-based balancing, health checks with circuit breaking, canary, blue-green and A/B releases, plus request, concurrency and token-count limits. Protocol coverage reaches HTTP/3 with QUIC, WebSocket, TCP/UDP, gRPC and gRPC-Web, Dubbo and MQTT, and API consumers can be authenticated with keys, JWT, basic credentials, Casbin, Keycloak, Casdoor or an external identity platform over OpenID Connect. Operators drive the gateway through a key-authenticated REST Admin API that only accepts 127.0.0.1 until you widen allow_admin, with Prometheus metrics, Zipkin and SkyWalking tracing, and log shipping to Kafka, Elasticsearch, ClickHouse, Datadog and other sinks. The AI gateway path forwards requests to several LLM providers behind one interface, adding retries, fallbacks and cost control through token limits. You can install it with the Docker quickstart script, the example compose stack from the apisix-docker repository, the official Helm chart, or RPM and DEB packages on supported Linux distributions; settings live in conf/config.yaml, and standalone modes drop etcd in favour of local YAML or an in-memory API-driven store. Linux is the supported production platform, and the Admin and Control ports should be kept off untrusted networks.
apisix alternatives
GPT-LoadAn open-source, self-hosted AI gateway routing one endpoint to 35 upstream channels — key credentials and subscription logins, with failover, logs and cost estimates.CompareGPT-Load with apisix
litellmSelf-hosted gateway unifying 100+ LLM providers under one OpenAI-compatible API with usage tracking, safety controls, and admin console.Comparelitellm with apisix
agentgatewayOpen-source, self-hosted HTTP and gRPC gateway routing LLM, MCP, A2A and service traffic in one binary, with auth, policy, guardrails, cost controls and observability.Compareagentgateway with apisix
TykSelf-hosted open-source API and AI gateway proxying REST, GraphQL, gRPC, TCP and MCP traffic with auth, quotas, plugins and analytics.CompareTyk with apisix
krakendSelf-hosted, open-source API gateway: a single stateless binary that aggregates, secures and transforms microservice APIs, with Docker, deb/rpm and brew installs.Comparekrakend with apisix
Weave RouterOpen-source LLM model router for coding agents like Claude Code, Codex, and Cursor; self-hosted with Docker Compose, it picks the cheapest capable model per request.CompareWeave Router with apisix
ai-apiSelf-hosted AI gateway unifying Azure OpenAI, OpenAI, Anthropic, and Gemini behind one OpenAI-compatible API with revocable credentials and cost tracking.Compareai-api with apisix
Middleware ManagerA self-hosted web UI for managing Traefik middlewares, custom services, plugins, and mTLS — compatible with Pangolin or Traefik directly.CompareMiddleware Manager with apisix
Should you self-host apisix?
apisix scores 79/100 on selfhost.directory (how scoring works) and ranks #2 of 39 in API Gateway. It has 17 310 GitHub stars, +109 in the last 30 days.
It shipped 5 stable releases in the past year. The latest, 3.19.0, came out on 28 September 2026. New versions land roughly every 2 months.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Lua.
Its closest alternative on selfhost.directory is Kong Gateway (82/100, 44 373 stars). It scores higher overall, so compare the two before you pick. See apisix vs Kong Gateway side by side.
Features
- AI gateway for LLM traffic
- API authentication and authorization
- Canary release and traffic splitting
- Dynamic routing
- Dynamic TLS certificates
- Dynamic upstream and load balancing
- External log shipping
- Health checks and circuit breaking
- Hot plugin reload
- Metrics, tracing and observability
- Multi-language plugin developmentWebAssembly path is described as experimental.
- Multi-protocol proxying
- Rate Limiting
- REST Admin API
- Standalone YAML configuration
apisix README
FAQ
How do I configure Apache APISIX to listen on multiple ports when handling HTTP or HTTPS requests?
Add extra ports under apisix.node_listen for HTTP and under apisix.ssl.listen for HTTPS in conf/config.yaml, then reload or restart APISIX.
How do I reload my custom Plugins for Apache APISIX?
No manual reload is needed — all plugins are hot reloaded.
How do I change Apache APISIX’s log level?
Set nginx_config.error_log_level in conf/config.yaml (the default is warn) and reload the gateway.
How do I redirect HTTP traffic to HTTPS with Apache APISIX?
Set http_to_https to true on the redirect plugin, use vars-based advanced routing with a 301 redirect, or run a serverless function in the rewrite phase.
How can I make a gray release with Apache APISIX?
Split users by request conditions either with the vars field on routes (for example on a query argument) and a redirect plugin, or with the traffic-split plugin.
How do I build the APISIX-Runtime environment?
Features that need extra NGINX modules require APISIX-Runtime, which can be built by following the code in the api7/apisix-build-tools repository.
When installing Apache APISIX dependencies with LuaRocks, why does it cause a timeout or result in a slow or unsuccessful installation?
The LuaRocks server in use may be blocked; use https_proxy, the --server flag with a faster mirror such as luarocks.cn, or --verbose for a detailed log.
Why does Apache APISIX use etcd for the configuration center?
Besides storing configuration, APISIX needs clustered deployment, guarded transactions, multi-version concurrency control, watch notifications and low read/write latency, which etcd provides.
Can I write my own Plugins for Apache APISIX?
Yes, the gateway is extensible through custom plugins, following the “how to write your own Plugins” guide.
Does Apache APISIX have a user interface?
Yes, configuration can be managed through the APISIX Dashboard user interface.
What does it mean by “Apache APISIX is fully dynamic”?
Behaviour changes take effect without restarting the gateway: plugin reloading, proxy rewrites and mirrors, response rewrites, health checks and traffic splitting all happen dynamically.
Which platforms does Apache APISIX support?
It is platform agnostic, built for cloud native environments and runs anywhere from bare metal to Kubernetes, including Apple Silicon chips.
What is the performance impact of using Apache APISIX?
The FAQ quotes a single-core throughput of 18,000 QPS with an average delay of 0.2 ms, with full benchmark results in the benchmark documentation.
How does Apache APISIX differ from other API gateways?
It stores and synchronizes configuration in etcd instead of PostgreSQL or MySQL, is fully dynamic, and hot-loads plugins.
Why do I need a new API gateway?
Cloud-native microservices need a gateway that is performant, flexible, secure and scalable; APISIX claims to beat other gateways on those metrics while staying platform agnostic and fully dynamic.
More in API Gateway
bifrostOpen-source, high-performance AI gateway that works as your LLM gateway, MCP gateway and agent gateway. One OpenAI-compatible API for 10,000+ models, with failover, load balancing, semantic caching, virtual keys, budgets and MCP Code Mode. Works with any SDK or agent and adds under 200µs of overhead at 5k RPS.
BricksLLMOpen-source Go AI gateway that meters LLM traffic with per-key rate limits, spend caps, and PII masking, covering OpenAI-style APIs, Anthropic, Azure and vLLM.
CatGPT-GatewaySelf-hosted gateway turning ChatGPT/Claude browser sessions into an OpenAI-compatible API with tool calling, vision, and file attachments.
ccLoadOpen-source gateway you host that combines AI keys and subscriptions into one endpoint with failover, protocol translation, and usage costs for coding assistants.
claude-code-aws-gatewaySelf-hosted proxy giving teams complete Claude Code capabilities via their AWS Bedrock accounts, with budgets, SSO, and analytics.
ClawRouterSelf-hosted LLM router with local smart routing across 88 models. Agents pay per request via USDC/x402 or credit-card API keys. MIT licensed.
CLI2APISelf-hosted OpenAI-compatible API that turns your own Qoder, WorkBuddy, and Trae account logins into a local API endpoint with multi-account routing and a web console.
cliproxyapi-cloudflare-stackA deployment template for running an OpenAI-compatible LLM API gateway on your own infrastructure using CLIProxyAPI and Cloudflare services.
Codex LB EnhancedSelf-hosted open-source gateway pooling ChatGPT accounts for Codex clients with transparent failover, session recovery, native quota headers, and a web dashboard.
consulSelf-hosted Consul is a service networking tool for service discovery, service mesh with mTLS, API gateway and health checks across multi-datacenter infrastructure.
ConvoyOpen-source webhooks gateway handling incoming and outgoing events with retries, signatures, fan-out and rate limits; self-host via Docker Compose or Helm chart.
Copilot_ProxySelf-hosted proxy that converts GitHub Copilot API into OpenAI, Anthropic, and Gemini compatible endpoints with a WebUI for multi-account management and token handling.


0 comments