<spanid="id1"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">settings.yml</span></code><aclass="headerlink"href="#settings-yml"title="Permalink to this headline">¶</a></h1>
<p>This page describe the options possibilities of the <aclass="reference external"href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>
<spanid="settings-global"></span><h2><aclass="toc-backref"href="#id2">Global Settings</a><aclass="headerlink"href="#global-settings"title="Permalink to this headline">¶</a></h2>
<spanclass="l l-Scalar l-Scalar-Plain">useragent_suffix</span><spanclass="p p-Indicator">:</span><spanclass="s">""</span><spanclass="c1"># suffix of searx_useragent, could contain</span>
<spanclass="c1"># informations like admins email address</span>
<spanclass="l l-Scalar l-Scalar-Plain">outgoing</span><spanclass="p p-Indicator">:</span><spanclass="c1"># communication with search engines</span>
<spanclass="l l-Scalar l-Scalar-Plain">request_timeout</span><spanclass="p p-Indicator">:</span><spanclass="l l-Scalar l-Scalar-Plain">2.0</span><spanclass="c1"># default timeout in seconds, can be override by engine</span>
<spanclass="c1"># max_request_timeout: 10.0 # the maximum timeout in seconds</span>
<spanclass="l l-Scalar l-Scalar-Plain">useragent_suffix</span><spanclass="p p-Indicator">:</span><spanclass="s">""</span><spanclass="c1"># suffix of searx_useragent, could contain informations like an email address to the administrator</span>
<spanclass="l l-Scalar l-Scalar-Plain">pool_connections</span><spanclass="p p-Indicator">:</span><spanclass="l l-Scalar l-Scalar-Plain">100</span><spanclass="c1"># Number of different hosts</span>
<spanclass="l l-Scalar l-Scalar-Plain">pool_maxsize</span><spanclass="p p-Indicator">:</span><spanclass="l l-Scalar l-Scalar-Plain">10</span><spanclass="c1"># Number of simultaneous requests by host</span>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">port</span></code> :</dt><dd><p>Port number of the searx web application if you run it directly using <codeclass="docutils literal notranslate"><spanclass="pre">python</span>
<spanclass="pre">searx/webapp.py</span></code>. Doesn’t apply to searx running on Apache or Nginx.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">secret_key</span></code> :</dt><dd><p>Used for cryptography purpose.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">debug</span></code> :</dt><dd><p>Allow a more detailed log if you run searx directly. Display <em>detailed</em> error
messages in the browser too, so this must be deactivated in production.</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">request_timeout</span></code> :</dt><dd><p>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)</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">base_url</span></code> :</dt><dd><p>The base URL where searx is deployed. Used to create correct inbound links.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">themes_path</span></code> :</dt><dd><p>Path to where the themes are located. If you didn’t develop anything, leave it
<dt><codeclass="docutils literal notranslate"><spanclass="pre">default_theme</span></code> :</dt><dd><p>Name of the theme you want to use by default on your searx instance.</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">useragent_suffix</span></code> :</dt><dd><p>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.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">image_proxy</span></code> :</dt><dd><p>Allow your instance of searx of being able to proxy images. Uses memory space.</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">default_locale</span></code> :</dt><dd><p>Searx interface language. If blank, the locale is detected by using the
<dt><codeclass="docutils literal notranslate"><spanclass="pre">proxies</span></code> :</dt><dd><p>Define one or more proxies you wish to use, see <aclass="reference external"href="http://requests.readthedocs.io/en/latest/user/advanced/#proxies">requests proxies</a>.
If there are more than one proxy for one protocol (http, https),
requests to the engines are distributed in a round-robin fashion.</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">source_ips</span></code> :</dt><dd><p>If you use multiple network interfaces, define from which IP the requests must
<dt><codeclass="docutils literal notranslate"><spanclass="pre">locales</span></code> :</dt><dd><p>Locales codes and their names. Available translations of searx interface.</p>
<spanid="settings-engine"></span><h2><aclass="toc-backref"href="#id3">Engine settings</a><aclass="headerlink"href="#engine-settings"title="Permalink to this headline">¶</a></h2>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">name</span></code> :</dt><dd><p>Name that will be used across searx to define this engine. In settings, on
<dt><codeclass="docutils literal notranslate"><spanclass="pre">engine</span></code> :</dt><dd><p>Name of the python file used to handle requests and responses to and from this
search engine.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">shortcut</span></code> :</dt><dd><p>Code used to execute bang requests (in this case using <codeclass="docutils literal notranslate"><spanclass="pre">!bi</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">?bi</span></code>)</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">base_url</span></code><spanclass="classifier">optional</span></dt><dd><p>Part of the URL that should be stable across every request. Can be useful to
use multiple sites using only one engine, or updating the site URL without
touching at the code.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">categories</span></code><spanclass="classifier">optional</span></dt><dd><p>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.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">timeout</span></code><spanclass="classifier">optional</span></dt><dd><p>Timeout of the search with the current search engine. <strong>Be careful, it will
modify the global timeout of searx.</strong></p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">api_key</span></code><spanclass="classifier">optional</span></dt><dd><p>In a few cases, using an API needs the use of a secret key. How to obtain them
<dt><codeclass="docutils literal notranslate"><spanclass="pre">disabled</span></code><spanclass="classifier">optional</span></dt><dd><p>To disable by default the engine, but not deleting it. It will allow the user
<dt><codeclass="docutils literal notranslate"><spanclass="pre">language</span></code><spanclass="classifier">optional</span></dt><dd><p>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 <codeclass="docutils literal notranslate"><spanclass="pre">fr_FR</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">en_US</span></code>,
<dt><codeclass="docutils literal notranslate"><spanclass="pre">weigth</span></code><spanclass="classifier">default <codeclass="docutils literal notranslate"><spanclass="pre">1</span></code></span></dt><dd><p>Weighting of the results of this engine.</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">display_error_messages</span></code><spanclass="classifier">default <codeclass="docutils literal notranslate"><spanclass="pre">True</span></code></span></dt><dd><p>When an engine returns an error, the message is displayed on the user interface.</p>
<spanid="settings-location"></span><h2><aclass="toc-backref"href="#id4">settings.yml location</a><aclass="headerlink"href="#settings-yml-location"title="Permalink to this headline">¶</a></h2>
<p>First, searx will try to load settings.yml from these locations:</p>
<olclass="arabic simple">
<li><p>the full path specified in the <codeclass="docutils literal notranslate"><spanclass="pre">SEARX_SETTINGS_PATH</span></code> environment variable.</p></li>
<p>If these files don’t exist (or are empty or can’t be read), searx uses the <aclass="reference external"href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a> file.</p>
</div>
<divclass="section"id="use-default-settings">
<h2><aclass="toc-backref"href="#id5">use_default_settings</a><aclass="headerlink"href="#use-default-settings"title="Permalink to this headline">¶</a></h2>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>If searx is cloned from a git repository, most probably there is no need to have an user settings.</p>
</div>
<p>The user defined settings.yml can relied on the default configuration <aclass="reference external"href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a> using <codeclass="docutils literal notranslate"><spanclass="pre">use_default_settings:</span><spanclass="pre">True</span></code>.</p>
<p>In the following example, the actual settings are the default settings defined in <aclass="reference external"href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a> with the exception of the <codeclass="docutils literal notranslate"><spanclass="pre">secret_key</span></code> and the <codeclass="docutils literal notranslate"><spanclass="pre">bind_address</span></code>:</p>
<p>With <codeclass="docutils literal notranslate"><spanclass="pre">use_default_settings:</span><spanclass="pre">True</span></code>, each settings can be override in a similar way, the <codeclass="docutils literal notranslate"><spanclass="pre">engines</span></code> section is merged according to the engine <codeclass="docutils literal notranslate"><spanclass="pre">name</span></code>.</p>
<p>In this example, searx will load all the engine and the arch linux wiki engine has a <aclass="reference internal"href="../blog/private-engines.html#private-engines"><spanclass="std std-ref">token</span></a>:</p>
<p>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:</p>