How to make tor browser work with the system tor service rather than the tor service provided with the browser.

Certain files in the Browser folder must be changed.

PS: I start the tor service on Linux with

# service tor start

2 Answers 2


From the guide I wrote, available on the Tor Project wiki here:

Add or edit the following lines in your torrc:

# add these flags to SocksPort to act like Tor Browser
SocksPort 9050 IPv6Traffic PreferIPv6 KeepAliveIsolateSOCKSAuth
ControlPort 9051
# only add these if they're *not* already defined in /usr/share/tor/tor-service-defaults-torrc
# i.e. if you're not using debian, ubuntu or one of their derivatives
#CookieAuthentication 1
#CookieAuthFile /var/run/tor/control.authcookie
#CookieAuthFileGroupReadable 1

Now reload Tor

sudo service tor reload

Then add your user to the group that the tor daemon runs as, on debian, ubuntu and similar this is debian-tor

sudo usermod -a -G debian-tor $USER

This will require a full log out and back in to take effect.

Now we need to add some environment variables that Tor Button and Tor Launcher will respect. Create a file called somthing like /etc/profile.d/99_tb.sh and add the following to it:

# Use system daemon socks port
export TOR_SOCKS_PORT=9050
# Use system daemon control port
export TOR_CONTROL_PORT=9051
# Don't launch a second tor instance, and don't take ownership of it.
# Tell it where to find the control auth cookie
export TOR_CONTROL_COOKIE_AUTH_FILE=/var/run/tor/control.authcookie

This will also require a full log out and back in to take effect.

Now when you launch Tor Browser, it should use the local tor daemon instance instead of starting it's own.

  • Isn't it easier to disable the TorButton and TorLauncher extensions in the browser and set up the proxy via preferences? Commented Nov 25, 2016 at 19:13
  • deleting the addons is uglier, more annoying (no NEWNYM, New Tor Circuit, Security Slider) and requires reapplication on new installs, these tweaks persist.
    – cacahuatl
    Commented Nov 25, 2016 at 19:59
  • What are the differences on using Tor systemd service? Is there any advantages on doing this?
    – admin
    Commented Nov 27, 2022 at 14:51

I realize the more recent versions of tor browser already contain the instructions (edit: they are different from the ones given in the tor wiki, which works for tor browser 5.x). For the benefit of other users, I have edited the tor wiki (onion) to include it. To quote it verbatim:

How do I make Tor Browser 7.x (may work for later versions) use the tor that is already running on the system?

See the section Using a system-installed Tor process with Tor Browser in the file $TB_INST_DIR/Browser/start-tor-browser where $TB_INST_DIR is your tor browser installation directory (e.g. tor-browser_en-US) for instructions. Alternatively, you can view them ​​online (​onion). Be careful, the online version is on the master branch, which may be too new for your tor browser. When in doubt, follow the one coming with your tor browser.

You must log in to answer this question.

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