# Unable to install/Load custom plugin

**URL:** <https://discuss.konghq.com/t/unable-to-install-load-custom-plugin/386>\
**Category:** General\
**Tags:** kong-gateway\
**Created:** [January 16, 2018, 3:19pm UTC](https://discuss.konghq.com/t/unable-to-install-load-custom-plugin/386 "2018-01-16T15:19:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_LO](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@Steven\_LO](https://discuss.konghq.com/u/Steven_LO)\
**Post date:** [January 16, 2018, 3:19pm UTC](https://discuss.konghq.com/t/unable-to-install-load-custom-plugin/386/1 "2018-01-16T15:19:40Z")

</div>

Hi, I am new to Kong. I setup a Kong Docker and it works well (Try Official 5 minutes tutorial)

Then, I try to install custom plugin : [GitHub - brndmg/kong-plugin-hello-world: A hello world example plugin for the Kong API Gateway](https://github.com/brndmg/kong-plugin-hello-world)  
Step A

1. Git Clone
2. luarocks make
3. luarocks pack kong-plugin-hello-world 0.1-1
4. luarocks install kong-plugin-hello-world

Step B: Load hello world plugin into Kong  
Try 1: Modify /etc/kong/kong.conf.default by adding custom\_plugins = kong-plugin-hello-world  
Try 2. Add kong.yml to /etc/kong/ and  
adding  
custom\_plugins:  
- kong-plugin-hello-world  
Try 3. Adding “export KONG\_CUSTOM\_PLUGINS=kong-plugin-hello-world” to .bashrc,

All the trial on Step B will restart Kong docker, but no one of them can load the plugin.

Anyone can help?

---

<div class="post-metadata">

**Author:** ![Tavernt\_Muchenje](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/tavernt_muchenje/32/1121_2.png) [@Tavernt\_Muchenje](https://discuss.konghq.com/u/Tavernt_Muchenje)\
**Post date:** [June 18, 2019, 8:50pm UTC](https://discuss.konghq.com/t/unable-to-install-load-custom-plugin/386/2 "2019-06-18T20:50:09Z")

</div>

Hi Steven,  
I’m currently facing the same issue. Did manage to get around this?

---

<div class="post-metadata">

**Author:** ![bskiefer](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@bskiefer](https://discuss.konghq.com/u/bskiefer)\
**Post date:** [June 26, 2019, 1:28pm UTC](https://discuss.konghq.com/t/unable-to-install-load-custom-plugin/386/3 "2019-06-26T13:28:23Z")

</div>

I’m on 1.2 and I used the environment variable `KONG_PLUGINS`. Be sure to include `bundled,kong-plugin-hello-world`. If you leave out `bundled`, it will only load the hello-world plugin. Are you getting any error such as `plugin is enabled but not installed`?

All I had to do is set that env and luarocks install and it showed

---

<div class="post-metadata">

**Author:** ![Tavernt\_Muchenje](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/tavernt_muchenje/32/1121_2.png) [@Tavernt\_Muchenje](https://discuss.konghq.com/u/Tavernt_Muchenje)\
**Post date:** [June 26, 2019, 1:45pm UTC](https://discuss.konghq.com/t/unable-to-install-load-custom-plugin/386/4 "2019-06-26T13:45:53Z")

</div>

All sorted now. Thanks @bskiefer!

---

<div class="post-metadata">

**Author:** ![Sachin\_Ghumbre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sachin_ghumbre/32/2737_2.png) [@Sachin\_Ghumbre](https://discuss.konghq.com/u/Sachin_Ghumbre)\
**Post date:** [March 1, 2023, 9:40am UTC](https://discuss.konghq.com/t/unable-to-install-load-custom-plugin/386/5 "2023-03-01T09:40:35Z")

</div>

Hi @Steven_LO ,

I am too late to answer your query, however I want to get this documented for others who face the same issue. Hence, commenting my response as below:

You have to set below mentioned two environment variables either in your docker file or through export command of linux:

```auto
KONG_LUA_PACKAGE_PATH="/usr/local/kong/custom/?.lua;;"
KONG_PLUGINS="bundled, MY_CUSTOM_PLUGIN"

```

After this, just restart the Kong gateway

```auto
docker exec -it KONG_CONTAINER_ID_OR_NAME
kong restart

```
