searxng / searxng-docker

The docker-compose files for setting up a SearXNG instance with docker.
GNU Affero General Public License v3.0
1.01k stars 247 forks source link
docker docker-compose

searxng-docker

Create a new SearXNG instance in five minutes using Docker

What is included ?

Name Description Docker image Dockerfile
Caddy Reverse proxy (create a LetsEncrypt certificate automatically) docker.io/library/caddy:2-alpine Dockerfile
SearXNG SearXNG by itself docker.io/searxng/searxng:latest Dockerfile
Valkey In-memory database docker.io/valkey/valkey:7-alpine Dockerfile

How to use it

[!WARNING]
If you use an older version of docker desktop (< 3.6.0), you may have to install Docker Compose v1. Accordingly, you should modify the commands in this documentation to suit Docker Compose v1. For instance, change 'docker compose up' to 'docker-compose up'.

Install the docker-compose plugin (be sure that docker-compose version is at least 1.9.0)

How to access the logs

To access the logs from all the containers use: docker compose logs -f.

To access the logs of one specific container:

Start SearXNG with systemd

You can skip this step if you don't use systemd.

Note on the image proxy feature

The SearXNG image proxy is activated by default.

The default Content-Security-Policy allow the browser to access to ${SEARXNG_HOSTNAME} and https://*.tile.openstreetmap.org;.

If some users want to disable the image proxy, you have to modify ./Caddyfile. Replace the img-src 'self' data: https://*.tile.openstreetmap.org; by img-src * data:;.

Multi Architecture Docker images

Supported architecture:

How to update ?

To update the SearXNG stack:

git pull
docker compose pull
docker compose up -d

Or the old way (with the old docker-compose version):

git pull
docker-compose pull
docker-compose up -d