Install Kong Gateway on Debian

    Kong is licensed under an .

    You have a supported system with root or root-equivalent access.

    You can install Kong Gateway by downloading an installation package or using our APT repository.

    Package

    APT repository

    Install Kong Gateway on Debian from the command line.

    1. Download the Kong package:

    Install the APT repository from the command line.

    1. Download the Kong APT repository:

      1. echo "deb [trusted=yes] https://download.konghq.com/gateway-2.x-debian-$(lsb_release -sc)/ \
      2. default all" | sudo tee /etc/apt/sources.list.d/kong.list
    2. Update the repository:

    3. Install Kong:

      1. apt install -y kong=2.6.0

    Kong can run either with or without a database.

    When using a database, you will use the kong.conf configuration file for setting Kong’s configuration properties at start-up and the database as storage of all configured entities, such as the Routes and Services to which Kong proxies.

    When not using a database, you will use kong.conf its configuration properties and a kong.yml file for specifying the entities as a declarative configuration.

    Kong so it can connect to your database. Kong supports both PostgreSQL and as its datastore.

    1. Run the Kong migrations:

    Without a database

    If you are going to run Kong in , you should start by generating declarative config file.

    1. Generate a kong.yml file in your current folder using the following command:

      1. kong config init

      The file contains instructions about how to populate it.

    2. Edit your kong.conf file. Set the database option to off and the declarative_config option to the path of your file:

      1. database = off
      2. declarative_config = /path/to/kong.yml
    1. Start Kong Gateway:

    2. Check that Kong Gateway is running:

      Check out Kong Gateway’s series of Getting Started guides to get the most out of Kong Gateway.