1. Install the dependencies

    OpenResty Kong being an OpenResty application, you must follow the OpenResty installation instructions. You will need OpenSSL and PCRE to compile OpenResty, and to at least use the following compilation options:

    $ ./configure \
      --with-pcre-jit \
      --with-http_ssl_module \
      --with-http_realip_module \
      --with-http_stub_status_module \

    You might have to specify --with-openssl and you can add any other option you'd like, such as additional Nginx modules or a custom --prefix directory.

    OpenResty conveniently bundles LuaJIT and resty-cli which are essential to Kong. Add the nginx and resty executables to your $PATH:

    $ export PATH="$PATH:/usr/local/openresty/bin"

    Luarocks 2.4.3, compiled with the LuaJIT version bundled with OpenResty (See the --with-lua and --with-lua-include configure options). Example:

    ./configure \
      --lua-suffix=jit \
      --with-lua=/usr/local/openresty/luajit \
  2. Install Kong

    Now that OpenResty is installed, we can use Luarocks to install Kong's Lua sources:

    $ luarocks install kong 0.14.1-0


    $ git clone git@github.com:Kong/kong.git
    $ [sudo] make install # this simply runs the `luarocks make kong-*.rockspec` command

    Finally, place the bin/kong script in your $PATH.

  3. Prepare your database

    Configure Kong so it can connect to your database. Kong supports both PostgreSQL 9.5+ and Cassandra 3.x.x as its datastore.

    If you are using Postgres, please provision a database and a user before starting Kong, ie:


    Now, run the Kong migrations:

    $ kong migrations up [-c /path/to/kong.conf]

    Note: migrations should never be run concurrently; only one Kong nodes should be performing migrations at a time.

  4. Start Kong

    $ kong start [-c /path/to/kong.conf]
  5. Use Kong

    Kong is running:

    $ curl -i http://localhost:8001/

    Quickly learn how to use Kong with the 5-minute Quickstart.

Get Updates!

Follow Up:

Get future release notes emailed to you.

Having Trouble? We're Here to Help!