SearXNG Ansible role
https://docs.searxng.org/
- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| defaults | ||
| meta | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
SearXNG
Deploys SearXNG — a self-hosted metasearch engine — via Docker Compose, as an internal search API for agents and apps (Hermes web_search, LibreChat, crw). Nothing but the search query itself leaves the network.
Requirements
- Docker
community.dockerAnsible collection (>=5.2.0)
Variables
| Variable | Default | Description |
|---|---|---|
searxng_instance |
searxng |
Unique instance name. Used as Compose project name and container name. |
searxng_docker_path |
/docker/searxng |
Host path for the Compose file and settings.yml. |
searxng_image |
searxng/searxng |
SearXNG image. Override for a private mirror/registry. |
searxng_version |
2026.10.2-19ffbcd30 |
Image tag (upstream publishes date+commit tags only). |
searxng_port |
8080 |
Host port (container port 8080). |
searxng_bind_address |
0.0.0.0 |
Host address the port binds to. |
searxng_secret_key |
~ |
Required. Generate with: openssl rand -hex 32 |
searxng_formats |
[html, json] |
Response formats. API clients need json. |
searxng_limiter |
false |
Bot-detection rate limiter. Needs Valkey (not deployed by this role). |
searxng_extra_settings |
{} |
Dict merged into settings.yml (upstream defaults stay active). |
searxng_mem_limit |
512m |
Container memory ceiling. |
searxng_uninstall |
false |
Stops and removes the container and the compose directory. |
Usage
searxng_secret_key: "{{ vault_searxng_secret_key }}"
Query: curl 'http://<host>:8080/search?q=test&format=json'
Notes
- No domain/Traefik option on purpose. This instance is an internal API. Restrict who can reach the port with the guest firewall.
- Limiter off. The limiter treats API clients as bots and throttles them. Only enable it (plus Valkey) if the instance is ever exposed to people.
- Stateless. Cache lives on tmpfs; the root filesystem is read-only.
settings.ymlcontains no secret (the key is passed viaSEARXNG_SECRET).