Skip to main content

SearXNG

Privacy-respecting, hackable metasearch engine

version: '3.7'

services:
  redis:
    container_name: searxng-redis
    image: "redis:alpine"
    restart: unless-stoppeddocker.io/valkey/valkey:8-alpine
    command: redis-valkey-server --save ""30 1 --appendonlyloglevel "no"
    networks:
      - searxng
    tmpfs:
      - /var/lib/redis
    cap_drop:
      - ALL
    cap_add:
      - SETGID
      - SETUID
      - DAC_OVERRIDE

  searxng:
    container_name: searxng
    image: searxng/searxng:latestwarning
    restart: unless-stopped
    networks:
      - searxng
    ports:
     - "8082:8080"
    volumes:
      - /srv/path/Files/Searxng/:redis-data:/etc/searxng:rw
    environment:
      - SEARXNG_BASE_URL=https://your.domain.ltd/data
    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:

ipam:#volumes:
driver:#  defaultredis-data: #redis storage
#  searxng: #searxng storage