# Enable a module extension by default in a sefhosted directus instance

**URL:** <https://community.directus.com/t/enable-a-module-extension-by-default-in-a-sefhosted-directus-instance/790>\
**Category:** Help\
**Created:** [July 17, 2025, 5:41pm UTC](https://community.directus.com/t/enable-a-module-extension-by-default-in-a-sefhosted-directus-instance/790 "2025-07-17T17:41:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ted\_Steen](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/ted_steen/32/627_2.png) [@Ted\_Steen](https://community.directus.com/u/Ted_Steen)\
**Post date:** [July 17, 2025, 5:41pm UTC](https://community.directus.com/t/enable-a-module-extension-by-default-in-a-sefhosted-directus-instance/790/1 "2025-07-17T17:41:42Z")

</div>

There seem to be no way to automatically enable a module extension by default (please correct me if I’m wrong) so I figured I would add a hook as well and enable it programmatically in ”init”/”app.after”.

Basically I build my directus docker image myself where I include these extensions. Problem is I cant figure out how to actually enable the module extension programmatically. I have access to the SettingsService and the database but the documentation for these internal tools is pretty sparse.

Any pointers as to how to achieve this?

Thanks!
