ODK Aggregate redirecting back to localhost

What is the problem? Please be detailed.
My ODK Aggregate redirects to localhost:8080 when opened. This is ok on the server I have installed it on but it does the same even when I try to access it from another computer or device. Example, if my server IP address is 192.168.1.1, then I use http://192.168.1.1:8080 to access it (I renamed the war file to ROOT.war). It redirects to localhost:8080. So I cannot access it other than on the local server.

What ODK tool and version are you using? And on what device and operating system version?
I'm using version 1.5 with MySQL 5.7 and Tomcat 8 running on MS server 2016.

What steps can we take to reproduce the problem?
Do a local server (Tomcat8) install with MySQL 5.7 on Server 2018, allow port 8080 through the firewall and access the application from another computer on the local network.

What you have you tried to fix the problem?
Read through the logs and I've seen this line:
'INFO: Incoming servername: server ip address expected: local host - - redirecting.'

What am I doing wrong?

When you installed Aggregate, the installer asked you for a fully qualified domain name. It sounds like you might have put localhost? Re-run the installer and put an externally accessible fully qualified domain name.

Thanks a lot. That worked.