how to host a golang app on Whonix using Golang web server ?

I want to host a Golang web app and I want to host it using Golang webserver (I don’t want use NGINX or Apache along with go for performance purposes) .

I exactly followed the guide provided on /wiki/Onion_Services (I only changed port from 80 to 8081 because it’s where my server is running) ,

The service is available on , but when I check if the service is available on , I get this error :
curl : (7) : failed to connect to port 8081:connection refused .
Notes :
-The .onion address generated isn’t accessible .
-I am a non-Qubes whonix newbie user .
-My /usr/local/etc/torrc.d/50_user.conf file looks like this :

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 8081
HiddenServiceVersion 3 

-my ‘/etc/whonix_firewall.d/50_user.conf’ file looks like this :


How can I solve this problem ?

Thanks a lot .

Application needs to listen on Before that is working, everything else does not matter.


  • Reconfigure application to listen on
  • Or use something like bindp (installed by default in Whonix, undocumented).

Hi Patrick ,
I reconfigured my app to , but this makes the service unavailable on , is that Okey ?

I don’t see why not.

It’s fixed :smiley: .
Thanks Patrick we do appreciate what you are all doing to make the internet a privat/better place .

1 Like