I need help setting up an XMPP server with the TOR modules

Anyone here has experience with the TOR modules and how I could use my TOR server to enforce its traffic through the TOR network, also need help to setup my localhost with an .onion adress. If anyone knows how to do this please let me know. I managed to get my XMPP server running on the clearnet by obtaining a TLS certificate (letsencrypt path), but I want to try something else now. Btw I use prosody.