Configure server xmpp

Hi I would like to use nextcloud’s xmpp chat but this is the first time I’ve been confronted with the prosody configuration.

I saw in the options that there were several configuration choices including an internal and an external server choice.

Can you explain me the difference between these two choices? Because it says that choosing the internal server limits the functionality of the server but then it means that calls are only possible using the external server option?

I was thinking of adding the talk TURN server configuration to the server again but it doesn’t seem to work.

Instead you have to enter BOSH URL and xmpp domain … can you tell me what this is and how to configure it?

I went to see the official prosody doc but nothing is typically specified for nextcloud so before going into the editor I’d rather ask you

I see thank you in advance


You need both. The XMPP domain is needed for determining the user account JIDs and the BOSH Url is the XMPP to HTTP proxy that comes with Prosody or Ejabbered (this is needed because in browser clients are not allowed to directly talk to the 5222 port XMPP uses normally).

For Prosody see:

I believe with Ejabberd Bosh is enabled by default.

Or you could use Snikket, which is a new initiative by the Prosody authors to provide an easy to install and preconfigured version of Prosody:

For STUN/TURN, you can either use the one build into ejabberd (use version 20.04 or later) or set up a Coturn server for Prosody.

Edit: For very nice integration of Nextcloud accounts with JSXC you can use

But setup of that is a bit more involved :slight_smile:
1 Like

Thank you for your answer! I’d have to look into setting this up seriously.

For the moment another more annoying problem has appeared, on the chat only the first message is sent correctly. The other messages, whether it’s rate recipient or rate messenger, load indefinitely and are never received. I just looked at github and a similar problem was seeing who was capitalizing the user’s name, but that’s not the case this time.

If you ever know how to solve the problem? Do you ever know how to solve the problem?

With the internal simplified server? No idea, might be a bug (file an issue on Github).
I doubt the internal php server is really tested anymore and you should really try to use a proper XMPP server. The internal one is a legacy code base from long ago when there was no other chat solution for Nextcloud. IMHO it should be just removed as it just gives a wrong impression of all the real features JSXC has.

Then of the blow I followed your councils and installed normally all that it was necessary I thus have well access to openfire only at the time to return the bosh url I have this which is displayed:

Cross domain request was not possible. Either your BOSH server does not send any Access-Control-Allow-Origin header or the content-security-policy (CSP) blocks your request. The savest way is still to use Apache ProxyRequest or Nginx proxy_pass.

This is the first time I’m setting this up so I’m trying to figure out how to make it work.

Hmm, I have never setup OpenFire. If you can, rather use Prosody or ejabberd; much better community support.

Googling for you problem seems to indicate this:

First try to enable CORS as shown in the screenshots. Otherwise try to follow the advise with the reverse proxy.

While running stuff behind a reverse proxy (I like Traefik, but Nginx and Apache work) is generally advisable, I do wonder why it is necessary in this case.

Checkout our guide for Debian which we used for some workshops. It should cover every aspect for a newbie to XMPP.

Good evening to all,

I take the liberty to reopen this post because since maybe things have changed, I’m trying again the installation of the chat. This time I have more time than when the other message was posted so it will surely be easier (I hope) currently my subdomain (the one that suits a nextcloud instance) is configured with a hsts header and I put on the list of https preloads.

I see that in our old conversation we are talking about various links that are supposed to be done in localhost between the server where the xmpp software is installed and the client, do you think that the fact that the site is on this preloading list could be a problem?

PS: I try to look for recent tutorials in case things have changed in the configuration between now and 2 years ago, if you know of any I’m interested! I guess I’ll also ask you again because I think I’ll have some problems and more questions to ask you soon.

Thanks in advance to all