Configuration fails due to server detected as localhost


I have installed 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: localhost chat

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

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,