selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

krakend logo

Self-host krakend

v3.0.4

Stateless, declarative open-source API gateway

ReleaseOpen SourceApache-2.0
apt-get install -y krakend
Updated3 days ago
LanguageGo
Setup difficultyModerate
Stars
2 704
Port
8080 (TCP port the gateway listens on (config attribute port, default 8080; used as 8080:8080 in the Docker examples))
Docker
krakend
krakend screenshot 1krakend screenshot 2

What is krakend?

krakend alternatives

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

krakend README

Krakend logo

KrakenD

FOSSA Status

How to install krakend

Install krakend with Docker

$docker run -p 8080:8080 -v $PWD:/etc/krakend/ krakend run --config /etc/krakend/krakend.json

Official image on Docker Hub; without the volume mount a default krakend.json serving /__health is used.

How to configure krakend

  • KRAKEND_PORTReserved variable overriding the config port; only works when the key already exists in the configuration.

    values: integer

  • port8080TCP port the gateway listens on.

    values: integer, recommended 1024-65535 for an unprivileged user

  • versionConfiguration syntax version (not the product version); must be 4 from KrakenD v3.0.

    values: 4

  • timeout2sDefault timeout for all endpoints, overridable per endpoint.

    values: durations in ns, us/µs, ms, s, m, h

  • cache_ttl0sDefault Cache-Control max-age advertised to clients/CDN; KrakenD itself does not store content with it.

    values: durations in ns, us/µs, ms, s, m, h

krakend releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

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

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…