Mandatory parameter for public instances! Tutorial #417
Pinned
unixfox
announced in
Announcements
Replies: 1 comment 1 reply
-
@return42 could you turn on the parameter on your instance? you should already have everything setup (redis wise), but this way your instance is conformed like the others. thank you |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
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.
Basic tutorial
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.
public_instance: true
in the sectionserver:
. Example:Per type of installation
searxng-docker
searxng-docker already have both the limiter and redis activated it's a simple change for you.
git pull
settings.yml
.public_instance: true
in the sectionserver:
. Example:installation script (./utils/searxng.sh)
Depending on when you installed SearXNG you may already have the limiter and redis enabled.
1) Check if already have redis enabled or not
/etc/searxng/settings.yml
with cat for example.url: unix:///usr/local/searxng-redis/run/redis.sock?db=0
then follow the first step, otherwise the second one.2) Make the modifications in SearXNG
A) If you already have redis
/etc/searxng/settings.yml
.public_instance: true
in the sectionserver:
. Example:Note: It may be another command but if you have installed SearXNG with uwsgi, it's this one.
B) If you do not have redis
Accept all the steps, this may take a while.
/etc/searxng/settings.yml
.public_instance: true
in the sectionserver:
. Example:Note: It may be another command but if you have installed SearXNG with uwsgi, it's this one.
3) Adapt your web server
X-Real-IP
andX-Forwarded-For
to the SearXNG server. See the NGINX or apache tutorial for advice.Step by step installation (type) AND other types of custom installation (not Docker based)
You probably do not have redis enabled so you will have to configure redis.
1) Install Redis
sudo apt install redis
/etc/redis/redis.conf
bind 127.0.0.1 -::1
andport 6379
exist, if not add them.2) Configure redis and new parameter in SearXNG
git pull
.settings.yml
. It is very probably at/etc/searxng/settings.yml
.public_instance: true
in the sectionserver:
. Example:redis:
, add the lineurl: redis://localhost:6379/1
:Please see the documentation for further details: https://docs.searxng.org/admin/settings/settings_redis.html#settings-redis
3) Adapt your web server
The point is to have the headers
X-Real-IP
andX-Forwarded-For
correctly sent to the SearXNG server.X-Real-IP
andX-Forwarded-For
to the SearXNG server. See the NGINX or apache tutorial for advice.Any other non official installation - Docker based
1) Redis and configure SearXNG
git pull
ordocker compose pull
thendocker compose up -d
.settings.yml
. It is very probably at/etc/searxng/settings.yml
.server:
section:redis:
, add the lineurl: 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
2) Adapt your web server
The point is to have the headers
X-Real-IP
andX-Forwarded-For
correctly sent to the SearXNG server.X-Real-IP
andX-Forwarded-For
to the SearXNG server. See the NGINX or apache tutorial for advice.Beta Was this translation helpful? Give feedback.
All reactions