The questions (1 2) about it are for mac OS. I'm strugling with windows 10.

I downloaded tor brownser and added that to the torrc file (I want to use it with scrapy)

    ControlPort 9051
    HashedControlPassword password_XYZ

(before I launch the cmd tor --hash-password "password_XYZ" )

But now the brownser doesn't work anymore. Tor unexpectedly exited.

(I tried to use the "Tor Expert Bundle on Windows" (comes without brownser) but I did not find any torrc files on it so I don't know how to use it to add the code above).

1 Answer 1


The HashedControlPassword line is the issue.

HashedControlPassword password_XYZ

When you run tor --hash-password you should get output like this

$ tor --hash-password password_XYZ

Then you want to put the output into the HashedControlPassword torrc line so it looks like this

HashedControlPassword 16:54C092A84F51545F600F6DEC3CEC93D16DE4C941FE12686CD10B8F4F3E

On Windows, the tor.exe process won't display output properly on the cmd.exe terminal. A work around for this is to pipe it into more, e.g.

tor.exe --hash-password password_XYZ | more

This should then display the output, giving you the hashed password to put into the torrc

  • thanks! I could get the 16:string... using tor.exe --hash-password password_XYZ | more and addd it to the torrc but it still doesn't work: the torrc look like i.imgur.com/Bld0cbF.png ( I did tor --service remove and then tor --service install -options ControlPort 9051 to relaunch it. I tried to reboot the computer but no luck).
    – J. Does
    Commented Oct 30, 2017 at 21:55
  • 2
    Ah, so you've added the service. Tor Browser launches it's own copy of Tor, if they're both using the same torrc then you'll already have a copy of Tor running and the one Tor Browser tries to launch will not be able to bind to the same port as the already running service. You should try removing the service, it's not required on Windows with Tor Browser.
    – cacahuatl
    Commented Oct 30, 2017 at 23:28
  • yes, you were right launching tor --service remove did solve the problem. Oh man that was vicious. Thanks a lot for your time!
    – J. Does
    Commented Oct 31, 2017 at 21:40
  • 1
    Tor Browser opens a control port on port 9151 by default, if you use that in your python code it should work.
    – cacahuatl
    Commented Oct 31, 2017 at 23:40
  • 1
    Tor Browser is different, if you're starting Tor from Tor Browser parts of it are already configured so it will create a control port on port 9151 and you should be able to just replace with Controller.from_port(port = 9051) as controller: with with Controller.from_port(port = 9151) as controller:, socks5:// with socks5:// and start Tor Browser and it will work, also you don't need the password authentication option since it will use cookie auth.
    – cacahuatl
    Commented Nov 2, 2017 at 1:54

You must log in to answer this question.

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