2019-12-30 20:56:09 +00:00
|
|
|
.. _settings.yml:
|
|
|
|
|
|
|
|
================
|
|
|
|
``settings.yml``
|
|
|
|
================
|
|
|
|
|
2020-02-04 15:42:13 +00:00
|
|
|
This page describe the options possibilities of the :origin:`searx/settings.yml`
|
|
|
|
file.
|
|
|
|
|
2019-12-30 20:56:09 +00:00
|
|
|
.. sidebar:: Further reading ..
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
- :ref:`use_default_settings.yml`
|
2019-12-30 20:56:09 +00:00
|
|
|
- :ref:`search API`
|
|
|
|
|
2020-02-04 15:42:13 +00:00
|
|
|
.. contents:: Contents
|
|
|
|
:depth: 2
|
|
|
|
:local:
|
|
|
|
:backlinks: entry
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
.. _settings location:
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
settings.yml location
|
|
|
|
=====================
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
The initial ``settings.yml`` we be load from these locations:
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
|
|
|
|
2. ``/etc/searx/settings.yml``
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-01-02 18:56:26 +00:00
|
|
|
If these files don't exist (or are empty or can't be read), searx uses the
|
2021-06-03 16:56:39 +00:00
|
|
|
:origin:`searx/settings.yml` file. Read :ref:`settings use_default_settings` to
|
|
|
|
see how you can simplify your *user defined* ``settings.yml``.
|
2019-12-30 20:56:09 +00:00
|
|
|
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
.. _settings global:
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
Global Settings
|
|
|
|
===============
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-06-29 17:46:06 +00:00
|
|
|
.. _settings global brand:
|
2021-01-02 18:56:26 +00:00
|
|
|
|
2021-06-29 17:46:06 +00:00
|
|
|
``brand:``
|
|
|
|
------------
|
2020-12-08 19:19:10 +00:00
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
.. code:: yaml
|
2021-04-25 10:03:54 +00:00
|
|
|
|
|
|
|
brand:
|
2021-06-03 16:56:39 +00:00
|
|
|
git_url: https://github.com/searxng/searxng
|
|
|
|
git_branch: master
|
|
|
|
issue_url: https://github.com/searxng/searxng/issues
|
|
|
|
docs_url: https://searxng/searxng.github.io/searxng
|
|
|
|
public_instances: https://searx.space
|
|
|
|
wiki_url: https://github.com/searxng/searxng/wiki
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
.. sidebar:: buildenv
|
|
|
|
|
|
|
|
Changing a value tagged by :ref:`buildenv <make buildenv>`, needs to
|
|
|
|
rebuild instance's environment :ref:`utils/brand.env <make buildenv>`.
|
|
|
|
|
|
|
|
``git_url`` & ``git_branch`` : :ref:`buildenv GIT_URL & GIT_BRANCH <make buildenv>`
|
2021-06-29 17:46:06 +00:00
|
|
|
Changes this, to point to your searx fork (branch).
|
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
``issue_url`` :
|
2021-06-29 17:46:06 +00:00
|
|
|
If you host your own issue tracker change this URL.
|
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
``docs_url`` :
|
2021-06-29 17:46:06 +00:00
|
|
|
If you host your own documentation change this URL.
|
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
``public_instances`` :
|
2021-06-29 17:46:06 +00:00
|
|
|
If you host your own https://searx.space change this URL.
|
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
``wiki_url`` :
|
2021-06-29 17:46:06 +00:00
|
|
|
Link to your wiki (or ``false``)
|
|
|
|
|
|
|
|
.. _settings global general:
|
|
|
|
|
|
|
|
``general:``
|
|
|
|
------------
|
|
|
|
|
|
|
|
.. code:: yaml
|
|
|
|
|
|
|
|
general:
|
|
|
|
debug: false # Debug mode, only for development
|
|
|
|
instance_name: "searxng" # displayed name
|
|
|
|
contact_url: false # mailto:contact@example.com
|
|
|
|
|
|
|
|
``debug`` : ``$SEARX_DEBUG``
|
2019-12-30 20:56:09 +00:00
|
|
|
Allow a more detailed log if you run searx directly. Display *detailed* error
|
|
|
|
messages in the browser too, so this must be deactivated in production.
|
|
|
|
|
2020-12-20 23:37:45 +00:00
|
|
|
``contact_url``:
|
2021-01-02 18:56:26 +00:00
|
|
|
Contact ``mailto:`` address or WEB form.
|
2020-12-20 23:37:45 +00:00
|
|
|
|
|
|
|
|
2021-06-29 17:46:06 +00:00
|
|
|
.. _settings global server:
|
2020-12-20 23:37:45 +00:00
|
|
|
|
2021-01-02 18:56:26 +00:00
|
|
|
``server:``
|
|
|
|
-----------
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
.. code:: yaml
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
server:
|
2021-07-20 11:16:21 +00:00
|
|
|
base_url: false # set custom base_url (or false)
|
2021-06-03 16:56:39 +00:00
|
|
|
port: 8888
|
|
|
|
bind_address: "127.0.0.1" # address to listen on
|
|
|
|
secret_key: "ultrasecretkey" # change this!
|
|
|
|
image_proxy: false # proxying image results through searx
|
|
|
|
default_locale: "" # default interface locale
|
|
|
|
default_theme: oscar # ui theme
|
2020-12-08 19:19:10 +00:00
|
|
|
default_http_headers:
|
2021-06-03 16:56:39 +00:00
|
|
|
X-Content-Type-Options : nosniff
|
|
|
|
X-XSS-Protection : 1; mode=block
|
|
|
|
X-Download-Options : noopen
|
|
|
|
X-Robots-Tag : noindex, nofollow
|
|
|
|
Referrer-Policy : no-referrer
|
2020-12-08 19:19:10 +00:00
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
.. sidebar:: buildenv
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
Changing a value tagged by :ref:`buildenv <make buildenv>`, needs to
|
|
|
|
rebuild instance's environment :ref:`utils/brand.env <make buildenv>`.
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-06-29 17:46:06 +00:00
|
|
|
``base_url`` : :ref:`buildenv SEARX_URL <make buildenv>`
|
2020-12-08 19:19:10 +00:00
|
|
|
The base URL where searx is deployed. Used to create correct inbound links.
|
2021-06-29 17:46:06 +00:00
|
|
|
If you change the value, don't forget to rebuild instance's environment
|
|
|
|
(:ref:`utils/brand.env <make buildenv>`)
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-07-20 11:16:21 +00:00
|
|
|
``port`` & ``bind_address``: :ref:`buildenv SEARX_PORT & SEARX_BIND_ADDRESS <make buildenv>`
|
|
|
|
Port number and *bind address* of the searx web application if you run it
|
|
|
|
directly using ``python searx/webapp.py``. Doesn't apply to searx running on
|
|
|
|
Apache or Nginx.
|
|
|
|
|
|
|
|
``secret_key`` : ``$SEARX_SECRET``
|
|
|
|
Used for cryptography purpose.
|
|
|
|
|
2019-12-30 20:56:09 +00:00
|
|
|
``image_proxy`` :
|
|
|
|
Allow your instance of searx of being able to proxy images. Uses memory space.
|
|
|
|
|
|
|
|
``default_locale`` :
|
2020-07-12 10:01:16 +00:00
|
|
|
Searx interface language. If blank, the locale is detected by using the
|
2019-12-30 20:56:09 +00:00
|
|
|
browser language. If it doesn't work, or you are deploying a language
|
|
|
|
specific instance of searx, a locale can be defined using an ISO language
|
|
|
|
code, like ``fr``, ``en``, ``de``.
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
``default_theme`` :
|
|
|
|
Name of the theme you want to use by default on your searx instance.
|
|
|
|
|
|
|
|
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
|
|
|
|
|
|
|
|
``default_http_headers``:
|
|
|
|
Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__
|
|
|
|
|
2021-01-02 18:56:26 +00:00
|
|
|
``outgoing:``
|
|
|
|
-------------
|
2020-12-08 19:19:10 +00:00
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
Communication with search engines.
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
.. code:: yaml
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
outgoing:
|
|
|
|
request_timeout: 2.0 # default timeout in seconds, can be override by engine
|
|
|
|
max_request_timeout: 10.0 # the maximum timeout in seconds
|
|
|
|
useragent_suffix: "" # informations like an email address to the administrator
|
|
|
|
pool_connections: 100 # Maximum number of allowable connections, or null
|
|
|
|
# for no limits. The default is 100.
|
|
|
|
pool_maxsize: 10 # Number of allowable keep-alive connections, or null
|
|
|
|
# to always allow. The default is 10.
|
|
|
|
enable_http2: true # See https://www.python-httpx.org/http2/
|
|
|
|
# uncomment below section if you want to use a proxy
|
|
|
|
# proxies:
|
|
|
|
# all://:
|
|
|
|
# - http://proxy1:8080
|
|
|
|
# - http://proxy2:8080
|
|
|
|
# uncomment below section only if you have more than one network interface
|
|
|
|
# which can be the source of outgoing search requests
|
|
|
|
# source_ips:
|
|
|
|
# - 1.1.1.1
|
|
|
|
# - 1.1.1.2
|
|
|
|
# - fe80::/126
|
2020-12-08 19:19:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
``request_timeout`` :
|
|
|
|
Global timeout of the requests made to others engines in seconds. A bigger
|
|
|
|
timeout will allow to wait for answers from slow engines, but in consequence
|
|
|
|
will slow searx reactivity (the result page may take the time specified in the
|
|
|
|
timeout to load). Can be override by :ref:`settings engine`
|
|
|
|
|
|
|
|
``useragent_suffix`` :
|
|
|
|
Suffix to the user-agent searx uses to send requests to others engines. If an
|
|
|
|
engine wish to block you, a contact info here may be useful to avoid that.
|
|
|
|
|
[httpx] replace searx.poolrequests by searx.network
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-04-05 08:43:33 +00:00
|
|
|
``keepalive_expiry``:
|
|
|
|
Number of seconds to keep a connection in the pool. By default 5.0 seconds.
|
|
|
|
|
|
|
|
.. _httpx proxies: https://www.python-httpx.org/advanced/#http-proxying
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2020-11-16 11:44:07 +00:00
|
|
|
``proxies`` :
|
[httpx] replace searx.poolrequests by searx.network
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-04-05 08:43:33 +00:00
|
|
|
Define one or more proxies you wish to use, see `httpx proxies`_.
|
2020-11-16 11:44:07 +00:00
|
|
|
If there are more than one proxy for one protocol (http, https),
|
|
|
|
requests to the engines are distributed in a round-robin fashion.
|
2019-12-30 20:56:09 +00:00
|
|
|
|
|
|
|
``source_ips`` :
|
2020-07-12 10:01:16 +00:00
|
|
|
If you use multiple network interfaces, define from which IP the requests must
|
[httpx] replace searx.poolrequests by searx.network
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-04-05 08:43:33 +00:00
|
|
|
be made. Example:
|
|
|
|
|
|
|
|
* ``0.0.0.0`` any local IPv4 address.
|
|
|
|
* ``::`` any local IPv6 address.
|
|
|
|
* ``192.168.0.1``
|
|
|
|
* ``[ 192.168.0.1, 192.168.0.2 ]`` these two specific IP addresses
|
|
|
|
* ``fe80::60a2:1691:e5a2:ee1f``
|
|
|
|
* ``fe80::60a2:1691:e5a2:ee1f/126`` all IP addresses in this network.
|
|
|
|
* ``[ 192.168.0.1, fe80::/126 ]``
|
|
|
|
|
|
|
|
``retries`` :
|
2021-06-03 16:56:39 +00:00
|
|
|
Number of retry in case of an HTTP error. On each retry, searx uses an
|
|
|
|
different proxy and source ip.
|
[httpx] replace searx.poolrequests by searx.network
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-04-05 08:43:33 +00:00
|
|
|
|
|
|
|
``retry_on_http_error`` :
|
|
|
|
Retry request on some HTTP status code.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
* ``true`` : on HTTP status code between 400 and 599.
|
|
|
|
* ``403`` : on HTTP status code 403.
|
|
|
|
* ``[403, 429]``: on HTTP status code 403 and 429.
|
|
|
|
|
|
|
|
``enable_http2`` :
|
2021-06-03 16:56:39 +00:00
|
|
|
Enable by default. Set to ``false`` to disable HTTP/2.
|
[httpx] replace searx.poolrequests by searx.network
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-04-05 08:43:33 +00:00
|
|
|
|
|
|
|
``max_redirects`` :
|
|
|
|
30 by default. Maximum redirect before it is an error.
|
2019-12-30 20:56:09 +00:00
|
|
|
|
2021-01-02 18:56:26 +00:00
|
|
|
|
|
|
|
``locales:``
|
|
|
|
------------
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
.. code:: yaml
|
|
|
|
|
|
|
|
locales:
|
2021-06-03 16:56:39 +00:00
|
|
|
en: English
|
|
|
|
de: Deutsch
|
|
|
|
he: Hebrew
|
|
|
|
hu: Magyar
|
|
|
|
fr: Français
|
|
|
|
es: Español
|
|
|
|
it: Italiano
|
|
|
|
nl: Nederlands
|
|
|
|
ja: 日本語 (Japanese)
|
|
|
|
tr: Türkçe
|
|
|
|
ru: Russian
|
|
|
|
ro: Romanian
|
2020-12-08 19:19:10 +00:00
|
|
|
|
2019-12-30 20:56:09 +00:00
|
|
|
``locales`` :
|
|
|
|
Locales codes and their names. Available translations of searx interface.
|
|
|
|
|
|
|
|
|
|
|
|
.. _settings engine:
|
|
|
|
|
|
|
|
Engine settings
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. sidebar:: Further reading ..
|
|
|
|
|
2021-06-04 09:29:58 +00:00
|
|
|
- :ref:`configured engines`
|
2019-12-30 20:56:09 +00:00
|
|
|
- :ref:`engines-dev`
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
In the code example below a *full fledged* example of a YAML setup from a dummy
|
|
|
|
engine is shown. Most of the options have a default value or even are optional.
|
|
|
|
|
2019-12-30 20:56:09 +00:00
|
|
|
.. code:: yaml
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
- name: example engine
|
|
|
|
engine: example
|
|
|
|
shortcut: demo
|
|
|
|
base_url: 'https://{language}.example.com/'
|
|
|
|
categories: general
|
|
|
|
timeout: 3.0
|
|
|
|
api_key: 'apikey'
|
|
|
|
disabled: false
|
|
|
|
language: en_US
|
|
|
|
tokens: [ 'my-secret-token' ]
|
|
|
|
weigth: 1
|
|
|
|
display_error_messages: true
|
|
|
|
about:
|
|
|
|
website: https://example.com
|
|
|
|
wikidata_id: Q306656
|
|
|
|
official_api_documentation: https://example.com/api-doc
|
|
|
|
use_official_api: true
|
|
|
|
require_api_key: true
|
|
|
|
results: HTML
|
|
|
|
enable_http: false
|
|
|
|
enable_http2: false
|
|
|
|
retries: 1
|
|
|
|
retry_on_http_error: true # or 403 or [404, 429]
|
|
|
|
max_connections: 100
|
|
|
|
max_keepalive_connections: 10
|
|
|
|
keepalive_expiry: 5.0
|
|
|
|
proxies:
|
|
|
|
http:
|
|
|
|
- http://proxy1:8080
|
|
|
|
- http://proxy2:8080
|
|
|
|
https:
|
|
|
|
- http://proxy1:8080
|
|
|
|
- http://proxy2:8080
|
|
|
|
- socks5://user:password@proxy3:1080
|
|
|
|
- socks5h://user:password@proxy4:1080
|
2019-12-30 20:56:09 +00:00
|
|
|
|
|
|
|
``name`` :
|
2020-07-12 10:01:16 +00:00
|
|
|
Name that will be used across searx to define this engine. In settings, on
|
2019-12-30 20:56:09 +00:00
|
|
|
the result page...
|
|
|
|
|
|
|
|
``engine`` :
|
|
|
|
Name of the python file used to handle requests and responses to and from this
|
|
|
|
search engine.
|
|
|
|
|
|
|
|
``shortcut`` :
|
|
|
|
Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
|
|
|
|
|
|
|
|
``base_url`` : optional
|
2020-07-12 10:01:16 +00:00
|
|
|
Part of the URL that should be stable across every request. Can be useful to
|
2019-12-30 20:56:09 +00:00
|
|
|
use multiple sites using only one engine, or updating the site URL without
|
|
|
|
touching at the code.
|
|
|
|
|
|
|
|
``categories`` : optional
|
|
|
|
Define in which categories this engine will be active. Most of the time, it is
|
|
|
|
defined in the code of the engine, but in a few cases it is useful, like when
|
|
|
|
describing multiple search engine using the same code.
|
|
|
|
|
|
|
|
``timeout`` : optional
|
|
|
|
Timeout of the search with the current search engine. **Be careful, it will
|
|
|
|
modify the global timeout of searx.**
|
|
|
|
|
|
|
|
``api_key`` : optional
|
|
|
|
In a few cases, using an API needs the use of a secret key. How to obtain them
|
|
|
|
is described in the file.
|
|
|
|
|
|
|
|
``disabled`` : optional
|
2020-07-12 10:01:16 +00:00
|
|
|
To disable by default the engine, but not deleting it. It will allow the user
|
2019-12-30 20:56:09 +00:00
|
|
|
to manually activate it in the settings.
|
|
|
|
|
|
|
|
``language`` : optional
|
|
|
|
If you want to use another language for a specific engine, you can define it
|
|
|
|
by using the full ISO code of language and country, like ``fr_FR``, ``en_US``,
|
|
|
|
``de_DE``.
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
``tokens`` : optional
|
|
|
|
A list of secret tokens to make this engine *private*, more details see
|
|
|
|
:ref:`private engines`.
|
|
|
|
|
2019-12-30 20:56:09 +00:00
|
|
|
``weigth`` : default ``1``
|
|
|
|
Weighting of the results of this engine.
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
``display_error_messages`` : default ``true``
|
2020-03-29 11:14:06 +00:00
|
|
|
When an engine returns an error, the message is displayed on the user interface.
|
|
|
|
|
[httpx] replace searx.poolrequests by searx.network
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-04-05 08:43:33 +00:00
|
|
|
``network``: optional
|
|
|
|
Use the network configuration from another engine.
|
|
|
|
In addition, there are two default networks:
|
|
|
|
* ``ipv4`` set ``local_addresses`` to ``0.0.0.0`` (use only IPv4 local addresses)
|
|
|
|
* ``ipv6`` set ``local_addresses`` to ``::`` (use only IPv6 local addresses)
|
|
|
|
|
2019-12-30 20:56:09 +00:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
A few more options are possible, but they are pretty specific to some
|
|
|
|
engines, and so won't be described here.
|
2020-11-03 14:29:59 +00:00
|
|
|
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
.. _settings use_default_settings:
|
2020-11-03 14:29:59 +00:00
|
|
|
|
|
|
|
use_default_settings
|
|
|
|
====================
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
.. sidebar:: ``use_default_settings: true``
|
2020-11-03 14:29:59 +00:00
|
|
|
|
2021-01-02 18:56:26 +00:00
|
|
|
- :ref:`settings location`
|
|
|
|
- :ref:`use_default_settings.yml`
|
|
|
|
- :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
|
|
|
|
|
|
|
|
The user defined ``settings.yml`` is loaded from the :ref:`settings location`
|
|
|
|
and can relied on the default configuration :origin:`searx/settings.yml` using:
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
``use_default_settings: true``
|
2021-01-02 18:56:26 +00:00
|
|
|
|
|
|
|
``server:``
|
|
|
|
In the following example, the actual settings are the default settings defined
|
|
|
|
in :origin:`searx/settings.yml` with the exception of the ``secret_key`` and
|
|
|
|
the ``bind_address``:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
use_default_settings: true
|
2021-01-02 18:56:26 +00:00
|
|
|
server:
|
2021-06-03 16:56:39 +00:00
|
|
|
secret_key: "ultrasecretkey" # change this!
|
2021-01-02 18:56:26 +00:00
|
|
|
bind_address: "0.0.0.0"
|
|
|
|
|
|
|
|
``engines:``
|
2021-06-03 16:56:39 +00:00
|
|
|
With ``use_default_settings: true``, each settings can be override in a
|
2021-01-02 18:56:26 +00:00
|
|
|
similar way, the ``engines`` section is merged according to the engine
|
|
|
|
``name``. In this example, searx will load all the engine and the arch linux
|
2021-06-03 16:56:39 +00:00
|
|
|
wiki engine has a :ref:`token <private engines>`:
|
2021-01-02 18:56:26 +00:00
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
2021-06-03 16:56:39 +00:00
|
|
|
use_default_settings: true
|
2021-01-02 18:56:26 +00:00
|
|
|
server:
|
2021-06-03 16:56:39 +00:00
|
|
|
secret_key: "ultrasecretkey" # change this!
|
2021-01-02 18:56:26 +00:00
|
|
|
engines:
|
|
|
|
- name: arch linux wiki
|
|
|
|
tokens: ['$ecretValue']
|
|
|
|
|
|
|
|
``engines:`` / ``remove:``
|
|
|
|
It is possible to remove some engines from the default settings. The following
|
|
|
|
example is similar to the above one, but searx doesn't load the the google
|
|
|
|
engine:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
use_default_settings:
|
2021-06-03 16:56:39 +00:00
|
|
|
engines:
|
|
|
|
remove:
|
|
|
|
- google
|
2021-01-02 18:56:26 +00:00
|
|
|
server:
|
2021-06-03 16:56:39 +00:00
|
|
|
secret_key: "ultrasecretkey" # change this!
|
2021-01-02 18:56:26 +00:00
|
|
|
engines:
|
|
|
|
- name: arch linux wiki
|
|
|
|
tokens: ['$ecretValue']
|
|
|
|
|
|
|
|
``engines:`` / ``keep_only:``
|
|
|
|
As an alternative, it is possible to specify the engines to keep. In the
|
|
|
|
following example, searx has only two engines:
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
use_default_settings:
|
2021-06-03 16:56:39 +00:00
|
|
|
engines:
|
|
|
|
keep_only:
|
|
|
|
- google
|
|
|
|
- duckduckgo
|
2021-01-02 18:56:26 +00:00
|
|
|
server:
|
2021-06-03 16:56:39 +00:00
|
|
|
secret_key: "ultrasecretkey" # change this!
|
2021-01-02 18:56:26 +00:00
|
|
|
engines:
|
|
|
|
- name: google
|
|
|
|
tokens: ['$ecretValue']
|
|
|
|
- name: duckduckgo
|
|
|
|
tokens: ['$ecretValue']
|