The first step to debugging this is probably more information.
What happens when you try to connect over the Tor onion service? Are you sure your IRC client is connecting over Tor? Are there any interesting messages in the log from the Tor instance that’s running the onion service?
It’s good to train locally and test things! Tor is a complex system, and testing things out is probably the best way to learn. By the way, Tor is spelled “Tor”, not TOR
Did you set Hexchat to go through the Tor network?
We need more info:
did you follow exactly this howto?
what is your OS, and what version?
Did you try connecting from another computer so that you can be sure there is no trace of your previous config in hexchat config ?
Tor Onion services are basically internet addresses (that end in “.onion”) for which traffic stays in the Tor network the whole way. So you need the tor software on one side (the server side, to “host” the Tor service), and you need the tor software on the other side (the client, the computer which will be used to “visit” or “connect to” the onion service).
I have never used HexChat before, so there are no old settings/config there.
In the HexChat config I did as the guide and entered my xxxxxxxxx.onion address and changes the socket to socks5 and so on.
BUT, you said that the client also need to run Tor services in order to connect to IRC via my hidden services, that might be one of my problems. However, setting up the IRC server using Tor hidden services does not work. The server can not resolve the hostname and uses my local IP (127.0.0.1).
Ok, first, let’s make sure your hexchat works.
Can you please uninstall it, purge the config files (probably in ~/.config/hexchat or ~/.hexchat), and reinstall it. Do this only if you don’t care loosing all your hexchat config
Then, please follow this to make hexchat use the tor network:
Open Preferences
Network Setup
Where it says Proxy Server enter:
** localhost
** 9150
** SOCKS5
** All Connections
Change nothing else on that page and save.
Make sure Tor Browser is running because we told Hexchat to use the tor software bundled in Tor Browser (port 9150. If you want to use the system tor, use port 9050).
Try to connect to this network and join a channel.
If it doesn’t work, try to fix it!
When you have that work, add a New Server and enter your onion service address and the port you chose, and see if that works.
If it does, bravo!
If it doesn’t, could you paste here your onion config? the torrc extract that states the onion port redirection.
Could you also check your ircd config? Like the port numbers and bind addresses. You can check those if you run ss -ltpn, better as root to see process names. (-l lists listening ports, -t only tcp, -p show process name, -n do not resolve names or IPs.)