Adding UI chat (xmpp) options

I have been using the Chat (XMPP via ejabberd) with Nethserver and noticed that it gives the option for enabling common modules out of the box, like Message Archive Management (MAM) and Server to Server (S2S, required for chatting with people outside of your own server).

These are great and very close the the bare minimum needed to run your own server. The main item I find missing is XEP-0363 (mod_http_upload), which is necessary for sending files through XMPP without manually uploading them somewhere else and pasting a URL.

I asked a question on this site and was pointed in the right direction to get it working on my server. I understand that I will need to make any of my configuration changes in the template files in order for them to persist. I notice that the other modules (MAM and S2S) are already in the template for configuring via setting variables which comes from the ejabberd settings in the Neth admin page. It seems like it would not be much more work to just add the option to the webpage to allow this to be turned on and off, and share this improvement with others.

How can I set setting variables from the admin page (in the old control panel or the new one), and how can I share this with others as an “out of the box configuration option” for Nethserver?


You’re referring to this post:

Appreciate your proposal. I think you’re right and it is a good idea to add it to the server-manager for everyone’s benefit. Your timing is perfect because, as soon as time allows, developers will start working on upgrading ejabberd to a new version.

For the old UI (following MVC design pattern), briefly would be something like:

  • adding a config default variable for the setting
  • enabling the module on ejabberd.yml through an existing/new default template, based on status of the config default (example using Perl syntax).
  • declaring the setting in the Module
  • adding setting on the UI View Template
  • adding labels on Language file
  • adding details on the documentation (1, 2)

Hope the list of steps does not seem daunting, it is easier than it seems (take a look at the code for similar setting).
More info in the developer manual.

For the new Cockpit UI I don’t know, I just can point you to its documentation. I’m sure developers will be able to assist you better and help you along the way if you have any doubts. Don’t hesitate to ask.


Yes it it easy to add the module.
I have already done changes for actual ejabberd (code/langs/…), I wait integration of my changes quickly and after an upgrade to ejabberd 19.09.1+ (master).

@Neustradamus - it sounds like procrastination may have paid off! In any case, I have updated my original post with the steps I took to enable this module using some config variables and the templating system.

It sounds like you’re much more experienced than me on it, so you probably know all of it already and can even point out some places it can be improved.

The main thing I think should be considered in this “update” is to change the 40Listen template. It has some S2S settings in there that are NOT listener related, and it makes it impossible to add on additional templates through the custom template and requires the user to overwrite the 40Listen template in order to add a listener. I could be wrong on this, it’s just my understanding of ejabberd configs and the Nethserver template system.

@dnutan - thanks for the information. Last night I started digging around and remembered that it’s probably configured somewhere in Cockpit, and that’s where the configuration is heading anyway. I was thinking of taking a stab at updating the existing Cockpit plugin for ejabberd, but if it is on the roadmap for the experts then I think it’s best left to them. :smiley:

To integrate a work, it starts from a github pull request, you should starts one at least with the backend, we could think after all if it worths to continue, the frontend could be done by the dev team.

Guys you really need to love cockpit, it is a nice dev environment :slight_smile:

Do not be scared of it

A post was merged into an existing topic: Ejabberd 19 upgrade

@djx, @Neustradamus, let’s discuss the new ejabberd 19 features in the #feature thread.

We develop new features for Cockpit only. Do not waste time on the old Nethgui :smiley:

You pointed @djx in the right direction :wink:

1 Like

I think, it is not hard to add an option in nethgui “enable or disable” this XEP support :slight_smile:
It is like S2S and 5223 port too.