<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-location"></span><h2><aclass="toc-backref"href="#id2">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>
<spanid="settings-global"></span><h2><aclass="toc-backref"href="#id3">Global Settings</a><aclass="headerlink"href="#global-settings"title="Permalink to this headline">¶</a></h2>
<h3><aclass="toc-backref"href="#id4"><codeclass="docutils literal notranslate"><spanclass="pre">general:</span></code></a><aclass="headerlink"href="#general"title="Permalink to this headline">¶</a></h3>
<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">contact_url</span></code>:</dt><dd><p>Contact <codeclass="docutils literal notranslate"><spanclass="pre">mailto:</span></code> address or WEB form.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">git_url</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">git_branch</span></code>:</dt><dd><p>Changes this, to point to your searx fork (branch).</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">docs_url</span></code></dt><dd><p>If you host your own documentation, change this URL.</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">wiki_url</span></code>:</dt><dd><p>Link to your wiki (or <codeclass="docutils literal notranslate"><spanclass="pre">False</span></code>)</p>
</dd>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">twitter_url</span></code>:</dt><dd><p>Link to your tweets (or <codeclass="docutils literal notranslate"><spanclass="pre">False</span></code>)</p>
<h3><aclass="toc-backref"href="#id5"><codeclass="docutils literal notranslate"><spanclass="pre">server:</span></code></a><aclass="headerlink"href="#server"title="Permalink to this headline">¶</a></h3>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">port</span></code>&<codeclass="docutils literal notranslate"><spanclass="pre">bind_address</span></code>:</dt><dd><p>Port number and <em>bind address</em> 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
<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">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">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">default_theme</span></code> :</dt><dd><p>Name of the theme you want to use by default on your searx instance.</p>
</dd>
</dl>
<dlclass="simple">
<dt><codeclass="docutils literal notranslate"><spanclass="pre">default_http_headers</span></code>:</dt><dd><p>Set additional HTTP headers, see <aclass="reference external"href="https://github.com/searx/searx/issues/715">#755</a></p>
<h3><aclass="toc-backref"href="#id6"><codeclass="docutils literal notranslate"><spanclass="pre">outgoing:</span></code></a><aclass="headerlink"href="#outgoing"title="Permalink to this headline">¶</a></h3>
<divclass="highlight-yaml notranslate"><divclass="highlight"><pre><span></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"># 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>
<spanclass="c1"># uncomment below section if you want to use a proxy</span>
<spanclass="c1"># proxies:</span>
<spanclass="c1"># http:</span>
<spanclass="c1"># - http://proxy1:8080</span>
<spanclass="c1"># - http://proxy2:8080</span>
<spanclass="c1"># https:</span>
<spanclass="c1"># - http://proxy1:8080</span>
<spanclass="c1"># - http://proxy2:8080</span>
<spanclass="c1"># uncomment below section only if you have more than one network interface</span>
<spanclass="c1"># which can be the source of outgoing search requests</span>
<spanclass="c1"># source_ips:</span>
<spanclass="c1"># - 1.1.1.1</span>
<spanclass="c1"># - 1.1.1.2</span>
</pre></div>
</div>
<dlclass="simple">
<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). Can be override by <aclass="reference internal"href="#settings-engine"><spanclass="std std-ref">Engine settings</span></a></p>
</dd>
<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>
<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="https://requests.readthedocs.io/en/latest/user/advanced/#proxies">requests proxies</a>.
<li><p>SOCKS proxies are also supported: <aclass="reference external"href="https://2.python-requests.org/en/latest/user/advanced/#socks">see</a></p></li>
<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
<h3><aclass="toc-backref"href="#id7"><codeclass="docutils literal notranslate"><spanclass="pre">locales:</span></code></a><aclass="headerlink"href="#locales"title="Permalink to this headline">¶</a></h3>
<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="#id8">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-use-default-settings"></span><h2><aclass="toc-backref"href="#id9">use_default_settings</a><aclass="headerlink"href="#use-default-settings"title="Permalink to this headline">¶</a></h2>
<p>The user defined <codeclass="docutils literal notranslate"><spanclass="pre">settings.yml</span></code> is loaded from the <aclass="reference internal"href="#settings-location"><spanclass="std std-ref">settings.yml location</span></a>
and 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:</p>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">server:</span></code></dt><dd><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>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">engines:</span></code></dt><dd><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>. 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>
<dt><codeclass="docutils literal notranslate"><spanclass="pre">engines:</span></code> / <codeclass="docutils literal notranslate"><spanclass="pre">remove:</span></code></dt><dd><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
<dt><codeclass="docutils literal notranslate"><spanclass="pre">engines:</span></code> / <codeclass="docutils literal notranslate"><spanclass="pre">keep_only:</span></code></dt><dd><p>As an alternative, it is possible to specify the engines to keep. In the
following example, searx has only two engines:</p>