[GH-ISSUE #342] [QUESTION] Fully disable Tor circuit? #231

Closed
opened 2026-02-25 20:35:13 +03:00 by kerem · 7 comments
Owner

Originally created by @madindehead on GitHub (Jun 3, 2021).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/342

Type out your question here. Please make sure that this is a topic that isn't already covered in the README.

I am certain this isn't covered in the README. Apologies if it is.

Is there anyway to fully disable Tor when running Whoogle? I have set the WHOOGLE_CONFIG_TOR=0 in the whoogle.env file, but I'm still getting a Tor circuit setup when I launch via docker-compose.

This is what I see in my logs despite disabling the option (I have removed part of the log to ease reading):

Jun 03 06:52:07.258 [notice] Tor 0.3.5.14 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1d, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.8.,
Jun 03 06:52:11.000 [notice] Bootstrapped 90%: Establishing a Tor circuit,
Jun 03 06:52:17.000 [notice] New control connection opened from 127.0.0.1.,
Jun 03 06:52:11.000 [notice] Bootstrapped 100%: Done,
Jun 03 06:52:17.000 [notice] Heartbeat: Tor's uptime is 0:00 hours, with 9 circuits open. I've sent 414 kB and received 2.79 MB.,
Serving on http://0.0.0.0:5000,
Jun 03 06:52:37.000 [notice] Heartbeat: Tor's uptime is 0:00 hours, with 11 circuits open. I've sent 418 kB and received 2.79 MB.,

I have specic reasons for not wanting to run a Tor circuit/run this via Tor and I need to be certain that it's disabled.

Any help is greatly appreciated. Thank you.

Originally created by @madindehead on GitHub (Jun 3, 2021). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/342 Type out your question here. Please make sure that this is a topic that isn't already covered in the README. I am certain this isn't covered in the README. Apologies if it is. Is there anyway to fully disable Tor when running Whoogle? I have set the `WHOOGLE_CONFIG_TOR=0` in the whoogle.env file, but I'm still getting a Tor circuit setup when I launch via docker-compose. This is what I see in my logs despite disabling the option (I have removed part of the log to ease reading): ``` Jun 03 06:52:07.258 [notice] Tor 0.3.5.14 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1d, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.8., Jun 03 06:52:11.000 [notice] Bootstrapped 90%: Establishing a Tor circuit, Jun 03 06:52:17.000 [notice] New control connection opened from 127.0.0.1., Jun 03 06:52:11.000 [notice] Bootstrapped 100%: Done, Jun 03 06:52:17.000 [notice] Heartbeat: Tor's uptime is 0:00 hours, with 9 circuits open. I've sent 414 kB and received 2.79 MB., Serving on http://0.0.0.0:5000, Jun 03 06:52:37.000 [notice] Heartbeat: Tor's uptime is 0:00 hours, with 11 circuits open. I've sent 418 kB and received 2.79 MB., ``` I have specic reasons for not wanting to run a Tor circuit/run this via Tor and I need to be certain that it's disabled. Any help is greatly appreciated. Thank you.
kerem 2026-02-25 20:35:13 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@benbusby commented on GitHub (Jun 3, 2021):

There isn't currently a way to fully disable the Tor circuit, at least not easily through any Docker-related deployment methods. If you never enable the Tor option in Whoogle's config menu, none of your outbound requests will ever use Tor. Tor will be just be running (unused) in the background of the container.

Is this sufficient for your purposes? If not, I can look into a way to fully disable the background service as well.

<!-- gh-comment-id:853865072 --> @benbusby commented on GitHub (Jun 3, 2021): There isn't currently a way to fully disable the Tor circuit, at least not easily through any Docker-related deployment methods. If you never enable the Tor option in Whoogle's config menu, none of your outbound requests will ever use Tor. Tor will be just be running (unused) in the background of the container. Is this sufficient for your purposes? If not, I can look into a way to fully disable the background service as well.
Author
Owner

@madindehead commented on GitHub (Jun 3, 2021):

Personally I would prefer to never even have the background service running. It just avoids any potential issues. I hope that's understandable. If it's not running at all, then there is never any doubt about it having been used.

For now, I would be happy with a solution where I need to edit something in the Docker container - providing it's not ridiculously complex. Overall - I would certainly appreciate you finding a way to fully disable the background service as an option for the service, provided it doesn't cause too much additional work.

<!-- gh-comment-id:853962712 --> @madindehead commented on GitHub (Jun 3, 2021): Personally I would prefer to never even have the background service running. It just avoids any potential issues. I hope that's understandable. If it's not running at all, then there is never any doubt about it having been used. For now, I would be happy with a solution where I need to edit something in the Docker container - providing it's not ridiculously complex. Overall - I would certainly appreciate you finding a way to fully disable the background service as an option for the service, **provided it doesn't cause too much additional work**.
Author
Owner

@benbusby commented on GitHub (Jun 3, 2021):

You can easily kill the background service by running:

docker exec -d whoogle-search killall tor

This can be used to stop the background service at any time once the docker-compose container is live. Alternatively, you could edit the Dockerfile to just use the run script and not the start-tor script. For example:

github.com/benbusby/whoogle-search@3892355199/Dockerfile (L73)

would become CMD ./run. You'd need to build the container locally (without docker-compose), but it would ensure that the Tor service is never started at any point.

After thinking about it a bit, I'm hesitant to introduce any environment variables or other settings to completely disable Tor, as I can imagine scenarios where it might be confusing for a user who sees two separate Tor variables (WHOOGLE_CONFIG_TOR vs WHOOGLE_DISABLE_TOR or something). It would also involve a little bit of UI work to ensure the Tor option is hidden on the home page template when Tor is completely disabled. I'm not overall opposed to adding it, it would just take a little effort to make sure it isn't going to confuse any first time users.

Let me know if the solutions I mentioned work for you!

<!-- gh-comment-id:853980576 --> @benbusby commented on GitHub (Jun 3, 2021): You can easily kill the background service by running: `docker exec -d whoogle-search killall tor` This can be used to stop the background service at any time once the docker-compose container is live. Alternatively, you could edit the Dockerfile to just use the `run` script and not the `start-tor` script. For example: https://github.com/benbusby/whoogle-search/blob/3892355199be1c76bb9f411166bdde16b64704d8/Dockerfile#L73 would become `CMD ./run`. You'd need to build the container locally (without docker-compose), but it would ensure that the Tor service is never started at any point. After thinking about it a bit, I'm hesitant to introduce any environment variables or other settings to completely disable Tor, as I can imagine scenarios where it might be confusing for a user who sees two separate Tor variables (`WHOOGLE_CONFIG_TOR` vs `WHOOGLE_DISABLE_TOR` or something). It would also involve a little bit of UI work to ensure the Tor option is hidden on the home page template when Tor is completely disabled. I'm not overall opposed to adding it, it would just take a little effort to make sure it isn't going to confuse any first time users. Let me know if the solutions I mentioned work for you!
Author
Owner

@madindehead commented on GitHub (Jun 4, 2021):

Thanks for these suggestions, they are much appreciated.

I fully understand your concerns around the confusion for new users and the additional work. For now, I will try each of these suggested solutions. I think the second one is better for me - removing the CMD misc/tor/start-tor.sh from the Dockerfile.

I will give each of these a try later on today and confirm that they both work, and if I encounter any issues.

Regarding the extra work to include it - I would love to see it, but I cannot offer any support to do it. My coding skills just aren't that good. For that reason, it's completely fair that it's not a priority at all and might not even make it in.

Update 1: Used the first command and I am seeing this in the logs:
Jun 04 12:12:36.000 [notice] Catching signal TERM, exiting cleanly.

Also, in the config on the main Whoogle page, I am seeing ' Use Tor: Unavailable'. That seems to have done the job.

Will try the Dockerfile local build later on.

<!-- gh-comment-id:854532905 --> @madindehead commented on GitHub (Jun 4, 2021): Thanks for these suggestions, they are much appreciated. I fully understand your concerns around the confusion for new users and the additional work. For now, I will try each of these suggested solutions. I think the second one is better for me - removing the `CMD misc/tor/start-tor.sh` from the Dockerfile. I will give each of these a try later on today and confirm that they both work, and if I encounter any issues. Regarding the extra work to include it - I would love to see it, but I cannot offer any support to do it. My coding skills just aren't that good. For that reason, it's completely fair that it's not a priority at all and might not even make it in. **Update 1:** Used the first command and I am seeing this in the logs: `Jun 04 12:12:36.000 [notice] Catching signal TERM, exiting cleanly.` Also, in the config on the main Whoogle page, I am seeing ' Use Tor: Unavailable'. That seems to have done the job. Will try the Dockerfile local build later on.
Author
Owner

@benbusby commented on GitHub (Jun 6, 2021):

I'm going to close this issue for now, since I believe we've reached an agreeable solution for your use case (correct me if I'm wrong).

I'm happy to continue helping you though if you need any further assistance with disabling the Tor service on your instance!

<!-- gh-comment-id:855436140 --> @benbusby commented on GitHub (Jun 6, 2021): I'm going to close this issue for now, since I believe we've reached an agreeable solution for your use case (correct me if I'm wrong). I'm happy to continue helping you though if you need any further assistance with disabling the Tor service on your instance!
Author
Owner

@madindehead commented on GitHub (Aug 17, 2021):

Not sure if this is the correct place to ask, but I have a quick question about using the locally built image with a docker-compose.yml file.

I'm currently running this using the docker command, but I'm keen to keep a docker-compose for it. I'm struggling to work out what to add for the image.

Normally, the compose file would use:

services:
  whoogle-search:
    image: benbusby/whoogle-search
    container_name: whoogle-search

In this instance, the image is being held locally (on the machine running docker). Without running the local registry, how would I reference the image in the docker-compose file?

Hopefully that makes sense. Thanks.

<!-- gh-comment-id:900263215 --> @madindehead commented on GitHub (Aug 17, 2021): Not sure if this is the correct place to ask, but I have a quick question about using the locally built image with a docker-compose.yml file. I'm currently running this using the docker command, but I'm keen to keep a docker-compose for it. I'm struggling to work out what to add for the image. Normally, the compose file would use: ``` services: whoogle-search: image: benbusby/whoogle-search container_name: whoogle-search ``` In this instance, the image is being held locally (on the machine running docker). Without running the local registry, how would I reference the image in the docker-compose file? Hopefully that makes sense. Thanks.
Author
Owner

@ACodingGenie commented on GitHub (Nov 6, 2021):

@madindehead You can just pass in command: ./run into your docker-compose.yml and it will only start up Whoogle not tor. @benbusby Maybe include this in the docs for people wondering about this? Sorry for commenting on a closed issue.

...
services:
  whoogle:
    image: benbusby/whoogle-search:latest
    container_name: whoogle
    restart: unless-stopped
    command: ./run
    pids_limit: 50
    mem_limit: 512mb
    memswap_limit: 512mb
...
<!-- gh-comment-id:962392273 --> @ACodingGenie commented on GitHub (Nov 6, 2021): @madindehead You can just pass in `command: ./run` into your `docker-compose.yml` and it will only start up Whoogle not tor. @benbusby Maybe include this in the docs for people wondering about this? Sorry for commenting on a closed issue. ``` ... services: whoogle: image: benbusby/whoogle-search:latest container_name: whoogle restart: unless-stopped command: ./run pids_limit: 50 mem_limit: 512mb memswap_limit: 512mb ... ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#231
No description provided.