# How to server.plugins.xpack\_main.registerFeature on the new platform?

**URL:** https://discuss.elastic.co/t/how-to-server-plugins-xpack-main-registerfeature-on-the-new-platform/245493
**Category:** Kibana
**Created:** [August 18, 2020, 9:06pm UTC](https://discuss.elastic.co/t/how-to-server-plugins-xpack-main-registerfeature-on-the-new-platform/245493 "2020-08-18T21:06:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![npm\_install](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@npm\_install](https://discuss.elastic.co/u/npm_install)
#### Post date: [August 18, 2020, 9:06pm UTC](https://discuss.elastic.co/t/how-to-server-plugins-xpack-main-registerfeature-on-the-new-platform/245493/1 "2020-08-18T21:06:43Z")

</div>

Hi,

I have created a basic plugin using the [plugin generator](https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html#_plugin_generator), and I have been reading documentation about different legacy functionality and the new platform equivalents. However, I cannot find an example of how to register a feature using xpack from this [documentation](https://www.elastic.co/guide/en/kibana/7.8/development-plugin-feature-registration.html) (which is in the legacy format). I see that the current version of the documentation doesn't have this page anymore. Is there any documentation or guidance I can follow to register a feature so that I can use the ui capabilities (or whatever the equivalent is in the new platform)?

Thanks!

---

<div class="post-metadata">

### Author: ![poff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poff/32/81795_2.png) [@poff](https://discuss.elastic.co/u/poff)
#### Post date: [August 18, 2020, 9:31pm UTC](https://discuss.elastic.co/t/how-to-server-plugins-xpack-main-registerfeature-on-the-new-platform/245493/2 "2020-08-18T21:31:55Z")

</div>

Hey there!

Our plugin documentation is being updated with the roll out of the new platform. In the mean time, checkout this migration doc in the kibana repo: [https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md#plugin-services](https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md#plugin-services)

The `registerFeature` function has migrated to the `features` plugin. So, in the new plugin system, you'll have to add the `features` plugin as a dependency and then you can call `plugin.features.registerFeature` from your plugin's setup function. You can see how Canvas does it here: [https://github.com/elastic/kibana/blob/master/x-pack/plugins/canvas/server/plugin.ts#L40](https://github.com/elastic/kibana/blob/master/x-pack/plugins/canvas/server/plugin.ts#L40)

---

<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: [September 15, 2020, 9:32pm UTC](https://discuss.elastic.co/t/how-to-server-plugins-xpack-main-registerfeature-on-the-new-platform/245493/3 "2020-09-15T21:32:10Z")

</div>

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