Official discussion: searxng/searx-instances#417
By the 1st December 2023, we are going to make mandatory the setting "server.public_instance".
If you need help in configuring this new parameter please do not hesitate to ask for help:
- join our matrix channel: https://matrix.to/#/#searxng:matrix.org and say that you are running a public instance
- create a github discussion: https://github.com/searxng/searxng/discussions
- we are also on IRC: https://web.libera.chat/?channel=#searxng
This new parameter for the moment activate by default both the bot limiter AND the new advanced bot limiter called link_token. This is to improve the quality of the public instances by decreasing overal amount of bots harming the public instances.
It is very possible that in the future we will add more bot protection features enabled by default for you, but thanks to this new parameter you won't have to do anything. We will obviously announce any new bot protection feature.
We can make exceptions in case you really do not want to enable our bot limiter solution, but you will have to send us proofs: clearly stating how you detect bots, how you actively deal with them and also prove that it really works.
Only if you already have the limiter enabled, thus redis activated and your web server correctly configured! If you do not please see per type of installation.
- Update SearXNG to the latest version.
- Go to your settings.yml file
- Add the line
public_instance: true
in the sectionserver:
. Example:
server:
public_instance: true
- Restart SearXNG
- searxng-docker
- installation script (./utils/searxng.sh)
- Step by step installation (type) AND other types of custom installation (not Docker based)
- Any other non official installation - Docker based
searxng-docker already have both the limiter and redis activated it's a simple change for you.
- Go to the directory of searxng-docker
- Update the directory by pulling the latest changes:
git pull
- Edit the file
settings.yml
. - Add the line
public_instance: true
in the sectionserver:
. Example:
server:
public_instance: true
- Update SearXNG and restart it
docker-compose pull
docker-compose up -d
docker-compose restart
Depending on when you installed SearXNG you may already have the limiter and redis enabled.
- View the file
/etc/searxng/settings.yml
with cat for example. - If you already have
url: unix:///usr/local/searxng-redis/run/redis.sock?db=0
then follow the first step, otherwise the second one.
- Pull the latest SearXNG changes:
./utils/searxng.sh update
- Edit the file
/etc/searxng/settings.yml
. - Add the line
public_instance: true
in the sectionserver:
. Example:
server:
public_instance: true
- Restart SearXNG:
service uwsgi restart searxng
Note: It may be another command but if you have installed SearXNG with uwsgi, it's this one.
- Pull the latest SearXNG changes:
./utils/searxng.sh update
- Install redis:
./utils/searxng.sh install redis
Accept all the steps, this may take a while.
- Edit the file
/etc/searxng/settings.yml
. - Add the line
public_instance: true
in the sectionserver:
. Example:
server:
public_instance: true
- Restart SearXNG:
service uwsgi restart searxng
Note: It may be another command but if you have installed SearXNG with uwsgi, it's this one.
- If you are using NGINX, check that you did correctly follow our guide: https://docs.searxng.org/admin/installation-nginx.html#installation-nginx
- If you are using apache, check that you did correctly follow our guide: https://docs.searxng.org/admin/installation-apache.html#installation-apache
- If you are using another web server, check that you are correctly sending the headers
X-Real-IP
andX-Forwarded-For
to the SearXNG server. See the NGINX or apache tutorial for advice.
You probably do not have redis enabled so you will have to configure redis.
- Install redis with your package manager. On debian/ubuntu:
sudo apt install redis
- Edit the redis config file:
/etc/redis/redis.conf
- Check that you have redis running on localhost, check if the lines
bind 127.0.0.1 -::1
andport 6379
exist, if not add them. - Restart redis if needed (above line modified or not).
- Update SearXNG to the latest version. Probably with
git pull
. - Edit your
settings.yml
. It is very probably at/etc/searxng/settings.yml
. - Add the line
public_instance: true
in the sectionserver:
. Example:
server:
public_instance: true
- In the section
redis:
, add the lineurl: redis://localhost:6379/1
:
redis:
url: redis://localhost:6379/1
Please see the documentation for further details: https://docs.searxng.org/admin/settings/settings_redis.html#settings-redis
- Restart SearXNG
The point is to have the headers X-Real-IP
and X-Forwarded-For
correctly sent to the SearXNG server.
- If you are using NGINX, check that you did correctly follow our guide: https://docs.searxng.org/admin/installation-nginx.html#installation-nginx
- If you are using apache, check that you did correctly follow our guide: https://docs.searxng.org/admin/installation-apache.html#installation-apache
- If you are using another web server, check that you are correctly sending the headers
X-Real-IP
andX-Forwarded-For
to the SearXNG server. See the NGINX or apache tutorial for advice.
- Install Redis locally. If you are on Docker add it for example in your docker-compose.yml file.
services:
redis:
image: redis:alpine
- Update SearXNG to the latest version. Probably with
git pull
ordocker compose pull
thendocker compose up -d
. - Edit your
settings.yml
. It is very probably at/etc/searxng/settings.yml
. - Add this line for the
server:
section:
server:
public_instance: true
- In the section
redis:
, add the lineurl: redis://localhost:6379/1
:
redis:
url: redis://localhost:6379/1
Please see the documentation for further details: https://docs.searxng.org/admin/settings/settings_redis.html#settings-redis
If you are on Docker, for redis use this line instead: redis://redis:6379/1
- Restart SearXNG
The point is to have the headers X-Real-IP
and X-Forwarded-For
correctly sent to the SearXNG server.
- If you are using NGINX, check that you did correctly follow our guide: https://docs.searxng.org/admin/installation-nginx.html#installation-nginx
- If you are using apache, check that you did correctly follow our guide: https://docs.searxng.org/admin/installation-apache.html#installation-apache
- If you are using another web server, check that you are correctly sending the headers
X-Real-IP
andX-Forwarded-For
to the SearXNG server. See the NGINX or apache tutorial for advice.