Configuration fails due to server detected as localhost

Hi,

I have installed Rocket.chat through snap. The server is an Ubuntu 20.14 and I can access the GUI through my browser. The server has its own IP (so it is not localhost) but whenever I finish the very first configuration all I get is “The link to your server localhost”.

This “localhost” makes my next steps fail (Cloud configuration) as no correct URL redirection is formed. My /etc/hosts is as follows:

127.0.0.1 localhost
127.0.1.1 chat.xxxx.com chat

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
62.171.183.64 chat.xxxx.com

I am pretty sure I must be doing something wrong with my server name or previous configuration, but cannot find where.

Can you please point me to what could be wrong?

Thanks in advance,

Jose