MCP HubMCP Hub
스킬 목록으로 돌아가기

deploy-searxng

pjt222
업데이트됨 Yesterday
1 조회
17
2
17
GitHub에서 보기
문서general

정보

이 Claude Skill은 Docker Compose를 사용하여 자체 호스팅 SearXNG 메타 검색 엔진을 배포하며, 추적 없는 개인 검색 솔루션을 제공합니다. 구성 관리, 검색 엔진 선택, Nginx 설정, 그리고 여러 공급자의 결과를 집계하기 위한 지속성을 처리합니다. 팀을 위한 공유 검색 인스턴스가 필요하거나 단일 상업적 공급자에 대한 의존성을 대체하고자 할 때 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/deploy-searxng

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Deploy SearXNG

Deploy self-hosted SearXNG meta search engine with Docker Compose and Nginx.

When Use

  • Set up private, self-hosted search engine
  • Aggregate results from multiple search providers without tracking
  • Run search instance for team or organization
  • Replace reliance on single search provider

Inputs

  • Required: Server or machine with Docker installed
  • Optional: Domain name for public access
  • Optional: SSL certificate or Let's Encrypt setup
  • Optional: Custom engine preferences

Steps

Step 1: Create Project Structure

mkdir -p searxng/{config,nginx}
cd searxng

Step 2: Write Docker Compose File

docker-compose.yml:

services:
  searxng:
    image: searxng/searxng:latest
    container_name: searxng
    volumes:
      - ./config:/etc/searxng:rw
    environment:
      - SEARXNG_BASE_URL=https://search.example.com/
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - SETGID
      - SETUID
    restart: unless-stopped
    networks:
      - searxng

  nginx:
    image: nginx:1.27-alpine
    container_name: searxng-nginx
    ports:
      - "8080:80"
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - searxng
    restart: unless-stopped
    networks:
      - searxng

networks:
  searxng:
    driver: bridge

Step 3: Configure SearXNG Settings

config/settings.yml:

use_default_settings: true

general:
  instance_name: "My SearXNG"
  privacypolicy_url: false
  contact_url: false

search:
  safe_search: 0
  autocomplete: "google"
  default_lang: "en"

server:
  secret_key: "generate-a-random-secret-key-here"
  limiter: true
  image_proxy: true
  port: 8080
  bind_address: "0.0.0.0"

ui:
  static_use_hash: true
  default_theme: simple
  infinite_scroll: true

engines:
  - name: google
    engine: google
    shortcut: g
    disabled: false

  - name: duckduckgo
    engine: duckduckgo
    shortcut: ddg
    disabled: false

  - name: wikipedia
    engine: wikipedia
    shortcut: wp
    disabled: false

  - name: github
    engine: github
    shortcut: gh
    disabled: false

  - name: stackoverflow
    engine: stackoverflow
    shortcut: so
    disabled: false

  - name: arxiv
    engine: arxiv
    shortcut: arx
    disabled: false

Generate secret key:

openssl rand -hex 32

Step 4: Configure Nginx Frontend

nginx/nginx.conf:

events {
    worker_connections 1024;
}

http {
    server {
        listen 80;

        location / {
            proxy_pass http://searxng:8080;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Connection "";
            proxy_buffering off;
        }

        location /static/ {
            proxy_pass http://searxng:8080/static/;
            expires 1y;
            add_header Cache-Control "public, immutable";
        }
    }
}

Step 5: Configure Rate Limiting

config/limiter.toml:

[botdetection.ip_limit]
link_token = true

[botdetection.ip_lists]
block_ip = []
pass_ip = ["127.0.0.1/8", "::1/128"]
pass_searxng_org = false

Step 6: Deploy and Verify

# Start stack
docker compose up -d

# Check logs
docker compose logs -f searxng

# Verify running
curl -s http://localhost:8080 | head -5

# Test search
curl -s "http://localhost:8080/search?q=test&format=json" | head -20

Got: SearXNG responds on port 8080 through Nginx. Search queries return aggregated results.

