What is Kong Gateway?
Kong is the most battle-tested open-source API gateway: routing, auth plugins (key, JWT, OAuth2), rate limiting, transformations, and observability hooks, all configured through a clean Admin API. This template runs DB-backed Kong OSS in front of your project’s apps.
The security shape is the point: the proxy is the only public surface. The Admin API stays project-internal, and the one authenticated way in from outside is the admin service - nginx serving Kong Manager and proxying the Admin API under /api, both behind basic auth. UI and API on one origin means the Manager works with no CORS or domain configuration.
On Lyngbak, the Postgres container is never deployed - db becomes a managed Postgres and Kong’s connection settings are auto-wired from its credentials. Zero configuration at deploy time.
What you get
- Routing, load balancing, and health checks for upstream services
- Plugin ecosystem: key-auth, JWT, OAuth2, rate limiting, CORS, transforms
- Kong Manager web UI + Admin API behind basic auth on one origin
- Admin API never publicly exposed
- Managed Postgres auto-provisioned and auto-wired
- Declarative or API-driven configuration
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
kong | gateway - proxy :5000, Admin API :8001 (internal) | proxy only |
admin | nginx - Kong Manager + Admin API at /api | behind basic auth |
db | Postgres - managed service on Lyngbak | no |
Before you deploy
ADMIN_USERNAME / ADMIN_PASSWORDbasic auth on Kong Manager + proxied Admin API
Sizing and billing
1 GiB for Kong handles thousands of requests/second on typical plugin chains; the admin proxy is a 256 MiB sliver. The managed Postgres stores configuration only - it stays small.
A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 5 GiB of volumes cost $0.15 per GiB a month ($0.75/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| Kong Konnect | Plus (serverless gateway) | $25/mo | per gateway, 1M requests/mo included - then $200 per extra 1M (cap 10M) |
Self-hosted Kong OSS has no request metering; Konnect adds the hosted control plane and analytics. Prices from each vendor's pricing page, June 2026.
Run it locally first
The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.
Questions
Kong OSS vs Kong Konnect - what am I giving up?
Konnect adds the hosted control plane, dev portal, and analytics, priced per service/gateway. Kong OSS here keeps the entire data plane and Admin API plus Kong Manager UI - for most teams routing internal and public APIs, that is the whole job, with no per-service or per-gateway pricing.
How do I configure routes and services?
Through Kong Manager (your admin domain, basic auth) or the Admin API at /api on the same origin - or curl it from any app inside the project at kong:8001. Services point at in-project upstreams by service name, e.g. http://my-api:5000.
Is the Admin API safe from the internet?
Yes - it has no public route. Outside access goes only through the nginx admin service behind basic auth; strip that service entirely and the Admin API becomes project-internal only.
Why DB-backed instead of declarative (DB-less) Kong?
DB-backed enables runtime configuration through the Manager UI and Admin API without redeploys, which is the comfortable operating mode on a platform. The managed Postgres makes the usual cost of DB-backed Kong - running the database - disappear.