The original post: /r/selfhosted by /u/Shoddy-Chicken1488 on 2024-04-15 19:51:29.

I’m diving into setting up a Whoogle instance with Docker Compose, and I’ve hit a roadblock with configuring Tor properly within the container. Here’s a rundown of what I’ve attempted:

I’ve crafted a Docker Compose file, leveraging Whoogle’s image, and I’ve followed the instructions outlined on Whoogle’s GitHub regarding the Tor configuration within Docker. However, despite my efforts, Tor doesn’t seem to be functioning within the container as expected.

Here’s a snippet of my Docker Compose file:

version: '3'

services: 
  whoogle-search:
    image: ${WHOOGLE_IMAGE:-benbusby/whoogle-search}
    container_name: whoogle-search
    restart: always
    pids_limit: 50
    mem_limit: 256mb
    memswap_limit: 256mb
    user: whoogle
    security_opt:
      - no-new-privileges
    cap_drop:
      - ALL
    tmpfs:
      - /config/:size=10M,uid=927,gid=927,mode=1700
      - /var/lib/tor/:size=10M,uid=927,gid=927,mode=1700
      - /run/tor/:size=1M,uid=927,gid=927,mode=1700
    environment:
      - PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      - CONFIG_VOLUME=/config
      - HTTPS_ONLY=1
      - WHOOGLE_CONFIG_LANGUAGE=lang_nl
      - WHOOGLE_CONFIG_SEARCH_LANGUAGE=lang_nl
      - WHOOGLE_CONFIG_TOR=1
      - WHOOGLE_TOR_USE_PASS=1
      - WHOOGLE_CSP=1
      - WHOOGLE_CONFIG_DISABLE=1
      - WHOOGLE_RESULTS_PER_PAGE=20
      - WHOOGLE_CONFIG_GET_ONLY=
    ports: 
      - "5000:5000"

Despite these settings, Tor doesn’t seem to be operational within the container. I’ve discovered that the configuration file (config.conf) is completely absent within the container. This leads to my question of whether I should perhaps configure Tor outside the container to get it to work correctly.

Could someone provide guidance on the correct procedure to seamlessly integrate Tor with Whoogle within Docker Compose, and whether it’s necessary to configure Tor outside the container? Any insights or suggestions would be greatly appreciated.

Thanks a lot for your help!