Self-host Kong Gateway with Levelrail

An API gateway in database-less mode on the open source image. Load routes with the admin API at kong:8001 from inside this project. With no routes the proxy answers 404, which is the healthy state.

  • AuthorKong
  • LicenceApache-2.0
  • Memory512 MiB
  • Services1

How to self-host Kong Gateway

  1. Pull the images

    One image is pulled on your server.

    Show images
    • kong:3.8.0
  2. Create the app

    One service starts in a single Compose app, on ports 8000, 8001.

  3. Fill in the secrets

    7 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

After the first start

  • Post a declarative config to kong:8001/config from a service in this project, then send traffic to the public address.

Kong Gateway requirements

Memory
About 512 MiB
Architectures
amd64 unknown, arm64 unknown
Ports
8000, 8001
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
Apache-2.0, permissive license
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Kong Gateway. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Kong Gateway docs page.

Deploy Kong Gateway your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Kong Gateway from the CLI

levelrail-cli templates deploy kong --name my-kong

Deploy Kong Gateway with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/kong/deploy

Kong Gateway configuration

Kong Gateway services

ServiceImagePortsVolumes
kong kong:3.8.0 8000, 8001 none

Kong Gateway environment variables

VariableServiceValue
KONG_ADMIN_ACCESS_LOG kong Preset by the template
KONG_ADMIN_ERROR_LOG kong Preset by the template
KONG_ADMIN_LISTEN kong Preset by the template
KONG_DATABASE kong Preset by the template
KONG_PROXY_ACCESS_LOG kong Preset by the template
KONG_PROXY_ERROR_LOG kong Preset by the template
KONG_PROXY_LISTEN kong Preset by the template

Ports and volumes

Ports
8000, 8001
Volumes
none

Kong Gateway FAQ

How much memory does Kong Gateway need?

The catalog lists about 512 MiB of memory for Kong Gateway.

Does Kong Gateway run on arm64?

For Kong Gateway, arm64 support is not confirmed; amd64 is unknown.

What licence is Kong Gateway under?

Kong Gateway is licensed under Apache-2.0, which is permissive, with few conditions on reuse.

Does Kong Gateway need configuration before it starts?

No. The template fills in its own defaults.

Which ports does Kong Gateway use?

Kong Gateway listens on ports 8000 and 8001 inside the stack.

Can I deploy Kong Gateway on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Kong Gateway, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image kong:3.8.0 is what you deploy there.

levelrail-cli templates deploy kong --name my-kong