# Docker Compose for SearxNG # Usage: cd searxng && cp .env.example .env && docker compose up -d # Then point ask-search at it: export SEARXNG_URL=http://localhost:8080 services: searxng: image: searxng/searxng:latest container_name: searxng ports: - "127.0.0.1:8080:8080" environment: # Generate a secure secret key: python3 -c "import secrets; print(secrets.token_hex(32))" - SEARXNG_SECRET=${SEARXNG_SECRET:-your-secret-key-change-in-production} - SEARXNG_BASE_URL=http://localhost:8080 volumes: # JSON output is enabled in searxng.yml (search.formats) - ./searxng.yml:/etc/searxng/settings.yml restart: unless-stopped # Steps: # 1. Generate a secret key: python3 -c "import secrets; print(secrets.token_hex(32))" # 2. Copy .env.example to .env and set SEARXNG_SECRET # 3. Run: docker compose up -d # 4. SearxNG UI: http://localhost:8080 # 5. Use ask-search: export SEARXNG_URL=http://localhost:8080