# How to access kibana.yml parameters in Custom Kibana Plugin 7.10.0

**URL:** <https://discuss.elastic.co/t/how-to-access-kibana-yml-parameters-in-custom-kibana-plugin-7-10-0/310149>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [July 20, 2022, 12:38pm UTC](https://discuss.elastic.co/t/how-to-access-kibana-yml-parameters-in-custom-kibana-plugin-7-10-0/310149 "2022-07-20T12:38:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hackwithharshil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hackwithharshil/32/98856_2.png) [@Hackwithharshil](https://discuss.elastic.co/u/Hackwithharshil)\
**Post date:** [July 20, 2022, 12:38pm UTC](https://discuss.elastic.co/t/how-to-access-kibana-yml-parameters-in-custom-kibana-plugin-7-10-0/310149/1 "2022-07-20T12:38:27Z")

</div>

Holla !

- I am using 7.10.0 version of kibana and I need to access kibana.yml's parameters in custom Plugin (consisting backend and frontend).

plugin.ts

```auto
constructor(initializerContext: PluginInitializerContext) {
    this.logger = initializerContext.logger.get();
    this.environmentConfig = initializerContext.env;
  }

  public setup(core: CoreSetup<AividInsightsPluginStartDeps>, deps: AividInsightsPluginSetupDeps) {
    this.logger.debug('aividInsights: Setup');
    const router = core.http.createRouter();

    core.getStartServices().then(([_, depsStart]) => {
      // console.log(_, depsStart, this.environmentConfig);

      const serverConfigData = {
        esClient: _.elasticsearch.client,
        //@ts-ignore
        esHosts: _.elasticsearch.client.config.hosts,
        //@ts-ignore
        additionBasePath: _.http.basePath.get(),
        ..._.http.getServerInfo(),
        environmentConfig: this.environmentConfig,
        IS_SERVER_LIVE: this.environmentConfig.mode.prod,
        NODE_JS_BASE_URL: this.environmentConfig.mode.prod
          ? PROD_NODE_JS_BASE_URL
          : OVERWRITE_DEV_JS_BASE_URL ||
            //@ts-ignore
            `${_.elasticsearch.client.config.hosts?.[0]
              ?.slice(0, -6)
              .replace('http:', 'https:')}:32000`,
      };
      registerRoutes(router, depsStart.data, this.logger, serverConfigData);
    });

    return {};
  }

```

I tried using the given parameters of plugins (intializerContext, core, deps) but I still have not found yml variables.  
Is there any variable available that consists the parameters of yml.  
I want to access **server.ssl.enabled , server.ssl.certificate , server.ssl.key , server.name**

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [July 22, 2022, 8:29pm UTC](https://discuss.elastic.co/t/how-to-access-kibana-yml-parameters-in-custom-kibana-plugin-7-10-0/310149/2 "2022-07-22T20:29:45Z")

</div>

Hi @Hackwithharshil and welcome to the community!

Kibana configuration is accessible through the `initializerContext.config` API.  
You should also be able to access the configuration from the plugin that registers the settings if you add that plugin as a dependency to yours.

It's challenging to provide the exact code to suit your needs but a great place to start is to look at the examples given for how to use [config in the Kibana platform](https://www.elastic.co/guide/en/kibana/7.12/migrating-legacy-plugins-examples.html#config-migration).

You'll also find other examples in Kibana's code in the x-pack plugins folder.

I hope that helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 19, 2022, 8:29pm UTC](https://discuss.elastic.co/t/how-to-access-kibana-yml-parameters-in-custom-kibana-plugin-7-10-0/310149/3 "2022-08-19T20:29:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
