Path to "torrc" file? Using Flatpak Tor Browser

Where is the torrc configuration file stored at ? I need the full path.

I am using Flatpak Tor Browser 15.0.2. Not the Flatpak from the Stable repository. I found a “torrc” file at /etc/tor/torrc But any edit to this file are ignored somehow by Tor Browser.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Below is the same as above. But with details for those interested.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Using

• Debian 12 Bookworm

• GNOME 43.9

• Flatpak Tor Browser Launcher 0.3.9

• Tor Browser 15.0.2

• Tor 0.4.7.16-1

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

**Steps to reproduce**

1 . Install this Flatpak https://flathub.org/en/apps/org.torproject.torbrowser-launcher

2 . Using the installed Tor Browser Launcher above, install **Tor Browser**

3 . Exit **Tor Browser**

4 . Using a text editor, edit the torrc configuration file at /etc/tor/torrc At the bottom of this file, add those two lines:
ExitNodes {ca},{us}
StrictNodes 1

5 . Using Terminal, execute this command to reload the configuration file
sudo systemctl reload tor.service

6 . Using Terminal, execute this command to restart tor
sudo systemctl restart tor.service

7 . Start Tor Browser

8 . Somehow the StrictNodes are ignored. 95% of the time, the ExitNodes are other random countries. This is the second challenge.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

**Notes**

• Why using ExitNodes and StrictNodes? For my testing software services for software engineers.

• I understand all the risk of using ExitNodes and StrictNodes. Per above, my primary need is using Tor ExitNodes Tor testing.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

**What I tried that failed**

• Searched for torrc configuration file stored in other location. I found none. The only one is at /etc/tor/torrc But it is suspiciously hold. Dated way back from 2023.

• Double-checked that the permissions are appropriate on the configuration file at torrc /etc/tor/torrc

• Searched for a .torrc file at /<USERNAME>/.torrc but found none

• Using Flatseal at https://flathub.org/en/apps/com.github.tchx84.Flatseal Allowed access to all files on the devices. Including, but not limited to, /etc/tor/torrc

• Tried another device

• Rebooted devices

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

**Cause of this challenge**

Below are theories about the cause of this challenge.

Theory 1
Somehow, Tor Browser does not have reading access to the file at /etc/tor/torrc

Theory 2
Somehow, the Flatpak version of Tor Browser install and use a torrc configuration file which is stored elsewhere. When searching, sometime I get a result at /run/user/<NUMBER>/doc/<RANDOM.CODE>/etc/tor/torrcI am guessing that, after the Flatpak Tor Browser starts, this is a temporary file is created by Flatpak.

Tor Browser is a self-contained application containing its own configuration file (torrc). It is located in the following directory relative to the top level directory Tor Browser was installed to: tor-browser\Browser\TorBrowser\Data\Tor, see this screenshot from my system (Linux Mint 22.2):

With a Flatpak installation you’ll need to start by finding where Flatpak installs Tor Browser to. On my system this would be /var/lib/flatpak/app/. I believe you can get the location of the Tor Browser Launcher app like so: flatpak info --show-location org.torproject.torbrowser-launcher. The torrc for your Flatpak Tor Browser should be in there.

The torrc at /etc/tor/torrc is for the system tor (little-t tor) you have installed. It is important to appreciate that Tor Browser does not use this configuration file. Any changes you make to it will affect your system tor installation though.

I use both Tor Browser and a system tor for proxying other applications/processes through tor (e.g. curl). If you don’t need a system tor you can remove it (e.g. sudo apt remove tor) any it won’t affect Tor Browser in any way.

1 Like

Thanks for your reply Noino :green_heart: We will try that. Then I will try to share our results here.