If fail: Check docker compose logs searxng for config errors. Verify settings.yml YAML syntax.

Step 7: Add SSL (Production)

For public deployments, add SSL termination. Update docker-compose.yml:

services:
  nginx:
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/nginx-ssl.conf:/etc/nginx/nginx.conf:ro
      - certbot-certs:/etc/letsencrypt:ro
      - certbot-webroot:/var/www/certbot:ro

  certbot:
    image: certbot/certbot
    volumes:
      - certbot-certs:/etc/letsencrypt
      - certbot-webroot:/var/www/certbot

volumes:
  certbot-certs:
  certbot-webroot:

See configure-nginx skill for full SSL Nginx configuration.

Step 8: Updates and Maintenance

# Pull latest image
docker compose pull searxng

# Restart with new image
docker compose up -d

# Backup configuration
cp -r config/ config-backup-$(date +%Y%m%d)/

Checks

  • SearXNG starts without errors in logs
  • Search queries return results from configured engines
  • Image proxy works (images load through SearXNG)
  • Rate limiter blocks excessive requests
  • Configuration persists across container restarts
  • Nginx proxies requests correctly

Pitfalls

  • Missing secret_key: SearXNG refuses to start without secret_key in settings.yml.
  • Config permissions: SearXNG writes to config directory. Volume must be :rw not :ro.
  • Engine blocks: Some engines block requests from server IPs. Rotate engines or use image proxy.
  • YAML indentation: settings.yml sensitive to indentation. Validate with YAML linter before deploying.
  • Base URL mismatch: SEARXNG_BASE_URL must match actual URL users access, including protocol and trailing slash.
  • DNS resolution in Docker: Engines using Google/Bing may need host network or proper DNS. Default Docker DNS usually works.

See Also

  • setup-compose-stack - general Docker Compose patterns used here
  • configure-nginx - Nginx configuration for SSL and security headers
  • configure-reverse-proxy - advanced proxy patterns for Nginx frontend

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman/skills/deploy-searxng
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

railway-docs

문서

이 스킬은 Railway의 기능, 작동 방식 또는 특정 문서 URL에 대한 질문에 답하기 위해 최신 Railway 문서를 가져옵니다. 개발자들이 Railway의 공식 소스로부터 정확하고 최신 정보를 직접 받을 수 있도록 보장합니다. 사용자가 Railway의 작동 방식을 묻거나 Railway 문서를 참조할 때 사용하세요.

스킬 보기

n8n-code-python

문서

이 Claude Skill은 n8n의 Code 노드에서 Python 코드를 작성할 때 전문적인 지침을 제공하며, 특히 Python 표준 라이브러리 사용과 n8n의 특수 구문인 `_input`, `_json`, `_node` 작업에 중점을 둡니다. 이는 개발자가 n8n 내에서 Python의 제한 사항을 이해하도록 돕고, 대부분의 워크플로에는 JavaScript 사용을 권장하면서도 특정 데이터 변환 요구사항에 대한 Python 솔루션을 제안합니다.

스킬 보기

archon

문서

Archon 스킬은 REST API를 통해 RAG 기반 시맨틱 검색과 프로젝트 관리를 제공합니다. 이 스킬을 사용하여 문서 검색, 계층적 프로젝트/태스크 관리, 문서 업로드 기능을 갖춘 지식 검색을 수행할 수 있습니다. 외부 문서를 검색할 때는 다른 소스를 사용하기 전에 항상 Archon을 최우선으로 활용하세요.

스킬 보기

n8n-code-javascript

문서

이 Claude Skill은 n8n의 Code 노드에서 JavaScript 코드 작성에 대한 전문적인 지침을 제공합니다. `$input`/`$json` 변수, HTTP 헬퍼, DateTime 처리와 같은 필수적인 n8n 특정 구문을 다루며 일반적인 오류를 해결합니다. Code 노드에서 사용자 정의 JavaScript 처리가 필요한 n8n 워크플로우를 개발할 때 활용하세요.

스킬 보기