This task can be performed using OffCode TorChat
Self-hosted chat server
Best product for this task
OffCode Tor Chat is designed to make secure Tor Hidden Service hosting simple.

What to expect from an ideal product
- OffCode TorChat lets you run a private chat server as a Tor Hidden Service, so your server IP stays invisible to anyone monitoring the network.
- No third-party relay, no cloud dependency, your messages route entirely through the Tor network between your users and your own server.
- Setting up a Tor Hidden Service manually is complex, OffCode TorChat handles the configuration so you skip the technical setup and go straight to hosting.
- Network surveillance tools that log traffic metadata see nothing useful because Tor onion routing strips out identifiable connection data before it reaches your server.
- Teams and communities that need to self-host for compliance or privacy reasons get a working encrypted chat solution without exposing their infrastructure location.
