searx/admin/settings.html

470 lines
36 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>settings.yml &#8212; Searx Documentation (Searx-1.0.0.tex)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/searx.css" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Administration API" href="api.html" />
<link rel="prev" title="How to update" href="update-searx.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="api.html" title="Administration API"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="update-searx.html" title="How to update"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="settings-yml">
<span id="id1"></span><h1><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code><a class="headerlink" href="#settings-yml" title="Permalink to this headline"></a></h1>
<p>This page describe the options possibilities of the <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>
file.</p>
<div class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="installation-searx.html#use-default-settings-yml"><span class="std std-ref">Configuration</span></a></p></li>
<li><p><a class="reference internal" href="../dev/search_api.html#search-api"><span class="std std-ref">Search API</span></a></p></li>
</ul>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#settings-yml-location" id="id2">settings.yml location</a></p></li>
<li><p><a class="reference internal" href="#global-settings" id="id3">Global Settings</a></p>
<ul>
<li><p><a class="reference internal" href="#general" id="id4"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></p></li>
<li><p><a class="reference internal" href="#server" id="id5"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></p></li>
<li><p><a class="reference internal" href="#outgoing" id="id6"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></p></li>
<li><p><a class="reference internal" href="#locales" id="id7"><code class="docutils literal notranslate"><span class="pre">locales:</span></code></a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#engine-settings" id="id8">Engine settings</a></p></li>
<li><p><a class="reference internal" href="#use-default-settings" id="id9">use_default_settings</a></p></li>
</ul>
</div>
<div class="section" id="settings-yml-location">
<span id="settings-location"></span><h2><a class="toc-backref" href="#id2">settings.yml location</a><a class="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>
<ol class="arabic simple">
<li><p>the full path specified in the <code class="docutils literal notranslate"><span class="pre">SEARX_SETTINGS_PATH</span></code> environment variable.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">/etc/searx/settings.yml</span></code></p></li>
</ol>
<p>If these files dont exist (or are empty or cant be read), searx uses the
<a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a> file.</p>
</div>
<div class="section" id="global-settings">
<span id="settings-global"></span><h2><a class="toc-backref" href="#id3">Global Settings</a><a class="headerlink" href="#global-settings" title="Permalink to this headline"></a></h2>
<div class="section" id="general">
<h3><a class="toc-backref" href="#id4"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a><a class="headerlink" href="#general" title="Permalink to this headline"></a></h3>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">general</span><span class="p">:</span>
<span class="nt">debug </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">False</span> <span class="c1"># Debug mode, only for development</span>
<span class="nt">instance_name </span><span class="p">:</span> <span class="s">&quot;searx&quot;</span> <span class="c1"># displayed name</span>
<span class="nt">git_url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">https://github.com/searx/searx</span>
<span class="nt">git_branch</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">master</span>
<span class="nt">issue_url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">https://github.com/searx/searx/issues</span>
<span class="nt">docs_url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">https://searx.github.io/searx</span>
<span class="nt">public_instances</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">https://searx.space</span>
<span class="nt">contact_url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">False</span> <span class="c1"># mailto:contact@example.com</span>
<span class="nt">wiki_url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">https://github.com/searx/searx/wiki</span>
<span class="nt">twitter_url</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">https://twitter.com/Searx_engine</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="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>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">contact_url</span></code>:</dt><dd><p>Contact <code class="docutils literal notranslate"><span class="pre">mailto:</span></code> address or WEB form.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">git_url</span></code> and <code class="docutils literal notranslate"><span class="pre">git_branch</span></code>:</dt><dd><p>Changes this, to point to your searx fork (branch).</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">docs_url</span></code></dt><dd><p>If you host your own documentation, change this URL.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">wiki_url</span></code>:</dt><dd><p>Link to your wiki (or <code class="docutils literal notranslate"><span class="pre">False</span></code>)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">twitter_url</span></code>:</dt><dd><p>Link to your tweets (or <code class="docutils literal notranslate"><span class="pre">False</span></code>)</p>
</dd>
</dl>
</div>
<div class="section" id="server">
<h3><a class="toc-backref" href="#id5"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a><a class="headerlink" href="#server" title="Permalink to this headline"></a></h3>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">server</span><span class="p">:</span>
<span class="nt">port </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">8888</span>
<span class="nt">bind_address </span><span class="p">:</span> <span class="s">&quot;127.0.0.1&quot;</span> <span class="c1"># address to listen on</span>
<span class="nt">secret_key </span><span class="p">:</span> <span class="s">&quot;ultrasecretkey&quot;</span> <span class="c1"># change this!</span>
<span class="nt">base_url </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">False</span> <span class="c1"># set custom base_url (or False)</span>
<span class="nt">image_proxy </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">False</span> <span class="c1"># proxying image results through searx</span>
<span class="nt">default_locale </span><span class="p">:</span> <span class="s">&quot;&quot;</span> <span class="c1"># default interface locale</span>
<span class="nt">default_theme </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">oscar</span> <span class="c1"># ui theme</span>
<span class="nt">default_http_headers</span><span class="p">:</span>
<span class="nt">X-Content-Type-Options </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">nosniff</span>
<span class="nt">X-XSS-Protection </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">1; mode=block</span>
<span class="nt">X-Download-Options </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">noopen</span>
<span class="nt">X-Robots-Tag </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">noindex, nofollow</span>
<span class="nt">Referrer-Policy </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">no-referrer</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">port</span></code> &amp; <code class="docutils literal notranslate"><span class="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 <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">searx/webapp.py</span></code>. Doesnt apply to searx running on
Apache or Nginx.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">secret_key</span></code> :</dt><dd><p>Used for cryptography purpose.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code> :</dt><dd><p>The base URL where searx is deployed. Used to create correct inbound links.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">image_proxy</span></code> :</dt><dd><p>Allow your instance of searx of being able to proxy images. Uses memory space.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">default_locale</span></code> :</dt><dd><p>Searx interface language. If blank, the locale is detected by using the
browser language. If it doesnt work, or you are deploying a language
specific instance of searx, a locale can be defined using an ISO language
code, like <code class="docutils literal notranslate"><span class="pre">fr</span></code>, <code class="docutils literal notranslate"><span class="pre">en</span></code>, <code class="docutils literal notranslate"><span class="pre">de</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="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>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">default_http_headers</span></code>:</dt><dd><p>Set additional HTTP headers, see <a class="reference external" href="https://github.com/searx/searx/issues/715">#755</a></p>
</dd>
</dl>
</div>
<div class="section" id="outgoing">
<h3><a class="toc-backref" href="#id6"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a><a class="headerlink" href="#outgoing" title="Permalink to this headline"></a></h3>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">outgoing</span><span class="p">:</span> <span class="c1"># communication with search engines</span>
<span class="nt">request_timeout </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">2.0</span> <span class="c1"># default timeout in seconds, can be override by engine</span>
<span class="c1"># max_request_timeout: 10.0 # the maximum timeout in seconds</span>
<span class="nt">useragent_suffix </span><span class="p">:</span> <span class="s">&quot;&quot;</span> <span class="c1"># informations like an email address to the administrator</span>
<span class="nt">pool_connections </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">100</span> <span class="c1"># Maximum number of allowable connections, or None for no limits. The default is 100.</span>
<span class="nt">pool_maxsize </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">10</span> <span class="c1"># Number of allowable keep-alive connections, or None to always allow. The default is 10.</span>
<span class="nt">enable_http2</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">True</span> <span class="c1"># See https://www.python-httpx.org/http2/</span>
<span class="c1"># uncomment below section if you want to use a proxy</span>
<span class="c1"># proxies:</span>
<span class="c1"># all://:</span>
<span class="c1"># - http://proxy1:8080</span>
<span class="c1"># - http://proxy2:8080</span>
<span class="c1"># uncomment below section only if you have more than one network interface</span>
<span class="c1"># which can be the source of outgoing search requests</span>
<span class="c1"># source_ips:</span>
<span class="c1"># - 1.1.1.1</span>
<span class="c1"># - 1.1.1.2</span>
<span class="c1"># - fe80::/126</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="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 <a class="reference internal" href="#settings-engine"><span class="std std-ref">Engine settings</span></a></p>
</dd>
<dt><code class="docutils literal notranslate"><span class="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><code class="docutils literal notranslate"><span class="pre">keepalive_expiry</span></code>:</dt><dd><p>Number of seconds to keep a connection in the pool. By default 5.0 seconds.</p>
</dd>
</dl>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">proxies</span></code> :</dt><dd><p>Define one or more proxies you wish to use, see <a class="reference external" href="https://www.python-httpx.org/advanced/#http-proxying">httpx 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>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">source_ips</span></code> :</dt><dd><p>If you use multiple network interfaces, define from which IP the requests must
be made. Example:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0.0.0.0</span></code> any local IPv4 address.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">::</span></code> any local IPv6 address.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">192.168.0.1</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">[</span> <span class="pre">192.168.0.1,</span> <span class="pre">192.168.0.2</span> <span class="pre">]</span></code> these two specific IP addresses</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">fe80::60a2:1691:e5a2:ee1f</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">fe80::60a2:1691:e5a2:ee1f/126</span></code> all IP addresses in this network.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">[</span> <span class="pre">192.168.0.1,</span> <span class="pre">fe80::/126</span> <span class="pre">]</span></code></p></li>
</ul>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">retries</span></code> :</dt><dd><p>Number of retry in case of an HTTP error.
On each retry, searx uses an different proxy and source ip.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">retry_on_http_error</span></code> :</dt><dd><p>Retry request on some HTTP status code.</p>
<p>Example:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">true</span></code> : on HTTP status code between 400 and 599.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">403</span></code> : on HTTP status code 403.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">[403,</span> <span class="pre">429]</span></code>: on HTTP status code 403 and 429.</p></li>
</ul>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">enable_http2</span></code> :</dt><dd><p>Enable by default. Set to <code class="docutils literal notranslate"><span class="pre">False</span></code> to disable HTTP/2.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">max_redirects</span></code> :</dt><dd><p>30 by default. Maximum redirect before it is an error.</p>
</dd>
</dl>
</div>
<div class="section" id="locales">
<h3><a class="toc-backref" href="#id7"><code class="docutils literal notranslate"><span class="pre">locales:</span></code></a><a class="headerlink" href="#locales" title="Permalink to this headline"></a></h3>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">locales</span><span class="p">:</span>
<span class="nt">en </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">English</span>
<span class="nt">de </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Deutsch</span>
<span class="nt">he </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Hebrew</span>
<span class="nt">hu </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Magyar</span>
<span class="nt">fr </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Français</span>
<span class="nt">es </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Español</span>
<span class="nt">it </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Italiano</span>
<span class="nt">nl </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Nederlands</span>
<span class="nt">ja </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">日本語 (Japanese)</span>
<span class="nt">tr </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Türkçe</span>
<span class="nt">ru </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Russian</span>
<span class="nt">ro </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Romanian</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">locales</span></code> :</dt><dd><p>Locales codes and their names. Available translations of searx interface.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="engine-settings">
<span id="settings-engine"></span><h2><a class="toc-backref" href="#id8">Engine settings</a><a class="headerlink" href="#engine-settings" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../dev/engine_overview.html#engines-dev"><span class="std std-ref">Engine overview</span></a></p></li>
</ul>
</div>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span> <span class="nt">name </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">bing</span>
<span class="nt">engine </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">bing</span>
<span class="nt">shortcut </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">bi</span>
<span class="nt">base_url </span><span class="p">:</span> <span class="s">&#39;https://{language}.wikipedia.org/&#39;</span>
<span class="nt">categories </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">general</span>
<span class="nt">timeout </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">3.0</span>
<span class="nt">api_key </span><span class="p">:</span> <span class="s">&#39;apikey&#39;</span>
<span class="nt">disabled </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">True</span>
<span class="nt">language </span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">en_US</span>
<span class="c1">#enable_http: False</span>
<span class="c1">#enable_http2: False</span>
<span class="c1">#retries: 1</span>
<span class="c1">#retry_on_http_error: True # or 403 or [404, 429]</span>
<span class="c1">#max_connections: 100</span>
<span class="c1">#max_keepalive_connections: 10</span>
<span class="c1">#keepalive_expiry: 5.0</span>
<span class="c1">#proxies:</span>
<span class="c1"># http:</span>
<span class="c1"># - http://proxy1:8080</span>
<span class="c1"># - http://proxy2:8080</span>
<span class="c1"># https:</span>
<span class="c1"># - http://proxy1:8080</span>
<span class="c1"># - http://proxy2:8080</span>
<span class="c1"># - socks5://user:password@proxy3:1080</span>
<span class="c1"># - socks5h://user:password@proxy4:1080</span>
</pre></div>
</div>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">name</span></code> :</dt><dd><p>Name that will be used across searx to define this engine. In settings, on
the result page…</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="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><code class="docutils literal notranslate"><span class="pre">shortcut</span></code> :</dt><dd><p>Code used to execute bang requests (in this case using <code class="docutils literal notranslate"><span class="pre">!bi</span></code> or <code class="docutils literal notranslate"><span class="pre">?bi</span></code>)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code><span class="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><code class="docutils literal notranslate"><span class="pre">categories</span></code><span class="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><code class="docutils literal notranslate"><span class="pre">timeout</span></code><span class="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><code class="docutils literal notranslate"><span class="pre">api_key</span></code><span class="classifier">optional</span></dt><dd><p>In a few cases, using an API needs the use of a secret key. How to obtain them
is described in the file.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">disabled</span></code><span class="classifier">optional</span></dt><dd><p>To disable by default the engine, but not deleting it. It will allow the user
to manually activate it in the settings.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">language</span></code><span class="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 <code class="docutils literal notranslate"><span class="pre">fr_FR</span></code>, <code class="docutils literal notranslate"><span class="pre">en_US</span></code>,
<code class="docutils literal notranslate"><span class="pre">de_DE</span></code>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">weigth</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">1</span></code></span></dt><dd><p>Weighting of the results of this engine.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">display_error_messages</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">True</span></code></span></dt><dd><p>When an engine returns an error, the message is displayed on the user interface.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">network</span></code>: optional</dt><dd><p>Use the network configuration from another engine.
In addition, there are two default networks:
* <code class="docutils literal notranslate"><span class="pre">ipv4</span></code> set <code class="docutils literal notranslate"><span class="pre">local_addresses</span></code> to <code class="docutils literal notranslate"><span class="pre">0.0.0.0</span></code> (use only IPv4 local addresses)
* <code class="docutils literal notranslate"><span class="pre">ipv6</span></code> set <code class="docutils literal notranslate"><span class="pre">local_addresses</span></code> to <code class="docutils literal notranslate"><span class="pre">::</span></code> (use only IPv6 local addresses)</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A few more options are possible, but they are pretty specific to some
engines, and so wont be described here.</p>
</div>
</div>
<div class="section" id="use-default-settings">
<span id="settings-use-default-settings"></span><h2><a class="toc-backref" href="#id9">use_default_settings</a><a class="headerlink" href="#use-default-settings" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title"><code class="docutils literal notranslate"><span class="pre">use_default_settings:</span> <span class="pre">True</span></code></p>
<ul class="simple">
<li><p><a class="reference internal" href="#settings-location"><span class="std std-ref">settings.yml location</span></a></p></li>
<li><p><a class="reference internal" href="installation-searx.html#use-default-settings-yml"><span class="std std-ref">Configuration</span></a></p></li>
<li><p><a class="reference external" href="https://github.com/searx/searx/blob/master/utils/templates/etc/searx/use_default_settings.yml">/etc/searx/settings.yml</a></p></li>
</ul>
</div>
<p>The user defined <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> is loaded from the <a class="reference internal" href="#settings-location"><span class="std std-ref">settings.yml location</span></a>
and can relied on the default configuration <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a> using:</p>
<blockquote>
<div><p><code class="docutils literal notranslate"><span class="pre">use_default_settings:</span> <span class="pre">True</span></code></p>
</div></blockquote>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">server:</span></code></dt><dd><p>In the following example, the actual settings are the default settings defined
in <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a> with the exception of the <code class="docutils literal notranslate"><span class="pre">secret_key</span></code> and
the <code class="docutils literal notranslate"><span class="pre">bind_address</span></code>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">use_default_settings</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">True</span>
<span class="nt">server</span><span class="p">:</span>
<span class="nt">secret_key</span><span class="p">:</span> <span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span>
<span class="nt">bind_address</span><span class="p">:</span> <span class="s">&quot;0.0.0.0&quot;</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">engines:</span></code></dt><dd><p>With <code class="docutils literal notranslate"><span class="pre">use_default_settings:</span> <span class="pre">True</span></code>, each settings can be override in a
similar way, the <code class="docutils literal notranslate"><span class="pre">engines</span></code> section is merged according to the engine
<code class="docutils literal notranslate"><span class="pre">name</span></code>. In this example, searx will load all the engine and the arch linux
wiki engine has a <a class="reference internal" href="../blog/private-engines.html#private-engines"><span class="std std-ref">token</span></a>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">use_default_settings</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">True</span>
<span class="nt">server</span><span class="p">:</span>
<span class="nt">secret_key</span><span class="p">:</span> <span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">arch linux wiki</span>
<span class="nt">tokens</span><span class="p">:</span> <span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">engines:</span></code> / <code class="docutils literal notranslate"><span class="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 doesnt load the the google
engine:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">use_default_settings</span><span class="p">:</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="nt">remove</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="nt">server</span><span class="p">:</span>
<span class="nt">secret_key</span><span class="p">:</span> <span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">arch linux wiki</span>
<span class="nt">tokens</span><span class="p">:</span> <span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">engines:</span></code> / <code class="docutils literal notranslate"><span class="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>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">use_default_settings</span><span class="p">:</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="nt">keep_only</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">duckduckgo</span>
<span class="nt">server</span><span class="p">:</span>
<span class="nt">secret_key</span><span class="p">:</span> <span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="nt">tokens</span><span class="p">:</span> <span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span>
<span class="p p-Indicator">-</span> <span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">duckduckgo</span>
<span class="nt">tokens</span><span class="p">:</span> <span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span>
</pre></div>
</div>
</dd>
</dl>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="blog/index.html">Blog</a>
<li><a href="https://github.com/searx/searx">Source</a>
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
<li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="update-searx.html" title="previous chapter">How to update</a>
<li>Next: <a href="api.html" title="next chapter">Administration API</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2021, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>