Self-host Kong Gateway on a VPS

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.

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

Specification

Status
Listed
Category
Infrastructure
Services
kong
Ports
8000, 8001
Volumes
0
Memory
about 512 MiB
arm64
unknown
amd64
unknown
Settings to fill in
none
Listing
Community template

About Kong Gateway

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.

What it deploys

Kong Gateway runs as one service in a single Compose app, listening on ports 8000, 8001.

ServiceImageTagPortsVolumes
kong kong 3.8.0 8000, 8001 none

Before you install

  • CPU architecture. arm64 unknown. The scan could not read a manifest or the tag is chosen at install time. This is not a claim either way.
  • Listed. It is in the catalog. Back up the data volume before changing an image tag.

Settings and environment

You do not have to fill in anything. Values are never shown here.

ServiceVariableValue
kongKONG_ADMIN_ACCESS_LOGPreset by the template
kongKONG_ADMIN_ERROR_LOGPreset by the template
kongKONG_ADMIN_LISTENPreset by the template
kongKONG_DATABASEPreset by the template
kongKONG_PROXY_ACCESS_LOGPreset by the template
kongKONG_PROXY_ERROR_LOGPreset by the template
kongKONG_PROXY_LISTENPreset by the template

First run

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

Install Kong Gateway on a VPS

  1. Install Levelrail on a fresh VPS

    Run this as root on a Linux server (amd64 or arm64) with ports 80 and 443 reachable. The installer prints a setup link.

    curl -fsSL https://levelrail.com/install.sh | sudo sh
  2. Sign in

    Open the setup link, choose a password, then log the CLI in. The CLI install command is curl -fsSL https://levelrail.com/install-cli.sh | sh if the machine does not have it. See Getting started.

    levelrail-cli login --device
  3. Read the template

    Shows the entry, including its full compose.yaml.

    levelrail-cli templates get kong
  4. Deploy it

    This deploys the template compose file as an app. The app name defaults to the template id; --name sets another.

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

Without a domain the app gets an sslip.io address. You can also deploy it from the dashboard: Apps, New app, Browse templates, then Kong Gateway.

More in Infrastructure

All Infrastructure templates