### [SearXNG](https://github.com/searxng/searxng)

> Handle: `searxng`<br/>
> URL: [http://localhost:33811/](http://localhost:33811/)

![SearXNG Logo](https://raw.githubusercontent.com/searxng/searxng/master/src/brand/searxng.svg)

A free internet metasearch engine which aggregates results from various search services and databases.

#### Starting

```bash
# [Optional] pre-pull the searxng image
harbor pull searxng

# Start the service
# --open is optional to open the browser automatically
harbor up searxng --open
```

- Harbor connectx SearXNG to the following services when run together: `webui`, `ldr`, `chatui`, `chatnio`, `perplexica`, `anythingllm`
- You can point all services in Harbor to use external SearXNG instance via `SEARXNG_INTERNAL_URL` configuration option (see below)

![Screenshot of Open WebUI Web RAG Functionality](./seaxng-webrag.png)

#### Configuration

Can be configured via the files in the `searxng` folder. [Configuration reference](https://docs.searxng.org/user/configured_engines.html).

Following options can be set via [`harbor config`](./3.-Harbor-CLI-Reference.md#harbor-config):

```bash
# The port on the host where SearXNG endpoint will be available
SEARXNG_HOST_PORT              33811

# Docker image to use for SearXNG
SEARXNG_IMAGE                  searxng/searxng

# Docker image tag to use for SearXNG
SEARXNG_VERSION                latest

# This is the URL Harbor will use to connect its services
# to the SearXNG instance. It can be replaced with
# your own or remote SearXNG instance if needed
SEARXNG_INTERNAL_URL           http://searxng:8080

# The path to the SearXNG workspace on the host
# This is where the configuration files are stored
# Should be either relative to $(harbor home) or absolute path
SEARXNG_WORKSPACE              ./searxng
```

See [environment configuration guide](./1.-Harbor-User-Guide.md#environment-variables) to set arbitrary environment variables for the service.