7This page describe the options possibilities of the :origin:`searx/settings.yml`
10.. sidebar:: Further reading ..
12 - :ref:`use_default_settings.yml`
25First, searx will try to load settings.yml from these locations:
271. the full path specified in the ``SEARX_SETTINGS_PATH`` environment variable.
282. ``/etc/searx/settings.yml``
30If these files don't exist (or are empty or can't be read), searx uses the
31:origin:`searx/settings.yml` file.
45 debug : False # Debug mode, only for development
46 instance_name : "searx" # displayed name
47 git_url: https://github.com/searx/searx
49 issue_url: https://github.com/searx/searx/issues
50 docs_url: https://searx.github.io/searx
51 public_instances: https://searx.space
52 contact_url: False # mailto:contact@example.com
53 wiki_url: https://github.com/searx/searx/wiki
54 twitter_url: https://twitter.com/Searx_engine
57 Allow a more detailed log if you run searx directly. Display *detailed* error
58 messages in the browser too, so this must be deactivated in production.
61 Contact ``mailto:`` address or WEB form.
63``git_url`` and ``git_branch``:
64 Changes this, to point to your searx fork (branch).
67 If you host your own documentation, change this URL.
70 Link to your wiki (or ``False``)
73 Link to your tweets (or ``False``)
83 bind_address : "127.0.0.1" # address to listen on
84 secret_key : "ultrasecretkey" # change this!
85 base_url : False # set custom base_url (or False)
86 image_proxy : False # proxying image results through searx
87 default_locale : "" # default interface locale
88 default_theme : oscar # ui theme
90 X-Content-Type-Options : nosniff
91 X-XSS-Protection : 1; mode=block
92 X-Download-Options : noopen
93 X-Robots-Tag : noindex, nofollow
94 Referrer-Policy : no-referrer
96``port`` & ``bind_address``:
97 Port number and *bind address* of the searx web application if you run it
98 directly using ``python searx/webapp.py``. Doesn't apply to searx running on
102 Used for cryptography purpose.
105 The base URL where searx is deployed. Used to create correct inbound links.
108 Allow your instance of searx of being able to proxy images. Uses memory space.
111 Searx interface language. If blank, the locale is detected by using the
112 browser language. If it doesn't work, or you are deploying a language
113 specific instance of searx, a locale can be defined using an ISO language
114 code, like ``fr``, ``en``, ``de``.
117 Name of the theme you want to use by default on your searx instance.
119.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
121``default_http_headers``:
122 Set additional HTTP headers, see `#755 <https://github.com/searx/searx/issues/715>`__
129 outgoing: # communication with search engines
130 request_timeout : 2.0 # default timeout in seconds, can be override by engine
131 # max_request_timeout: 10.0 # the maximum timeout in seconds
132 useragent_suffix : "" # informations like an email address to the administrator
133 pool_connections : 100 # Maximum number of allowable connections, or None for no limits. The default is 100.
134 pool_maxsize : 10 # Number of allowable keep-alive connections, or None to always allow. The default is 10.
135 enable_http2: True # See https://www.python-httpx.org/http2/
136 # uncomment below section if you want to use a proxy
139 # - http://proxy1:8080
140 # - http://proxy2:8080
141 # uncomment below section only if you have more than one network interface
142 # which can be the source of outgoing search requests
150 Global timeout of the requests made to others engines in seconds. A bigger
151 timeout will allow to wait for answers from slow engines, but in consequence
152 will slow searx reactivity (the result page may take the time specified in the
153 timeout to load). Can be override by :ref:`settings engine`
155``useragent_suffix`` :
156 Suffix to the user-agent searx uses to send requests to others engines. If an
157 engine wish to block you, a contact info here may be useful to avoid that.
160 Number of seconds to keep a connection in the pool. By default 5.0 seconds.
162.. _httpx proxies: https://www.python-httpx.org/advanced/#http-proxying
165 Define one or more proxies you wish to use, see `httpx proxies`_.
166 If there are more than one proxy for one protocol (http, https),
167 requests to the engines are distributed in a round-robin fashion.
170 If you use multiple network interfaces, define from which IP the requests must
173 * ``0.0.0.0`` any local IPv4 address.
174 * ``::`` any local IPv6 address.
176 * ``[ 192.168.0.1, 192.168.0.2 ]`` these two specific IP addresses
177 * ``fe80::60a2:1691:e5a2:ee1f``
178 * ``fe80::60a2:1691:e5a2:ee1f/126`` all IP addresses in this network.
179 * ``[ 192.168.0.1, fe80::/126 ]``
182 Number of retry in case of an HTTP error.
183 On each retry, searx uses an different proxy and source ip.
185``retry_on_http_error`` :
186 Retry request on some HTTP status code.
190 * ``true`` : on HTTP status code between 400 and 599.
191 * ``403`` : on HTTP status code 403.
192 * ``[403, 429]``: on HTTP status code 403 and 429.
195 Enable by default. Set to ``False`` to disable HTTP/2.
198 30 by default. Maximum redirect before it is an error.
221 Locales codes and their names. Available translations of searx interface.
229.. sidebar:: Further reading ..
238 base_url : 'https://{language}.wikipedia.org/'
247 #retry_on_http_error: True # or 403 or [404, 429]
248 #max_connections: 100
249 #max_keepalive_connections: 10
250 #keepalive_expiry: 5.0
253 # - http://proxy1:8080
254 # - http://proxy2:8080
256 # - http://proxy1:8080
257 # - http://proxy2:8080
258 # - socks5://user:password@proxy3:1080
259 # - socks5h://user:password@proxy4:1080
262 Name that will be used across searx to define this engine. In settings, on
266 Name of the python file used to handle requests and responses to and from this
270 Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
272``base_url`` : optional
273 Part of the URL that should be stable across every request. Can be useful to
274 use multiple sites using only one engine, or updating the site URL without
275 touching at the code.
277``categories`` : optional
278 Define in which categories this engine will be active. Most of the time, it is
279 defined in the code of the engine, but in a few cases it is useful, like when
280 describing multiple search engine using the same code.
282``timeout`` : optional
283 Timeout of the search with the current search engine. **Be careful, it will
284 modify the global timeout of searx.**
286``api_key`` : optional
287 In a few cases, using an API needs the use of a secret key. How to obtain them
288 is described in the file.
290``disabled`` : optional
291 To disable by default the engine, but not deleting it. It will allow the user
292 to manually activate it in the settings.
294``language`` : optional
295 If you want to use another language for a specific engine, you can define it
296 by using the full ISO code of language and country, like ``fr_FR``, ``en_US``,
299``weigth`` : default ``1``
300 Weighting of the results of this engine.
302``display_error_messages`` : default ``True``
303 When an engine returns an error, the message is displayed on the user interface.
306 Use the network configuration from another engine.
307 In addition, there are two default networks:
308 * ``ipv4`` set ``local_addresses`` to ``0.0.0.0`` (use only IPv4 local addresses)
309 * ``ipv6`` set ``local_addresses`` to ``::`` (use only IPv6 local addresses)
313 A few more options are possible, but they are pretty specific to some
314 engines, and so won't be described here.
317.. _settings use_default_settings:
322.. sidebar:: ``use_default_settings: True``
324 - :ref:`settings location`
325 - :ref:`use_default_settings.yml`
326 - :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
328The user defined ``settings.yml`` is loaded from the :ref:`settings location`
329and can relied on the default configuration :origin:`searx/settings.yml` using:
331 ``use_default_settings: True``
334 In the following example, the actual settings are the default settings defined
335 in :origin:`searx/settings.yml` with the exception of the ``secret_key`` and
336 the ``bind_address``:
340 use_default_settings: True
342 secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
343 bind_address: "0.0.0.0"
346 With ``use_default_settings: True``, each settings can be override in a
347 similar way, the ``engines`` section is merged according to the engine
348 ``name``. In this example, searx will load all the engine and the arch linux
349 wiki engine has a :ref:`token<private engines>`:
353 use_default_settings: True
355 secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
357 - name: arch linux wiki
358 tokens: ['$ecretValue']
360``engines:`` / ``remove:``
361 It is possible to remove some engines from the default settings. The following
362 example is similar to the above one, but searx doesn't load the the google
367 use_default_settings:
372 secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
374 - name: arch linux wiki
375 tokens: ['$ecretValue']
377``engines:`` / ``keep_only:``
378 As an alternative, it is possible to specify the engines to keep. In the
379 following example, searx has only two engines:
383 use_default_settings:
389 secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
392 tokens: ['$ecretValue']
394 tokens: ['$ecretValue']
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list