Self-host krakend
v3.0.4Stateless, declarative open-source API gateway
apt-get install -y krakend- Stars
- 2 704
- Port
- 8080 (TCP port the gateway listens on (config attribute port, default 8080; used as 8080:8080 in the Docker examples))
krakendWhat is krakend?
KrakenD Community Edition, usually written KrakenD-CE, is the free flavour of the KrakenD gateway: a stateless, Go-written API gateway that stands in front of your services and handles the cross-cutting work for every API you expose. One endpoint can fan out to many backends and come back as a single merged document, encodings are converted between JSON, XML and friends without you writing adapters, and traffic is guarded with load balancing, circuit breaking, concurrent calls and stateless rate limits. At the edge it validates JWT, OAuth2 and OpenID Connect tokens, talks to backends over mTLS, terminates TLS 1.3, and ships logs, metrics and traces to Prometheus, Datadog, Jaeger, Zipkin, InfluxDB, Graylog or any OpenTelemetry sink. Nothing is persisted inside a node, so clusters scale out linearly and each instance is rebuilt from one declarative file that lives in version control; that file can be written as JSON, YAML, TOML or HCL, templated with environment variables, and extended with Lua scripts or the messaging connectors for RabbitMQ, Kafka, NATS, SNS, SQS and Pub/Sub. Self-hosting is a single command with the official krakend container, or an apt or rpm package, a Homebrew formula, a tarball, and prebuilt AWS and Azure machine images; the gateway listens on port 8080 by default and answers on /__health. Worth knowing before you commit: there is no admin web UI at all, everything is configuration-driven, and a long list of capabilities — stateful Redis-backed, service and tiered rate limits, IP filtering, wildcards, URL rewrite, gRPC, WebSockets, OpenAPI tooling, custom Go plugins, the AI gateway and the MCP server — are reserved for the commercial Enterprise edition built on the same binary.
krakend alternatives
graviteeSelf-hosted, open-source API management: gateway, 50+ policies, developer portal and analytics for REST, GraphQL and gRPC APIs, run via Docker Compose or Helm.Comparegravitee with krakend
homarr-iframesSelf-hosted Go API generating embeddable iFrames for 17+ services like Linkwarden, Vikunja, Overseerr, Sonarr, Radarr, Uptime Kuma — works in any dashboard.Comparehomarr-iframes with krakend
apisixOpen-source, self-hosted API and AI gateway built on NGINX and etcd, with hot-loaded plugins, dynamic routing, load balancing and rate limiting.Compareapisix with krakend
corootSelf-hosted, open-source APM and observability platform where eBPF agents capture every telemetry signal without code changes, with service maps and SLO alerting.Comparecoroot with krakend
kiteSelf-hosted, open-source Kubernetes workspace for multi-cluster management: RBAC, LDAP/OAuth login, Prometheus monitoring, Helm, audit logs, and an AI assistant.Comparekite with krakend
Versity S3 GatewayVersityGW is an open-source, Apache-2.0 S3 object-storage gateway in Go: it turns POSIX filesystems, ScoutFS or Azure Blob into an S3 API, with IAM, WebUI and Helm.CompareVersity S3 Gateway with krakend
mcp-gatewaySelf-hosted MCP gateway converting REST APIs into secured MCP endpoints with multi-tenant isolation, API key/OAuth auth, tool policies, and audit logging.Comparemcp-gateway with krakend
Middleware ManagerA self-hosted web UI for managing Traefik middlewares, custom services, plugins, and mTLS — compatible with Pangolin or Traefik directly.CompareMiddleware Manager with krakend
Should you self-host krakend?
krakend scores 63/100 on selfhost.directory (how scoring works) and ranks #10 of 38 in API Gateway. It has 2 704 GitHub stars, +14 in the last 30 days.
It shipped 18 stable releases in the past year. The latest, v3.0.4, came out on 12 November 2026. New versions land roughly every 2 weeks.
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 Go.
Its closest alternative on selfhost.directory is Kong Gateway (82/100, 44 381 stars). It scores higher overall, so compare the two before you pick. See krakend vs Kong Gateway side by side.
Features
- API aggregation and composition
- Automatic content encoding conversion
- Backend response caching
- Circuit Breaker
- Declarative, GitOps-friendly configuration
- GraphQL Support
- Load Balancing
- Lua ScriptingAdvanced Lua helpers are Enterprise-only.
- Message and event-driven connectivityKafka async agents specifically are Enterprise-only.
- Multi-format configuration files
- Mutual TLS (mTLS)
- Rate LimitingStateful Redis-backed global rate limit, service and tiered rate limits, and IP filtering are Enterprise-only.
- Request and response transformation
- TLS and HTTP/2
FAQ
Can I self-host the open source API gateway for microservices?
Yes, it is fully self-hosted and stateless, so nodes need no coordination or database and can run on-premises, hybrid or in any cloud.
What is the difference between the open source (Community) and Enterprise editions?
Community carries the full gateway core (routing, rate limiting, transformation, aggregation), while Enterprise adds things like audit logging, SSO/SAML, fast security fixes and SLA-backed support.
Is KrakenD a free, open source API gateway?
Yes, the Community Edition is free and released under Apache 2.0, so you can download, run and modify it with no license cost.
I've upgraded to v2.x, and I start to see context canceled errors
The client disconnected mid-transmission; these errors were always happening but after the router logging refactor they now appear in the application log instead of the access log.
I have empty responses
Empty responses usually come from a backend timeout, in which case the log shows context deadline exceeded, or from malformed JSON/XML the gateway could not decode.
I am seeing frequent 503 errors in the logs
max_rate caps how many requests per second an endpoint or backend accepts, and requests beyond it are rejected with 503; raise the number or set it to 0 to disable the limit.
I am getting a 500 status when the backend returns anything but 200, 201 or redirects
By default the gateway turns any backend status above 400 into a 500; the error-handling strategy can be changed in the backend settings.
Why is a 204 considered invalid?
In full gateway mode KrakenD expects a payload to compose or aggregate, and a 204 carries none, so it reports an error; configure the endpoint with no-op encoding to proxy such responses untouched.
I am getting a 200 status when the backend returns a 201
KrakenD sends HTTP 200 by default when the backend answered 200 or 201; to pass the original 201 through you have to use the no-op encoding.
More in API Gateway
llm-gatewaySelf-hosted OpenAI-compatible API gateway routing to OpenAI, Anthropic, and local backends with semantic routing, load balancing, and zero-trust networking via zrok.
llm-gatewaySelf-hosted open-source API gateway routing 250+ LLM models from 40+ providers via unified OpenAI-compatible API with cost tracking, caching, and failover.
lmgateSelf-hosted gateway adding enterprise auth, rate limits, and model ACLs to Ollama, llama.cpp, and LM Studio via Docker Compose.
LumenLumen is a self-hosted AI gateway. It provides a web chat interface and an OpenAI-compatible API proxy/
LynkrSelf-hosted, open-source LLM gateway for AI coding assistants that compresses tool tokens, caches prompts semantically, and routes by complexity across 14+ providers.
ManifestSelf-hosted, open-source LLM gateway: one OpenAI-compatible endpoint routes agents to 300+ models with provider fallbacks, cost tracking and full request logs.
mcp-context-forgeAn AI Gateway, registry, and proxy that sits in front of any MCP, A2A, or REST/gRPC APIs, exposing a unified endpoint with centralized discovery, guardrails and management. Optimizes Agent & Tool calling, and supports plugins.
mcp-gatewaySelf-hosted MCP gateway converting REST APIs into secured MCP endpoints with multi-tenant isolation, API key/OAuth auth, tool policies, and audit logging.
MCPJungleSelf-hosted, open-source MCP gateway: register stdio and HTTP MCP servers once, serve them via one /mcp endpoint with tool groups and access control.
McpManagerSelf-hosted open-source MCP proxy aggregating multiple upstream servers into a single endpoint for AI tools like Claude Code and Cursor.
mcpoA self-hosted, open-source proxy that turns any MCP server into an OpenAPI-compatible HTTP endpoint, with API-key access, generated docs and OAuth 2.1.
mistral.rsmistral.rs is a self-hosted, open-source LLM inference engine in Rust serving OpenAI-compatible and Anthropic-compatible APIs with built-in web UI.



0 comments