Skip to main content

SearXNG

Privacy-respecting, hackable metasearch engine

version: '3.7'

services:

  redis:
    container_name: searxng-redis
    image: docker.io/valkey/valkey:8-alpine"redis:alpine"
    restart: unless-stopped
    command: valkey-redis-server --save 30 1"" --loglevelappendonly warning
    restart: unless-stopped"no"
    networks:
      - searxng
    volumes:tmpfs:
      - /srv/path/Files/Searxng/redis-data:/datavar/lib/redis
    cap_drop:
      - ALL
    cap_add:
      - SETGID
      - SETUID
      - DAC_OVERRIDE

  searxng:
    container_name: searxng
    image: searxng/searxng:latest
    restart: unless-stopped
    depends_on:
      - redis
    networks:
      - searxng
    ports:
     - "8082:8080"
    volumes:
      - /srv/.../Files/Searxng/:/etc/searxng:rw
    environment:
      - SEARXNG_BASE_URL=https://your.domain.tld/
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - SETGID
      - SETUID
      - DAC_OVERRIDE
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"
searxng:
    container_name: searxng
    image: docker.io/searxng/searxng:latest
    restart: unless-stopped
    networks:
      - searxng
    ports:
      - "8082:8080" #change 8082 as needed, but not 8080
    volumes:
      - /srv/path/Files/Searxng/:/etc/searxng:rw
    environment:
      - SEARXNG_BASE_URL=http://your.docker.server.ip:8082/ #Change "your.docker.server.ip" to your Docker server's IP or https://your.domain.ltd/
      - UWSGI_WORKERS=4 #You can change this
      - UWSGI_THREADS=4 #You can change this
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - SETGID
      - SETUID
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"

networks:
  searxng:
    #volumes:ipam:
      #driver: redis-data: #redis storage
#  searxng: #searxng storagedefault