Back to Private agent search

Private agent search / Guide 2 of 6

Deploy SearXNG

Run the search service with a local Docker Compose setup.

Run this step · Terminal

# Create directory
mkdir -p ~/searxng && cd ~/searxng

# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
services:
  searxng:
    image: searxng/searxng:latest
    container_name: searxng
    ports:
      - "127.0.0.1:8080:8080"
    environment:
      - SEARXNG_BASE_URL=http://localhost:8080
    volumes:
      - ./config:/etc/searxng:rw
    restart: unless-stopped
EOF

# Create config directory
mkdir -p config

# Start it
docker compose up -d

Create and start the service

If you don't already have SearXNG running, spin it up:

Verify it's running:

bash

curl -I http://127.0.0.1:8080

It’s working if

The container is running and the search interface opens at http://127.0.0.1:8080. JSON output is configured in the next lesson.