# How to configure a plugin?

**URL:** <https://janus.discourse.group/t/how-to-configure-a-plugin/1541>\
**Category:** General\
**Created:** [March 17, 2025, 7:43pm UTC](https://janus.discourse.group/t/how-to-configure-a-plugin/1541 "2025-03-17T19:43:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwarfman78](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dwarfman78](https://janus.discourse.group/u/dwarfman78)\
**Post date:** [March 17, 2025, 7:43pm UTC](https://janus.discourse.group/t/how-to-configure-a-plugin/1541/1 "2025-03-17T19:43:02Z")

</div>

Hi, I’m new here and sorry that question must have been asked multiple times but the documentation doesn’t tell clearly how to add/configure a plugin. I have found some examples but where am I supposed to put them in? (which file?)

thanks

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [March 18, 2025, 1:27am UTC](https://janus.discourse.group/t/how-to-configure-a-plugin/1541/2 "2025-03-18T01:27:33Z")

</div>

Existing plugins have [configuration files](https://github.com/meetecho/janus-gateway/tree/master/conf) that are installed in the `etc` folder. They’re all extensively documented.

Adding new plugins is usually not needed, unless you have some very specific requirements. A relatively easy way to create new plugins is by using the [Lua](https://janus.conf.meetecho.com/docs/lua) or [Duktape](https://janus.conf.meetecho.com/docs/duktape) plugins, which allow you to define some custom logic using Lua and JavaScript. If you want to create a new plugin from scratch in C, you’ll need to refer to [plugin.h](https://janus.conf.meetecho.com/docs/plugin_8h.html), and maybe check existing 3rd party plugins as a reference (our own [janus-ndi](https://github.com/meetecho/janus-ndi) is a good example). But again, I don’t think you really need that, as the existing plugins are all flexible enough to cover most use cases.

---

<div class="post-metadata">

**Author:** ![dwarfman78](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dwarfman78](https://janus.discourse.group/u/dwarfman78)\
**Post date:** [March 18, 2025, 5:27pm UTC](https://janus.discourse.group/t/how-to-configure-a-plugin/1541/3 "2025-03-18T17:27:25Z")

</div>

thanks, I thought those were examples you had to copy to the main file but what’s in /etc/janus is the actual active configuration that corresponds to the demo website, so you have to comment and remove what you don’t want. It’s a bit concerning to have so many ports opened by default to be honest.

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [March 19, 2025, 12:56am UTC](https://janus.discourse.group/t/how-to-configure-a-plugin/1541/4 "2025-03-19T00:56:48Z")

</div>

> [@dwarfman78](#):
>
> It’s a bit concerning to have so many ports opened by default to be honest.

You can configure how many ports to open, but with WebRTC you’ll need at least one port per active session anyway.
