Openfire only working on localhost

Hello there,
I have recently got introduced to this XMPP protocol and Openfire is almost best Open Source server I can look for.

Yet there is many issues that i am encountering. I have created server in Openfire with domain name openfire.demo as well as FQDN openfire.demo and using MySQL MariaDB as a database. Server setup is perfect as per the documentation says. And all functions are working well.
But only with “localhost”.

I have my server name and FQDN as openfire.demo. I used Candy web client in server web clients page it shows that i can access that using http://openfire.demo:7070/Candy but i can’t access that client from that instead i have to put http://localhost:7070/Candy and it works.
Same with Spark and Pidgin…

In Spark if I just use default settings then I am not able to connect is shows error “Invalid name or server not found” but if i put localhost as host in advanced tab then it connects…
In pidgin it’s the same issue if i use localhost as hostname then it connects or else it shows “Unable to Connect” error…
Can anyone tell me about this issue…

It should not be related to port forwarding as I am only using it in my LAN

This appears to be a networking issue, not an Openfire issue. When you use ‘openfire.demo’ as the FQDN and XMPP domain name of your server, then your network infrastructure must also identify the server on which you run Openfire by that same name. This typically involves setting the hostname of the server, and setting DNS records.