You probably won’t want your chat to be out in the open but encrypted - and encryption requires a certificate and such certificate is only issued to a domain name and never issued to an IP address.
The reason for this is that an IP address can host multiple domains and as such not eglible for a certificate.
But you could try installing onionshare as this provides you with an encrypted platform - for among a few others - a chat.
Read the documentation Installation — OnionShare 2.3 documentation
onionshare from repo out of date and don’t work.
The comment linked below contains two options for successfully installing and running onionshare
One person runs the onionshare chatengine - everybody connects using the Tor browser and the onion address - either from GUI or terminal
An article by the lead developer of onionshare can be found at his website
To start a chat server In a terminal run
onionshare --chat