@@ -9,6 +9,7 @@ file.
10.. sidebar:: Further reading ..
10.. sidebar:: Further reading ..
12+ - :ref:`use_default_settings.yml`
12 - :ref:`search API`
13 - :ref:`search API`
14.. contents:: Contents
15.. contents:: Contents
@@ -16,92 +17,61 @@ file.
17 :backlinks: entry
18 :backlinks: entry
19−.. _settings global:
20+.. _settings location:
21−Global Settings
22+settings.yml location
22−===============
23+=====================
24−.. code:: yaml
25+First, searx will try to load settings.yml from these locations:
26− server:
27+1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
27− port : 8888
28+2. ``/etc/searx/settings.yml``
28− secret_key : "ultrasecretkey" # change this!
29− debug : False # debug mode, only for development
30− request_timeout : 2.0 # seconds
31− base_url : False # set custom base_url (or False)
32− themes_path : "" # custom ui themes path
33− default_theme : oscar # ui theme
34− useragent_suffix : "" # suffix of searx_useragent, could contain
35− # informations like admins email address
36− image_proxy : False # proxying image results through searx
37− default_locale : "" # default interface locale
39− outgoing: # communication with search engines
30+If these files don't exist (or are empty or can't be read), searx uses the :origin:`searx/settings.yml` file.
40− request_timeout : 2.0 # default timeout in seconds, can be override by engine
41− # max_request_timeout: 10.0 # the maximum timeout in seconds
42− useragent_suffix : "" # suffix of searx_useragent, could contain informations like an email address to the administrator
43− pool_connections : 100 # Number of different hosts
44− pool_maxsize : 10 # Number of simultaneous requests by host
48− # - http://proxy1:8080
49− # - http://proxy2:8080
51− # - http://proxy1:8080
52− # - http://proxy2:8080
53− # - socks5://user:password@proxy3:1080
54− # - socks5h://user:password@proxy4:1080
75−``port`` :
35+Global Settings
76− Port number of the searx web application if you run it directly using ``python
36+===============
77− searx/webapp.py``. Doesn't apply to searx running on Apache or Nginx.
79−``secret_key`` :
38+.. code:: yaml
80− Used for cryptography purpose.
39+
41+ debug : False # Debug mode, only for development
42+ instance_name : "searx" # displayed name
82``debug`` :
44``debug`` :
83 Allow a more detailed log if you run searx directly. Display *detailed* error
45 Allow a more detailed log if you run searx directly. Display *detailed* error
84 messages in the browser too, so this must be deactivated in production.
46 messages in the browser too, so this must be deactivated in production.
86−``request_timeout`` :
48+.. code:: yaml
87− Global timeout of the requests made to others engines in seconds. A bigger
88− timeout will allow to wait for answers from slow engines, but in consequence
89− will slow searx reactivity (the result page may take the time specified in the
93− The base URL where searx is deployed. Used to create correct inbound links.
95−``themes_path`` :
50+ server:
96− Path to where the themes are located. If you didn't develop anything, leave it
51+ port : 8888
97− blank.
52+ bind_address : "127.0.0.1" # address to listen on
53+ secret_key : "ultrasecretkey" # change this!
54+ base_url : False # set custom base_url (or False)
55+ image_proxy : False # proxying image results through searx
56+ default_locale : "" # default interface locale
57+ default_theme : oscar # ui theme
58+ default_http_headers:
59+ X-Content-Type-Options : nosniff
60+ X-XSS-Protection : 1; mode=block
61+ X-Download-Options : noopen
62+ X-Robots-Tag : noindex, nofollow
63+ Referrer-Policy : no-referrer
65+``port`` & ``bind_address``:
66+ Port number and *bind address* of the searx web application if you run it
67+ directly using ``python searx/webapp.py``. Doesn't apply to searx running on
99−``default_theme`` :
70+``secret_key`` :
100− Name of the theme you want to use by default on your searx instance.
71+ Used for cryptography purpose.
102−``useragent_suffix`` :
73+``base_url`` :
103− Suffix to the user-agent searx uses to send requests to others engines. If an
74+ The base URL where searx is deployed. Used to create correct inbound links.
104− engine wish to block you, a contact info here may be useful to avoid that.
106``image_proxy`` :
76``image_proxy`` :
107 Allow your instance of searx of being able to proxy images. Uses memory space.
77 Allow your instance of searx of being able to proxy images. Uses memory space.
@@ -112,6 +82,48 @@ Global Settings
112 specific instance of searx, a locale can be defined using an ISO language
82 specific instance of searx, a locale can be defined using an ISO language
113 code, like ``fr``, ``en``, ``de``.
83 code, like ``fr``, ``en``, ``de``.
86+ Name of the theme you want to use by default on your searx instance.
88+.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
90+``default_http_headers``:
91+ Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__
96+ outgoing: # communication with search engines
97+ request_timeout : 2.0 # default timeout in seconds, can be override by engine
98+ # max_request_timeout: 10.0 # the maximum timeout in seconds
99+ useragent_suffix : "" # informations like an email address to the administrator
100+ pool_connections : 100 # Number of different hosts
101+ pool_maxsize : 10 # Number of simultaneous requests by host
102+ # uncomment below section if you want to use a proxy
105+ # - http://proxy1:8080
106+ # - http://proxy2:8080
108+ # - http://proxy1:8080
109+ # - http://proxy2:8080
110+ # uncomment below section only if you have more than one network interface
111+ # which can be the source of outgoing search requests
117+``request_timeout`` :
118+ Global timeout of the requests made to others engines in seconds. A bigger
119+ timeout will allow to wait for answers from slow engines, but in consequence
120+ will slow searx reactivity (the result page may take the time specified in the
121+ timeout to load). Can be override by :ref:`settings engine`
123+``useragent_suffix`` :
124+ Suffix to the user-agent searx uses to send requests to others engines. If an
125+ engine wish to block you, a contact info here may be useful to avoid that.
115.. _requests proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies
127.. _requests proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies
116.. _PySocks: https://pypi.org/project/PySocks/
128.. _PySocks: https://pypi.org/project/PySocks/
@@ -120,10 +132,29 @@ Global Settings
120 If there are more than one proxy for one protocol (http, https),
132 If there are more than one proxy for one protocol (http, https),
121 requests to the engines are distributed in a round-robin fashion.
133 requests to the engines are distributed in a round-robin fashion.
135+ - Proxy: `see <https://2.python-requests.org/en/latest/user/advanced/#proxies>`__.
136+ - SOCKS proxies are also supported: `see <https://2.python-requests.org/en/latest/user/advanced/#socks>`__
123``source_ips`` :
138``source_ips`` :
124 If you use multiple network interfaces, define from which IP the requests must
139 If you use multiple network interfaces, define from which IP the requests must
125 be made. This parameter is ignored when ``proxies`` is set.
140 be made. This parameter is ignored when ``proxies`` is set.
127``locales`` :
158``locales`` :
128 Locales codes and their names. Available translations of searx interface.
159 Locales codes and their names. Available translations of searx interface.
@@ -208,19 +239,7 @@ Engine settings
208 engines, and so won't be described here.
239 engines, and so won't be described here.
211−.. _settings location:
213−settings.yml location
214−=====================
216−First, searx will try to load settings.yml from these locations:
218−1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
219−2. ``/etc/searx/settings.yml``
221−If these files don't exist (or are empty or can't be read), searx uses the :origin:`searx/settings.yml` file.
223−.. _ settings use_default_settings:
242+.. _settings use_default_settings:
225use_default_settings
244use_default_settings
226====================
245====================