# My Custom Plugin Is Not Showing in Plugin list

**URL:** <https://discuss.konghq.com/t/my-custom-plugin-is-not-showing-in-plugin-list/12927>\
**Category:** Questions\
**Tags:** plugins\
**Created:** [August 19, 2024, 6:32am UTC](https://discuss.konghq.com/t/my-custom-plugin-is-not-showing-in-plugin-list/12927 "2024-08-19T06:32:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sivadharani\_G](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sivadharani_g/32/4608_2.png) [@Sivadharani\_G](https://discuss.konghq.com/u/Sivadharani_G)\
**Post date:** [August 19, 2024, 6:32am UTC](https://discuss.konghq.com/t/my-custom-plugin-is-not-showing-in-plugin-list/12927/1 "2024-08-19T06:32:29Z")

</div>

using docker to run the Kong ,I am created the custom Plugin To Validate the header  
Key :Test123  
---------------------------handler.lua-------------------------------------------  
local kong = kong

local CustomPlugin = {  
PRIORITY = 1000,  
VERSION = “0.1”,  
}

function CustomPlugin:access(conf)  
CustomPlugin.super.access(self)

– Validate the static header  
local header\_value = kong.request.get\_header(“Key”)

if header\_value ~= “Test123” then  
– Return an error response if the header is missing or invalid  
return kong.response.exit(401, { message = “Unauthorized: Invalid or missing ‘Key’ header” })  
end

– If the header is valid, the request will continue to the upstream service  
kong.log.debug(“Header validation passed. Continuing to the upstream service.”)  
end

## return CustomPlugin

--------------------------------------schema--------------------------------------  
local typedefs = require “kong.db.schema.typedefs”

## return { name = “custom-plugin”, fields = { { config = { type = “record”, fields = {} } } } } ----------------------------/etc/kong/kong.conf-------------------------------------------- plugins = bundled,custom-plugin

Used cmd  
docker cp ./custom-plugin c3b65b77458c:/usr/local/share/lua/5.1/kong/plugins

docker cp ./kong c3b65b77458c:/usr/local/etc

and restart the container but Not working any solution?

---

<div class="post-metadata">

**Author:** ![rick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rick/32/4446_2.png) [@rick](https://discuss.konghq.com/u/rick)\
**Post date:** [August 19, 2024, 7:05pm UTC](https://discuss.konghq.com/t/my-custom-plugin-is-not-showing-in-plugin-list/12927/2 "2024-08-19T19:05:28Z")

</div>

@Sivadharani_G Can you please clarify errors or issues with your code? Please expand on “Not working” by providing any logs, errors and full steps to reproduce.

Also, for your information, you can provide code snippets in code format within your question, this makes it much easier for a reader to understand what is code and what is text of your question.

You surround your code with 3 backticks ( ``` ) For example:

```auto
local kong = kong

local CustomPlugin = {
PRIORITY = 1000,
VERSION = “0.1”,
}

```

---

<div class="post-metadata">

**Author:** ![Sivadharani\_G](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sivadharani_g/32/4608_2.png) [@Sivadharani\_G](https://discuss.konghq.com/u/Sivadharani_G)\
**Post date:** [August 20, 2024, 5:50am UTC](https://discuss.konghq.com/t/my-custom-plugin-is-not-showing-in-plugin-list/12927/3 "2024-08-20T05:50:48Z")

</div>

> [@Sivadharani\_G](#):
>
> solution

Hi @rick ,

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/5/5eef66378691b4fa0aa32a7defef504dcfc1826f.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/3/3a11b5155a05a510e701bd1eb987eb1f0bb89a53.png)

![image](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/3/3512f3d56d901bd435d921791f1e6bcf4b66b6d8.png)

curl -i -X POST  
[http://localhost:8001/plugins/](http://localhost:8001/plugins/)  
\ –data “name=custom-plugin”

Error : {“name”:“schema violation”,“fields”:{“name”:“plugin ‘custom-plugin’ not enabled; add it to the ‘plugins’ configuration property”},“code”:2,“message”:“schema violation (name: plugin ‘custom-plugin’ not enabled; add it to the ‘plugins’ configuration property)”}

---

<div class="post-metadata">

**Author:** ![Sivadharani\_G](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sivadharani_g/32/4608_2.png) [@Sivadharani\_G](https://discuss.konghq.com/u/Sivadharani_G)\
**Post date:** [August 22, 2024, 10:10am UTC](https://discuss.konghq.com/t/my-custom-plugin-is-not-showing-in-plugin-list/12927/4 "2024-08-22T10:10:31Z")

</div>

Any one Have solution ?

---

<div class="post-metadata">

**Author:** ![rick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rick/32/4446_2.png) [@rick](https://discuss.konghq.com/u/rick)\
**Post date:** [August 23, 2024, 1:05am UTC](https://discuss.konghq.com/t/my-custom-plugin-is-not-showing-in-plugin-list/12927/5 "2024-08-23T01:05:47Z")

</div>

@Sivadharani_G

The error message provides important information. Did you install the custom plugin properly? Please try following this guide for building and installing a custom plugin from scratch. In particular the Deploy Plugin section may be of help to you.

> **[Introduction - Kong Gateway | Kong Docs](https://docs.konghq.com/gateway/latest/plugin-development/get-started/)**
>
> Documentation for Kong, the Cloud Connectivity Company for APIs and Microservices.

> [@Sivadharani\_G](#):
>
> Error : {“name”:“schema violation”,“fields”:{“name”:“plugin ‘custom-plugin’ not enabled; add it to the ‘plugins’ configuration property”},“code”:2,“message”:“schema violation (name: plugin ‘custom-plugin’ not enabled; add it to the ‘plugins’ configuration property)”}
