In torrc, I have come across both these lines:
HiddenServicePort 80
HiddenServicePort 80

Can anyone explain what their differences are?

2 Answers 2


The only difference between and is the exit port of you local web server, or also known as the listening port.

It is the port number your locally running web server, whether it be Apache, Nginx, etc, is open to incoming requests.

To find out which port your server is using, check the configuration file in the server's installation directory, or just use 80 if you haven't changed any defaults.


The first number is the port on which the HS accepts connections.
The address+port is the actual (web?) server that the HS connects to.

In your second example:
HiddenServicePort 80 The web server listens to port 8080, but the HS accepts connections to port #80. (Which is the default for http, so clients don't have to specify a port number.)
In this case, Tor and the web server live on the same host, so Tor connects to (localhost) but if they don't live on the same host, then the HiddenServicePort directive should have the address (and port) of the web server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .