2

Goal: start the tor service on Windows 10 with specified torrc.

My attempt:

1 step. tor --service install -options -f C:\TorBrowser\torrc

2 step. Trying to start the service... I get the error.

Error 1064


torrc file located in C:\TorBrowser\torrc:

Bridge <<SOME VALUE>>
Bridge <<SOME VALUE>>
Bridge <<SOME VALUE>>
DataDirectory C:\TorBrowser\Browser\TorBrowser\Data\Tor
ExcludeExitNodes <<SOME VALUE>>,{??}
GeoIPFile C:\TorBrowser\Browser\TorBrowser\Data\Tor\geoip
GeoIPv6File C:\TorBrowser\Browser\TorBrowser\Data\Tor\geoip6
Log notice file TorBrowser/Tor/notice.log
SocksPolicy accept private:*,reject *:*
SocksPort 9051 CacheDNS UseDNSCache
StrictNodes 1
TrackHostExits <<SOME VALUE>>
UseBridges 1

Where <<SOME VALUE>> is some value :)

When I use Tor Browser with that torrc file — all OK.

When I try to run C:\TorBrowser\Browser\TorBrowser\Tor>tor.exe -f C:\TorBrowser\torrc the process tor.exe starts and dies in ~one second.(I looked in the Task Manager.)


The similar Tor ticket.

The only way to create a running tor service for a relay is to use the "sc create..." in cmd command line as irc#tor suggested. So this is how it works: sc create "Tor Win32 Service" binPath= "\"C:\tornou\Tor\tor.exe\" --nt-service -f \"C:/tornou/Data/Tor/torrc\""

I tried this solution. The problem remains, the service does not start (with Error 1064).

Any help is welcome!

  • Are the permissions set appropriately? and the Log file notice ... line provides a relative path, do you know which directory it will be relative to when the Tor service starts? – cacahuatl Jul 4 '17 at 21:47
  • Also can you please include any output from the log file? (with bridge addresses redacted, of course) – cacahuatl Jul 4 '17 at 21:52
  • @canonizingironize What permissions do you have in mind? "do you know which directory" – C:\TorBrowser\Browser\TorBrowser\Tor\notice.log. Log example (I started the browser, launched a couple of applications, closed the browser. Attempts to start the service do not leave anything in the log file.) – Woland Jul 5 '17 at 15:34
  • Try making the Log file a non-relative path. The command line will produce no output on Windows because cmd.exe doesn't handle it. It's likely reporting some error that you cannot see. – cacahuatl Jul 5 '17 at 16:22
  • @canonizingironize You are a wizard! Many thanks! :) P.S. Post your comment as an answer and I will mark it as correct. – Woland Jul 5 '17 at 20:28
0

The log line is a relative path, within Tor Browser this normally works because it is careful about the directory it is in when it interprets the relative path.

Log notice file TorBrowser/Tor/notice.log

You should instead make it an absolute path instead to ensure it's opened in the correct location. e.g.:

Log notice file C:\TorBrowser\Browser\TorBrowser\Tor\notice.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.