Chat server host name problem

Hello everyone,

i have correctly setup the ejabberd chat server. My problem is that i had to change host name in ejabberd.cfg because my server is hosted in and the file only had in the settings. After an update is stopped working and i went to check the file again and the part was removed. There was only Is there a way to keep it permanently?


You can use a custom template, but if the domain is not properly detected there might be something else wrong.

For custom template: didn’t test it but should be something along the lines of:

mkdir -p /etc/e-smith/templates-custom/etc/ejabberd/

Then copy there the ejabberd config file and modify it.

1 Like

Excuse me but i’m not familiar with custom templates. What will it do exactly? Whenever i update it will keep this setting?

Me neither. But basically, the settings you set there will take prevalence, and remain after reboots and updates.

There is more detailed info on the Developers Manual, but first you can read to make sure you didn’t miss some setting.

I get how it works but if there’s a better or different method i’d like to hear it.

There’s no mention in the docs about host name unfortunately.

What i noticed is in the Server Name module i have hostname set to office and domain to Maybe ejabberd gets the hostname from there?

1 Like

AFAIK, the Host name field is the domain name. Here’s my server:
% Host name:
{hosts, [“”]}.

And it works as expected with pidgin or empathy.
Maybe you need to adjust something on the xmpp client?

The thing is it should connect to which is the server running nethserver and not which is a different server. In the host name it defaults to whenever i update/install/remove something and not to

Could this be related?

If NethServer is also the DNS server of the network, the client should automatically find the server’s address through special pre-configured DNS records. Otherwise, specify the server address in the advanced options.

In the DNS module where it says DNS Servers it’s set to, in the Hosts there’s and Server Alias is empty. Where are the advanced settings that it says? In the chat server module i can only enable or disable ejabber.

It refers to the advanced settings on the client side.

Oh, i don’t think that’s the problem as the configuration file changes from having the host set to to Not 100% but pretty sure it has something to do with this.

Not sure if this will be of help as your setup might be different, but did a quick test on a VM (first time config, without using a real domain).

NethServer acting as Gateway (DHCP, DNS server).
ejabberd installed without changing any file.
Users created on the server.

On LAN, xmpp (pidgin) clients configured with:

  • Username: userx
  • Domain:
  • Password: userx-password

Anything else left as per defaults.
LAN clients were able to chat.

For external xmpp (pidgin) client used same settings but adding the server address on pidgin’s Advanced tab (connect server), and configuring my router to forward xmpp ports to the server.

Also tried from mobile phone with Conversations xmpp client, configuring it with the server address (used Public IP address, as had no real domain prepared). External client was able to chat.

With a real domain you might need to configure DNS SRV records. I think @filippo_carletti and @tzar can help you better on that. :wink:

Continuing the discussion from Ejabberd service won't start:

The ejabberd web interface is disabled by default, but can be enabled as per @giacomo indications:

config setprop ejabberd WebAdmin enabled
signal-event nethserver-ejabberd-save

Then you can access as, for instance, at https://ip-address-or-domain:5280/admin/

I get it but the problem is that is a different server in a different place used to host the website. leads to the server that has jabber so if the client uses it will try to connect to a different server to no avail.

Also i used the commands to enable webadmin interface but i only get this written in the browser when i try to connect to it using LAN IP:

<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='' id='3195391253' from='' version='1.0'><stream:error><xml-not-well-formed xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error></stream:stream>

I’m using in pidgin to connect to the server and not an IP address. If i change the config file from to it works perfectly. Even further now that i run the commands for enabling the webadmin interface the config file was again changed to use instead of the and pidgin fails to connect.

I really appreciate your time and sorry for asking so many questions but i can’t seem to fix it.

@LamboLighting, did you sorted it out? If not, lets see if someone can help.

P.S. About the xml message you may have tried to access the wrong port number.