REGISTER NOW FOR THE KONG AGENTIC ERA WORLD TOUR GOVERN A2A TRAFFIC WITH KONG'S NEW AGENT GATEWAY WHY GARTNER’S “CONTEXT MESH” CHANGES EVERYTHING DON’T MISS API + AI SUMMIT 2026 SEPT 30 – OCT 1
  • [Why Kong](/company/why-kong)Why Kong
    • Explore the unified API Platform
        • BUILD APIs
        • [
          Kong Insomnia](/products/kong-insomnia)
          Kong Insomnia
        • [
          API Design](/products/kong-insomnia/api-design)
          API Design
        • [
          API Mocking](/products/kong-insomnia/api-mocking)
          API Mocking
        • [
          API Testing and Debugging](/products/kong-insomnia/api-testing-and-debugging)
          API Testing and Debugging
        • [
          MCP Client](/products/kong-insomnia/mcp-client)
          MCP Client
        • RUN APIs
        • [
          API Gateway](/products/kong-gateway)
          API Gateway
        • [
          Context Mesh](/products/kong-konnect/features/context-mesh)
          Context Mesh
        • [
          AI Gateway](/products/kong-ai-gateway)
          AI Gateway
        • [
          Event Gateway](/products/event-gateway)
          Event Gateway
        • [
          Kubernetes Operator](/products/kong-gateway-operator)
          Kubernetes Operator
        • [
          Service Mesh](/products/kong-mesh)
          Service Mesh
        • [
          Ingress Controller](/products/kong-ingress-controller)
          Ingress Controller
        • [
          Runtime Management](/products/kong-konnect/features/runtime-management)
          Runtime Management
        • DISCOVER APIs
        • [
          Developer Portal](/products/kong-konnect/features/developer-portal)
          Developer Portal
        • [
          Service Catalog](/products/kong-konnect/features/api-service-catalog)
          Service Catalog
        • [
          MCP Registry](/products/mcp-registry)
          MCP Registry
        • GOVERN APIs
        • [
          Metering and Billing](/products/kong-konnect/features/usage-based-metering-and-billing)
          Metering and Billing
        • [
          APIOps and Automation](/products/apiops-automation)
          APIOps and Automation
        • [
          API Observability](/products/kong-konnect/features/api-observability)
          API Observability
        • [Why Kong?](/company/why-kong)Why Kong?
      • CLOUD
      • [Cloud API Gateways](/products/kong-konnect/features/dedicated-cloud-gateways)Cloud API Gateways
      • [Need a self-hosted or hybrid option?](/products/kong-enterprise)Need a self-hosted or hybrid option?
      • COMPARE
      • [Considering AI Gateway alternatives? ](/performance-comparison/ai-gateway-alternatives)Considering AI Gateway alternatives?
      • [Kong vs. Postman](/performance-comparison/kong-vs-postman)Kong vs. Postman
      • [Kong vs. MuleSoft](/performance-comparison/kong-vs-mulesoft)Kong vs. MuleSoft
      • [Kong vs. Apigee](/performance-comparison/kong-vs-apigee)Kong vs. Apigee
      • [Kong vs. IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs. IBM
      • GET STARTED
      • [Sign Up for Kong Konnect](/products/kong-konnect/register)Sign Up for Kong Konnect
      • [Documentation](https://developer.konghq.com/)Documentation
      • FOR PLATFORM TEAMS
      • [Developer Platform](/solutions/building-developer-platform)Developer Platform
      • [Kubernetes and Microservices](/solutions/build-on-kubernetes)Kubernetes and Microservices
      • [Observability](/solutions/observability)Observability
      • [Service Mesh Connectivity ](/solutions/service-mesh-connectivity)Service Mesh Connectivity
      • [Kafka Event Streaming](/solutions/kafka-stream-api-management)Kafka Event Streaming
      • FOR EXECUTIVES
      • [AI Connectivity](/ai-connectivity)AI Connectivity
      • [Open Banking](/solutions/open-banking)Open Banking
      • [Legacy Migration](/solutions/legacy-api-management-migration)Legacy Migration
      • [Platform Cost Reduction](/solutions/api-platform-consolidation)Platform Cost Reduction
      • [Kafka Cost Optimization](/solutions/reduce-kafka-cost)Kafka Cost Optimization
      • [API Monetization](/solutions/api-monetization)API Monetization
      • [AI Monetization](/solutions/ai-monetization)AI Monetization
      • [AI FinOps](/solutions/ai-cost-governance-finops)AI FinOps
      • FOR AI TEAMS
      • [Agent Gateway](/agent-gateway)Agent Gateway
      • [AI Governance](/solutions/ai-governance)AI Governance
      • [AI Security](/solutions/ai-security)AI Security
      • [AI Cost Control](/solutions/ai-cost-optimization-management)AI Cost Control
      • [Agentic Infrastructure](/solutions/agentic-ai-workflows)Agentic Infrastructure
      • [MCP Production](/solutions/mcp-production-and-consumption)MCP Production
      • [MCP Traffic Gateway](/solutions/mcp-governance)MCP Traffic Gateway
      • FOR DEVELOPERS
      • [Mobile App API Development](/solutions/mobile-application-api-development)Mobile App API Development
      • [GenAI App Development](/solutions/power-openai-applications)GenAI App Development
      • [API Gateway for Istio](/solutions/istio-gateway)API Gateway for Istio
      • [Decentralized Load Balancing](/solutions/decentralized-load-balancing)Decentralized Load Balancing
      • BY INDUSTRY
      • [Financial Services](/solutions/financial-services-industry)Financial Services
      • [Healthcare](/solutions/healthcare)Healthcare
      • [Higher Education](/solutions/api-platform-for-education-services)Higher Education
      • [Insurance](/solutions/insurance)Insurance
      • [Manufacturing](/solutions/manufacturing)Manufacturing
      • [Retail](/solutions/retail)Retail
      • [Software & Technology](/solutions/software-and-technology)Software & Technology
      • [Transportation](/solutions/transportation-and-logistics)Transportation
      • [See all Solutions](/solutions)See all Solutions
  • [Pricing](/pricing)Pricing
      • DOCUMENTATION
      • [Kong Konnect](https://developer.konghq.com/konnect/)Kong Konnect
      • [Kong Gateway](https://developer.konghq.com/gateway/)Kong Gateway
      • [Kong Mesh](https://developer.konghq.com/mesh/)Kong Mesh
      • [Kong AI Gateway](https://developer.konghq.com/ai-gateway/)Kong AI Gateway
      • [Kong Event Gateway](https://developer.konghq.com/event-gateway/)Kong Event Gateway
      • [Kong Insomnia](https://developer.konghq.com/insomnia/)Kong Insomnia
      • [Plugin Hub](https://developer.konghq.com/plugins/)Plugin Hub
      • EXPLORE
      • [Blog](/blog)Blog
      • [Learning Center](/blog/learning-center)Learning Center
      • [eBooks](/resources/e-book)eBooks
      • [Reports](/resources/reports)Reports
      • [Demos](/resources/demos)Demos
      • [Customer Stories](/customer-stories)Customer Stories
      • [Videos](/resources/videos)Videos
      • EVENTS
      • [API + AI Summit](/events/conferences/api-ai-summit)API + AI Summit
      • [Agentic Era World Tour](/agentic-era-world-tour)Agentic Era World Tour
      • [Webinars](/events/webinars)Webinars
      • [User Calls](/events/user-calls)User Calls
      • [Workshops](/events/workshops)Workshops
      • [Meetups](/events/meetups)Meetups
      • [See All Events](/events)See All Events
      • FOR DEVELOPERS
      • [Get Started](https://developer.konghq.com/)Get Started
      • [Community](/community)Community
      • [Certification](/academy/certification)Certification
      • [Training](https://education.konghq.com)Training
      • COMPANY
      • [About Us](/company/about-us)About Us
      • [We're Hiring!](/company/careers)We're Hiring!
      • [Press Room](/company/press-room)Press Room
      • [Contact Us](/company/contact-us)Contact Us
      • [Kong Partner Program](/partners)Kong Partner Program
      • [Enterprise Support Portal](https://support.konghq.com/s/)Enterprise Support Portal
      • [Documentation](https://developer.konghq.com/?_gl=1*tphanb*_gcl_au*MTcxNTQ5NjQ0MC4xNzY5Nzg4MDY0LjIwMTI3NzEwOTEuMTc3MzMxODI2MS4xNzczMzE4MjYw*_ga*NDIwMDU4MTU3LjE3Njk3ODgwNjQ.*_ga_4JK9146J1H*czE3NzQwMjg1MjkkbzE4OSRnMCR0MTc3NDAyODUyOSRqNjAkbDAkaDA)Documentation
  • [](/search)
  • [Login](https://cloud.konghq.com/login)Login
  • [Book Demo](/contact-sales)Book Demo
  • [Get Started](/products/kong-konnect/register)Get Started
[Blog](/blog)Blog
  • [AI Gateway](/blog/tag/ai-gateway)AI Gateway
  • [AI Security](/blog/tag/ai-security)AI Security
  • [AIOps](/blog/tag/aiops)AIOps
  • [API Security](/blog/tag/api-security)API Security
  • [API Gateway](/blog/tag/api-gateway)API Gateway
|
    • [API Management](/blog/tag/api-management)API Management
    • [API Development](/blog/tag/api-development)API Development
    • [API Design](/blog/tag/api-design)API Design
    • [Automation](/blog/tag/automation)Automation
    • [Service Mesh](/blog/tag/service-mesh)Service Mesh
    • [Insomnia](/blog/tag/insomnia)Insomnia
    • [Event Gateway](/blog/tag/event-gateway)Event Gateway
    • [View All Blogs](/blog/page/1)View All Blogs
We're Entering the Age of AI Connectivity [Read more](/blog/news/the-age-of-ai-connectivity)Read moreProducts & Agents:
    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong API Gateway](/products/kong-gateway)Kong API Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Metering & Billing](/products/usage-based-metering-and-billing)Kong Metering & Billing
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
  • [Documentation](https://developer.konghq.com)Documentation
  • [Book Demo](/contact-sales)Book Demo
  1. Home
  2. Blog
  3. Engineering
  4. How to Set Up Kong Gateway
[Engineering](/blog/engineering)Engineering
December 2, 2020
4 min read

# How to Set Up Kong Gateway

Kevin Chen

### Read the latest version: [Kong Gateway Tutorial: Up and Running With a GUI in <15 Minutes](https://konghq.com/blog/kong-gateway-tutorial)Kong Gateway Tutorial: Up and Running With a GUI in <15 Minutes

##### Archived post below.

You've decided to install Kong Gateway. Congrats! You're almost ready to accelerate your microservices journey with the world's most popular open source [API gateway](https://konghq.com/blog/learning-center/what-is-an-api-gateway)API gateway. This article and [video](https://youtu.be/F-YphLgKuz4)video will guide you through the short version of our tutorial. If you prefer, [here](https://docs.konghq.com/getting-started-guide/2.1.x/overview)here are some more detailed instructions.

If you haven't already, make sure you've [installed Kong](https://konghq.com/get-started#install)installed Kong before getting started. It should only take a few minutes.

To check that you've started Kong, make a quick request to port 8001 (the default for the Kong admin API). A response status code of 200 means that Kong is up and running.

Now, let's get started.

## 3 Steps to Getting Started

  1. - [**Add a *****Service***](#add-a-service)**Add a *****Service****. *This is the ID that [Kong Gateway](https://konghq.com/kong)Kong Gateway uses to refer to the upstream [APIs and microservices](https://konghq.com/kong)APIs and microservices it manages.
  2. - [**Add a *****Route***](#add-a-route)**Add a *****Route***[** to the Service**](#add-a-route)** to the Service**. Routes specify how (and if) requests are sent to their Services after they reach the API gateway. A single Service can have many Routes.
  3. - [**Add *****plugins***](#add-a-plugin)**Add *****plugins***, which provide a modular system for modifying and controlling Kong’s capabilities. For example, to [secure your API gateway](https://konghq.com/blog/learning-center/building-a-secure-api-gateway)secure your API gateway, you could require an access key to set up using the key-auth plugin. Plugins provide a wide array of functionality, including access control, caching, rate limiting, logging and more.

**Watch the video guide below, or keep reading for the full written guide with screenshots.**

###

### Add a Service

Kong exposes a RESTful Admin API on port 8001 that allows you to change Kong configurations, such as adding Services and Routes via the command line. Begin by making a post request to the Admin API/Service Route.

```
curl -i -X POST \
--url http://localhost:8001/services/ \
--data 'name=example-service' \
--data 'url=http://mockbin.org'
```

Then, create a new example Service that points to the [Mockbin API](http://mockbin.org)Mockbin API. Press enter, and the system will generate the response status code of 201. You'll see the name example Service within the response JSON as well as some other information.

Kong Gateway: Add a Service

### Add a Route

Next, create a new Route for the Service. Start by making a post request to the admin API. Hit the example Service you created earlier and then hit the Route’s endpoint for that example Service. Specify the host headers of example.com.

```
curl -i -X POST \
--url http://localhost:8001/services/example-service/routes \
--data 'hosts[]=example.com'
```

Now that you have a Route and a Service, you're ready to proxy your request through Kong Gateway. Go ahead and issue a curl command, but this time use port 8000.

```
curl -i -X GET \
--url http://localhost:8000/ \
--header 'Host: example.com'
```

If you receive a successful response, Kong will now forward requests made to localhost port 8000 to the URL you configured back in step one, the Mockbin API.

If you make the same request again and this time strip out the header, you’ll see a code of 200, which means a successful request. It’s a proxy via Kong 1.3, so you can see the version, and you can also see how much latency the Kong proxy is adding to the request. As you make more and more requests, the number should get lower because Kong can cache the response and request that you make.

Kong Gateway: Add Route

### Add a Plugin

Now that you have your Route and Service set up, you'll need to add a plug-in to secure your Service. To configure the [key-auth plugin](https://docs.konghq.com/hub/kong-inc/key-auth)key-auth plugin for the Service you configured in Kong Gateway, issue the following curl request. Once again, you'll be utilizing the admin API to create a plugin.

```
curl -i -X POST \
--url http://localhost:8001/services/example-service/plugins/ \
--data 'name=key-auth'
```

Start by hitting the example Service you started in earlier steps to add a plugin called key-auth. After making the request, the key-auth plugin will have some information in the response JSON.

Then, make the same request to port 8000. You'll immediately get a 401 saying that it’s unauthorized. The request is still proxied through Kong; Kong is just looking for the key authentication. So, now that you’ve configured the key-auth plugin, you see how quickly you can secure any Services. Additionally, you can specify plugins to services, routes or consumers. Key authentication allows you to choose who can access your services, giving you more control over your microservices.

Kong Gateway: Add Key Auth Plugin

Next, configure the key-auth plugin and add a Consumer to your Service. Create a Consumer through the restful API. Once again, utilize the admin API to hit the Consumer’s endpoint and adding a Consumer named Jason.

```
curl -i -X POST \
--url http://localhost:8001/consumers/ \
--data "username=Jason"
```

Afterward, you'll see a 201 created as well as an ID for Jason.

To provision key credentials for your Consumer, use the admin API once again as a post-request through the Consumers/Jason/key-auth endpoint. Where it says key=ENTER_KEY_HERE, enter the ID that you see in Jason’s response JSON.

```
curl -i -X POST \
--url http://localhost:8001/consumers/Jason/key-auth/ \
--data 'key=ENTER_KEY_HERE'
```

After successful creation, Jason now has the credentials necessary to make the request. If you go back and make the request to port 8000, you still keep the host header, example.com, but now you have to add a field called apikey. Take the key for Jason, and plug it in. Now you see the request starts to work again. Strip the body and just look at the header, and you'll get a response of 200.

Kong Gateway: Add Plugin

That's it! You've successfully added a Service, created a Route for that Service, and secured that Service using a key-auth plugin with a Consumer named Jason. For more information, visit our [documentation page](http://docs.konghq.com)documentation page.

**Have questions or want to stay in touch with the Kong community? Join us wherever you hang out:**

⭐ [Star us on GitHub](https://github.com/Kong/kong)Star us on GitHub

🐦 [Follow us on Twitter](https://twitter.com/thekonginc)Follow us on Twitter

🌎 [Join the Kong Community](https://konghq.com/community?utm_source=newsletter&utm_medium=email&utm_campaign=community)Join the Kong Community

🍻 [Join our Meetups](https://www.meetup.com/pro/kong)Join our Meetups

❓ ️[Ask and answer questions on Kong Nation](https://discuss.konghq.com)Ask and answer questions on Kong Nation

💯 [Apply to become a Kong Champion](https://konghq.com/kong-champions?utm_source=newsletter&utm_medium=email&utm_campaign=community)Apply to become a Kong Champion

## Developer agility meets compliance and security. Discover how Kong can help you become an API-first company.

[Get a Demo](/contact-sales)Get a Demo[Start for Free](/products/kong-konnect/register)Start for Free
- [API Gateway](/blog/tag/api-gateway)API Gateway- [Kong Gateway](/blog/tag/kong-gateway)Kong Gateway- [API Development](/blog/tag/api-development)API Development

## More on this topic

_Videos_

## Kong Builders Nov 16- Introducing Kong Gateway Operator

_Videos_

## Kong Builders - July 22 - Running Kong Gateway on Red Hat OpenShift

## See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

[Get a Demo](/contact-sales)Get a Demo
**Topics**
- [API Gateway](/blog/tag/api-gateway)API Gateway- [Kong Gateway](/blog/tag/kong-gateway)Kong Gateway- [API Development](/blog/tag/api-development)API Development
Kevin Chen

Recommended posts

# Using Kong Gateway to Adapt SOAP Services to the JSON World

[Engineering](/blog)EngineeringSeptember 6, 2023

While JSON-based APIs are ubiquitous in the API-centric world of today, many industries adapted internet-based protocols for automated information exchange way before REST and JSON became popular. One attempt to establish a standardized protocol sui

Hans Hübner
[](https://konghq.com/blog/engineering/soap-to-json-with-kong-gateway)

# Developing a Kong Gateway Plugin With Go

[Engineering](/blog)EngineeringApril 22, 2021

This tutorial shows you how to create a custom Kong Gateway plugin with Go programming language. The sample plugin I created adds an extra layer for security between consumers and producers. The way it works is it identifies consumers through a

Mert Simsek
[](https://konghq.com/blog/engineering/kong-gateway-go-plugin)

# Supporting Legacy Web Services (SOAP) With Kong API Gateway

[Engineering](/blog)EngineeringMarch 11, 2020

Let's admit it - web services (SOAP) are here to stay for a few more years, and maybe for a long time in some places where there is no business incentive to rebuild them. However, with a decline in new SOAP web services and most applications moving

Vikas Vijendra
[](https://konghq.com/blog/engineering/supporting-legacy-web-services-with-kong)

# Rewrite Published URLs with Kong API Gateway

[Engineering](/blog)EngineeringFebruary 6, 2020

A common requirement for API gateways is to rewrite the published URL to a different URL for the upstream service’s endpoint. For example, due to legacy reasons, your upstream endpoint may have a base URI like /api/oilers/. However, you want your pub

Peter Kim
[](https://konghq.com/blog/engineering/url-rewriting-in-kong)

# Beyond Static Routing: Modernizing API Logic with Conditional Policy Execution

[Engineering](/blog)EngineeringApril 15, 2026

Imagine you have a single Service, order-api . You want to apply a strict rate limit to most traffic, but you want to bypass that limit—or apply a different one—if the request contains a specific X-App-Priority: High header. Previously, you had t

Hugo Guerrero
[](https://konghq.com/blog/engineering/conditional-policy-execution)

# Token Exchange at the Gateway

[Engineering](/blog)EngineeringApril 15, 2026

How OAuth 2.0 Token Exchange Reshapes Trust Between Services — and Why the API Gateway Is Exactly the Right Place to Enforce It Modern applications don’t run as a single monolithic. They are composed of services — frontend APIs, backend microservi

Veena Rajarathna
[](https://konghq.com/blog/engineering/token-exchange-at-the-gateway)

# Practical Strategies to Monetize AI APIs in Production

[Engineering](/blog)EngineeringMarch 27, 2026

Traditional APIs are, in a word, predictable. You know what you're getting: Compute costs that don't surprise you Traffic patterns that behave themselves Clean, well-defined request and response cycles AI APIs, especially anything that runs on LLMs

Deepanshu Pandey
[](https://konghq.com/blog/engineering/monetize-ai-apis)

## Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

[Get a Demo](/contact-sales)Get a Demo

## step-0

  • ## Company

    • [About Kong](/company/about-us)About Kong
    • [Customers](/customer-stories)Customers
    • [Careers](/company/careers)Careers
    • [Press](/company/press-room)Press
    • [Events](/events)Events
    • [Contact](/company/contact-us)Contact
    • [Pricing](/pricing)Pricing
      • Terms
      • Privacy
      • Trust and Compliance
  • ## Platform

    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
    • [Kong Gateway](/products/kong-gateway)Kong Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Documentation](https://developer.konghq.com)Documentation
    • [Book Demo](/contact-sales)Book Demo
  • ## Compare

    • [AI Gateway Alternatives](/performance-comparison/ai-gateway-alternatives)AI Gateway Alternatives
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
    • [Kong vs IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs IBM
    • [Kong vs Postman](/performance-comparison/kong-vs-postman)Kong vs Postman
    • [Kong vs Mulesoft](/performance-comparison/kong-vs-mulesoft)Kong vs Mulesoft
  • ## Explore More

    • [Open Banking API Solutions](/solutions/open-banking)Open Banking API Solutions
    • [API Governance Solutions](/solutions/api-governance)API Governance Solutions
    • [Istio API Gateway Integration](/solutions/istio-gateway)Istio API Gateway Integration
    • [Kubernetes API Management](/solutions/build-on-kubernetes)Kubernetes API Management
    • [API Gateway: Build vs Buy](/campaign/secure-api-scalability)API Gateway: Build vs Buy
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
  • ## Open Source

    • [Kong Gateway](https://developer.konghq.com/gateway/install/)Kong Gateway
    • [Kuma](https://kuma.io/)Kuma
    • [Insomnia](https://insomnia.rest/)Insomnia
    • [Kong Community](/community)Kong Community

Kong enables the connectivity layer for the agentic era – securely connecting, governing, and monetizing APIs and AI tokens across any model or cloud.

  • English
  • Japanese
  • Frenchcoming soon
  • Spanishcoming soon
  • Germancoming soon
© Kong Inc. 2026
Interaction mode