How to remove the Discourse chat plugin completely from an install

AI-generated summary

A user is seeking to completely remove the Discourse chat plugin from their install, rather than just disabling it through the admin settings. Victor_Berridge would like a config variable in the container build YML file to omit the plugin code. However, crcoli7307 and crcoli7307 pointed out that this might not be possible, and downgrading to an old version of Discourse would introduce security risks. Falco noted that disabling the plugin in the admin UI already stops loading the plugin JS, minimizing “wasted” resources. pfaffman suggested adding an rm -rf chat command to app.yml, but advises against it due to potential risks.

The code is disabled in the admin settings but would prefer to not waste any bits loading this plugin which we don’t plan to use.

Could not find any Discourse config parameter to disable this plugin from being loaded when the container is built (now we can only disable, but the plugin code is loaded).
Ideally, for us, would be to have a config variable in the container build YML file which instructs the build to omit this plugin code (searched and did not find one).

Thanks

I don’t believe there is a way to disable the setting in any other way than with the check box in the admin panel.

You could always use an old, unsupported version of discourse which doesn’t have the chat functionality built in, although I don’t think the security risks would be worth removing the chat function.

What bits?

After disabling the plugin on the admin UI we stop loading the plugin JS, so no bits are wasted on the transfer.

It’s possible to put an rm -rf chat in your app.yml, but I don’t recommend it for all of the reasons mentioned already, so if you want to do that you’ll need to look at some other examples of how to run commands in your app.yml.