@@ -9,6 +9,7 @@ file.
99
1010.. sidebar:: Further reading ..
1111
12+ - :ref:`use_default_settings.yml`
1213 - :ref:`search API`
1314
1415.. contents:: Contents
@@ -16,92 +17,61 @@ file.
1617 :local:
1718 :backlinks: entry
1819
19−.. _settings global:
20+.. _settings location:
2021
21−Global Settings
22−===============
22+settings.yml location
23+=====================
2324
24−.. code:: yaml
25+First, searx will try to load settings.yml from these locations:
2526
26− server:
27− port : 8888
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
27+1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
28+2. ``/etc/searx/settings.yml``
3829
39− outgoing: # communication with search engines
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
45−
46− #proxies:
47− # http:
48− # - http://proxy1:8080
49− # - http://proxy2:8080
50− # https:
51− # - http://proxy1:8080
52− # - http://proxy2:8080
53− # - socks5://user:password@proxy3:1080
54− # - socks5h://user:password@proxy4:1080
55−
56− #source_ips:
57− # - 1.1.1.1
58− # - 1.1.1.2
30+If these files don't exist (or are empty or can't be read), searx uses the :origin:`searx/settings.yml` file.
5931
60− locales:
61− en : English
62− de : Deutsch
63− he : Hebrew
64− hu : Magyar
65− fr : Français
66− es : Español
67− it : Italiano
68− nl : Nederlands
69− ja : 日本語 (Japanese)
70− tr : Türkçe
71− ru : Russian
72− ro : Romanian
7332
33+.. _settings global:
7434
75−``port`` :
76− Port number of the searx web application if you run it directly using ``python
77− searx/webapp.py``. Doesn't apply to searx running on Apache or Nginx.
35+Global Settings
36+===============
7837
79−``secret_key`` :
80− Used for cryptography purpose.
38+.. code:: yaml
39+
40+ general:
41+ debug : False # Debug mode, only for development
42+ instance_name : "searx" # displayed name
8143
8244``debug`` :
8345 Allow a more detailed log if you run searx directly. Display *detailed* error
8446 messages in the browser too, so this must be deactivated in production.
8547
86−``request_timeout`` :
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
90− timeout to load)
91−
92−``base_url`` :
93− The base URL where searx is deployed. Used to create correct inbound links.
48+.. code:: yaml
9449
95−``themes_path`` :
96− Path to where the themes are located. If you didn't develop anything, leave it
97− blank.
50+ server:
51+ port : 8888
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
64+
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
68+ Apache or Nginx.
9869
99−``default_theme`` :
100− Name of the theme you want to use by default on your searx instance.
70+``secret_key`` :
71+ Used for cryptography purpose.
10172
102−``useragent_suffix`` :
103− Suffix to the user-agent searx uses to send requests to others engines. If an
104− engine wish to block you, a contact info here may be useful to avoid that.
73+``base_url`` :
74+ The base URL where searx is deployed. Used to create correct inbound links.
10575
10676``image_proxy`` :
10777 Allow your instance of searx of being able to proxy images. Uses memory space.
@@ -112,6 +82,48 @@ Global Settings
11282 specific instance of searx, a locale can be defined using an ISO language
11383 code, like ``fr``, ``en``, ``de``.
11484
85+``default_theme`` :
86+ Name of the theme you want to use by default on your searx instance.
87+
88+.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
89+
90+``default_http_headers``:
91+ Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__
92+
93+
94+.. code:: yaml
95+
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
103+ # proxies:
104+ # http:
105+ # - http://proxy1:8080
106+ # - http://proxy2:8080
107+ # https:
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
112+ # source_ips:
113+ # - 1.1.1.1
114+ # - 1.1.1.2
115+
116+
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`
122+
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.
126+
115127.. _requests proxies: https://requests.readthedocs.io/en/latest/user/advanced/#proxies
116128.. _PySocks: https://pypi.org/project/PySocks/
117129
@@ -120,10 +132,29 @@ Global Settings
120132 If there are more than one proxy for one protocol (http, https),
121133 requests to the engines are distributed in a round-robin fashion.
122134
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>`__
137+
123138``source_ips`` :
124139 If you use multiple network interfaces, define from which IP the requests must
125140 be made. This parameter is ignored when ``proxies`` is set.
126141
142+.. code:: yaml
143+
144+ locales:
145+ en : English
146+ de : Deutsch
147+ he : Hebrew
148+ hu : Magyar
149+ fr : Français
150+ es : Español
151+ it : Italiano
152+ nl : Nederlands
153+ ja : 日本語 (Japanese)
154+ tr : Türkçe
155+ ru : Russian
156+ ro : Romanian
157+
127158``locales`` :
128159 Locales codes and their names. Available translations of searx interface.
129160
@@ -208,19 +239,7 @@ Engine settings
208239 engines, and so won't be described here.
209240
210241
211−.. _settings location:
212−
213−settings.yml location
214−=====================
215−
216−First, searx will try to load settings.yml from these locations:
217−
218−1. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
219−2. ``/etc/searx/settings.yml``
220−
221−If these files don't exist (or are empty or can't be read), searx uses the :origin:`searx/settings.yml` file.
222−
223−.. _ settings use_default_settings:
242+.. _settings use_default_settings:
224243
225244use_default_settings
226245====================