build from commit 905ce2a6f6

This commit is contained in:
return42 2023-08-11 10:34:02 +00:00
commit 5849f6a4b3
277 changed files with 61654 additions and 0 deletions

196
admin/answer-captcha.html Normal file
View file

@ -0,0 +1,196 @@
<!DOCTYPE html>
<html lang="en">
<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>Answer CAPTCHA from servers IP &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/tabs.js?v=3030b3cb"></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="SearXNG maintenance" href="update-searxng.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-searxng.html" title="SearXNG maintenance"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Answer CAPTCHA from servers IP</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="answer-captcha-from-server-s-ip">
<h1>Answer CAPTCHA from servers IP<a class="headerlink" href="#answer-captcha-from-server-s-ip" title="Permalink to this heading"></a></h1>
<p>With a SSH tunnel we can send requests from servers IP and solve a CAPTCHA that
blocks requests from this IP. If your SearXNG instance is hosted at
<code class="docutils literal notranslate"><span class="pre">example.org</span></code> and your login is <code class="docutils literal notranslate"><span class="pre">user</span></code> you can setup a proxy simply by
<a class="reference external" href="https://manpages.debian.org/jump?q=ssh">ssh</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># SOCKS server: socks://127.0.0.1:8080</span>
$<span class="w"> </span>ssh<span class="w"> </span>-q<span class="w"> </span>-N<span class="w"> </span>-D<span class="w"> </span><span class="m">8080</span><span class="w"> </span>user@example.org
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">socks://localhost:8080</span></code> from above can be tested by:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-c2VydmVyJ3MgSVA=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-c2VydmVyJ3MgSVA=" name="c2VydmVyJ3MgSVA=" role="tab" tabindex="0">servers IP</button><button aria-controls="panel-0-ZGVza3RvcCdzIElQ" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-ZGVza3RvcCdzIElQ" name="ZGVza3RvcCdzIElQ" role="tab" tabindex="-1">desktops IP</button></div><div aria-labelledby="tab-0-c2VydmVyJ3MgSVA=" class="sphinx-tabs-panel group-tab" id="panel-0-c2VydmVyJ3MgSVA=" name="c2VydmVyJ3MgSVA=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>curl<span class="w"> </span>-x<span class="w"> </span>socks://127.0.0.1:8080<span class="w"> </span>http://ipecho.net/plain
n.n.n.n
</pre></div>
</div>
</div><div aria-labelledby="tab-0-ZGVza3RvcCdzIElQ" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-ZGVza3RvcCdzIElQ" name="ZGVza3RvcCdzIElQ" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>curl<span class="w"> </span>http://ipecho.net/plain
x.x.x.x
</pre></div>
</div>
</div></div>
<p>In the settings of the WEB browser open the <em>“Network Settings”</em> and setup a
proxy on <code class="docutils literal notranslate"><span class="pre">SOCKS5</span> <span class="pre">127.0.0.1:8080</span></code> (see screenshot below). In the WEB browser
check the IP from the server is used:</p>
<ul class="simple">
<li><p><a class="reference external" href="http://ipecho.net/plain">http://ipecho.net/plain</a></p></li>
</ul>
<p>Now open the search engine that blocks requests from your servers IP. If you
have <a class="reference external" href="https://github.com/searxng/searxng/issues/2011#issuecomment-1553317619">issues with the qwant engine</a>,
solve the CAPTCHA from <a class="reference external" href="https://www.qwant.com/">qwant.com</a>.</p>
<hr class="docutils" />
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-RmlyZWZveA==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-RmlyZWZveA==" name="RmlyZWZveA==" role="tab" tabindex="0">Firefox</button></div><div aria-labelledby="tab-1-RmlyZWZveA==" class="sphinx-tabs-panel group-tab" id="panel-1-RmlyZWZveA==" name="RmlyZWZveA==" role="tabpanel" tabindex="0"><figure class="align-default" id="id1">
<img alt="FFox proxy on SOCKS5, 127.0.0.1:8080" src="../_images/ffox-setting-proxy-socks.png" />
<figcaption>
<p><span class="caption-number">Fig. 1 </span><span class="caption-text">Firefoxs network settings</span><a class="headerlink" href="#id1" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</div></div>
<div class="admonition-man-ssh-manual admonition">
<p class="admonition-title"><a class="reference external" href="https://manpages.debian.org/jump?q=ssh">ssh</a> manual:</p>
<dl class="simple">
<dt>-D [bind_address:]port</dt><dd><p>Specifies a local “dynamic” application-level port forwarding. This works
by allocating a socket to listen to port on the local side .. Whenever a
connection is made to this port, the connection is forwarded over the
secure channel, and the application protocol is then used to determine
where to connect to from the remote machine .. ssh will act as a SOCKS
server ..</p>
</dd>
</dl>
<dl class="option-list">
<dt><kbd><span class="option">-N</span></kbd></dt>
<dd><p>Do not execute a remote command. This is useful for just forwarding ports.</p>
</dd>
</dl>
</div>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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-searxng.html" title="previous chapter">SearXNG maintenance</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/answer-captcha.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

226
admin/api.html Normal file
View file

@ -0,0 +1,226 @@
<!DOCTYPE html>
<html lang="en">
<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>Administration API &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Architecture" href="architecture.html" />
<link rel="prev" title="Answer CAPTCHA from servers IP" href="answer-captcha.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="architecture.html" title="Architecture"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="answer-captcha.html" title="Answer CAPTCHA from servers IP"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Administration API</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="administration-api">
<span id="adminapi"></span><h1>Administration API<a class="headerlink" href="#administration-api" title="Permalink to this heading"></a></h1>
<section id="get-configuration-data">
<h2>Get configuration data<a class="headerlink" href="#get-configuration-data" title="Permalink to this heading"></a></h2>
<div class="highlight-http notranslate"><div class="highlight"><pre><span></span><span class="nf">GET</span> <span class="nn">/config</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
</pre></div>
</div>
<section id="sample-response">
<h3>Sample response<a class="headerlink" href="#sample-response" title="Permalink to this heading"></a></h3>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;autocomplete&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;categories&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="s2">&quot;map&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;it&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;images&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;default_locale&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;default_theme&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;simple&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;engines&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;categories&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="s2">&quot;map&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;openstreetmap&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;shortcut&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;osm&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;categories&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="s2">&quot;it&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;arch linux wiki&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;shortcut&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;al&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;categories&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="s2">&quot;images&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;google images&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;shortcut&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;goi&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;categories&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="s2">&quot;it&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;bitbucket&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;shortcut&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;bb&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;instance_name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;searx&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;locales&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;de&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Deutsch (German)&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;en&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;English&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;eo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Esperanto (Esperanto)&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;plugins&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;HTTPS rewrite&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;enabled&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Vim-like hotkeys&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;safe_search&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>
</section>
</section>
<section id="embed-search-bar">
<h2>Embed search bar<a class="headerlink" href="#embed-search-bar" title="Permalink to this heading"></a></h2>
<p>The search bar can be embedded into websites. Just paste the example into the
HTML of the site. URL of the SearXNG instance and values are customizable.</p>
<div class="highlight-html notranslate"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">form</span> <span class="na">method</span><span class="o">=</span><span class="s">&quot;post&quot;</span> <span class="na">action</span><span class="o">=</span><span class="s">&quot;https://example.org/&quot;</span><span class="p">&gt;</span>
<span class="cm">&lt;!-- search --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;q&quot;</span> <span class="p">/&gt;</span>
<span class="cm">&lt;!-- categories --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;categories&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;general,social media&quot;</span> <span class="p">/&gt;</span>
<span class="cm">&lt;!-- language --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;lang&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;all&quot;</span> <span class="p">/&gt;</span>
<span class="cm">&lt;!-- locale --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;locale&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;en&quot;</span> <span class="p">/&gt;</span>
<span class="cm">&lt;!-- date filter --&gt;</span> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;time_range&quot;</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;month&quot;</span> <span class="p">/&gt;</span>
<span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
</pre></div>
</div>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="answer-captcha.html" title="previous chapter">Answer CAPTCHA from servers IP</a>
<li>Next: <a href="architecture.html" title="next chapter">Architecture</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/api.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

191
admin/architecture.html Normal file
View file

@ -0,0 +1,191 @@
<!DOCTYPE html>
<html lang="en">
<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>Architecture &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Plugins builtin" href="plugins.html" />
<link rel="prev" title="Administration API" href="api.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="plugins.html" title="Plugins builtin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="api.html" title="Administration API"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Architecture</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="architecture">
<span id="id1"></span><h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">Further reading</p>
<ul class="simple">
<li><p>Reverse Proxy: <a class="reference internal" href="installation-apache.html#apache-searxng-site"><span class="std std-ref">Apache</span></a> &amp; <a class="reference internal" href="installation-nginx.html#nginx-searxng-site"><span class="std std-ref">nginx</span></a></p></li>
<li><p>uWSGI: <a class="reference internal" href="installation-uwsgi.html#searxng-uwsgi"><span class="std std-ref">uWSGI</span></a></p></li>
<li><p>SearXNG: <a class="reference internal" href="installation-searxng.html#installation-basic"><span class="std std-ref">Step by step installation</span></a></p></li>
</ul>
</aside>
<p>Herein you will find some hints and suggestions about typical architectures of
SearXNG infrastructures.</p>
<section id="uwsgi-setup">
<span id="architecture-uwsgi"></span><h2>uWSGI Setup<a class="headerlink" href="#uwsgi-setup" title="Permalink to this heading"></a></h2>
<p>We start with a <em>reference</em> setup for public SearXNG instances which can be build
up and maintained by the scripts from our <a class="reference internal" href="../utils/index.html#toolboxing"><span class="std std-ref">DevOps tooling box</span></a>.</p>
<figure class="align-default" id="id2">
<img alt="arch_public.dot" src="../_images/arch_public.svg" /><figcaption>
<p><span class="caption-number">Fig. 2 </span><span class="caption-text">Reference architecture of a public SearXNG setup.</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>The reference installation activates <code class="docutils literal notranslate"><span class="pre">server.limiter</span></code>, <code class="docutils literal notranslate"><span class="pre">server.image_proxy</span></code>
and <code class="docutils literal notranslate"><span class="pre">ui.static_use_hash</span></code> (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/templates/etc/searxng/settings.yml">/etc/searxng/settings.yml</a>)</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># SearXNG settings</span>
<span class="nt">use_default_settings</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="nt">general</span><span class="p">:</span>
<span class="w"> </span><span class="nt">debug</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">instance_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SearXNG&quot;</span>
<span class="nt">search</span><span class="p">:</span>
<span class="w"> </span><span class="nt">safe_search</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2</span>
<span class="w"> </span><span class="nt">autocomplete</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;duckduckgo&#39;</span>
<span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Is overwritten by ${SEARXNG_SECRET}</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span>
<span class="w"> </span><span class="nt">limiter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">image_proxy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="c1"># public URL of the instance, to ensure correct inbound links. Is overwritten</span>
<span class="w"> </span><span class="c1"># by ${SEARXNG_URL}.</span>
<span class="w"> </span><span class="c1"># base_url: http://example.com/location</span>
<span class="nt">redis</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># URL to connect redis database. Is overwritten by ${SEARXNG_REDIS_URL}.</span>
<span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">unix:///usr/local/searxng-redis/run/redis.sock?db=0</span>
<span class="nt">ui</span><span class="p">:</span>
<span class="w"> </span><span class="nt">static_use_hash</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</pre></div>
</div>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="api.html" title="previous chapter">Administration API</a>
<li>Next: <a href="plugins.html" title="next chapter">Plugins builtin</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/architecture.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

277
admin/buildhosts.html Normal file
View file

@ -0,0 +1,277 @@
<!DOCTYPE html>
<html lang="en">
<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>Buildhosts &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/tabs.js?v=3030b3cb"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Developer documentation" href="../dev/index.html" />
<link rel="prev" title="Plugins builtin" href="plugins.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="../dev/index.html" title="Developer documentation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="plugins.html" title="Plugins builtin"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Buildhosts</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="buildhosts">
<span id="id1"></span><h1>Buildhosts<a class="headerlink" href="#buildhosts" title="Permalink to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#build-and-development-tools" id="id2">Build and Development tools</a></p></li>
<li><p><a class="reference internal" href="#build-docs" id="id3">Build docs</a></p></li>
<li><p><a class="reference internal" href="#lint-shell-scripts" id="id4">Lint shell scripts</a></p></li>
</ul>
</nav>
<p>To get best results from build, its recommend to install additional packages on
build hosts (see <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>).</p>
<section id="build-and-development-tools">
<span id="searxng-sh-install-buildhost"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Build and Development tools</a><a class="headerlink" href="#build-and-development-tools" title="Permalink to this heading"></a></h2>
<p>To Install tools used by build and development tasks in once:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-U2VhclhORydzIGRldmVsb3BtZW50IHRvb2xz" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-U2VhclhORydzIGRldmVsb3BtZW50IHRvb2xz" name="U2VhclhORydzIGRldmVsb3BtZW50IHRvb2xz" role="tab" tabindex="0">SearXNGs development tools</button></div><div aria-labelledby="tab-0-U2VhclhORydzIGRldmVsb3BtZW50IHRvb2xz" class="sphinx-tabs-panel group-tab" id="panel-0-U2VhclhORydzIGRldmVsb3BtZW50IHRvb2xz" name="U2VhclhORydzIGRldmVsb3BtZW50IHRvb2xz" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>buildhost
</pre></div>
</div>
</div></div>
<p>This will install packages needed by SearXNG:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-1-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-1-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-1-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>python3-dev<span class="w"> </span>python3-babel<span class="w"> </span>python3-venv<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>uwsgi<span class="w"> </span>uwsgi-plugin-python3<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>git<span class="w"> </span>build-essential<span class="w"> </span>libxslt-dev<span class="w"> </span>zlib1g-dev<span class="w"> </span>libffi-dev<span class="w"> </span>libssl-dev
</pre></div>
</div>
</div><div aria-labelledby="tab-1-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>--noconfirm<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>python<span class="w"> </span>python-pip<span class="w"> </span>python-lxml<span class="w"> </span>python-babel<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>uwsgi<span class="w"> </span>uwsgi-plugin-python<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>git<span class="w"> </span>base-devel<span class="w"> </span>libxml2
</pre></div>
</div>
</div><div aria-labelledby="tab-1-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>python<span class="w"> </span>python-pip<span class="w"> </span>python-lxml<span class="w"> </span>python-babel<span class="w"> </span>python3-devel<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>uwsgi<span class="w"> </span>uwsgi-plugin-python3<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>git<span class="w"> </span>@development-tools<span class="w"> </span>libxml2<span class="w"> </span>openssl
</pre></div>
</div>
</div></div>
<p>and packages needed to build docuemtation and run tests:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-2-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-2-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-2-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-2-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>firefox<span class="w"> </span>graphviz<span class="w"> </span>imagemagick<span class="w"> </span>texlive-xetex<span class="w"> </span>librsvg2-bin<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>texlive-latex-recommended<span class="w"> </span>texlive-extra-utils<span class="w"> </span>fonts-dejavu<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>latexmk<span class="w"> </span>shellcheck
</pre></div>
</div>
</div><div aria-labelledby="tab-2-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>--noconfirm<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>firefox<span class="w"> </span>graphviz<span class="w"> </span>imagemagick<span class="w"> </span>texlive-bin<span class="w"> </span>extra/librsvg<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>texlive-core<span class="w"> </span>texlive-latexextra<span class="w"> </span>ttf-dejavu<span class="w"> </span>shellcheck
</pre></div>
</div>
</div><div aria-labelledby="tab-2-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>firefox<span class="w"> </span>graphviz<span class="w"> </span>graphviz-gd<span class="w"> </span>ImageMagick<span class="w"> </span>librsvg2-tools<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>texlive-xetex-bin<span class="w"> </span>texlive-collection-fontsrecommended<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>texlive-collection-latex<span class="w"> </span>dejavu-sans-fonts<span class="w"> </span>dejavu-serif-fonts<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>dejavu-sans-mono-fonts<span class="w"> </span>ShellCheck
</pre></div>
</div>
</div></div>
</section>
<section id="build-docs">
<span id="docs-build"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Build docs</a><a class="headerlink" href="#build-docs" title="Permalink to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">Sphinx build needs</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.imagemagick.org">ImageMagick</a></p></li>
<li><p><a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li>
<li><p><a class="reference external" href="https://tug.org/xetex/">XeTeX</a></p></li>
<li><p><a class="reference external" href="https://dvisvgm.de/">dvisvgm</a></p></li>
</ul>
</aside>
<p>Most of the sphinx requirements are installed from <a class="reference external" href="https://github.com/searxng/searxng/blob/master/setup.py">git://setup.py</a> and the
docs can be build from scratch with <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.html</span></code>. For better math and
image processing additional packages are needed. The <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> needed not only for
PDF creation, its also needed for <a class="reference internal" href="../dev/reST.html#math"><span class="std std-ref">Math equations</span></a> when HTML output is build.</p>
<p>To be able to do <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/math.html#math-support" title="(in Sphinx v7.2.0)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered
as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension).</p>
<p>Here is the extract from the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/docs/conf.py">git://docs/conf.py</a> file, setting math renderer
to <code class="docutils literal notranslate"><span class="pre">imgmath</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">html_math_renderer</span> <span class="o">=</span> <span class="s1">&#39;imgmath&#39;</span>
<span class="n">imgmath_image_format</span> <span class="o">=</span> <span class="s1">&#39;svg&#39;</span>
<span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span>
</pre></div>
</div>
<p>If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.html</span></code>) shows warnings like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">WARNING</span><span class="p">:</span> <span class="n">dot</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="ow">not</span> <span class="n">found</span><span class="p">,</span> <span class="k">for</span> <span class="n">better</span> <span class="n">output</span> <span class="n">quality</span> <span class="n">install</span> \
<span class="n">graphviz</span> <span class="kn">from</span> <span class="nn">https</span><span class="p">:</span><span class="o">//</span><span class="n">www</span><span class="o">.</span><span class="n">graphviz</span><span class="o">.</span><span class="n">org</span>
<span class="o">..</span>
<span class="n">WARNING</span><span class="p">:</span> <span class="n">LaTeX</span> <span class="n">command</span> <span class="s1">&#39;latex&#39;</span> <span class="n">cannot</span> <span class="n">be</span> <span class="n">run</span> <span class="p">(</span><span class="n">needed</span> <span class="k">for</span> <span class="n">math</span> \
<span class="n">display</span><span class="p">),</span> <span class="n">check</span> <span class="n">the</span> <span class="n">imgmath_latex</span> <span class="n">setting</span>
</pre></div>
</div>
<p>you need to install additional packages on your build host, to get better HTML
output (<a class="reference internal" href="#searxng-sh-install-buildhost"><span class="std std-ref">install buildhost</span></a>).</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-3-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-3-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-3-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>graphviz<span class="w"> </span>imagemagick<span class="w"> </span>texlive-xetex<span class="w"> </span>librsvg2-bin
</pre></div>
</div>
</div><div aria-labelledby="tab-3-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>graphviz<span class="w"> </span>imagemagick<span class="w"> </span>texlive-bin<span class="w"> </span>extra/librsvg
</pre></div>
</div>
</div><div aria-labelledby="tab-3-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>graphviz<span class="w"> </span>graphviz-gd<span class="w"> </span>ImageMagick<span class="w"> </span>texlive-xetex-bin<span class="w"> </span>librsvg2-tools
</pre></div>
</div>
</div></div>
<p>For PDF output you also need:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-4-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-4-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-4-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-4-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>texlive-latex-recommended<span class="w"> </span>texlive-extra-utils<span class="w"> </span>ttf-dejavu
</pre></div>
</div>
</div><div aria-labelledby="tab-4-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>texlive-core<span class="w"> </span>texlive-latexextra<span class="w"> </span>ttf-dejavu
</pre></div>
</div>
</div><div aria-labelledby="tab-4-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>texlive-collection-fontsrecommended<span class="w"> </span>texlive-collection-latex<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>dejavu-sans-fonts<span class="w"> </span>dejavu-serif-fonts<span class="w"> </span>dejavu-sans-mono-fonts
</pre></div>
</div>
</div></div>
</section>
<section id="lint-shell-scripts">
<span id="sh-lint"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Lint shell scripts</a><a class="headerlink" href="#lint-shell-scripts" title="Permalink to this heading"></a></h2>
<p>To lint shell scripts we use <a class="reference external" href="https://github.com/koalaman/shellcheck">ShellCheck</a> - a shell script static analysis tool
(<a class="reference internal" href="#searxng-sh-install-buildhost"><span class="std std-ref">install buildhost</span></a>).</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-5-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-5-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-5-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-5-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-5-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-5-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>shellcheck
</pre></div>
</div>
</div><div aria-labelledby="tab-5-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>shellcheck
</pre></div>
</div>
</div><div aria-labelledby="tab-5-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>ShellCheck
</pre></div>
</div>
</div></div>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="plugins.html" title="previous chapter">Plugins builtin</a>
<li>Next: <a href="../dev/index.html" title="next chapter">Developer documentation</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/buildhosts.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

213
admin/index.html Normal file
View file

@ -0,0 +1,213 @@
<!DOCTYPE html>
<html lang="en">
<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>Administrator documentation &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Settings" href="settings/index.html" />
<link rel="prev" title="Why use a private instance?" href="../own-instance.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="settings/index.html" title="Settings"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../own-instance.html" title="Why use a private instance?"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Administrator documentation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="administrator-documentation">
<h1>Administrator documentation<a class="headerlink" href="#administrator-documentation" title="Permalink to this heading"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="settings/index.html">Settings</a><ul>
<li class="toctree-l2"><a class="reference internal" href="settings/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="settings/settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation-docker.html">Docker Container</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html#get-docker">Get Docker</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html#searxng-searxng">searxng/searxng</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html#build-the-image">Build the image</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html#command-line">Command line</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation-searxng.html">Step by step installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html#install-packages">Install packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html#create-user">Create user</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html#install-searxng-dependencies">Install SearXNG &amp; dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html#check">Check</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#origin-uwsgi">Origin uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#distributors">Distributors</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#uwsgi-maintenance">uWSGI maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#uwsgi-setup">uWSGI setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#pitfalls-of-the-tyrant-mode">Pitfalls of the Tyrant mode</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-nginx.html">NGINX</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html#the-nginx-http-server">The nginx HTTP server</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html#nginx-s-searxng-site">NGINXs SearXNG site</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html#disable-logs">Disable logs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-apache.html">Apache</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#the-apache-http-server">The Apache HTTP server</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#apache-s-searxng-site">Apaches SearXNG site</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#disable-logs">disable logs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a><ul>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html#how-to-update">How to update</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html#how-to-inspect-debug">How to inspect &amp; debug</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html#migrate-and-stay-tuned">Migrate and stay tuned!</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">Administration API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="api.html#get-configuration-data">Get configuration data</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html#embed-search-bar">Embed search bar</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="architecture.html">Architecture</a><ul>
<li class="toctree-l2"><a class="reference internal" href="architecture.html#uwsgi-setup">uWSGI Setup</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l1"><a class="reference internal" href="buildhosts.html">Buildhosts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html#build-and-development-tools">Build and Development tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html#build-docs">Build docs</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html#lint-shell-scripts">Lint shell scripts</a></li>
</ul>
</li>
</ul>
</div>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Administrator documentation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li>Previous: <a href="../own-instance.html" title="previous chapter">Why use a private instance?</a>
<li>Next: <a href="settings/index.html" title="next chapter">Settings</a>
</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,471 @@
<!DOCTYPE html>
<html lang="en">
<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>Apache &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/tabs.js?v=3030b3cb"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="SearXNG maintenance" href="update-searxng.html" />
<link rel="prev" title="NGINX" href="installation-nginx.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="update-searxng.html" title="SearXNG maintenance"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-nginx.html" title="NGINX"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Apache</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="apache">
<span id="installation-apache"></span><h1>Apache<a class="headerlink" href="#apache" title="Permalink to this heading"></a></h1>
<p>This section explains how to set up a SearXNG instance using the HTTP server <a class="reference external" href="https://httpd.apache.org/">Apache</a>.
If you did use the <a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a> and do not have any special preferences
you can install the <a class="reference internal" href="#apache-searxng-site"><span class="std std-ref">SearXNG site</span></a> using
<a class="reference internal" href="../utils/searxng.sh.html#searxng-sh-overview"><span class="std std-ref">searxng.sh</span></a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>apache
</pre></div>
</div>
<p>If you have special interests or problems with setting up Apache, the following
section might give you some guidance.</p>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference external" href="https://wiki.archlinux.org/index.php/Apache_HTTP_Server">Apache Arch Linux</a></p></li>
<li><p><a class="reference external" href="https://cwiki.apache.org/confluence/display/HTTPD/DistrosDefaultLayout#DistrosDefaultLayout-Debian,Ubuntu(Apachehttpd2.x):">Apache Debian</a></p></li>
<li><p><a class="reference external" href="https://salsa.debian.org/apache-team/apache2/raw/master/debian/apache2.README.Debian">apache2.README.Debian</a></p></li>
<li><p><a class="reference external" href="https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-apache-http-server/index.html">Apache Fedora</a></p></li>
<li><p><a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/directives.html">Apache directives</a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#the-apache-http-server" id="id5">The Apache HTTP server</a></p>
<ul>
<li><p><a class="reference internal" href="#debian-s-apache-layout" id="id6">Debians Apache layout</a></p></li>
<li><p><a class="reference internal" href="#apache-modules" id="id7">Apache modules</a></p></li>
<li><p><a class="reference internal" href="#apache-sites" id="id8">Apache sites</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#apache-s-searxng-site" id="id9">Apaches SearXNG site</a></p></li>
<li><p><a class="reference internal" href="#disable-logs" id="id10">disable logs</a></p></li>
</ul>
</nav>
<section id="the-apache-http-server">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">The Apache HTTP server</a><a class="headerlink" href="#the-apache-http-server" title="Permalink to this heading"></a></h2>
<p>If <a class="reference external" href="https://httpd.apache.org/">Apache</a> is not installed, install it now. If <a class="reference external" href="https://httpd.apache.org/">apache</a> is new to you, the
<a class="reference external" href="https://httpd.apache.org/docs/current/en/getting-started.html">Getting Started</a>, <a class="reference external" href="https://httpd.apache.org/docs/current/en/configuring.html">Configuration Files</a> and <a class="reference external" href="https://httpd.apache.org/docs/current/en/mod/directive-dict.html">Terms Used to Describe
Directives</a> documentation gives first orientation. There is also a list of
<a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/directives.html">Apache directives</a> <em>to keep in the pocket</em>.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-0-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-0-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-0-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>apache2
</pre></div>
</div>
</div><div aria-labelledby="tab-0-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>apache
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>httpd
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>http
</pre></div>
</div>
</div><div aria-labelledby="tab-0-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>httpd
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>httpd
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>httpd
</pre></div>
</div>
</div></div>
<p>Now at <a class="reference external" href="http://localhost">http://localhost</a> you should see some kind of <em>Welcome</em> or <em>Test</em> page.
How this default site is configured, depends on the linux distribution
(compare <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/directives.html">Apache directives</a>).</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-1-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-1-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-1-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>less<span class="w"> </span>/etc/apache2/sites-enabled/000-default.conf
</pre></div>
</div>
<p>In this file, there is a line setting the <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/core.html#documentroot">DocumentRoot</a> directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">DocumentRoot</span><span class="w"> </span><span class="sx">/var/www/html</span>
</pre></div>
</div>
<p>And the <em>welcome</em> page is the HTML file at <code class="docutils literal notranslate"><span class="pre">/var/www/html/index.html</span></code>.</p>
</div><div aria-labelledby="tab-1-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>less<span class="w"> </span>/etc/httpd/conf/httpd.conf
</pre></div>
</div>
<p>In this file, there is a line setting the <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/core.html#documentroot">DocumentRoot</a> directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">DocumentRoot</span><span class="w"> </span><span class="s2">&quot;/srv/http&quot;</span>
<span class="nt">&lt;Directory</span><span class="w"> </span><span class="s">&quot;/srv/http&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nb">Options</span><span class="w"> </span>Indexes<span class="w"> </span>FollowSymLinks
<span class="w"> </span><span class="nb">AllowOverride</span><span class="w"> </span><span class="k">None</span>
<span class="w"> </span><span class="nb">Require</span><span class="w"> </span><span class="k">all</span><span class="w"> </span>granted
<span class="nt">&lt;/Directory&gt;</span>
</pre></div>
</div>
<p>The <em>welcome</em> page of Arch Linux is a page showing the directory located
at <code class="docutils literal notranslate"><span class="pre">DocumentRoot</span></code>. This <em>directory</em> page is generated by the Module
<a class="reference external" href="https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html">mod_autoindex</a>:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">LoadModule</span><span class="w"> </span>autoindex_module<span class="w"> </span>modules/mod_autoindex.so
...
<span class="nb">Include</span><span class="w"> </span>conf/extra/httpd-autoindex.conf
</pre></div>
</div>
</div><div aria-labelledby="tab-1-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>less<span class="w"> </span>/etc/httpd/conf/httpd.conf
</pre></div>
</div>
<p>In this file, there is a line setting the <code class="docutils literal notranslate"><span class="pre">DocumentRoot</span></code> directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">DocumentRoot</span><span class="w"> </span><span class="s2">&quot;/var/www/html&quot;</span>
...
<span class="nt">&lt;Directory</span><span class="w"> </span><span class="s">&quot;/var/www&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nb">AllowOverride</span><span class="w"> </span><span class="k">None</span>
<span class="w"> </span><span class="c"># Allow open access:</span>
<span class="w"> </span><span class="nb">Require</span><span class="w"> </span><span class="k">all</span><span class="w"> </span>granted
<span class="nt">&lt;/Directory&gt;</span>
</pre></div>
</div>
<p>On fresh installations, the <code class="docutils literal notranslate"><span class="pre">/var/www</span></code> is empty and the <em>default
welcome page</em> is shown, the configuration is located at:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">less</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">httpd</span><span class="o">/</span><span class="n">conf</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">welcome</span><span class="o">.</span><span class="n">conf</span>
</pre></div>
</div>
</div></div>
<section id="debian-s-apache-layout">
<span id="id2"></span><h3><a class="toc-backref" href="#id6" role="doc-backlink">Debians Apache layout</a><a class="headerlink" href="#debian-s-apache-layout" title="Permalink to this heading"></a></h3>
<p>Be aware, Debians Apache layout is quite different from the standard Apache
configuration. For details look at the <a class="reference external" href="https://salsa.debian.org/apache-team/apache2/raw/master/debian/apache2.README.Debian">apache2.README.Debian</a>
(<code class="docutils literal notranslate"><span class="pre">/usr/share/doc/apache2/README.Debian.gz</span></code>). Some commands you should know on
Debian:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=apache2ctl">apache2ctl</a>: Apache HTTP server control interface</p></li>
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=a2enmod">a2enmod</a>, <a class="reference external" href="https://manpages.debian.org/jump?q=a2dismod">a2dismod</a>: switch on/off modules</p></li>
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=a2enconf">a2enconf</a>, <a class="reference external" href="https://manpages.debian.org/jump?q=a2disconf">a2disconf</a>: switch on/off configurations</p></li>
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=a2ensite">a2ensite</a>, <a class="reference external" href="https://manpages.debian.org/jump?q=a2dissite">a2dissite</a>: switch on/off sites</p></li>
</ul>
</section>
<section id="apache-modules">
<span id="id3"></span><h3><a class="toc-backref" href="#id7" role="doc-backlink">Apache modules</a><a class="headerlink" href="#apache-modules" title="Permalink to this heading"></a></h3>
<p>To load additional modules, in most distributions you have to un-comment the
lines with the corresponding <a class="reference external" href="https://httpd.apache.org/docs/mod/mod_so.html#loadmodule">LoadModule</a> directive, except in <a class="reference internal" href="#debian-s-apache-layout"><span class="std std-ref">Debians Apache layout</span></a>.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-2-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-2-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-2-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-2-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><p><a class="reference internal" href="#debian-s-apache-layout"><span class="std std-ref">Debians Apache layout</span></a> uses <a class="reference external" href="https://manpages.debian.org/jump?q=a2enmod">a2enmod</a> and <a class="reference external" href="https://manpages.debian.org/jump?q=a2dismod">a2dismod</a> to
activate or disable modules:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>a2enmod<span class="w"> </span>ssl
sudo<span class="w"> </span>-H<span class="w"> </span>a2enmod<span class="w"> </span>headers
sudo<span class="w"> </span>-H<span class="w"> </span>a2enmod<span class="w"> </span>proxy
sudo<span class="w"> </span>-H<span class="w"> </span>a2enmod<span class="w"> </span>proxy_http
sudo<span class="w"> </span>-H<span class="w"> </span>a2enmod<span class="w"> </span>proxy_uwsgi
</pre></div>
</div>
</div><div aria-labelledby="tab-2-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><p>In the <code class="docutils literal notranslate"><span class="pre">/etc/httpd/conf/httpd.conf</span></code> file, activate <a class="reference external" href="https://httpd.apache.org/docs/mod/mod_so.html#loadmodule">LoadModule</a>
directives:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">LoadModule</span><span class="w"> </span>ssl_module<span class="w"> </span>modules/mod_ssl.so
<span class="nb">LoadModule</span><span class="w"> </span>headers_module<span class="w"> </span>modules/mod_headers.so
<span class="nb">LoadModule</span><span class="w"> </span>proxy_module<span class="w"> </span>modules/mod_proxy.so
<span class="nb">LoadModule</span><span class="w"> </span>proxy_http_module<span class="w"> </span>modules/mod_proxy_http.so
<span class="nb">LoadModule</span><span class="w"> </span>proxy_uwsgi_module<span class="w"> </span>modules/mod_proxy_uwsgi.so
</pre></div>
</div>
</div><div aria-labelledby="tab-2-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><p>In the <code class="docutils literal notranslate"><span class="pre">/etc/httpd/conf/httpd.conf</span></code> file, activate <a class="reference external" href="https://httpd.apache.org/docs/mod/mod_so.html#loadmodule">LoadModule</a>
directives:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">LoadModule</span><span class="w"> </span>ssl_module<span class="w"> </span>modules/mod_ssl.so
<span class="nb">LoadModule</span><span class="w"> </span>headers_module<span class="w"> </span>modules/mod_headers.so
<span class="nb">LoadModule</span><span class="w"> </span>proxy_module<span class="w"> </span>modules/mod_proxy.so
<span class="nb">LoadModule</span><span class="w"> </span>proxy_http_module<span class="w"> </span>modules/mod_proxy_http.so
<span class="nb">LoadModule</span><span class="w"> </span>proxy_uwsgi_module<span class="w"> </span>modules/mod_proxy_uwsgi.so
</pre></div>
</div>
</div></div>
</section>
<section id="apache-sites">
<span id="id4"></span><h3><a class="toc-backref" href="#id8" role="doc-backlink">Apache sites</a><a class="headerlink" href="#apache-sites" title="Permalink to this heading"></a></h3>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-3-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-3-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-3-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><p>In <a class="reference internal" href="#debian-s-apache-layout"><span class="std std-ref">Debians Apache layout</span></a> you create a <code class="docutils literal notranslate"><span class="pre">searxng.conf</span></code> with the
<code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/searxng</span> <span class="pre">&gt;</span></code> directive and save this file in the <em>sites
available</em> folder at <code class="docutils literal notranslate"><span class="pre">/etc/apache2/sites-available</span></code>. To enable the
<code class="docutils literal notranslate"><span class="pre">searxng.conf</span></code> use <a class="reference external" href="https://manpages.debian.org/jump?q=a2ensite">a2ensite</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>a2ensite<span class="w"> </span>searxng.conf
</pre></div>
</div>
</div><div aria-labelledby="tab-3-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><p>In the <code class="docutils literal notranslate"><span class="pre">/etc/httpd/conf/httpd.conf</span></code> file add a <a class="reference external" href="https://httpd.apache.org/docs/mod/core.html#includeoptional">IncludeOptional</a>
directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">IncludeOptional</span><span class="w"> </span>sites-enabled/*.conf
</pre></div>
</div>
<p>Create two folders, one for the <em>available sites</em> and one for the <em>enabled sites</em>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/httpd/sites-available
mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/httpd/sites-enabled
</pre></div>
</div>
<p>Create configuration at <code class="docutils literal notranslate"><span class="pre">/etc/httpd/sites-available</span></code> and place a
symlink to <code class="docutils literal notranslate"><span class="pre">sites-enabled</span></code>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/etc/httpd/sites-available/searxng.conf<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>/etc/httpd/sites-enabled/searxng.conf
</pre></div>
</div>
</div><div aria-labelledby="tab-3-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><p>In the <code class="docutils literal notranslate"><span class="pre">/etc/httpd/conf/httpd.conf</span></code> file add a <a class="reference external" href="https://httpd.apache.org/docs/mod/core.html#includeoptional">IncludeOptional</a>
directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">IncludeOptional</span><span class="w"> </span>sites-enabled/*.conf
</pre></div>
</div>
<p>Create two folders, one for the <em>available sites</em> and one for the <em>enabled sites</em>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/httpd/sites-available
mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/httpd/sites-enabled
</pre></div>
</div>
<p>Create configuration at <code class="docutils literal notranslate"><span class="pre">/etc/httpd/sites-available</span></code> and place a
symlink to <code class="docutils literal notranslate"><span class="pre">sites-enabled</span></code>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/etc/httpd/sites-available/searxng.conf<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>/etc/httpd/sites-enabled/searxng.conf
</pre></div>
</div>
</div></div>
</section>
</section>
<section id="apache-s-searxng-site">
<span id="apache-searxng-site"></span><h2><a class="toc-backref" href="#id9" role="doc-backlink">Apaches SearXNG site</a><a class="headerlink" href="#apache-s-searxng-site" title="Permalink to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">uWSGI</p>
<p>Use <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi">mod_proxy_uwsgi</a> / dont use the old <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-uwsgi">mod_uwsgi</a> anymore.</p>
</aside>
<p>To proxy the incoming requests to the SearXNG instance Apache needs the
<a class="reference external" href="https://httpd.apache.org/docs/current/mod/mod_proxy.html">mod_proxy</a> module (<a class="reference internal" href="#apache-modules"><span class="std std-ref">Apache modules</span></a>).</p>
<aside class="sidebar">
<p class="sidebar-title">HTTP headers</p>
<p>With <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypreservehost">ProxyPreserveHost</a> the incoming <code class="docutils literal notranslate"><span class="pre">Host</span></code> header is passed to the proxied
host.</p>
</aside>
<p>Depending on what your SearXNG installation is listening on, you need a http
<a class="reference external" href="https://httpd.apache.org/docs/current/mod/mod_proxy_http.html">mod_proxy_http</a>) or socket (<a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi">mod_proxy_uwsgi</a>) communication to upstream.</p>
<p>The <a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a> installs the <a class="reference internal" href="installation-searxng.html#use-default-settings-yml"><span class="std std-ref">reference setup</span></a> and a <a class="reference internal" href="installation-uwsgi.html#uwsgi-setup"><span class="std std-ref">uWSGI setup</span></a> that listens on a socket by default.
You can install and activate your own <code class="docutils literal notranslate"><span class="pre">searxng.conf</span></code> like shown in
<a class="reference internal" href="#apache-sites"><span class="std std-ref">Apache sites</span></a>.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-c29ja2V0" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-c29ja2V0" name="c29ja2V0" role="tab" tabindex="0">socket</button><button aria-controls="panel-4-aHR0cA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-aHR0cA==" name="aHR0cA==" role="tab" tabindex="-1">http</button></div><div aria-labelledby="tab-4-c29ja2V0" class="sphinx-tabs-panel group-tab" id="panel-4-c29ja2V0" name="c29ja2V0" role="tabpanel" tabindex="0"><div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="c"># -*- coding: utf-8; mode: apache -*-</span>
<span class="nb">LoadModule</span><span class="w"> </span>ssl_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_ssl.so</span>
<span class="nb">LoadModule</span><span class="w"> </span>headers_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_headers.so</span>
<span class="nb">LoadModule</span><span class="w"> </span>proxy_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_proxy.so</span>
<span class="nb">LoadModule</span><span class="w"> </span>proxy_uwsgi_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_proxy_uwsgi.so</span>
<span class="c"># LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so</span>
<span class="c">#</span>
<span class="c"># SetEnvIf Request_URI /searxng dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nt">&lt;Location</span><span class="w"> </span><span class="s">/searxng</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nb">Require</span><span class="w"> </span><span class="k">all</span><span class="w"> </span>granted
<span class="w"> </span><span class="nb">Order</span><span class="w"> </span>deny,allow
<span class="w"> </span><span class="nb">Deny</span><span class="w"> </span>from<span class="w"> </span><span class="k">all</span>
<span class="w"> </span><span class="c"># Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="w"> </span><span class="nb">Allow</span><span class="w"> </span>from<span class="w"> </span><span class="k">all</span>
<span class="w"> </span><span class="c"># add the trailing slash</span>
<span class="w"> </span><span class="nb">RedirectMatch</span><span class="w"> </span><span class="m">308</span><span class="w"> </span><span class="sx">/searxng</span>$<span class="w"> </span><span class="sx">/searxng/</span>
<span class="w"> </span><span class="nb">ProxyPreserveHost</span><span class="w"> </span><span class="k">On</span>
<span class="w"> </span><span class="nb">ProxyPass</span><span class="w"> </span>unix:/usr/local/searxng/run/socket|uwsgi://uwsgi-uds-searxng/
<span class="w"> </span><span class="c"># see flaskfix.py</span>
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>set<span class="w"> </span>X-Scheme<span class="w"> </span>%{REQUEST_SCHEME}s
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>set<span class="w"> </span>X-Script-Name<span class="w"> </span><span class="sx">/searxng</span>
<span class="w"> </span><span class="c"># see limiter.py</span>
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>set<span class="w"> </span>X-Real-IP<span class="w"> </span>%{REMOTE_ADDR}s
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>append<span class="w"> </span>X-Forwarded-For<span class="w"> </span>%{REMOTE_ADDR}s
<span class="nt">&lt;/Location&gt;</span>
<span class="c"># uWSGI serves the static files and in settings.yml we use::</span>
<span class="c">#</span>
<span class="c"># ui:</span>
<span class="c"># static_use_hash: true</span>
<span class="c">#</span>
<span class="c"># Alias /searxng/static/ /usr/local/searxng/searxng-src/searx/static/</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-4-aHR0cA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-aHR0cA==" name="aHR0cA==" role="tabpanel" tabindex="0"><div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="c"># -*- coding: utf-8; mode: apache -*-</span>
<span class="nb">LoadModule</span><span class="w"> </span>ssl_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_ssl.so</span>
<span class="nb">LoadModule</span><span class="w"> </span>headers_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_headers.so</span>
<span class="nb">LoadModule</span><span class="w"> </span>proxy_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_proxy.so</span>
<span class="nb">LoadModule</span><span class="w"> </span>proxy_http_module<span class="w"> </span><span class="sx">/usr/lib/apache2/modules/mod_proxy_http.so</span>
<span class="c"># LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so</span>
<span class="c">#</span>
<span class="c"># SetEnvIf Request_URI /searxng dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nt">&lt;Location</span><span class="w"> </span><span class="s">/searxng</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nb">Require</span><span class="w"> </span><span class="k">all</span><span class="w"> </span>granted
<span class="w"> </span><span class="nb">Order</span><span class="w"> </span>deny,allow
<span class="w"> </span><span class="nb">Deny</span><span class="w"> </span>from<span class="w"> </span><span class="k">all</span>
<span class="w"> </span><span class="c"># Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="w"> </span><span class="nb">Allow</span><span class="w"> </span>from<span class="w"> </span><span class="k">all</span>
<span class="w"> </span><span class="c"># add the trailing slash</span>
<span class="w"> </span><span class="nb">RedirectMatch</span><span class="w"> </span><span class="m">308</span><span class="w"> </span><span class="sx">/searxng</span>$<span class="w"> </span><span class="sx">/searxng/</span>
<span class="w"> </span><span class="nb">ProxyPreserveHost</span><span class="w"> </span><span class="k">On</span>
<span class="w"> </span><span class="nb">ProxyPass</span><span class="w"> </span>http://127.0.0.1:8888
<span class="w"> </span><span class="c"># see flaskfix.py</span>
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>set<span class="w"> </span>X-Scheme<span class="w"> </span>%{REQUEST_SCHEME}s
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>set<span class="w"> </span>X-Script-Name<span class="w"> </span><span class="sx">/searxng</span>
<span class="w"> </span><span class="c"># see limiter.py</span>
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>set<span class="w"> </span>X-Real-IP<span class="w"> </span>%{REMOTE_ADDR}s
<span class="w"> </span><span class="nb">RequestHeader</span><span class="w"> </span>append<span class="w"> </span>X-Forwarded-For<span class="w"> </span>%{REMOTE_ADDR}s
<span class="nt">&lt;/Location&gt;</span>
<span class="c"># uWSGI serves the static files and in settings.yml we use::</span>
<span class="c">#</span>
<span class="c"># ui:</span>
<span class="c"># static_use_hash: true</span>
<span class="c">#</span>
<span class="c"># Alias /searxng/static/ /usr/local/searxng/searxng-src/searx/static/</span>
</pre></div>
</div>
</div></div>
<p id="restart-apache">Restart service:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-5-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-5-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-5-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-5-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-5-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-5-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>apache2
sudo<span class="w"> </span>-H<span class="w"> </span>service<span class="w"> </span>uwsgi<span class="w"> </span>restart<span class="w"> </span>searxng
</pre></div>
</div>
</div><div aria-labelledby="tab-5-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>httpd
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng
</pre></div>
</div>
</div><div aria-labelledby="tab-5-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>httpd
sudo<span class="w"> </span>-H<span class="w"> </span>touch<span class="w"> </span>/etc/uwsgi.d/searxng.ini
</pre></div>
</div>
</div></div>
</section>
<section id="disable-logs">
<h2><a class="toc-backref" href="#id10" role="doc-backlink">disable logs</a><a class="headerlink" href="#disable-logs" title="Permalink to this heading"></a></h2>
<p>For better privacy you can disable Apache logs. In the examples above activate
one of the lines and <a class="reference internal" href="#restart-apache">restart apache</a>:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">SetEnvIf</span><span class="w"> </span>Request_URI<span class="w"> </span><span class="s2">&quot;/searxng&quot;</span><span class="w"> </span>dontlog
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">CustomLog</span></code> directive disables logs for the entire (virtual) server, use it
when the URL of the service does not have a path component (<code class="docutils literal notranslate"><span class="pre">/searxng</span></code>), so when
SearXNG is located at root (<code class="docutils literal notranslate"><span class="pre">/</span></code>).</p>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="installation-nginx.html" title="previous chapter">NGINX</a>
<li>Next: <a href="update-searxng.html" title="next chapter">SearXNG maintenance</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/installation-apache.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,319 @@
<!DOCTYPE html>
<html lang="en">
<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>Docker Container &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Installation Script" href="installation-scripts.html" />
<link rel="prev" title="Installation" href="installation.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="installation-scripts.html" title="Installation Script"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Docker Container</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="docker-container">
<span id="installation-docker"></span><h1>Docker Container<a class="headerlink" href="#docker-container" title="Permalink to this heading"></a></h1>
<hr class="docutils" />
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://hub.docker.com/r/searxng/searxng">searxng/searxng &#64;dockerhub</a></p></li>
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/Dockerfile">git://Dockerfile</a></p></li>
<li><p><a class="reference external" href="https://docs.docker.com/get-started/overview">Docker overview</a></p></li>
<li><p><a class="reference external" href="https://docs.docker.com/get-started/docker_cheatsheet.pdf">Docker Cheat Sheet</a></p></li>
<li><p><a class="reference external" href="https://alpinelinux.org">Alpine Linux</a>
<a class="reference external" href="https://en.wikipedia.org/wiki/Alpine_Linux">(wiki)</a>
<a class="reference external" href="https://pkgs.alpinelinux.org/packages">apt packages</a></p></li>
<li><p>Alpines <code class="docutils literal notranslate"><span class="pre">/bin/sh</span></code> is <a class="reference external" href="https://manpages.debian.org/jump?q=dash">dash</a></p></li>
</ul>
</aside>
<p><strong>If you intend to create a public instance using Docker, use our well maintained
docker container</strong></p>
<ul class="simple">
<li><p><a class="reference external" href="https://hub.docker.com/r/searxng/searxng">searxng/searxng &#64;dockerhub</a>.</p></li>
</ul>
<aside class="sidebar">
<p class="sidebar-title">hint</p>
<p>The rest of this article is of interest only to those who want to create and
maintain their own Docker images.</p>
</aside>
<p>The sources are hosted at <a class="reference external" href="https://github.com/searxng/searxng-docker">searxng-docker</a> and the container includes:</p>
<ul class="simple">
<li><p>a HTTPS reverse proxy <a class="reference external" href="https://hub.docker.com/_/caddy">[caddy]</a> and</p></li>
<li><p>a <a class="reference external" href="https://redis.io/">Redis</a> DB</p></li>
</ul>
<p>The <a class="reference external" href="https://github.com/searxng/searxng-docker/blob/master/searxng/settings.yml">default SearXNG setup</a>
of this container:</p>
<ul class="simple">
<li><p>enables <a class="reference internal" href="settings/settings_server.html#limiter"><span class="std std-ref">limiter</span></a> to protect against bots</p></li>
<li><p>enables <a class="reference internal" href="settings/settings_server.html#image-proxy"><span class="std std-ref">image proxy</span></a> for better privacy</p></li>
<li><p>enables <a class="reference internal" href="settings/settings_ui.html#static-use-hash"><span class="std std-ref">cache busting</span></a> to save bandwith</p></li>
</ul>
<hr class="docutils" />
<section id="get-docker">
<h2>Get Docker<a class="headerlink" href="#get-docker" title="Permalink to this heading"></a></h2>
<p>If you plan to build and maintain a docker image by yourself, make sure you have
<a class="reference external" href="https://docs.docker.com/get-docker/">Docker installed</a>. On Linux dont
forget to add your user to the docker group (log out and log back in so that
your group membership is re-evaluated):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>usermod<span class="w"> </span>-a<span class="w"> </span>-G<span class="w"> </span>docker<span class="w"> </span><span class="nv">$USER</span>
</pre></div>
</div>
</section>
<section id="searxng-searxng">
<h2>searxng/searxng<a class="headerlink" href="#searxng-searxng" title="Permalink to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title"><code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span></code></p>
<ul class="simple">
<li><p><a class="reference external" href="https://docs.docker.com/engine/reference/run/#clean-up---rm">--rm</a>
automatically clean up when container exits</p></li>
<li><p><a class="reference external" href="https://docs.docker.com/engine/reference/run/#detached--d">-d</a> start
detached container</p></li>
<li><p><a class="reference external" href="https://docs.docker.com/engine/reference/run/#volume-shared-filesystems">-v</a>
mount volume <code class="docutils literal notranslate"><span class="pre">HOST:CONTAINER</span></code></p></li>
</ul>
</aside>
<p>The docker image is based on <a class="reference external" href="https://github.com/searxng/searxng/blob/master/Dockerfile">git://Dockerfile</a> and available from
<a class="reference external" href="https://hub.docker.com/r/searxng/searxng">searxng/searxng &#64;dockerhub</a>. Using the docker image is quite easy, for
instance you can pull the <a class="reference external" href="https://hub.docker.com/r/searxng/searxng">searxng/searxng &#64;dockerhub</a> image and deploy a local
instance using <a class="reference external" href="https://docs.docker.com/engine/reference/run/">docker run</a>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>mkdir<span class="w"> </span>my-instance
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>my-instance
$<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="nv">PORT</span><span class="o">=</span><span class="m">8080</span>
$<span class="w"> </span>docker<span class="w"> </span>pull<span class="w"> </span>searxng/searxng
$<span class="w"> </span>docker<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-d<span class="w"> </span>-p<span class="w"> </span><span class="si">${</span><span class="nv">PORT</span><span class="si">}</span>:8080<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-v<span class="w"> </span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">PWD</span><span class="si">}</span><span class="s2">/searxng:/etc/searxng&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;BASE_URL=http://localhost:</span><span class="nv">$PORT</span><span class="s2">/&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;INSTANCE_NAME=my-instance&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>searxng/searxng
2f998....<span class="w"> </span><span class="c1"># container&#39;s ID</span>
</pre></div>
</div>
<p>Open your WEB browser and visit the URL:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>xdg-open<span class="w"> </span><span class="s2">&quot;http://localhost:</span><span class="nv">$PORT</span><span class="s2">&quot;</span>
</pre></div>
</div>
<p>Inside <code class="docutils literal notranslate"><span class="pre">${PWD}/searxng</span></code>, you will find <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> and <code class="docutils literal notranslate"><span class="pre">uwsgi.ini</span></code>. You
can modify these files according to your needs and restart the Docker image.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>docker<span class="w"> </span>container<span class="w"> </span>restart<span class="w"> </span>2f998
</pre></div>
</div>
<p>Use command <code class="docutils literal notranslate"><span class="pre">container</span> <span class="pre">ls</span></code> to list running containers, add flag <a class="reference external" href="https://docs.docker.com/engine/reference/commandline/container_ls">-a</a> to list
exited containers also. With <code class="docutils literal notranslate"><span class="pre">container</span> <span class="pre">stop</span></code> a running container can be
stoped. To get rid of a container use <code class="docutils literal notranslate"><span class="pre">container</span> <span class="pre">rm</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>docker<span class="w"> </span>container<span class="w"> </span>ls
CONTAINER<span class="w"> </span>ID<span class="w"> </span>IMAGE<span class="w"> </span>COMMAND<span class="w"> </span>CREATED<span class="w"> </span>...
2f998d725993<span class="w"> </span>searxng/searxng<span class="w"> </span><span class="s2">&quot;/sbin/tini -- /usr/…&quot;</span><span class="w"> </span><span class="m">7</span><span class="w"> </span>minutes<span class="w"> </span>ago<span class="w"> </span>...
$<span class="w"> </span>docker<span class="w"> </span>container<span class="w"> </span>stop<span class="w"> </span>2f998
$<span class="w"> </span>docker<span class="w"> </span>container<span class="w"> </span>rm<span class="w"> </span>2f998
</pre></div>
</div>
<aside class="sidebar">
<p class="sidebar-title">Warning</p>
<p>This might remove all docker items, not only those from SearXNG.</p>
</aside>
<p>If you wont use docker anymore and want to get rid of all containers &amp; images
use the following <em>prune</em> command:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>docker<span class="w"> </span>stop<span class="w"> </span><span class="k">$(</span>docker<span class="w"> </span>ps<span class="w"> </span>-aq<span class="k">)</span><span class="w"> </span><span class="c1"># stop all containers</span>
$<span class="w"> </span>docker<span class="w"> </span>system<span class="w"> </span>prune<span class="w"> </span><span class="c1"># make some housekeeping</span>
$<span class="w"> </span>docker<span class="w"> </span>rmi<span class="w"> </span>-f<span class="w"> </span><span class="k">$(</span>docker<span class="w"> </span>images<span class="w"> </span>-q<span class="k">)</span><span class="w"> </span><span class="c1"># drop all images</span>
</pre></div>
</div>
<section id="shell-inside-container">
<h3>shell inside container<a class="headerlink" href="#shell-inside-container" title="Permalink to this heading"></a></h3>
<aside class="sidebar">
<p class="sidebar-title">Bashism</p>
<ul class="simple">
<li><p><a class="reference external" href="https://lwn.net/Articles/343924/">A tale of two shells: bash or dash</a></p></li>
<li><p><a class="reference external" href="http://mywiki.wooledge.org/Bashism">How to make bash scripts work in dash</a></p></li>
<li><p><a class="reference external" href="https://dev.to/bowmanjd/writing-bash-scripts-that-are-not-only-bash-checking-for-bashisms-and-testing-with-dash-1bli">Checking for Bashisms</a></p></li>
</ul>
</aside>
<p>Like in many other distributions, Alpines <a class="reference external" href="https://wiki.ubuntu.com/DashAsBinSh">/bin/sh</a> is <a class="reference external" href="https://manpages.debian.org/jump?q=dash">dash</a>. Dash is meant to be
<a class="reference external" href="https://pubs.opengroup.org/onlinepubs/9699919799">POSIX-compliant</a>.
Compared to debian, in the Alpine image <a class="reference external" href="https://manpages.debian.org/jump?q=bash">bash</a> is not installed. The
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/dockerfiles/docker-entrypoint.sh">git://dockerfiles/docker-entrypoint.sh</a> script is checked <em>against dash</em>
(<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">tests.shell</span></code>).</p>
<p>To open a shell inside the container:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>docker<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>-it<span class="w"> </span>2f998<span class="w"> </span>sh
</pre></div>
</div>
</section>
</section>
<section id="build-the-image">
<h2>Build the image<a class="headerlink" href="#build-the-image" title="Permalink to this heading"></a></h2>
<p>Its also possible to build SearXNG from the embedded <a class="reference external" href="https://github.com/searxng/searxng/blob/master/Dockerfile">git://Dockerfile</a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ git clone https://github.com/searxng/searxng.git
$ cd searxng
$ make docker.build
...
Successfully built 49586c016434
Successfully tagged searxng/searxng:latest
Successfully tagged searxng/searxng:1.0.0-209-9c823800-dirty
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
searxng/searxng 1.0.0-209-9c823800-dirty 49586c016434 13 minutes ago 308MB
searxng/searxng latest 49586c016434 13 minutes ago 308MB
alpine 3.13 6dbb9cc54074 3 weeks ago 5.61MB
</pre></div>
</div>
</section>
<section id="command-line">
<h2>Command line<a class="headerlink" href="#command-line" title="Permalink to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">docker run</p>
<p>Use flags <code class="docutils literal notranslate"><span class="pre">-it</span></code> for <a class="reference external" href="https://docs.docker.com/engine/reference/run/#foreground">interactive processes</a>.</p>
</aside>
<p>In the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/Dockerfile">git://Dockerfile</a> the <a class="reference external" href="https://docs.docker.com/engine/reference/builder/#entrypoint">ENTRYPOINT</a> is defined as
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/dockerfiles/docker-entrypoint.sh">git://dockerfiles/docker-entrypoint.sh</a></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker<span class="w"> </span>run<span class="w"> </span>--rm<span class="w"> </span>-it<span class="w"> </span>searxng/searxng<span class="w"> </span>-h
</pre></div>
</div>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Command line:
-h Display this help
-d Dry run to update the configuration files.
-f Always update on the configuration files (existing files are renamed with
the .old suffix). Without this option, the new configuration files are
copied with the .new suffix
Environment variables:
INSTANCE_NAME settings.yml : general.instance_name
AUTOCOMPLETE settings.yml : search.autocomplete
BASE_URL settings.yml : server.base_url
MORTY_URL settings.yml : result_proxy.url
MORTY_KEY settings.yml : result_proxy.key
BIND_ADDRESS uwsgi bind to the specified TCP socket using HTTP protocol.
Default value: 0.0.0.0:8080
Volume:
/etc/searxng the docker entry point copies settings.yml and uwsgi.ini in
this directory (see the -f command line option)&quot;
</pre></div>
</div>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="installation.html" title="previous chapter">Installation</a>
<li>Next: <a href="installation-scripts.html" title="next chapter">Installation Script</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/installation-docker.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,354 @@
<!DOCTYPE html>
<html lang="en">
<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>NGINX &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/tabs.js?v=3030b3cb"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Apache" href="installation-apache.html" />
<link rel="prev" title="uWSGI" href="installation-uwsgi.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="installation-apache.html" title="Apache"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-uwsgi.html" title="uWSGI"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">NGINX</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="nginx">
<span id="installation-nginx"></span><h1>NGINX<a class="headerlink" href="#nginx" title="Permalink to this heading"></a></h1>
<p>This section explains how to set up a SearXNG instance using the HTTP server <a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/">nginx</a>.
If you have used the <a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a> and do not have any special preferences
you can install the <a class="reference internal" href="#nginx-searxng-site"><span class="std std-ref">SearXNG site</span></a> using
<a class="reference internal" href="../utils/searxng.sh.html#searxng-sh-overview"><span class="std std-ref">searxng.sh</span></a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>nginx
</pre></div>
</div>
<p>If you have special interests or problems with setting up nginx, the following
section might give you some guidance.</p>
<aside class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/">nginx</a></p></li>
<li><p><a class="reference external" href="https://nginx.org/en/docs/beginners_guide.html">nginx beginners guide</a></p></li>
<li><p><a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#setting-up-virtual-servers">nginx server configuration</a></p></li>
<li><p><a class="reference external" href="https://www.nginx.com/resources/wiki/start/">Getting Started wiki</a></p></li>
<li><p><a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html">uWSGI support from nginx</a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#the-nginx-http-server" id="id2">The nginx HTTP server</a></p></li>
<li><p><a class="reference internal" href="#nginx-s-searxng-site" id="id3">NGINXs SearXNG site</a></p></li>
<li><p><a class="reference internal" href="#disable-logs" id="id4">Disable logs</a></p></li>
</ul>
</nav>
<section id="the-nginx-http-server">
<h2><a class="toc-backref" href="#id2" role="doc-backlink">The nginx HTTP server</a><a class="headerlink" href="#the-nginx-http-server" title="Permalink to this heading"></a></h2>
<p>If <a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/">nginx</a> is not installed, install it now.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-0-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-0-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-0-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>nginx
</pre></div>
</div>
</div><div aria-labelledby="tab-0-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>nginx-mainline
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>nginx
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>nginx
</pre></div>
</div>
</div><div aria-labelledby="tab-0-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>nginx
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>nginx
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>nginx
</pre></div>
</div>
</div></div>
<p>Now at <a class="reference external" href="http://localhost">http://localhost</a> you should see a <em>Welcome to nginx!</em> page, on Fedora you
see a <em>Fedora Webserver - Test Page</em>. The test page comes from the default
<a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#setting-up-virtual-servers">nginx server configuration</a>. How this default site is configured,
depends on the linux distribution:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-1-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-1-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-1-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>less<span class="w"> </span>/etc/nginx/nginx.conf
</pre></div>
</div>
<p>There is one line that includes site configurations from:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">include</span><span class="w"> </span><span class="n">/etc/nginx/sites-enabled/*</span>;
</pre></div>
</div>
</div><div aria-labelledby="tab-1-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less<span class="w"> </span>/etc/nginx/nginx.conf
</pre></div>
</div>
<p>There is a configuration section named <code class="docutils literal notranslate"><span class="pre">server</span></code>:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">server</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kn">listen</span><span class="w"> </span><span class="mi">80</span><span class="p">;</span>
<span class="w"> </span><span class="kn">server_name</span><span class="w"> </span><span class="s">localhost</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># ...</span>
<span class="p">}</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-1-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less<span class="w"> </span>/etc/nginx/nginx.conf
</pre></div>
</div>
<p>There is one line that includes site configurations from:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">include</span><span class="w"> </span><span class="n">/etc/nginx/conf.d/*.conf</span>;
</pre></div>
</div>
</div></div>
</section>
<section id="nginx-s-searxng-site">
<span id="nginx-searxng-site"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">NGINXs SearXNG site</a><a class="headerlink" href="#nginx-s-searxng-site" title="Permalink to this heading"></a></h2>
<p>Now you have to create a configuration file (<code class="docutils literal notranslate"><span class="pre">searxng.conf</span></code>) for the SearXNG
site. If <a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/">nginx</a> is new to you, the <a class="reference external" href="https://nginx.org/en/docs/beginners_guide.html">nginx beginners guide</a> is a good starting
point and the <a class="reference external" href="https://www.nginx.com/resources/wiki/start/">Getting Started wiki</a> is always a good resource <em>to keep in the
pocket</em>.</p>
<p>Depending on what your SearXNG installation is listening on, you need a http or socket
communication to upstream.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-c29ja2V0" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-c29ja2V0" name="c29ja2V0" role="tab" tabindex="0">socket</button><button aria-controls="panel-2-aHR0cA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-aHR0cA==" name="aHR0cA==" role="tab" tabindex="-1">http</button></div><div aria-labelledby="tab-2-c29ja2V0" class="sphinx-tabs-panel group-tab" id="panel-2-c29ja2V0" name="c29ja2V0" role="tabpanel" tabindex="0"><div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span><span class="w"> </span><span class="s">/searxng</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kn">uwsgi_pass</span><span class="w"> </span><span class="s">unix:///usr/local/searxng/run/socket</span><span class="p">;</span>
<span class="w"> </span><span class="kn">include</span><span class="w"> </span><span class="s">uwsgi_params</span><span class="p">;</span>
<span class="w"> </span><span class="kn">uwsgi_param</span><span class="w"> </span><span class="s">HTTP_HOST</span><span class="w"> </span><span class="nv">$host</span><span class="p">;</span>
<span class="w"> </span><span class="kn">uwsgi_param</span><span class="w"> </span><span class="s">HTTP_CONNECTION</span><span class="w"> </span><span class="nv">$http_connection</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># see flaskfix.py</span>
<span class="w"> </span><span class="kn">uwsgi_param</span><span class="w"> </span><span class="s">HTTP_X_SCHEME</span><span class="w"> </span><span class="nv">$scheme</span><span class="p">;</span>
<span class="w"> </span><span class="kn">uwsgi_param</span><span class="w"> </span><span class="s">HTTP_X_SCRIPT_NAME</span><span class="w"> </span><span class="s">/searxng</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># see limiter.py</span>
<span class="w"> </span><span class="kn">uwsgi_param</span><span class="w"> </span><span class="s">HTTP_X_REAL_IP</span><span class="w"> </span><span class="nv">$remote_addr</span><span class="p">;</span>
<span class="w"> </span><span class="kn">uwsgi_param</span><span class="w"> </span><span class="s">HTTP_X_FORWARDED_FOR</span><span class="w"> </span><span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="p">}</span>
<span class="c1"># uWSGI serves the static files and in settings.yml we use::</span>
<span class="c1">#</span>
<span class="c1"># ui:</span>
<span class="c1"># static_use_hash: true</span>
<span class="c1">#</span>
<span class="c1"># location /searxng/static/ {</span>
<span class="c1"># alias /usr/local/searxng/searxng-src/searx/static/;</span>
<span class="c1"># }</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-2-aHR0cA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-aHR0cA==" name="aHR0cA==" role="tabpanel" tabindex="0"><div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span><span class="w"> </span><span class="s">/searxng</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kn">proxy_pass</span><span class="w"> </span><span class="s">http://127.0.0.1:8888</span><span class="p">;</span>
<span class="w"> </span><span class="kn">proxy_set_header</span><span class="w"> </span><span class="s">Host</span><span class="w"> </span><span class="nv">$host</span><span class="p">;</span>
<span class="w"> </span><span class="kn">proxy_set_header</span><span class="w"> </span><span class="s">Connection</span><span class="w"> </span><span class="nv">$http_connection</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># see flaskfix.py</span>
<span class="w"> </span><span class="kn">proxy_set_header</span><span class="w"> </span><span class="s">X-Scheme</span><span class="w"> </span><span class="nv">$scheme</span><span class="p">;</span>
<span class="w"> </span><span class="kn">proxy_set_header</span><span class="w"> </span><span class="s">X-Script-Name</span><span class="w"> </span><span class="s">/searxng</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># see limiter.py</span>
<span class="w"> </span><span class="kn">proxy_set_header</span><span class="w"> </span><span class="s">X-Real-IP</span><span class="w"> </span><span class="nv">$remote_addr</span><span class="p">;</span>
<span class="w"> </span><span class="kn">proxy_set_header</span><span class="w"> </span><span class="s">X-Forwarded-For</span><span class="w"> </span><span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># proxy_buffering off;</span>
<span class="w"> </span><span class="c1"># proxy_request_buffering off;</span>
<span class="w"> </span><span class="c1"># proxy_buffer_size 8k;</span>
<span class="p">}</span>
<span class="c1"># uWSGI serves the static files and in settings.yml we use::</span>
<span class="c1">#</span>
<span class="c1"># ui:</span>
<span class="c1"># static_use_hash: true</span>
<span class="c1">#</span>
<span class="c1"># location /searxng/static/ {</span>
<span class="c1"># alias /usr/local/searxng/searxng-src/searx/static/;</span>
<span class="c1"># }</span>
</pre></div>
</div>
</div></div>
<p>The <a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a> installs the <a class="reference internal" href="installation-searxng.html#use-default-settings-yml"><span class="std std-ref">reference setup</span></a> and a <a class="reference internal" href="installation-uwsgi.html#uwsgi-setup"><span class="std std-ref">uWSGI setup</span></a> that listens on a socket by default.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-3-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-3-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-3-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><p>Create configuration at <code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-available/</span></code> and place a
symlink to <code class="docutils literal notranslate"><span class="pre">sites-enabled</span></code>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/etc/nginx/sites-available/searxng.conf<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>/etc/nginx/sites-enabled/searxng.conf
</pre></div>
</div>
</div><div aria-labelledby="tab-3-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><p>In the <code class="docutils literal notranslate"><span class="pre">/etc/nginx/nginx.conf</span></code> file, in the <code class="docutils literal notranslate"><span class="pre">server</span></code> section add a
<a class="reference external" href="https://nginx.org/en/docs/ngx_core_module.html#include">include</a>
directive:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">server</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="c1"># ...</span>
<span class="w"> </span><span class="kn">include</span><span class="w"> </span><span class="s">/etc/nginx/default.d/*.conf</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># ...</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Create two folders, one for the <em>available sites</em> and one for the <em>enabled sites</em>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/nginx/default.d
mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/nginx/default.apps-available
</pre></div>
</div>
<p>Create configuration at <code class="docutils literal notranslate"><span class="pre">/etc/nginx/default.apps-available</span></code> and place a
symlink to <code class="docutils literal notranslate"><span class="pre">default.d</span></code>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/etc/nginx/default.apps-available/searxng.conf<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>/etc/nginx/default.d/searxng.conf
</pre></div>
</div>
</div><div aria-labelledby="tab-3-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><p>Create a folder for the <em>available sites</em>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir<span class="w"> </span>-p<span class="w"> </span>/etc/nginx/default.apps-available
</pre></div>
</div>
<p>Create configuration at <code class="docutils literal notranslate"><span class="pre">/etc/nginx/default.apps-available</span></code> and place a
symlink to <code class="docutils literal notranslate"><span class="pre">conf.d</span></code>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/etc/nginx/default.apps-available/searxng.conf<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>/etc/nginx/conf.d/searxng.conf
</pre></div>
</div>
</div></div>
<p>Restart services:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-4-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-4-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-4-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-4-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>nginx
sudo<span class="w"> </span>-H<span class="w"> </span>service<span class="w"> </span>uwsgi<span class="w"> </span>restart<span class="w"> </span>searxng
</pre></div>
</div>
</div><div aria-labelledby="tab-4-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>nginx
sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng
</pre></div>
</div>
</div><div aria-labelledby="tab-4-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>nginx
sudo<span class="w"> </span>-H<span class="w"> </span>touch<span class="w"> </span>/etc/uwsgi.d/searxng.ini
</pre></div>
</div>
</div></div>
</section>
<section id="disable-logs">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Disable logs</a><a class="headerlink" href="#disable-logs" title="Permalink to this heading"></a></h2>
<p>For better privacy you can disable nginx logs in <code class="docutils literal notranslate"><span class="pre">/etc/nginx/nginx.conf</span></code>.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">http</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="c1"># ...</span>
<span class="w"> </span><span class="kn">access_log</span><span class="w"> </span><span class="s">/dev/null</span><span class="p">;</span>
<span class="w"> </span><span class="kn">error_log</span><span class="w"> </span><span class="s">/dev/null</span><span class="p">;</span>
<span class="w"> </span><span class="c1"># ...</span>
<span class="p">}</span>
</pre></div>
</div>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="installation-uwsgi.html" title="previous chapter">uWSGI</a>
<li>Next: <a href="installation-apache.html" title="next chapter">Apache</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/installation-nginx.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,194 @@
<!DOCTYPE html>
<html lang="en">
<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>Installation Script &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Step by step installation" href="installation-searxng.html" />
<link rel="prev" title="Docker Container" href="installation-docker.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="installation-searxng.html" title="Step by step installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-docker.html" title="Docker Container"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Installation Script</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="installation-script">
<span id="installation-scripts"></span><h1>Installation Script<a class="headerlink" href="#installation-script" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">Update the OS first!</p>
<p>To avoid unwanted side effects, update your OS before installing SearXNG.</p>
</aside>
<p>The following will install a setup as shown in <a class="reference internal" href="architecture.html#arch-public"><span class="std std-ref">the reference architecture</span></a>. First you need to get a clone of the repository. The clone is only needed for
the installation procedure and some maintenance tasks.</p>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/index.html#toolboxing"><span class="std std-ref">DevOps tooling box</span></a></p></li>
</ul>
</aside>
<p>Jump to a folder that is readable by <em>others</em> and start to clone SearXNG,
alternatively you can create your own fork and clone from there.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>~/Downloads
$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/searxng/searxng.git<span class="w"> </span>searxng
$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>searxng
</pre></div>
</div>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="update-searxng.html#inspect-searxng"><span class="std std-ref">How to inspect &amp; debug</span></a></p></li>
</ul>
</aside>
<p>To install a SearXNG <a class="reference internal" href="installation-searxng.html#use-default-settings-yml"><span class="std std-ref">reference setup</span></a>
including a <a class="reference internal" href="architecture.html#architecture-uwsgi"><span class="std std-ref">uWSGI setup</span></a> as described in the
<a class="reference internal" href="installation-searxng.html#installation-basic"><span class="std std-ref">Step by step installation</span></a> and in the <a class="reference internal" href="installation-uwsgi.html#searxng-uwsgi"><span class="std std-ref">uWSGI</span></a> section type:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>all
</pre></div>
</div>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>For the installation procedure, use a <em>sudoer</em> login to run the scripts. If
you install from <code class="docutils literal notranslate"><span class="pre">root</span></code>, take into account that the scripts are creating a
<code class="docutils literal notranslate"><span class="pre">searxng</span></code> user. In the installation procedure this new created user does
need to have read access to the cloned SearXNG repository, which is not the case if you clone
it into a folder below <code class="docutils literal notranslate"><span class="pre">/root</span></code>!</p>
</div>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="update-searxng.html#update-searxng"><span class="std std-ref">How to update</span></a></p></li>
</ul>
</aside>
<p>When all services are installed and running fine, you can add SearXNG to your
HTTP server. We do not have any preferences regarding the HTTP server, you can use
whatever you prefer.</p>
<p>We use caddy in our <a class="reference internal" href="installation-docker.html#installation-docker"><span class="std std-ref">docker image</span></a> and we have
implemented installation procedures for:</p>
<ul class="simple">
<li><p><a class="reference internal" href="installation-nginx.html#installation-nginx"><span class="std std-ref">NGINX</span></a></p></li>
<li><p><a class="reference internal" href="installation-apache.html#installation-apache"><span class="std std-ref">Apache</span></a></p></li>
</ul>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="installation-docker.html" title="previous chapter">Docker Container</a>
<li>Next: <a href="installation-searxng.html" title="next chapter">Step by step installation</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/installation-scripts.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,599 @@
<!DOCTYPE html>
<html lang="en">
<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>Step by step installation &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/tabs.js?v=3030b3cb"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="uWSGI" href="installation-uwsgi.html" />
<link rel="prev" title="Installation Script" href="installation-scripts.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="installation-uwsgi.html" title="uWSGI"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-scripts.html" title="Installation Script"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Step by step installation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="step-by-step-installation">
<span id="installation-basic"></span><h1>Step by step installation<a class="headerlink" href="#step-by-step-installation" title="Permalink to this heading"></a></h1>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#install-packages" id="id2">Install packages</a></p></li>
<li><p><a class="reference internal" href="#create-user" id="id3">Create user</a></p></li>
<li><p><a class="reference internal" href="#install-searxng-dependencies" id="id4">Install SearXNG &amp; dependencies</a></p></li>
<li><p><a class="reference internal" href="#configuration" id="id5">Configuration</a></p></li>
<li><p><a class="reference internal" href="#check" id="id6">Check</a></p></li>
</ul>
</nav>
<p>In this section we show the setup of a SearXNG instance that will be installed
by the <a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a>.</p>
<section id="install-packages">
<span id="id1"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Install packages</a><a class="headerlink" href="#install-packages" title="Permalink to this heading"></a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-0-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-0-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-0-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>apt-get<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>python3-dev<span class="w"> </span>python3-babel<span class="w"> </span>python3-venv<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>uwsgi<span class="w"> </span>uwsgi-plugin-python3<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>git<span class="w"> </span>build-essential<span class="w"> </span>libxslt-dev<span class="w"> </span>zlib1g-dev<span class="w"> </span>libffi-dev<span class="w"> </span>libssl-dev
</pre></div>
</div>
</div><div aria-labelledby="tab-0-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>--noconfirm<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>python<span class="w"> </span>python-pip<span class="w"> </span>python-lxml<span class="w"> </span>python-babel<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>uwsgi<span class="w"> </span>uwsgi-plugin-python<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>git<span class="w"> </span>base-devel<span class="w"> </span>libxml2
</pre></div>
</div>
</div><div aria-labelledby="tab-0-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>-y<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>python<span class="w"> </span>python-pip<span class="w"> </span>python-lxml<span class="w"> </span>python-babel<span class="w"> </span>python3-devel<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>uwsgi<span class="w"> </span>uwsgi-plugin-python3<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>git<span class="w"> </span>@development-tools<span class="w"> </span>libxml2<span class="w"> </span>openssl
</pre></div>
</div>
</div></div>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>This installs also the packages needed by <a class="reference internal" href="installation-uwsgi.html#searxng-uwsgi"><span class="std std-ref">uWSGI</span></a></p>
</div>
</section>
<section id="create-user">
<span id="create-searxng-user"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Create user</a><a class="headerlink" href="#create-user" title="Permalink to this heading"></a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-YmFzaA==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-YmFzaA==" name="YmFzaA==" role="tab" tabindex="0">bash</button></div><div aria-labelledby="tab-1-YmFzaA==" class="sphinx-tabs-panel group-tab" id="panel-1-YmFzaA==" name="YmFzaA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>useradd<span class="w"> </span>--shell<span class="w"> </span>/bin/bash<span class="w"> </span>--system<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--home-dir<span class="w"> </span><span class="s2">&quot;/usr/local/searxng&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--comment<span class="w"> </span><span class="s1">&#39;Privacy-respecting metasearch engine&#39;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>searxng
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>mkdir<span class="w"> </span><span class="s2">&quot;/usr/local/searxng&quot;</span>
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>chown<span class="w"> </span>-R<span class="w"> </span><span class="s2">&quot;searxng:searxng&quot;</span><span class="w"> </span><span class="s2">&quot;/usr/local/searxng&quot;</span>
</pre></div>
</div>
</div></div>
</section>
<section id="install-searxng-dependencies">
<span id="searxng-src"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Install SearXNG &amp; dependencies</a><a class="headerlink" href="#install-searxng-dependencies" title="Permalink to this heading"></a></h2>
<p>Start a interactive shell from new created user and clone SearXNG:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-YmFzaA==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-YmFzaA==" name="YmFzaA==" role="tab" tabindex="0">bash</button></div><div aria-labelledby="tab-2-YmFzaA==" class="sphinx-tabs-panel group-tab" id="panel-2-YmFzaA==" name="YmFzaA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>-u<span class="w"> </span>searxng<span class="w"> </span>-i
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span><span class="s2">&quot;https://github.com/searxng/searxng&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span><span class="s2">&quot;/usr/local/searxng/searxng-src&quot;</span>
</pre></div>
</div>
</div></div>
<p>In the same shell create <em>virtualenv</em>:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-YmFzaA==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-YmFzaA==" name="YmFzaA==" role="tab" tabindex="0">bash</button></div><div aria-labelledby="tab-3-YmFzaA==" class="sphinx-tabs-panel group-tab" id="panel-3-YmFzaA==" name="YmFzaA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span>python3<span class="w"> </span>-m<span class="w"> </span>venv<span class="w"> </span><span class="s2">&quot;/usr/local/searxng/searx-pyenv&quot;</span>
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot;. /usr/local/searxng/searx-pyenv/bin/activate&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>&gt;&gt;<span class="w"> </span><span class="s2">&quot;/usr/local/searxng/.profile&quot;</span>
</pre></div>
</div>
</div></div>
<p>To install SearXNGs dependencies, exit the SearXNG <em>bash</em> session you opened above
and start a new one. Before installing, check if your <em>virtualenv</em> was sourced
from the login (<em>~/.profile</em>):</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-YmFzaA==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-YmFzaA==" name="YmFzaA==" role="tab" tabindex="0">bash</button></div><div aria-labelledby="tab-4-YmFzaA==" class="sphinx-tabs-panel group-tab" id="panel-4-YmFzaA==" name="YmFzaA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>-u<span class="w"> </span>searxng<span class="w"> </span>-i
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span><span class="nb">command</span><span class="w"> </span>-v<span class="w"> </span>python<span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span>python<span class="w"> </span>--version
/usr/local/searxng/searx-pyenv/bin/python
Python<span class="w"> </span><span class="m">3</span>.8.1
<span class="c1"># update pip&#39;s boilerplate ..</span>
pip<span class="w"> </span>install<span class="w"> </span>-U<span class="w"> </span>pip
pip<span class="w"> </span>install<span class="w"> </span>-U<span class="w"> </span>setuptools
pip<span class="w"> </span>install<span class="w"> </span>-U<span class="w"> </span>wheel
pip<span class="w"> </span>install<span class="w"> </span>-U<span class="w"> </span>pyyaml
<span class="c1"># jump to SearXNG&#39;s working tree and install SearXNG into virtualenv</span>
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span><span class="s2">&quot;/usr/local/searxng/searxng-src&quot;</span>
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.
</pre></div>
</div>
</div></div>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>Open a second terminal for the configuration tasks and leave the <code class="docutils literal notranslate"><span class="pre">(searx)$</span></code>
terminal open for the tasks below.</p>
</div>
</section>
<section id="configuration">
<span id="use-default-settings-yml"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h2>
<aside 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/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a></p></li>
<li><p><a class="reference internal" href="settings/settings.html#settings-location"><span class="std std-ref">settings.yml location</span></a></p></li>
<li><p><a class="reference internal" href="settings/settings.html#settings-use-default-settings"><span class="std std-ref">use_default_settings</span></a></p></li>
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/templates/etc/searxng/settings.yml">/etc/searxng/settings.yml</a></p></li>
</ul>
</aside>
<p>To create a initial <code class="docutils literal notranslate"><span class="pre">/etc/searxng/settings.yml</span></code> we recommend to start with a
copy of the file <a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/templates/etc/searxng/settings.yml">git://utils/templates/etc/searxng/settings.yml</a>. This setup
<a class="reference internal" href="settings/settings.html#settings-use-default-settings"><span class="std std-ref">use default settings</span></a> from
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">git://searx/settings.yml</a> and is shown in the tab <em>“Use default settings”</em>
below. This setup:</p>
<ul class="simple">
<li><p>enables <a class="reference internal" href="settings/settings_server.html#limiter"><span class="std std-ref">limiter</span></a> to protect against bots</p></li>
<li><p>enables <a class="reference internal" href="settings/settings_server.html#image-proxy"><span class="std std-ref">image proxy</span></a> for better privacy</p></li>
<li><p>enables <a class="reference internal" href="settings/settings_ui.html#static-use-hash"><span class="std std-ref">cache busting</span></a> to save bandwith</p></li>
</ul>
<p>Modify the <code class="docutils literal notranslate"><span class="pre">/etc/searxng/settings.yml</span></code> to your needs:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-5-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-5-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" name="VXNlIGRlZmF1bHQgc2V0dGluZ3M=" role="tab" tabindex="0">Use default settings</button><button aria-controls="panel-5-c2Vhcngvc2V0dGluZ3MueW1s" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-c2Vhcngvc2V0dGluZ3MueW1s" name="c2Vhcngvc2V0dGluZ3MueW1s" role="tab" tabindex="-1">searx/settings.yml</button></div><div aria-labelledby="tab-5-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" class="sphinx-tabs-panel group-tab" id="panel-5-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" name="VXNlIGRlZmF1bHQgc2V0dGluZ3M=" role="tabpanel" tabindex="0"><div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># SearXNG settings</span>
<span class="nt">use_default_settings</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="nt">general</span><span class="p">:</span>
<span class="w"> </span><span class="nt">debug</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">instance_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SearXNG&quot;</span>
<span class="nt">search</span><span class="p">:</span>
<span class="w"> </span><span class="nt">safe_search</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2</span>
<span class="w"> </span><span class="nt">autocomplete</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;duckduckgo&#39;</span>
<span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Is overwritten by ${SEARXNG_SECRET}</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span>
<span class="w"> </span><span class="nt">limiter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">image_proxy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="c1"># public URL of the instance, to ensure correct inbound links. Is overwritten</span>
<span class="w"> </span><span class="c1"># by ${SEARXNG_URL}.</span>
<span class="w"> </span><span class="c1"># base_url: http://example.com/location</span>
<span class="nt">redis</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># URL to connect redis database. Is overwritten by ${SEARXNG_REDIS_URL}.</span>
<span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">unix:///usr/local/searxng-redis/run/redis.sock?db=0</span>
<span class="nt">ui</span><span class="p">:</span>
<span class="w"> </span><span class="nt">static_use_hash</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="c1"># preferences:</span>
<span class="c1"># lock:</span>
<span class="c1"># - autocomplete</span>
<span class="c1"># - method</span>
<span class="nt">enabled_plugins</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;Hash</span><span class="nv"> </span><span class="s">plugin&#39;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;Search</span><span class="nv"> </span><span class="s">on</span><span class="nv"> </span><span class="s">category</span><span class="nv"> </span><span class="s">select&#39;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;Self</span><span class="nv"> </span><span class="s">Informations&#39;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;Tracker</span><span class="nv"> </span><span class="s">URL</span><span class="nv"> </span><span class="s">remover&#39;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&#39;Ahmia</span><span class="nv"> </span><span class="s">blacklist&#39;</span>
<span class="w"> </span><span class="c1"># - &#39;Hostname replace&#39; # see hostname_replace configuration below</span>
<span class="w"> </span><span class="c1"># - &#39;Infinite scroll&#39;</span>
<span class="w"> </span><span class="c1"># - &#39;Open Access DOI rewrite&#39;</span>
<span class="w"> </span><span class="c1"># - &#39;Vim-like hotkeys&#39;</span>
<span class="c1"># plugins:</span>
<span class="c1"># - only_show_green_results</span>
</pre></div>
</div>
<p>To see the entire file jump to <a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/templates/etc/searxng/settings.yml">git://utils/templates/etc/searxng/settings.yml</a></p>
</div><div aria-labelledby="tab-5-c2Vhcngvc2V0dGluZ3MueW1s" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-c2Vhcngvc2V0dGluZ3MueW1s" name="c2Vhcngvc2V0dGluZ3MueW1s" role="tabpanel" tabindex="0"><div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">general</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Debug mode, only for development. Is overwritten by ${SEARXNG_DEBUG}</span>
<span class="w"> </span><span class="nt">debug</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># displayed name</span>
<span class="w"> </span><span class="nt">instance_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SearXNG&quot;</span>
<span class="w"> </span><span class="c1"># For example: https://example.com/privacy</span>
<span class="w"> </span><span class="nt">privacypolicy_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># use true to use your own donation page written in searx/info/en/donate.md</span>
<span class="w"> </span><span class="c1"># use false to disable the donation link</span>
<span class="w"> </span><span class="nt">donation_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># mailto:contact@example.com</span>
<span class="w"> </span><span class="nt">contact_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># record stats</span>
<span class="w"> </span><span class="nt">enable_metrics</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="nt">brand</span><span class="p">:</span>
<span class="w"> </span><span class="nt">new_issue_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://github.com/searxng/searxng/issues/new</span>
<span class="w"> </span><span class="nt">docs_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://docs.searxng.org/</span>
<span class="w"> </span><span class="nt">public_instances</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://searx.space</span>
<span class="w"> </span><span class="nt">wiki_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://github.com/searxng/searxng/wiki</span>
<span class="w"> </span><span class="nt">issue_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://github.com/searxng/searxng/issues</span>
<span class="nt">search</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Filter results. 0: None, 1: Moderate, 2: Strict</span>
<span class="w"> </span><span class="nt">safe_search</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="c1"># Existing autocomplete backends: &quot;dbpedia&quot;, &quot;duckduckgo&quot;, &quot;google&quot;, &quot;yandex&quot;,</span>
<span class="w"> </span><span class="c1"># &quot;seznam&quot;, &quot;startpage&quot;, &quot;swisscows&quot;, &quot;qwant&quot;, &quot;wikipedia&quot; - leave blank to turn it off</span>
<span class="w"> </span><span class="c1"># by default.</span>
<span class="w"> </span><span class="nt">autocomplete</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="c1"># minimun characters to type before autocompleter starts</span>
<span class="w"> </span><span class="nt">autocomplete_min</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">4</span>
<span class="w"> </span><span class="c1"># Default search language - leave blank to detect from browser information or</span>
<span class="w"> </span><span class="c1"># use codes from &#39;languages.py&#39;</span>
<span class="w"> </span><span class="nt">default_lang</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;auto&quot;</span>
<span class="w"> </span><span class="c1"># Available languages</span>
<span class="w"> </span><span class="c1"># languages:</span>
<span class="w"> </span><span class="c1"># - all</span>
<span class="w"> </span><span class="c1"># - en</span>
<span class="w"> </span><span class="c1"># - en-US</span>
<span class="w"> </span><span class="c1"># - de</span>
<span class="w"> </span><span class="c1"># - it-IT</span>
<span class="w"> </span><span class="c1"># - fr</span>
<span class="w"> </span><span class="c1"># - fr-BE</span>
<span class="w"> </span><span class="c1"># ban time in seconds after engine errors</span>
<span class="w"> </span><span class="nt">ban_time_on_fail</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5</span>
<span class="w"> </span><span class="c1"># max ban time in seconds after engine errors</span>
<span class="w"> </span><span class="nt">max_ban_time_on_fail</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">120</span>
<span class="w"> </span><span class="nt">suspended_times</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Engine suspension time after error (in seconds; set to 0 to disable)</span>
<span class="w"> </span><span class="c1"># For error &quot;Access denied&quot; and &quot;HTTP error [402, 403]&quot;</span>
<span class="w"> </span><span class="nt">SearxEngineAccessDenied</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">86400</span>
<span class="w"> </span><span class="c1"># For error &quot;CAPTCHA&quot;</span>
<span class="w"> </span><span class="nt">SearxEngineCaptcha</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">86400</span>
<span class="w"> </span><span class="c1"># For error &quot;Too many request&quot; and &quot;HTTP error 429&quot;</span>
<span class="w"> </span><span class="nt">SearxEngineTooManyRequests</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3600</span>
<span class="w"> </span><span class="c1"># Cloudflare CAPTCHA</span>
<span class="w"> </span><span class="nt">cf_SearxEngineCaptcha</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1296000</span>
<span class="w"> </span><span class="nt">cf_SearxEngineAccessDenied</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">86400</span>
<span class="w"> </span><span class="c1"># ReCAPTCHA</span>
<span class="w"> </span><span class="nt">recaptcha_SearxEngineCaptcha</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">604800</span>
<span class="w"> </span><span class="c1"># remove format to deny access, use lower case.</span>
<span class="w"> </span><span class="c1"># formats: [html, csv, json, rss]</span>
<span class="w"> </span><span class="nt">formats</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">html</span>
<span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># If you change port, bind_address or base_url don&#39;t forget to rebuild</span>
<span class="w"> </span><span class="c1"># instance&#39;s environment (make buildenv). Is overwritten by ${SEARXNG_PORT}</span>
<span class="w"> </span><span class="c1"># and ${SEARXNG_BIND_ADDRESS}</span>
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">8888</span>
<span class="w"> </span><span class="nt">bind_address</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;127.0.0.1&quot;</span>
<span class="w"> </span><span class="c1"># public URL of the instance, to ensure correct inbound links. Is overwritten</span>
<span class="w"> </span><span class="c1"># by ${SEARXNG_URL}.</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span><span class="w"> </span><span class="c1"># &quot;http://example.com/location&quot;</span>
<span class="w"> </span><span class="nt">limiter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span><span class="w"> </span><span class="c1"># rate limit the number of request on the instance, block some bots</span>
<span class="w"> </span><span class="c1"># If your instance owns a /etc/searxng/settings.yml file, then set the following</span>
<span class="w"> </span><span class="c1"># values there.</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span><span class="w"> </span><span class="c1"># Is overwritten by ${SEARXNG_SECRET}</span>
<span class="w"> </span><span class="c1"># Proxying image results through searx</span>
<span class="w"> </span><span class="nt">image_proxy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># 1.0 and 1.1 are supported</span>
<span class="w"> </span><span class="nt">http_protocol_version</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;1.0&quot;</span>
<span class="w"> </span><span class="c1"># POST queries are more secure as they don&#39;t show up in history but may cause</span>
<span class="w"> </span><span class="c1"># problems when using Firefox containers</span>
<span class="w"> </span><span class="nt">method</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;POST&quot;</span>
<span class="w"> </span><span class="nt">default_http_headers</span><span class="p">:</span>
<span class="w"> </span><span class="nt">X-Content-Type-Options</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nosniff</span>
<span class="w"> </span><span class="nt">X-XSS-Protection</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1; mode=block</span>
<span class="w"> </span><span class="nt">X-Download-Options</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">noopen</span>
<span class="w"> </span><span class="nt">X-Robots-Tag</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">noindex, nofollow</span>
<span class="w"> </span><span class="nt">Referrer-Policy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">no-referrer</span>
<span class="nt">redis</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># URL to connect redis database. Is overwritten by ${SEARXNG_REDIS_URL}.</span>
<span class="w"> </span><span class="c1"># https://redis-py.readthedocs.io/en/stable/connections.html#redis.client.Redis.from_url</span>
<span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="nt">ui</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># Custom static path - leave it blank if you didn&#39;t change</span>
<span class="w"> </span><span class="nt">static_path</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="nt">static_use_hash</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># Custom templates path - leave it blank if you didn&#39;t change</span>
<span class="w"> </span><span class="nt">templates_path</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="c1"># query_in_title: When true, the result page&#39;s titles contains the query</span>
<span class="w"> </span><span class="c1"># it decreases the privacy, since the browser can records the page titles.</span>
<span class="w"> </span><span class="nt">query_in_title</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># infinite_scroll: When true, automatically loads the next page when scrolling to bottom of the current page.</span>
<span class="w"> </span><span class="nt">infinite_scroll</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># ui theme</span>
<span class="w"> </span><span class="nt">default_theme</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">simple</span>
<span class="w"> </span><span class="c1"># center the results ?</span>
<span class="w"> </span><span class="nt">center_alignment</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="c1"># URL prefix of the internet archive, don&#39;t forgett trailing slash (if needed).</span>
<span class="w"> </span><span class="c1"># cache_url: &quot;https://webcache.googleusercontent.com/search?q=cache:&quot;</span>
<span class="w"> </span><span class="c1"># Default interface locale - leave blank to detect from browser information or</span>
<span class="w"> </span><span class="c1"># use codes from the &#39;locales&#39; config section</span>
<span class="w"> </span><span class="nt">default_locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="c1"># Open result links in a new tab by default</span>
<span class="w"> </span><span class="c1"># results_on_new_tab: false</span>
<span class="w"> </span><span class="nt">theme_args</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># style of simple theme: auto, light, dark</span>
<span class="w"> </span><span class="nt">simple_style</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">auto</span>
<span class="c1"># Lock arbitrary settings on the preferences page. To find the ID of the user</span>
<span class="c1"># setting you want to lock, check the ID of the form on the page &quot;preferences&quot;.</span>
<span class="c1">#</span>
<span class="c1"># preferences:</span>
<span class="c1"># lock:</span>
<span class="c1"># - language</span>
<span class="c1"># - autocomplete</span>
<span class="c1"># - method</span>
<span class="c1"># - query_in_title</span>
<span class="c1"># searx supports result proxification using an external service:</span>
<span class="c1"># https://github.com/asciimoo/morty uncomment below section if you have running</span>
<span class="c1"># morty proxy the key is base64 encoded (keep the !!binary notation)</span>
<span class="c1"># Note: since commit af77ec3, morty accepts a base64 encoded key.</span>
<span class="c1">#</span>
<span class="c1"># result_proxy:</span>
<span class="c1"># url: http://127.0.0.1:3000/</span>
<span class="c1"># # the key is a base64 encoded string, the YAML !!binary prefix is optional</span>
<span class="c1"># key: !!binary &quot;your_morty_proxy_key&quot;</span>
<span class="c1"># # [true|false] enable the &quot;proxy&quot; button next to each result</span>
<span class="c1"># proxify_results: true</span>
<span class="c1"># communication with search engines</span>
<span class="c1">#</span>
<span class="nt">outgoing</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># default timeout in seconds, can be override by engine</span>
<span class="w"> </span><span class="nt">request_timeout</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3.0</span>
<span class="w"> </span><span class="c1"># the maximum timeout in seconds</span>
<span class="w"> </span><span class="c1"># max_request_timeout: 10.0</span>
<span class="w"> </span><span class="c1"># suffix of searx_useragent, could contain information like an email address</span>
<span class="w"> </span><span class="c1"># to the administrator</span>
<span class="w"> </span><span class="nt">useragent_suffix</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="c1"># The maximum number of concurrent connections that may be established.</span>
<span class="w"> </span><span class="nt">pool_connections</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">100</span>
<span class="w"> </span><span class="c1"># Allow the connection pool to maintain keep-alive connections below this</span>
<span class="w"> </span><span class="c1"># point.</span>
<span class="w"> </span><span class="nt">pool_maxsize</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">20</span>
<span class="w"> </span><span class="c1"># See https://www.python-httpx.org/http2/</span>
<span class="w"> </span><span class="nt">enable_http2</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="c1"># uncomment below section if you want to use a custom server certificate</span>
<span class="w"> </span><span class="c1"># see https://www.python-httpx.org/advanced/#changing-the-verification-defaults</span>
<span class="w"> </span><span class="c1"># and https://www.python-httpx.org/compatibility/#ssl-configuration</span>
<span class="w"> </span><span class="c1"># verify: ~/.mitmproxy/mitmproxy-ca-cert.cer</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># uncomment below section if you want to use a proxyq see: SOCKS proxies</span>
<span class="w"> </span><span class="c1"># https://2.python-requests.org/en/latest/user/advanced/#proxies</span>
<span class="w"> </span><span class="c1"># are also supported: see</span>
<span class="w"> </span><span class="c1"># https://2.python-requests.org/en/latest/user/advanced/#socks</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># proxies:</span>
<span class="w"> </span><span class="c1"># all://:</span>
<span class="w"> </span><span class="c1"># - http://proxy1:8080</span>
<span class="w"> </span><span class="c1"># - http://proxy2:8080</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># using_tor_proxy: true</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># Extra seconds to add in order to account for the time taken by the proxy</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># extra_proxy_timeout: 10.0</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># uncomment below section only if you have more than one network interface</span>
<span class="w"> </span><span class="c1"># which can be the source of outgoing search requests</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># source_ips:</span>
<span class="w"> </span><span class="c1"># - 1.1.1.1</span>
<span class="w"> </span><span class="c1"># - 1.1.1.2</span>
<span class="w"> </span><span class="c1"># - fe80::/126</span>
<span class="c1"># External plugin configuration, for more details see</span>
<span class="c1"># https://docs.searxng.org/dev/plugins.html</span>
<span class="c1">#</span>
<span class="c1"># plugins:</span>
<span class="c1"># - plugin1</span>
<span class="c1"># - plugin2</span>
<span class="c1"># - ...</span>
<span class="c1"># Comment or un-comment plugin to activate / deactivate by default.</span>
<span class="c1">#</span>
<span class="c1"># enabled_plugins:</span>
<span class="c1"># # these plugins are enabled if nothing is configured ..</span>
<span class="c1"># - &#39;Hash plugin&#39;</span>
<span class="c1"># - &#39;Search on category select&#39;</span>
<span class="c1"># - &#39;Self Information&#39;</span>
<span class="c1"># - &#39;Tracker URL remover&#39;</span>
<span class="c1"># - &#39;Ahmia blacklist&#39; # activation depends on outgoing.using_tor_proxy</span>
<span class="c1"># # these plugins are disabled if nothing is configured ..</span>
<span class="c1"># - &#39;Hostname replace&#39; # see hostname_replace configuration below</span>
<span class="c1"># - &#39;Open Access DOI rewrite&#39;</span>
<span class="c1"># - &#39;Vim-like hotkeys&#39;</span>
<span class="c1"># - &#39;Tor check plugin&#39;</span>
<span class="c1"># # Read the docs before activate: auto-detection of the language could be</span>
<span class="c1"># # detrimental to users expectations / users can activate the plugin in the</span>
<span class="c1"># # preferences if they want.</span>
<span class="c1"># - &#39;Autodetect search language&#39;</span>
<span class="c1"># Configuration of the &quot;Hostname replace&quot; plugin:</span>
<span class="c1">#</span>
</pre></div>
</div>
<p>To see the entire file jump to <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">git://searx/settings.yml</a></p>
</div></div>
<p>For a <em>minimal setup</em> you need to set <code class="docutils literal notranslate"><span class="pre">server:secret_key</span></code>.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-6-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-6-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" name="VXNlIGRlZmF1bHQgc2V0dGluZ3M=" role="tab" tabindex="0">Use default settings</button><button aria-controls="panel-6-bWluaW1hbCBzZXR1cA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-6-bWluaW1hbCBzZXR1cA==" name="bWluaW1hbCBzZXR1cA==" role="tab" tabindex="-1">minimal setup</button></div><div aria-labelledby="tab-6-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" class="sphinx-tabs-panel group-tab" id="panel-6-VXNlIGRlZmF1bHQgc2V0dGluZ3M=" name="VXNlIGRlZmF1bHQgc2V0dGluZ3M=" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span><span class="s2">&quot;/etc/searxng&quot;</span>
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>cp<span class="w"> </span><span class="s2">&quot;/usr/local/searxng/searxng-src/utils/templates/etc/searxng/settings.yml&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span><span class="s2">&quot;/etc/searxng/settings.yml&quot;</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-6-bWluaW1hbCBzZXR1cA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-6-bWluaW1hbCBzZXR1cA==" name="bWluaW1hbCBzZXR1cA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>sed<span class="w"> </span>-i<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;s/ultrasecretkey/</span><span class="k">$(</span>openssl<span class="w"> </span>rand<span class="w"> </span>-hex<span class="w"> </span><span class="m">16</span><span class="k">)</span><span class="s2">/g&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span><span class="s2">&quot;/etc/searxng/settings.yml&quot;</span>
</pre></div>
</div>
</div></div>
</section>
<section id="check">
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Check</a><a class="headerlink" href="#check" title="Permalink to this heading"></a></h2>
<p>To check your SearXNG setup, optional enable debugging and start the <em>webapp</em>.
SearXNG looks at the exported environment <code class="docutils literal notranslate"><span class="pre">$SEARXNG_SETTINGS_PATH</span></code> for a
configuration file.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-7-YmFzaA==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-7-YmFzaA==" name="YmFzaA==" role="tab" tabindex="0">bash</button></div><div aria-labelledby="tab-7-YmFzaA==" class="sphinx-tabs-panel group-tab" id="panel-7-YmFzaA==" name="YmFzaA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># enable debug ..</span>
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>sed<span class="w"> </span>-i<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;s/debug : False/debug : True/g&quot;</span><span class="w"> </span><span class="s2">&quot;/etc/searxng/settings.yml&quot;</span>
<span class="c1"># start webapp</span>
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>-u<span class="w"> </span>searxng<span class="w"> </span>-i
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/usr/local/searxng/searxng-src
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span><span class="nb">export</span><span class="w"> </span><span class="nv">SEARXNG_SETTINGS_PATH</span><span class="o">=</span><span class="s2">&quot;/etc/searxng/settings.yml&quot;</span>
<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span>python<span class="w"> </span>searx/webapp.py
<span class="c1"># disable debug</span>
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>sed<span class="w"> </span>-i<span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;s/debug : True/debug : False/g&quot;</span><span class="w"> </span><span class="s2">&quot;/etc/searxng/settings.yml&quot;</span>
</pre></div>
</div>
</div></div>
<p>Open WEB browser and visit <a class="reference external" href="http://127.0.0.1:8888">http://127.0.0.1:8888</a> . If you are inside a
container or in a script, test with curl:</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-8-V0VCIGJyb3dzZXI=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-8-V0VCIGJyb3dzZXI=" name="V0VCIGJyb3dzZXI=" role="tab" tabindex="0">WEB browser</button><button aria-controls="panel-8-Y3VybA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-8-Y3VybA==" name="Y3VybA==" role="tab" tabindex="-1">curl</button></div><div aria-labelledby="tab-8-V0VCIGJyb3dzZXI=" class="sphinx-tabs-panel group-tab" id="panel-8-V0VCIGJyb3dzZXI=" name="V0VCIGJyb3dzZXI=" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>xdg-open<span class="w"> </span>http://127.0.0.1:8888
</pre></div>
</div>
</div><div aria-labelledby="tab-8-Y3VybA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-8-Y3VybA==" name="Y3VybA==" role="tabpanel" tabindex="0"><div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ curl --location --verbose --head --insecure 127.0.0.1:8888
* Trying 127.0.0.1:8888...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
&gt; HEAD / HTTP/1.1
&gt; Host: 127.0.0.1:8888
&gt; User-Agent: curl/7.68.0
&gt; Accept: */*
&gt;
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
&lt; HTTP/1.0 200 OK
HTTP/1.0 200 OK
...
</pre></div>
</div>
</div></div>
<p>If everything works fine, hit <code class="docutils literal notranslate"><span class="pre">[CTRL-C]</span></code> to stop the <em>webapp</em> and disable the
debug option in <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>. You can now exit SearXNG user bash session (enter exit
command twice). At this point SearXNG is not demonized; uwsgi allows this.</p>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="installation-scripts.html" title="previous chapter">Installation Script</a>
<li>Next: <a href="installation-uwsgi.html" title="next chapter">uWSGI</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/installation-searxng.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,630 @@
<!DOCTYPE html>
<html lang="en">
<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>uWSGI &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/tabs.js?v=3030b3cb"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="NGINX" href="installation-nginx.html" />
<link rel="prev" title="Step by step installation" href="installation-searxng.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="installation-nginx.html" title="NGINX"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-searxng.html" title="Step by step installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">uWSGI</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="uwsgi">
<span id="searxng-uwsgi"></span><h1>uWSGI<a class="headerlink" href="#uwsgi" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html">systemd.unit</a></p></li>
<li><p><a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#origin-uwsgi" id="id7">Origin uWSGI</a></p></li>
<li><p><a class="reference internal" href="#distributors" id="id8">Distributors</a></p>
<ul>
<li><p><a class="reference internal" href="#debian-s-uwsgi-layout" id="id9">Debians uWSGI layout</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#uwsgi-maintenance" id="id10">uWSGI maintenance</a></p></li>
<li><p><a class="reference internal" href="#uwsgi-setup" id="id11">uWSGI setup</a></p></li>
<li><p><a class="reference internal" href="#pitfalls-of-the-tyrant-mode" id="id12">Pitfalls of the Tyrant mode</a></p></li>
</ul>
</nav>
<section id="origin-uwsgi">
<h2><a class="toc-backref" href="#id7" role="doc-backlink">Origin uWSGI</a><a class="headerlink" href="#origin-uwsgi" title="Permalink to this heading"></a></h2>
<p>How uWSGI is implemented by distributors varies. The uWSGI project itself
recommends two methods:</p>
<ol class="arabic simple">
<li><p><a class="reference external" href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html">systemd.unit</a> template file as described here <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd">One service per app in systemd</a>:</p></li>
</ol>
<blockquote>
<div><p>There is one <a class="reference external" href="http://0pointer.de/blog/projects/instances.html">systemd unit template</a> on the system installed and one <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files">uwsgi
ini file</a> per uWSGI-app placed at dedicated locations. Take archlinux and a
<code class="docutils literal notranslate"><span class="pre">searxng.ini</span></code> as example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">systemd</span> <span class="n">template</span> <span class="n">unit</span><span class="p">:</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">systemd</span><span class="o">/</span><span class="n">system</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">@.</span><span class="n">service</span>
<span class="n">contains</span><span class="p">:</span> <span class="p">[</span><span class="n">Service</span><span class="p">]</span>
<span class="n">ExecStart</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">uwsgi</span> <span class="o">--</span><span class="n">ini</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/%</span><span class="n">I</span><span class="o">.</span><span class="n">ini</span>
<span class="n">SearXNG</span> <span class="n">application</span><span class="p">:</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">searxng</span><span class="o">.</span><span class="n">ini</span>
<span class="n">links</span> <span class="n">to</span><span class="p">:</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">searxng</span><span class="o">.</span><span class="n">ini</span>
</pre></div>
</div>
<p>The SearXNG app (template <code class="docutils literal notranslate"><span class="pre">/etc/uwsgi/%I.ini</span></code>) can be maintained as known
from common systemd units:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>uwsgi@searxng
$<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>uwsgi@searxng
$<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng
$<span class="w"> </span>systemctl<span class="w"> </span>stop<span class="w"> </span>uwsgi@searxng
</pre></div>
</div>
</div></blockquote>
<ol class="arabic simple" start="2">
<li><p>The <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a> which fits for maintaining a large range of uwsgi
apps and there is a <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting">Tyrant mode</a> to secure multi-user hosting.</p></li>
</ol>
<blockquote>
<div><p>The Emperor mode is a special uWSGI instance that will monitor specific
events. The Emperor mode (the service) is started by a (common, not template)
systemd unit.</p>
<p>The Emperor service will scan specific directories for <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files">uwsgi ini file</a>s
(also know as <em>vassals</em>). If a <em>vassal</em> is added, removed or the timestamp is
modified, a corresponding action takes place: a new uWSGI instance is started,
reload or stopped. Take Fedora and a <code class="docutils literal notranslate"><span class="pre">searxng.ini</span></code> as example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">to</span> <span class="n">install</span> <span class="o">&amp;</span> <span class="n">start</span> <span class="n">SearXNG</span> <span class="n">instance</span> <span class="n">create</span> <span class="o">--&gt;</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">searxng</span><span class="o">.</span><span class="n">ini</span>
<span class="n">to</span> <span class="n">reload</span> <span class="n">the</span> <span class="n">instance</span> <span class="n">edit</span> <span class="n">timestamp</span> <span class="o">--&gt;</span> <span class="n">touch</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">searxng</span><span class="o">.</span><span class="n">ini</span>
<span class="n">to</span> <span class="n">stop</span> <span class="n">instance</span> <span class="n">remove</span> <span class="n">ini</span> <span class="o">--&gt;</span> <span class="n">rm</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">searxng</span><span class="o">.</span><span class="n">ini</span>
</pre></div>
</div>
</div></blockquote>
</section>
<section id="distributors">
<h2><a class="toc-backref" href="#id8" role="doc-backlink">Distributors</a><a class="headerlink" href="#distributors" title="Permalink to this heading"></a></h2>
<p>The <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a> mode and <a class="reference external" href="http://0pointer.de/blog/projects/instances.html">systemd unit template</a> is what the distributors
mostly offer their users, even if they differ in the way they implement both
modes and their defaults. Another point they might differ in is the packaging of
plugins (if so, compare <a class="reference internal" href="installation-searxng.html#install-packages"><span class="std std-ref">Install packages</span></a>) and what the default python
interpreter is (python2 vs. python3).</p>
<p>While archlinux does not start a uWSGI service by default, Fedora (RHEL) starts
a Emperor in <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting">Tyrant mode</a> by default (you should have read <a class="reference internal" href="#uwsgi-tyrant-mode-pitfalls"><span class="std std-ref">Pitfalls of the Tyrant mode</span></a>). Worth to know; debian (ubuntu) follow a complete different
approach, read see <a class="reference internal" href="#debian-s-uwsgi-layout"><span class="std std-ref">Debians uWSGI layout</span></a>.</p>
<section id="debian-s-uwsgi-layout">
<span id="id1"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink">Debians uWSGI layout</a><a class="headerlink" href="#debian-s-uwsgi-layout" title="Permalink to this heading"></a></h3>
<p>Be aware, Debians uWSGI layout is quite different from the standard uWSGI
configuration. Your are familiar with <a class="reference internal" href="installation-apache.html#debian-s-apache-layout"><span class="std std-ref">Debians Apache layout</span></a>? .. they do a
similar thing for the uWSGI infrastructure. The folders are:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">available</span><span class="o">/</span>
<span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">enabled</span><span class="o">/</span>
</pre></div>
</div>
<p>The <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files">uwsgi ini file</a> is enabled by a symbolic link:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">searxng</span><span class="o">.</span><span class="n">ini</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">enabled</span><span class="o">/</span>
</pre></div>
</div>
<p>More details can be found in the <a class="reference external" href="https://salsa.debian.org/uwsgi-team/uwsgi/-/raw/debian/latest/debian/uwsgi.README.Debian">uwsgi.README.Debian</a>
(<code class="docutils literal notranslate"><span class="pre">/usr/share/doc/uwsgi/README.Debian.gz</span></code>). Some commands you should know on
Debian:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Commands recognized by init.d script
====================================
You can issue to init.d script following commands:
* start | starts daemon
* stop | stops daemon
* reload | sends to daemon SIGHUP signal
* force-reload | sends to daemon SIGTERM signal
* restart | issues &#39;stop&#39;, then &#39;start&#39; commands
* status | shows status of daemon instance (running/not running)
&#39;status&#39; command must be issued with exactly one argument: &#39;&lt;confname&gt;&#39;.
Controlling specific instances of uWSGI
=======================================
You could control specific instance(s) by issuing:
SYSTEMCTL_SKIP_REDIRECT=1 service uwsgi &lt;command&gt; &lt;confname&gt; &lt;confname&gt;...
where:
* &lt;command&gt; is one of &#39;start&#39;, &#39;stop&#39; etc.
* &lt;confname&gt; is the name of configuration file (without extension)
For example, this is how instance for /etc/uwsgi/apps-enabled/hello.xml is
started:
SYSTEMCTL_SKIP_REDIRECT=1 service uwsgi start hello
</pre></div>
</div>
</section>
</section>
<section id="uwsgi-maintenance">
<span id="id2"></span><h2><a class="toc-backref" href="#id10" role="doc-backlink">uWSGI maintenance</a><a class="headerlink" href="#uwsgi-maintenance" title="Permalink to this heading"></a></h2>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-0-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-0-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-0-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># init.d --&gt; /usr/share/doc/uwsgi/README.Debian.gz</span>
<span class="c1"># For uWSGI debian uses the LSB init process, this might be changed</span>
<span class="c1"># one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067</span>
create<span class="w"> </span>/etc/uwsgi/apps-available/searxng.ini
enable:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/etc/uwsgi/apps-available/searxng.ini<span class="w"> </span>/etc/uwsgi/apps-enabled/
start:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>service<span class="w"> </span>uwsgi<span class="w"> </span>start<span class="w"> </span>searxng
restart:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>service<span class="w"> </span>uwsgi<span class="w"> </span>restart<span class="w"> </span>searxng
stop:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>service<span class="w"> </span>uwsgi<span class="w"> </span>stop<span class="w"> </span>searxng
disable:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>rm<span class="w"> </span>/etc/uwsgi/apps-enabled/searxng.ini
</pre></div>
</div>
</div><div aria-labelledby="tab-0-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># systemd --&gt; /usr/lib/systemd/system/uwsgi@.service</span>
<span class="c1"># For uWSGI archlinux uses systemd template units, see</span>
<span class="c1"># - http://0pointer.de/blog/projects/instances.html</span>
<span class="c1"># - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd</span>
create:<span class="w"> </span>/etc/uwsgi/searxng.ini
enable:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span><span class="nb">enable</span><span class="w"> </span>uwsgi@searxng
start:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>start<span class="w"> </span>uwsgi@searxng
restart:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng
stop:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>stop<span class="w"> </span>uwsgi@searxng
disable:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>systemctl<span class="w"> </span>disable<span class="w"> </span>uwsgi@searxng
</pre></div>
</div>
</div><div aria-labelledby="tab-0-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># systemd --&gt; /usr/lib/systemd/system/uwsgi.service</span>
<span class="c1"># The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see</span>
<span class="c1"># - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html</span>
create:<span class="w"> </span>/etc/uwsgi.d/searxng.ini
restart:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>touch<span class="w"> </span>/etc/uwsgi.d/searxng.ini
disable:<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>rm<span class="w"> </span>/etc/uwsgi.d/searxng.ini
</pre></div>
</div>
</div></div>
</section>
<section id="uwsgi-setup">
<span id="id3"></span><h2><a class="toc-backref" href="#id11" role="doc-backlink">uWSGI setup</a><a class="headerlink" href="#uwsgi-setup" title="Permalink to this heading"></a></h2>
<p>Create the configuration ini-file according to your distribution and restart the
uwsgi application. As shown below, the <a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a> installs by
default:</p>
<ul class="simple">
<li><p>a uWSGI setup that listens on a socket and</p></li>
<li><p>enables <a class="reference internal" href="settings/settings_ui.html#static-use-hash"><span class="std std-ref">cache busting</span></a>.</p></li>
</ul>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-1-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-1-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-1-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># -*- mode: conf; coding: utf-8 -*-</span>
<span class="o">[</span>uwsgi<span class="o">]</span>
<span class="c1"># uWSGI core</span>
<span class="c1"># ----------</span>
<span class="c1">#</span>
<span class="c1"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core</span>
<span class="c1"># Who will run the code / Hint: in emperor-tyrant mode uid &amp; gid setting will be</span>
<span class="c1"># ignored [1]. Mode emperor-tyrant is the default on fedora (/etc/uwsgi.ini).</span>
<span class="c1">#</span>
<span class="c1"># [1] https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting</span>
<span class="c1">#</span>
<span class="nv">uid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searxng
<span class="nv">gid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searxng
<span class="c1"># set (python) default encoding UTF-8</span>
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LANG</span><span class="o">=</span>C.UTF-8
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LANGUAGE</span><span class="o">=</span>C.UTF-8
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LC_ALL</span><span class="o">=</span>C.UTF-8
<span class="c1"># chdir to specified directory before apps loading</span>
<span class="nv">chdir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searxng-src/searx
<span class="c1"># SearXNG configuration (settings.yml)</span>
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">SEARXNG_SETTINGS_PATH</span><span class="o">=</span>/etc/searxng/settings.yml
<span class="c1"># disable logging for privacy</span>
disable-logging<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># The right granted on the created socket</span>
chmod-socket<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">666</span>
<span class="c1"># Plugin to use and interpreter config</span>
single-interpreter<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># enable master process</span>
<span class="nv">master</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># load apps in each worker instead of the master</span>
lazy-apps<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># load uWSGI plugins</span>
<span class="nv">plugin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>python3,http
<span class="c1"># By default the Python plugin does not initialize the GIL. This means your</span>
<span class="c1"># app-generated threads will not run. If you need threads, remember to enable</span>
<span class="c1"># them with enable-threads. Running uWSGI in multithreading mode (with the</span>
<span class="c1"># threads options) will automatically enable threading support. This *strange*</span>
<span class="c1"># default behaviour is for performance reasons.</span>
enable-threads<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># plugin: python</span>
<span class="c1"># --------------</span>
<span class="c1">#</span>
<span class="c1"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python</span>
<span class="c1"># load a WSGI module</span>
<span class="nv">module</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searx.webapp
<span class="c1"># set PYTHONHOME/virtualenv</span>
<span class="nv">virtualenv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searx-pyenv
<span class="c1"># add directory (or glob) to pythonpath</span>
<span class="nv">pythonpath</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searxng-src
<span class="c1"># speak to upstream</span>
<span class="c1"># -----------------</span>
<span class="nv">socket</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/run/socket
buffer-size<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">8192</span>
<span class="c1"># uWSGI serves the static files and in settings.yml we use::</span>
<span class="c1">#</span>
<span class="c1"># ui:</span>
<span class="c1"># static_use_hash: true</span>
<span class="c1">#</span>
static-map<span class="w"> </span><span class="o">=</span><span class="w"> </span>/static<span class="o">=</span>/usr/local/searxng/searxng-src/searx/static
<span class="c1"># expires set to one year since there are hashes</span>
static-expires<span class="w"> </span><span class="o">=</span><span class="w"> </span>/*<span class="w"> </span><span class="m">31557600</span>
static-gzip-all<span class="w"> </span><span class="o">=</span><span class="w"> </span>True
offload-threads<span class="w"> </span><span class="o">=</span><span class="w"> </span>%k
<span class="c1"># Cache</span>
<span class="nv">cache2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">name</span><span class="o">=</span>searxngcache,items<span class="o">=</span><span class="m">2000</span>,blocks<span class="o">=</span><span class="m">2000</span>,blocksize<span class="o">=</span><span class="m">4096</span>,bitmap<span class="o">=</span><span class="m">1</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-1-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># -*- mode: conf; coding: utf-8 -*-</span>
<span class="o">[</span>uwsgi<span class="o">]</span>
<span class="c1"># uWSGI core</span>
<span class="c1"># ----------</span>
<span class="c1">#</span>
<span class="c1"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core</span>
<span class="c1"># Who will run the code</span>
<span class="nv">uid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searxng
<span class="nv">gid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searxng
<span class="c1"># set (python) default encoding UTF-8</span>
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LANG</span><span class="o">=</span>C.UTF-8
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LANGUAGE</span><span class="o">=</span>C.UTF-8
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LC_ALL</span><span class="o">=</span>C.UTF-8
<span class="c1"># chdir to specified directory before apps loading</span>
<span class="nv">chdir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searxng-src/searx
<span class="c1"># SearXNG configuration (settings.yml)</span>
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">SEARXNG_SETTINGS_PATH</span><span class="o">=</span>/etc/searxng/settings.yml
<span class="c1"># disable logging for privacy</span>
<span class="nv">logger</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>systemd
disable-logging<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># The right granted on the created socket</span>
chmod-socket<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">666</span>
<span class="c1"># Plugin to use and interpreter config</span>
single-interpreter<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># enable master process</span>
<span class="nv">master</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># load apps in each worker instead of the master</span>
lazy-apps<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># load uWSGI plugins</span>
<span class="nv">plugin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>python
<span class="c1"># By default the Python plugin does not initialize the GIL. This means your</span>
<span class="c1"># app-generated threads will not run. If you need threads, remember to enable</span>
<span class="c1"># them with enable-threads. Running uWSGI in multithreading mode (with the</span>
<span class="c1"># threads options) will automatically enable threading support. This *strange*</span>
<span class="c1"># default behaviour is for performance reasons.</span>
enable-threads<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># plugin: python</span>
<span class="c1"># --------------</span>
<span class="c1">#</span>
<span class="c1"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python</span>
<span class="c1"># load a WSGI module</span>
<span class="nv">module</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searx.webapp
<span class="c1"># set PYTHONHOME/virtualenv</span>
<span class="nv">virtualenv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searx-pyenv
<span class="c1"># add directory (or glob) to pythonpath</span>
<span class="nv">pythonpath</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searxng-src
<span class="c1"># speak to upstream</span>
<span class="c1"># -----------------</span>
<span class="nv">socket</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/run/socket
buffer-size<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">8192</span>
<span class="c1"># uWSGI serves the static files and in settings.yml we use::</span>
<span class="c1">#</span>
<span class="c1"># ui:</span>
<span class="c1"># static_use_hash: true</span>
<span class="c1">#</span>
static-map<span class="w"> </span><span class="o">=</span><span class="w"> </span>/static<span class="o">=</span>/usr/local/searxng/searxng-src/searx/static
<span class="c1"># expires set to one year since there are hashes</span>
static-expires<span class="w"> </span><span class="o">=</span><span class="w"> </span>/*<span class="w"> </span><span class="m">31557600</span>
static-gzip-all<span class="w"> </span><span class="o">=</span><span class="w"> </span>True
offload-threads<span class="w"> </span><span class="o">=</span><span class="w"> </span>%k
<span class="c1"># Cache</span>
<span class="nv">cache2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">name</span><span class="o">=</span>searxngcache,items<span class="o">=</span><span class="m">2000</span>,blocks<span class="o">=</span><span class="m">2000</span>,blocksize<span class="o">=</span><span class="m">4096</span>,bitmap<span class="o">=</span><span class="m">1</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-1-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># -*- mode: conf; coding: utf-8 -*-</span>
<span class="o">[</span>uwsgi<span class="o">]</span>
<span class="c1"># uWSGI core</span>
<span class="c1"># ----------</span>
<span class="c1">#</span>
<span class="c1"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core</span>
<span class="c1"># Who will run the code / Hint: in emperor-tyrant mode uid &amp; gid setting will be</span>
<span class="c1"># ignored [1]. Mode emperor-tyrant is the default on fedora (/etc/uwsgi.ini).</span>
<span class="c1">#</span>
<span class="c1"># [1] https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting</span>
<span class="c1">#</span>
<span class="nv">uid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searxng
<span class="nv">gid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searxng
<span class="c1"># set (python) default encoding UTF-8</span>
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LANG</span><span class="o">=</span>C.UTF-8
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LANGUAGE</span><span class="o">=</span>C.UTF-8
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">LC_ALL</span><span class="o">=</span>C.UTF-8
<span class="c1"># chdir to specified directory before apps loading</span>
<span class="nv">chdir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searxng-src/searx
<span class="c1"># SearXNG configuration (settings.yml)</span>
<span class="nv">env</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">SEARXNG_SETTINGS_PATH</span><span class="o">=</span>/etc/searxng/settings.yml
<span class="c1"># disable logging for privacy</span>
disable-logging<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># The right granted on the created socket</span>
chmod-socket<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">666</span>
<span class="c1"># Plugin to use and interpreter config</span>
single-interpreter<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># enable master process</span>
<span class="nv">master</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># load apps in each worker instead of the master</span>
lazy-apps<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># load uWSGI plugins</span>
<span class="nv">plugin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>python3,http
<span class="c1"># By default the Python plugin does not initialize the GIL. This means your</span>
<span class="c1"># app-generated threads will not run. If you need threads, remember to enable</span>
<span class="c1"># them with enable-threads. Running uWSGI in multithreading mode (with the</span>
<span class="c1"># threads options) will automatically enable threading support. This *strange*</span>
<span class="c1"># default behaviour is for performance reasons.</span>
enable-threads<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span>
<span class="c1"># plugin: python</span>
<span class="c1"># --------------</span>
<span class="c1">#</span>
<span class="c1"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python</span>
<span class="c1"># load a WSGI module</span>
<span class="nv">module</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>searx.webapp
<span class="c1"># set PYTHONHOME/virtualenv</span>
<span class="nv">virtualenv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searx-pyenv
<span class="c1"># add directory (or glob) to pythonpath</span>
<span class="nv">pythonpath</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/searxng-src
<span class="c1"># speak to upstream</span>
<span class="c1"># -----------------</span>
<span class="nv">socket</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>/usr/local/searxng/run/socket
buffer-size<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">8192</span>
<span class="c1"># uWSGI serves the static files and in settings.yml we use::</span>
<span class="c1">#</span>
<span class="c1"># ui:</span>
<span class="c1"># static_use_hash: true</span>
<span class="c1">#</span>
static-map<span class="w"> </span><span class="o">=</span><span class="w"> </span>/static<span class="o">=</span>/usr/local/searxng/searxng-src/searx/static
<span class="c1"># expires set to one year since there are hashes</span>
static-expires<span class="w"> </span><span class="o">=</span><span class="w"> </span>/*<span class="w"> </span><span class="m">31557600</span>
static-gzip-all<span class="w"> </span><span class="o">=</span><span class="w"> </span>True
offload-threads<span class="w"> </span><span class="o">=</span><span class="w"> </span>%k
<span class="c1"># Cache</span>
<span class="nv">cache2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">name</span><span class="o">=</span>searxngcache,items<span class="o">=</span><span class="m">2000</span>,blocks<span class="o">=</span><span class="m">2000</span>,blocksize<span class="o">=</span><span class="m">4096</span>,bitmap<span class="o">=</span><span class="m">1</span>
</pre></div>
</div>
</div></div>
</section>
<section id="pitfalls-of-the-tyrant-mode">
<span id="uwsgi-tyrant-mode-pitfalls"></span><h2><a class="toc-backref" href="#id12" role="doc-backlink">Pitfalls of the Tyrant mode</a><a class="headerlink" href="#pitfalls-of-the-tyrant-mode" title="Permalink to this heading"></a></h2>
<p>The implementation of the process owners and groups in the <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting">Tyrant mode</a> is
somewhat unusual and requires special consideration. In <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting">Tyrant mode</a> mode the
Emperor will run the vassal using the UID/GID of the vassal configuration file
(user and group of the app <code class="docutils literal notranslate"><span class="pre">.ini</span></code> file).</p>
<p>Without option <code class="docutils literal notranslate"><span class="pre">emperor-tyrant-initgroups=true</span></code> in <code class="docutils literal notranslate"><span class="pre">/etc/uwsgi.ini</span></code> the
process wont get the additional groups, but this option is not available in
2.0.x branch (see <a class="reference external" href="https://github.com/unbit/uwsgi/issues/2099">#2099&#64;uWSGI</a>) the feature <a class="reference external" href="https://github.com/unbit/uwsgi/pull/752">#752&#64;uWSGI</a> has been merged (on
Oct. 2014) to the master branch of uWSGI but had never been released; the last
major release is from Dec. 2013, since the there had been only bugfix releases
(see <a class="reference external" href="https://github.com/unbit/uwsgi/issues/2425">#2425uWSGI</a>). To shorten up:</p>
<blockquote>
<div><p><strong>In Tyrant mode, there is no way to get additional groups, and the uWSGI
process misses additional permissions that may be needed.</strong></p>
</div></blockquote>
<p>For example on Fedora (RHEL): If you try to install a redis DB with socket
communication and you want to connect to it from the SearXNG uWSGI, you will see a
<em>Permission denied</em> in the log of your instance:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>ERROR:searx.redisdb: [searxng (993)] can&#39;t connect redis DB ...
ERROR:searx.redisdb: Error 13 connecting to unix socket: /usr/local/searxng-redis/run/redis.sock. Permission denied.
ERROR:searx.plugins.limiter: init limiter DB failed!!!
</pre></div>
</div>
<p>Even if your <em>searxng</em> user of the uWSGI process is added to additional groups
to give access to the socket from the redis DB:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ groups searxng
searxng : searxng searxng-redis
</pre></div>
</div>
<p>To see the effective groups of the uwsgi process, you have to look at the status
of the process, by example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ps -aef | grep &#39;/usr/sbin/uwsgi --ini searxng.ini&#39;
searxng 93 92 0 12:43 ? 00:00:00 /usr/sbin/uwsgi --ini searxng.ini
searxng 186 93 0 12:44 ? 00:00:01 /usr/sbin/uwsgi --ini searxng.ini
</pre></div>
</div>
<p>Here you can see that the additional “Groups” of PID 186 are unset (missing gid
of <code class="docutils literal notranslate"><span class="pre">searxng-redis</span></code>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cat /proc/186/task/186/status
...
Uid: 993 993 993 993
Gid: 993 993 993 993
FDSize: 128
Groups:
...
</pre></div>
</div>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="installation-searxng.html" title="previous chapter">Step by step installation</a>
<li>Next: <a href="installation-nginx.html" title="next chapter">NGINX</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/installation-uwsgi.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

155
admin/installation.html Normal file
View file

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="en">
<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>Installation &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Docker Container" href="installation-docker.html" />
<link rel="prev" title="categories_as_tabs:" href="settings/settings_categories_as_tabs.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="installation-docker.html" title="Docker Container"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings/settings_categories_as_tabs.html" title="categories_as_tabs:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Installation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="installation">
<span id="id1"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this heading"></a></h1>
<p><em>Youre spoilt for choice</em>, choose your preferred method of installation.</p>
<ul class="simple">
<li><p><a class="reference internal" href="installation-docker.html#installation-docker"><span class="std std-ref">Docker Container</span></a></p></li>
<li><p><a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a></p></li>
<li><p><a class="reference internal" href="installation-searxng.html#installation-basic"><span class="std std-ref">Step by step installation</span></a></p></li>
</ul>
<p>The <a class="reference internal" href="installation-searxng.html#installation-basic"><span class="std std-ref">Step by step installation</span></a> is an excellent illustration of <em>how a SearXNG
instance is build up</em> (see <a class="reference internal" href="architecture.html#architecture-uwsgi"><span class="std std-ref">uWSGI Setup</span></a>). If you do not have any
special preferences, its recommended to use the <a class="reference internal" href="installation-docker.html#installation-docker"><span class="std std-ref">Docker Container</span></a> or the
<a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a>.</p>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>SearXNG is growing rapidly, you should regularly read our <a class="reference internal" href="update-searxng.html#migrate-and-stay-tuned"><span class="std std-ref">Migrate and stay tuned!</span></a> section. If you want to upgrade an existing instance or migrate
from searx to SearXNG, you should read this section first!</p>
</div>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="settings/settings_categories_as_tabs.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a>
<li>Next: <a href="installation-docker.html" title="next chapter">Docker Container</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/installation.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

202
admin/plugins.html Normal file
View file

@ -0,0 +1,202 @@
<!DOCTYPE html>
<html lang="en">
<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>Plugins builtin &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Buildhosts" href="buildhosts.html" />
<link rel="prev" title="Architecture" href="architecture.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="buildhosts.html" title="Buildhosts"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="architecture.html" title="Architecture"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Plugins builtin</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="plugins-builtin">
<span id="plugins-generic"></span><h1>Plugins builtin<a class="headerlink" href="#plugins-builtin" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../dev/plugins.html#dev-plugin"><span class="std std-ref">Plugins</span></a></p></li>
</ul>
</aside>
<p>Configuration defaults (at built time):</p>
<dl class="field-list simple">
<dt class="field-odd">DO<span class="colon">:</span></dt>
<dd class="field-odd"><p>Default on</p>
</dd>
</dl>
<span id="configured-plugins"></span><table class="docutils align-default" id="id1">
<caption><span class="caption-number">Table 1 </span><span class="caption-text">Plugins configured at built time (defaults)</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
<colgroup>
<col style="width: 23%" />
<col style="width: 8%" />
<col style="width: 69%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head stub"><p>Name</p></th>
<th class="head"><p>DO</p></th>
<th class="head"><p>Description</p>
<p>JS &amp; CSS dependencies</p>
</th>
</tr>
</thead>
<tbody>
<tr class="row-even"><th class="stub"><p>Hash plugin</p></th>
<td><p>y</p></td>
<td><p>Converts strings to different hash digests.</p></td>
</tr>
<tr class="row-odd"><th class="stub"><p>Hostname replace</p></th>
<td></td>
<td><p>Rewrite result hostnames or remove results based on the hostname</p></td>
</tr>
<tr class="row-even"><th class="stub"><p>Open Access DOI rewrite</p></th>
<td></td>
<td><p>Avoid paywalls by redirecting to open-access versions of publications when available</p></td>
</tr>
<tr class="row-odd"><th class="stub"><p>Search on category select</p></th>
<td><p>y</p></td>
<td><p>Perform search immediately if a category selected. Disable to select multiple categories. (JavaScript required)</p></td>
</tr>
<tr class="row-even"><th class="stub"><p>Self Information</p></th>
<td><p>y</p></td>
<td><p>Displays your IP if the query is “ip” and your user agent if the query contains “user agent”.</p></td>
</tr>
<tr class="row-odd"><th class="stub"><p>Tor check plugin</p></th>
<td></td>
<td><p>This plugin checks if the address of the request is a Tor exit-node, and informs the user if it is; like check.torproject.org, but from SearXNG.</p></td>
</tr>
<tr class="row-even"><th class="stub"><p>Tracker URL remover</p></th>
<td><p>y</p></td>
<td><p>Remove trackers arguments from the returned URL</p></td>
</tr>
<tr class="row-odd"><th class="stub"><p>Vim-like hotkeys</p></th>
<td></td>
<td><p>Navigate search results with Vim-like hotkeys (JavaScript required). Press “h” key on main or result page to get help.</p></td>
</tr>
</tbody>
</table>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="architecture.html" title="previous chapter">Architecture</a>
<li>Next: <a href="buildhosts.html" title="next chapter">Buildhosts</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/plugins.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

172
admin/settings/index.html Normal file
View file

@ -0,0 +1,172 @@
<!DOCTYPE html>
<html lang="en">
<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 &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="settings.yml" href="settings.html" />
<link rel="prev" title="Administrator documentation" href="../index.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="settings.html" title="settings.yml"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../index.html" title="Administrator documentation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">Settings</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="settings">
<h1>Settings<a class="headerlink" href="#settings" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../dev/engines/engine_overview.html#engine-settings"><span class="std std-ref">Engine settings.yml</span></a></p></li>
<li><p><a class="reference internal" href="../../dev/engines/engine_overview.html#engine-file"><span class="std std-ref">Engine File</span></a></p></li>
</ul>
</aside>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="settings.html#settings-yml-location">settings.yml location</a></li>
<li class="toctree-l2"><a class="reference internal" href="settings.html#use-default-settings">use_default_settings</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="settings_engine.html#private-engines-tokens">Private Engines (<code class="docutils literal notranslate"><span class="pre">tokens</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="settings_engine.html#example-multilingual-search">Example: Multilingual Search</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="settings_redis.html#redis-developer-notes">Redis Developer Notes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="settings_categories_as_tabs.html"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
</ul>
</div>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="../index.html" title="previous chapter">Administrator documentation</a>
<li>Next: <a href="settings.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,246 @@
<!DOCTYPE html>
<html lang="en">
<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; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="engine:" href="settings_engine.html" />
<link rel="prev" title="Settings" href="index.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="settings_engine.html" title="engine:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Settings"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</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">
<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 heading"></a></h1>
<p>This page describe the options possibilities of the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">git://searx/settings.yml</a>
file.</p>
<aside class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../installation-searxng.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>
</aside>
<nav class="contents local" id="contents">
<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="#use-default-settings" id="id3">use_default_settings</a></p></li>
</ul>
</nav>
<section id="settings-yml-location">
<span id="settings-location"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">settings.yml location</a><a class="headerlink" href="#settings-yml-location" title="Permalink to this heading"></a></h2>
<p>The initial <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> we be load from these locations:</p>
<ol class="arabic simple">
<li><p>the full path specified in the <code class="docutils literal notranslate"><span class="pre">SEARXNG_SETTINGS_PATH</span></code> environment variable.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">/etc/searxng/settings.yml</span></code></p></li>
</ol>
<p>If these files dont exist (or are empty or cant be read), SearXNG uses the
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">git://searx/settings.yml</a> file. Read <a class="reference internal" href="#settings-use-default-settings"><span class="std std-ref">use_default_settings</span></a> to
see how you can simplify your <em>user defined</em> <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>.</p>
</section>
<section id="use-default-settings">
<span id="settings-use-default-settings"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">use_default_settings</a><a class="headerlink" href="#use-default-settings" title="Permalink to this heading"></a></h2>
<aside 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-searxng.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/searxng/searxng/blob/master/utils/templates/etc/searxng/settings.yml">/etc/searxng/settings.yml</a></p></li>
</ul>
</aside>
<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/searxng/searxng/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/searxng/searxng/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="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span><span class="w"> </span><span class="c1"># change this!</span>
<span class="w"> </span><span class="nt">bind_address</span><span class="p">:</span><span class="w"> </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, SearXNG will load all the default engines, will
enable the <code class="docutils literal notranslate"><span class="pre">bing</span></code> engine and define a <a class="reference internal" href="settings_engine.html#private-engines"><span class="std std-ref">token</span></a> for
the arch linux 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="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span><span class="w"> </span><span class="c1"># change this!</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">arch linux wiki</span>
<span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bing</span>
<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</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 SearXNG 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="w"> </span><span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="nt">remove</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span><span class="w"> </span><span class="c1"># change this!</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">arch linux wiki</span>
<span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </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, SearXNG 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="w"> </span><span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="nt">keep_only</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">duckduckgo</span>
<span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span><span class="w"> </span><span class="c1"># change this!</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">duckduckgo</span>
<span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </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>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Settings</a>
<li>Next: <a href="settings_engine.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,161 @@
<!DOCTYPE html>
<html lang="en">
<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>brand: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="general:" href="settings_general.html" />
<link rel="prev" title="engine:" href="settings_engine.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="settings_general.html" title="general:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_engine.html" title="engine:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="brand">
<span id="settings-brand"></span><h1><code class="docutils literal notranslate"><span class="pre">brand:</span></code><a class="headerlink" href="#brand" title="Permalink to this heading"></a></h1>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">brand</span><span class="p">:</span>
<span class="w"> </span><span class="nt">issue_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://github.com/searxng/searxng/issues</span>
<span class="w"> </span><span class="nt">docs_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://docs.searxng.org</span>
<span class="w"> </span><span class="nt">public_instances</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://searx.space</span>
<span class="w"> </span><span class="nt">wiki_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://github.com/searxng/searxng/wiki</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">issue_url</span></code> :</dt><dd><p>If you host your own issue tracker change this URL.</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">public_instances</span></code> :</dt><dd><p>If you host your own <a class="reference external" href="https://searx.space">https://searx.space</a> 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>
</dl>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_engine.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a>
<li>Next: <a href="settings_general.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_brand.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,166 @@
<!DOCTYPE html>
<html lang="en">
<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>categories_as_tabs: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Installation" href="../installation.html" />
<link rel="prev" title="outgoing:" href="settings_outgoing.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="../installation.html" title="Installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_outgoing.html" title="outgoing:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="categories-as-tabs">
<span id="settings-categories-as-tabs"></span><h1><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code><a class="headerlink" href="#categories-as-tabs" title="Permalink to this heading"></a></h1>
<p>A list of the categories that are displayed as tabs in the user interface.
Categories not listed here can still be searched with the <a class="reference internal" href="../../user/search-syntax.html#search-syntax"><span class="std std-ref">Search syntax</span></a>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">categories_as_tabs</span><span class="p">:</span>
<span class="w"> </span><span class="nt">general</span><span class="p">:</span>
<span class="w"> </span><span class="nt">images</span><span class="p">:</span>
<span class="w"> </span><span class="nt">videos</span><span class="p">:</span>
<span class="w"> </span><span class="nt">news</span><span class="p">:</span>
<span class="w"> </span><span class="nt">map</span><span class="p">:</span>
<span class="w"> </span><span class="nt">music</span><span class="p">:</span>
<span class="w"> </span><span class="nt">it</span><span class="p">:</span>
<span class="w"> </span><span class="nt">science</span><span class="p">:</span>
<span class="w"> </span><span class="nt">files</span><span class="p">:</span>
<span class="w"> </span><span class="nt">social media</span><span class="p">:</span>
</pre></div>
</div>
<p>Engines are added to <code class="docutils literal notranslate"><span class="pre">categories:</span></code> (compare <a class="reference internal" href="settings_engine.html#engine-categories"><span class="std std-ref">categories</span></a>), the
categories listed in <code class="docutils literal notranslate"><span class="pre">categories_as_tabs</span></code> are shown as tabs in the UI. If
there are no active engines in a category, the tab is not displayed (e.g. if a
user disables all engines in a category).</p>
<p>On the preferences page (<code class="docutils literal notranslate"><span class="pre">/preferences</span></code>) under <em>engines</em> there is an
additional tab, called <em>other</em>. In this tab are all engines listed that are not
in one of the UI tabs (not included in <code class="docutils literal notranslate"><span class="pre">categories_as_tabs</span></code>).</p>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_outgoing.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a>
<li>Next: <a href="../installation.html" title="next chapter">Installation</a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_categories_as_tabs.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,344 @@
<!DOCTYPE html>
<html lang="en">
<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>engine: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="brand:" href="settings_brand.html" />
<link rel="prev" title="settings.yml" href="settings.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="settings_brand.html" title="brand:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings.html" title="settings.yml"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="engine">
<span id="settings-engine"></span><h1><code class="docutils literal notranslate"><span class="pre">engine:</span></code><a class="headerlink" href="#engine" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a></p></li>
<li><p><a class="reference internal" href="../../dev/engines/engine_overview.html#engines-dev"><span class="std std-ref">Engine Overview</span></a></p></li>
</ul>
</aside>
<p>In the code example below a <em>full fledged</em> example of a YAML setup from a dummy
engine is shown. Most of the options have a default value or even are optional.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>A few more options are possible, but they are pretty specific to some
engines (<a class="reference internal" href="../../dev/engines/index.html#engine-implementations"><span class="std std-ref">Engine Implementations</span></a>).</p>
</div>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">example engine</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">example</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;https://{language}.example.com/&#39;</span>
<span class="w"> </span><span class="nt">send_accept_language_header</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">general</span>
<span class="w"> </span><span class="nt">timeout</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3.0</span>
<span class="w"> </span><span class="nt">api_key</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;apikey&#39;</span>
<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en_US</span>
<span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="w"> </span><span class="s">&#39;my-secret-token&#39;</span><span class="w"> </span><span class="p p-Indicator">]</span>
<span class="w"> </span><span class="nt">weight</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="w"> </span><span class="nt">display_error_messages</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">about</span><span class="p">:</span>
<span class="w"> </span><span class="nt">website</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://example.com</span>
<span class="w"> </span><span class="nt">wikidata_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Q306656</span>
<span class="w"> </span><span class="nt">official_api_documentation</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://example.com/api-doc</span>
<span class="w"> </span><span class="nt">use_official_api</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">require_api_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class="w"> </span><span class="nt">results</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">HTML</span>
<span class="w"> </span><span class="c1"># overwrite values from section &#39;outgoing:&#39;</span>
<span class="w"> </span><span class="nt">enable_http2</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">retries</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
<span class="w"> </span><span class="nt">max_connections</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">100</span>
<span class="w"> </span><span class="nt">max_keepalive_connections</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">10</span>
<span class="w"> </span><span class="nt">keepalive_expiry</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5.0</span>
<span class="w"> </span><span class="nt">using_tor_proxy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">proxies</span><span class="p">:</span>
<span class="w"> </span><span class="nt">http</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://proxy1:8080</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://proxy2:8080</span>
<span class="w"> </span><span class="nt">https</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://proxy1:8080</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://proxy2:8080</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">socks5://user:password@proxy3:1080</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">socks5h://user:password@proxy4:1080</span>
<span class="w"> </span><span class="c1"># other network settings</span>
<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">retry_on_http_error</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"> </span><span class="c1"># or 403 or [404, 429]</span>
</pre></div>
</div>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">name</span></code> :</dt><dd><p>Name that will be used across SearXNG 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>)</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">send_accept_language_header</span></code> :</dt><dd><p>Several engines that support languages (or regions) deal with the HTTP header
<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> to build a response that fits to the locale. When this
option is activated, the language (locale) that is selected by the user is used
to build and send a <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header in the request to the origin
search engine.</p>
</dd>
</dl>
<dl id="engine-categories">
<dt><code class="docutils literal notranslate"><span class="pre">categories</span></code><span class="classifier">optional</span></dt><dd><p>Specifies to which categories the engine should be added. Engines can be
assigned to multiple categories.</p>
<p>Categories can be shown as tabs (<a class="reference internal" href="settings_categories_as_tabs.html#settings-categories-as-tabs"><span class="std std-ref">categories_as_tabs:</span></a>) in the
UI. A search in a tab (in the UI) will query all engines that are active in
this tab. In the preferences page (<code class="docutils literal notranslate"><span class="pre">/preferences</span></code>) under <em>engines</em>
users can select what engine should be active when querying in this tab.</p>
<p>Alternatively, <a class="reference internal" href="../../user/search-syntax.html#search-syntax"><span class="std std-ref">!bang</span></a> can be used to search all engines
in a category, regardless of whether they are active or not, or whether they
are in a tab of the UI or not. For example, <code class="docutils literal notranslate"><span class="pre">!dictionaries</span></code> can be used to
query all search engines in that category (group).</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. Overwrites
<code class="docutils literal notranslate"><span class="pre">request_timeout</span></code> from <a class="reference internal" href="settings_outgoing.html#settings-outgoing"><span class="std std-ref">outgoing:</span></a>. <strong>Be careful, it will
modify the global timeout of SearXNG.</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">inactive</span></code>: optional</dt><dd><p>Remove the engine from the settings (<em>disabled &amp; removed</em>).</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 ISO code of language (and region), like <code class="docutils literal notranslate"><span class="pre">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">tokens</span></code><span class="classifier">optional</span></dt><dd><p>A list of secret tokens to make this engine <em>private</em>, more details see
<a class="reference internal" href="#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">weight</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><span class="classifier">optional</span></dt><dd><p>Use the network configuration from another engine.
In addition, there are two default networks:</p>
<ul class="simple">
<li><p><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)</p></li>
<li><p><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></li>
</ul>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">enable_http</span></code><span class="classifier">optional</span></dt><dd><p>Enable HTTP for this engine (by default only HTTPS is enabled).</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">retry_on_http_error</span></code><span class="classifier">optional</span></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">proxies</span></code> :</dt><dd><p>Overwrites proxy settings from <a class="reference internal" href="settings_outgoing.html#settings-outgoing"><span class="std std-ref">outgoing:</span></a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">using_tor_proxy</span></code> :</dt><dd><p>Using tor proxy (<code class="docutils literal notranslate"><span class="pre">true</span></code>) or not (<code class="docutils literal notranslate"><span class="pre">false</span></code>) for this engine. The default is
taken from <code class="docutils literal notranslate"><span class="pre">using_tor_proxy</span></code> of the <a class="reference internal" href="settings_outgoing.html#settings-outgoing"><span class="std std-ref">outgoing:</span></a>.</p>
</dd>
</dl>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">max_keepalive_connection#s</span></code> :</dt><dd><dl class="simple">
<dt><a class="reference external" href="https://www.python-httpx.org/advanced/#pool-limit-configuration">Pool limit configuration</a>, overwrites value <code class="docutils literal notranslate"><span class="pre">pool_maxsize</span></code> from</dt><dd><p><a class="reference internal" href="settings_outgoing.html#settings-outgoing"><span class="std std-ref">outgoing:</span></a> for this engine.</p>
</dd>
</dl>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">max_connections</span></code> :</dt><dd><p><a class="reference external" href="https://www.python-httpx.org/advanced/#pool-limit-configuration">Pool limit configuration</a>, overwrites value <code class="docutils literal notranslate"><span class="pre">pool_connections</span></code> from
<a class="reference internal" href="settings_outgoing.html#settings-outgoing"><span class="std std-ref">outgoing:</span></a> for this engine.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">keepalive_expiry</span></code> :</dt><dd><p><a class="reference external" href="https://www.python-httpx.org/advanced/#pool-limit-configuration">Pool limit configuration</a>, overwrites value <code class="docutils literal notranslate"><span class="pre">keepalive_expiry</span></code> from
<a class="reference internal" href="settings_outgoing.html#settings-outgoing"><span class="std std-ref">outgoing:</span></a> for this engine.</p>
</dd>
</dl>
<section id="private-engines-tokens">
<span id="private-engines"></span><h2>Private Engines (<code class="docutils literal notranslate"><span class="pre">tokens</span></code>)<a class="headerlink" href="#private-engines-tokens" title="Permalink to this heading"></a></h2>
<p>Administrators might find themselves wanting to limit access to some of the
enabled engines on their instances. It might be because they do not want to
expose some private information through <a class="reference internal" href="../../dev/engines/index.html#offline-engines"><span class="std std-ref">Offline Engines</span></a>. Or they would
rather share engines only with their trusted friends or colleagues.</p>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p>
</aside>
<p>To solve this issue the concept of <em>private engines</em> exists.</p>
<p>A new option was added to engines named <cite>tokens</cite>. It expects a list of strings.
If the user making a request presents one of the tokens of an engine, they can
access information about the engine and make search requests.</p>
<p>Example configuration to restrict access to the Arch Linux Wiki engine:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">arch linux wiki</span>
<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">archlinux</span>
<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">al</span>
<span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="w"> </span><span class="s">&#39;my-secret-token&#39;</span><span class="w"> </span><span class="p p-Indicator">]</span>
</pre></div>
</div>
<p>Unless a user has configured the right token, the engine is going to be hidden
from him/her. It is not going to be included in the list of engines on the
Preferences page and in the output of <cite>/config</cite> REST API call.</p>
<p>Tokens can be added to ones configuration on the Preferences page under “Engine
tokens”. The input expects a comma separated list of strings.</p>
<p>The distribution of the tokens from the administrator to the users is not carved
in stone. As providing access to such engines implies that the admin knows and
trusts the user, we do not see necessary to come up with a strict process.
Instead, we would like to add guidelines to the documentation of the feature.</p>
</section>
<section id="example-multilingual-search">
<h2>Example: Multilingual Search<a class="headerlink" href="#example-multilingual-search" title="Permalink to this heading"></a></h2>
<p>SearXNG does not support true multilingual search. You have to use the language
prefix in your search query when searching in a different language.</p>
<p>But there is a workaround: By adding a new search engine with a different
language, SearXNG will search in your default and other language.</p>
<p>Example configuration in settings.yml for a German and English speaker:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">search</span><span class="p">:</span>
<span class="w"> </span><span class="nt">default_lang </span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google english</span>
<span class="w"> </span><span class="nt">engine </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google</span>
<span class="w"> </span><span class="nt">language </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en</span>
<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</pre></div>
</div>
<p>When searching, the default google engine will return German results and
“google english” will return English results.</p>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a>
<li>Next: <a href="settings_brand.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_engine.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,169 @@
<!DOCTYPE html>
<html lang="en">
<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>general: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="search:" href="settings_search.html" />
<link rel="prev" title="brand:" href="settings_brand.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="settings_search.html" title="search:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_brand.html" title="brand:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="general">
<span id="settings-general"></span><h1><code class="docutils literal notranslate"><span class="pre">general:</span></code><a class="headerlink" href="#general" title="Permalink to this heading"></a></h1>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">general</span><span class="p">:</span>
<span class="w"> </span><span class="nt">debug</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">instance_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SearXNG&quot;</span>
<span class="w"> </span><span class="nt">privacypolicy_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">donation_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">contact_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">enable_metrics</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</pre></div>
</div>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">debug</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SEARXNG_DEBUG</span></code></span></dt><dd><p>Allow a more detailed log if you run SearXNG 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">donation_url</span></code> :</dt><dd><p>Set value to <code class="docutils literal notranslate"><span class="pre">true</span></code> to use your own donation page written in the
<a class="reference internal" href="../../src/searx.infopage.html#searx-infopage"><span class="std std-ref">searx/info/en/donate.md</span></a> and use <code class="docutils literal notranslate"><span class="pre">false</span></code> to disable
the donation link altogether.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">privacypolicy_url</span></code>:</dt><dd><p>Link to privacy policy.</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">enable_metrics</span></code>:</dt><dd><p>Enabled by default. Record various anonymous metrics available at <code class="docutils literal notranslate"><span class="pre">/stats</span></code>,
<code class="docutils literal notranslate"><span class="pre">/stats/errors</span></code> and <code class="docutils literal notranslate"><span class="pre">/preferences</span></code>.</p>
</dd>
</dl>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_brand.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a>
<li>Next: <a href="settings_search.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_general.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,234 @@
<!DOCTYPE html>
<html lang="en">
<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>outgoing: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="categories_as_tabs:" href="settings_categories_as_tabs.html" />
<link rel="prev" title="redis:" href="settings_redis.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="settings_categories_as_tabs.html" title="categories_as_tabs:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_redis.html" title="redis:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="outgoing">
<span id="settings-outgoing"></span><h1><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code><a class="headerlink" href="#outgoing" title="Permalink to this heading"></a></h1>
<p>Communication with search engines.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">outgoing</span><span class="p">:</span>
<span class="w"> </span><span class="nt">request_timeout</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2.0</span><span class="w"> </span><span class="c1"># default timeout in seconds, can be override by engine</span>
<span class="w"> </span><span class="nt">max_request_timeout</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">10.0</span><span class="w"> </span><span class="c1"># the maximum timeout in seconds</span>
<span class="w"> </span><span class="nt">useragent_suffix</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="c1"># information like an email address to the administrator</span>
<span class="w"> </span><span class="nt">pool_connections</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">100</span><span class="w"> </span><span class="c1"># Maximum number of allowable connections, or null</span>
<span class="w"> </span><span class="c1"># for no limits. The default is 100.</span>
<span class="w"> </span><span class="nt">pool_maxsize</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">10</span><span class="w"> </span><span class="c1"># Number of allowable keep-alive connections, or null</span>
<span class="w"> </span><span class="c1"># to always allow. The default is 10.</span>
<span class="w"> </span><span class="nt">enable_http2</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"> </span><span class="c1"># See https://www.python-httpx.org/http2/</span>
<span class="w"> </span><span class="c1"># uncomment below section if you want to use a custom server certificate</span>
<span class="w"> </span><span class="c1"># see https://www.python-httpx.org/advanced/#changing-the-verification-defaults</span>
<span class="w"> </span><span class="c1"># and https://www.python-httpx.org/compatibility/#ssl-configuration</span>
<span class="w"> </span><span class="c1"># verify: ~/.mitmproxy/mitmproxy-ca-cert.cer</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># uncomment below section if you want to use a proxyq see: SOCKS proxies</span>
<span class="w"> </span><span class="c1"># https://2.python-requests.org/en/latest/user/advanced/#proxies</span>
<span class="w"> </span><span class="c1"># are also supported: see</span>
<span class="w"> </span><span class="c1"># https://2.python-requests.org/en/latest/user/advanced/#socks</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># proxies:</span>
<span class="w"> </span><span class="c1"># all://:</span>
<span class="w"> </span><span class="c1"># - http://proxy1:8080</span>
<span class="w"> </span><span class="c1"># - http://proxy2:8080</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># using_tor_proxy: true</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># Extra seconds to add in order to account for the time taken by the proxy</span>
<span class="w"> </span><span class="c1">#</span>
<span class="w"> </span><span class="c1"># extra_proxy_timeout: 10.0</span>
<span class="w"> </span><span class="c1">#</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 SearXNG reactivity (the result page may take the time specified in the
timeout to load). Can be override by <code class="docutils literal notranslate"><span class="pre">timeout</span></code> in the <a class="reference internal" href="settings_engine.html#settings-engine"><span class="std std-ref">engine:</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 SearXNG 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>
</dl>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">pool_maxsize</span></code>:</dt><dd><p>Number of allowable keep-alive connections, or <code class="docutils literal notranslate"><span class="pre">null</span></code> to always allow. The
default is 10. See <code class="docutils literal notranslate"><span class="pre">max_keepalive_connections</span></code> <a class="reference external" href="https://www.python-httpx.org/advanced/#pool-limit-configuration">Pool limit configuration</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">pool_connections</span></code> :</dt><dd><p>Maximum number of allowable connections, or <code class="docutils literal notranslate"><span class="pre">null</span></code> # for no limits. The
default is 100. See <code class="docutils literal notranslate"><span class="pre">max_connections</span></code> <a class="reference external" href="https://www.python-httpx.org/advanced/#pool-limit-configuration">Pool limit configuration</a>.</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.
See <code class="docutils literal notranslate"><span class="pre">keepalive_expiry</span></code> <a class="reference external" href="https://www.python-httpx.org/advanced/#pool-limit-configuration">Pool limit configuration</a>.</p>
</dd>
</dl>
<dl class="simple">
<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, SearXNG uses an
different proxy and source ip.</p>
</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>
</dl>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">verify</span></code>:<span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SSL_CERT_FILE</span></code>, <code class="docutils literal notranslate"><span class="pre">$SSL_CERT_DIR</span></code></span></dt><dd><p>Allow to specify a path to certificate.
see <a class="reference external" href="https://www.python-httpx.org/advanced/#changing-the-verification-defaults">httpx verification defaults</a>.</p>
<p>In addition to <code class="docutils literal notranslate"><span class="pre">verify</span></code>, SearXNG supports the <code class="docutils literal notranslate"><span class="pre">$SSL_CERT_FILE</span></code> (for a file) and
<code class="docutils literal notranslate"><span class="pre">$SSL_CERT_DIR</span></code> (for a directory) OpenSSL variables.
see <a class="reference external" href="https://www.python-httpx.org/compatibility/#ssl-configuration">httpx ssl configuration</a>.</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>
<dt><code class="docutils literal notranslate"><span class="pre">using_tor_proxy</span></code> :</dt><dd><p>Using tor proxy (<code class="docutils literal notranslate"><span class="pre">true</span></code>) or not (<code class="docutils literal notranslate"><span class="pre">false</span></code>) for all engines. The default is
<code class="docutils literal notranslate"><span class="pre">false</span></code> and can be overwritten in the <a class="reference internal" href="settings_engine.html#settings-engine"><span class="std std-ref">engine:</span></a></p>
</dd>
</dl>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_redis.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a>
<li>Next: <a href="settings_categories_as_tabs.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_outgoing.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,179 @@
<!DOCTYPE html>
<html lang="en">
<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>redis: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="outgoing:" href="settings_outgoing.html" />
<link rel="prev" title="ui:" href="settings_ui.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="settings_outgoing.html" title="outgoing:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_ui.html" title="ui:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="redis">
<span id="settings-redis"></span><h1><code class="docutils literal notranslate"><span class="pre">redis:</span></code><a class="headerlink" href="#redis" title="Permalink to this heading"></a></h1>
<p>A redis DB can be connected by an URL, in <a class="reference internal" href="../../src/searx.redisdb.html#module-searx.redisdb" title="searx.redisdb"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.redisdb</span></code></a> you
will find a description to test your redis connection in SerXNG. When using
sockets, dont forget to check the access rights on the socket:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ls</span> <span class="o">-</span><span class="n">la</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">redis</span><span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">redis</span><span class="o">.</span><span class="n">sock</span>
<span class="n">srwxrwx</span><span class="o">---</span> <span class="mi">1</span> <span class="n">searxng</span><span class="o">-</span><span class="n">redis</span> <span class="n">searxng</span><span class="o">-</span><span class="n">redis</span> <span class="o">...</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">redis</span><span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">redis</span><span class="o">.</span><span class="n">sock</span>
</pre></div>
</div>
<p>In this example read/write access is given to the <em>searxng-redis</em> group. To get
access rights to redis instance (the socket), your SearXNG (or even your
developer) account needs to be added to the <em>searxng-redis</em> group.</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">url</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SEARXNG_REDIS_URL</span></code></span></dt><dd><p>URL to connect redis database, see <a class="reference external" href="https://redis-py.readthedocs.io/en/stable/connections.html#redis.client.Redis.from_url">Redis.from_url(url)</a> &amp; <a class="reference internal" href="../../src/searx.redisdb.html#redis-db"><span class="std std-ref">Redis DB</span></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>redis://[[username]:[password]]@localhost:6379/0
rediss://[[username]:[password]]@localhost:6379/0
unix://[[username]:[password]]@/path/to/socket.sock?db=0
</pre></div>
</div>
</dd>
</dl>
<section id="redis-developer-notes">
<span id="id1"></span><h2>Redis Developer Notes<a class="headerlink" href="#redis-developer-notes" title="Permalink to this heading"></a></h2>
<p>To set up a local redis instance, first set the socket path of the Redis DB
in your YAML setting:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">redis</span><span class="p">:</span>
<span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">unix:///usr/local/searxng-redis/run/redis.sock?db=0</span>
</pre></div>
</div>
<p>Then use the following commands to install the redis instance (<a class="reference internal" href="../../dev/makefile.html#manage-redis-help"><span class="std std-ref">./manage redis.help</span></a>):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./manage<span class="w"> </span>redis.build
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./manage<span class="w"> </span>redis.install
$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./manage<span class="w"> </span>redis.addgrp<span class="w"> </span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">USER</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="c1"># don&#39;t forget to logout &amp; login to get member of group</span>
</pre></div>
</div>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_ui.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a>
<li>Next: <a href="settings_outgoing.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_redis.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,232 @@
<!DOCTYPE html>
<html lang="en">
<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>search: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="server:" href="settings_server.html" />
<link rel="prev" title="general:" href="settings_general.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="settings_server.html" title="server:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_general.html" title="general:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="search">
<span id="settings-search"></span><h1><code class="docutils literal notranslate"><span class="pre">search:</span></code><a class="headerlink" href="#search" title="Permalink to this heading"></a></h1>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">search</span><span class="p">:</span>
<span class="w"> </span><span class="nt">safe_search</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class="w"> </span><span class="nt">autocomplete</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="nt">default_lang</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="nt">ban_time_on_fail</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5</span>
<span class="w"> </span><span class="nt">max_ban_time_on_fail</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">120</span>
<span class="w"> </span><span class="nt">suspended_times</span><span class="p">:</span>
<span class="w"> </span><span class="nt">SearxEngineAccessDenied</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">86400</span>
<span class="w"> </span><span class="nt">SearxEngineCaptcha</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">86400</span>
<span class="w"> </span><span class="nt">SearxEngineTooManyRequests</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">3600</span>
<span class="w"> </span><span class="nt">cf_SearxEngineCaptcha</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1296000</span>
<span class="w"> </span><span class="nt">cf_SearxEngineAccessDenied</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">86400</span>
<span class="w"> </span><span class="nt">recaptcha_SearxEngineCaptcha</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">604800</span>
<span class="w"> </span><span class="nt">formats</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">html</span>
</pre></div>
</div>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">safe_search</span></code>:</dt><dd><p>Filter results.</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">0</span></code>: None</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">1</span></code>: Moderate</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">2</span></code>: Strict</p></li>
</ul>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">autocomplete</span></code>:</dt><dd><p>Existing autocomplete backends, leave blank to turn it off.</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">dbpedia</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">duckduckgo</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">google</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">startpage</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">swisscows</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qwant</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">wikipedia</span></code></p></li>
</ul>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">default_lang</span></code>:</dt><dd><p>Default search language - leave blank to detect from browser information or
use codes from <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/languages.py">git://searx/languages.py</a>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">languages</span></code>:</dt><dd><p>List of available languages - leave unset to use all codes from
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/languages.py">git://searx/languages.py</a>. Otherwise list codes of available languages.
The <code class="docutils literal notranslate"><span class="pre">all</span></code> value is shown as the <code class="docutils literal notranslate"><span class="pre">Default</span> <span class="pre">language</span></code> in the user interface
(in most cases, it is meant to send the query without a language parameter ;
in some cases, it means the English language) Example:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">languages</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">all</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">en-US</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">de</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">it-IT</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fr</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fr-BE</span>
</pre></div>
</div>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">ban_time_on_fail</span></code>:</dt><dd><p>Ban time in seconds after engine errors.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">max_ban_time_on_fail</span></code>:</dt><dd><p>Max ban time in seconds after engine errors.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">suspended_times</span></code>:</dt><dd><p>Engine suspension time after error (in seconds; set to 0 to disable)</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">SearxEngineAccessDenied</span></code>: 86400</dt><dd><p>For error “Access denied” and “HTTP error [402, 403]”</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">SearxEngineCaptcha</span></code>: 86400</dt><dd><p>For error “CAPTCHA”</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">SearxEngineTooManyRequests</span></code>: 3600</dt><dd><p>For error “Too many request” and “HTTP error 429”</p>
</dd>
<dt>Cloudflare CAPTCHA:</dt><dd><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">cf_SearxEngineCaptcha</span></code>: 1296000</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">cf_SearxEngineAccessDenied</span></code>: 86400</p></li>
</ul>
</dd>
<dt>Google CAPTCHA:</dt><dd><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">recaptcha_SearxEngineCaptcha</span></code>: 604800</p></li>
</ul>
</dd>
</dl>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">formats</span></code>:</dt><dd><p>Result formats available from web, remove format to deny access (use lower
case).</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">html</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">csv</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">json</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">rss</span></code></p></li>
</ul>
</dd>
</dl>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_general.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a>
<li>Next: <a href="settings_server.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_search.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,186 @@
<!DOCTYPE html>
<html lang="en">
<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>server: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="ui:" href="settings_ui.html" />
<link rel="prev" title="search:" href="settings_search.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="settings_ui.html" title="ui:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_search.html" title="search:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="server">
<span id="settings-server"></span><h1><code class="docutils literal notranslate"><span class="pre">server:</span></code><a class="headerlink" href="#server" title="Permalink to this heading"></a></h1>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">server</span><span class="p">:</span>
<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://example.org/location</span><span class="w"> </span><span class="c1"># change this!</span>
<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">8888</span>
<span class="w"> </span><span class="nt">bind_address</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;127.0.0.1&quot;</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span><span class="w"> </span><span class="c1"># change this!</span>
<span class="w"> </span><span class="nt">limiter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">image_proxy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">default_http_headers</span><span class="p">:</span>
<span class="w"> </span><span class="nt">X-Content-Type-Options </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">nosniff</span>
<span class="w"> </span><span class="nt">X-XSS-Protection </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1; mode=block</span>
<span class="w"> </span><span class="nt">X-Download-Options </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">noopen</span>
<span class="w"> </span><span class="nt">X-Robots-Tag </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">noindex, nofollow</span>
<span class="w"> </span><span class="nt">Referrer-Policy </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">no-referrer</span>
</pre></div>
</div>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SEARXNG_URL</span></code> <a class="reference internal" href="../../dev/makefile.html#make-buildenv"><span class="std std-ref">buildenv</span></a></span></dt><dd><p>The base URL where SearXNG is deployed. Used to create correct inbound links.
If you change the value, dont forget to rebuild instances environment
(<a class="reference internal" href="../../dev/makefile.html#make-buildenv"><span class="std std-ref">utils/brand.env</span></a>)</p>
</dd>
<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>: <code class="docutils literal notranslate"><span class="pre">$SEARXNG_PORT</span></code> &amp; <code class="docutils literal notranslate"><span class="pre">$SEARXNG_BIND_ADDRESS</span></code> <a class="reference internal" href="../../dev/makefile.html#make-buildenv"><span class="std std-ref">buildenv</span></a></dt><dd><p>Port number and <em>bind address</em> of the SearXNG 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 a SearXNG
services running behind a proxy and using socket communications. If you
change the value, dont forget to rebuild instances environment
(<a class="reference internal" href="../../dev/makefile.html#make-buildenv"><span class="std std-ref">utils/brand.env</span></a>)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">secret_key</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SEARXNG_SECRET</span></code></span></dt><dd><p>Used for cryptography purpose.</p>
</dd>
</dl>
<dl class="simple" id="limiter">
<dt><code class="docutils literal notranslate"><span class="pre">limiter</span></code> :</dt><dd><p>Rate limit the number of request on the instance, block some bots. The
<a class="reference internal" href="../../src/searx.botdetection.html#limiter-src"><span class="std std-ref">Limiter</span></a> requires a <a class="reference internal" href="settings_redis.html#settings-redis"><span class="std std-ref">redis:</span></a> database.</p>
</dd>
</dl>
<dl class="simple" id="image-proxy">
<dt><code class="docutils literal notranslate"><span class="pre">image_proxy</span></code> :</dt><dd><p>Allow your instance of SearXNG of being able to proxy images. Uses memory space.</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>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_search.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a>
<li>Next: <a href="settings_ui.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_server.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

View file

@ -0,0 +1,189 @@
<!DOCTYPE html>
<html lang="en">
<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>ui: &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="redis:" href="settings_redis.html" />
<link rel="prev" title="server:" href="settings_server.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="settings_redis.html" title="redis:"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings_server.html" title="server:"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="ui">
<span id="settings-ui"></span><h1><code class="docutils literal notranslate"><span class="pre">ui:</span></code><a class="headerlink" href="#ui" title="Permalink to this heading"></a></h1>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">ui</span><span class="p">:</span>
<span class="w"> </span><span class="nt">static_use_hash</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">default_locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span>
<span class="w"> </span><span class="nt">query_in_title</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">infinite_scroll</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">center_alignment</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class="w"> </span><span class="nt">cache_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://web.archive.org/web/</span>
<span class="w"> </span><span class="nt">default_theme</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">simple</span>
<span class="w"> </span><span class="nt">theme_args</span><span class="p">:</span>
<span class="w"> </span><span class="nt">simple_style</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">auto</span>
</pre></div>
</div>
<dl id="static-use-hash">
<dt><code class="docutils literal notranslate"><span class="pre">static_use_hash</span></code> :</dt><dd><p>Enables <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#caching_static_assets_with_cache_busting">cache busting</a> of static files.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">default_locale</span></code> :</dt><dd><p>SearXNG 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">query_in_title</span></code> :</dt><dd><p>When true, the result pages titles contains the query it decreases the
privacy, since the browser can records the page titles.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">infinite_scroll</span></code>:</dt><dd><p>When true, automatically loads the next page when scrolling to bottom of the current page.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">center_alignment</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">false</span></code></span></dt><dd><p>When enabled, the results are centered instead of being in the left (or RTL)
side of the screen. This setting only affects the <em>desktop layout</em>
(<a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/static/themes/simple/src/less/definitions.less">min-width: &#64;tablet</a>)</p>
</dd>
</dl>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">cache_url</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">https://web.archive.org/web/</span></code></span></dt><dd><p>URL prefix of the internet archive or cache, dont forgett trailing slash (if
needed). The default is <a class="reference external" href="https://web.archive.org/web/">https://web.archive.org/web/</a> alternatives are:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://webcache.googleusercontent.com/search?q=cache">https://webcache.googleusercontent.com/search?q=cache</a>:</p></li>
<li><p><a class="reference external" href="https://archive.today/">https://archive.today/</a></p></li>
</ul>
</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 SearXNG instance.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">theme_args.simple_style</span></code>:</dt><dd><p>Style of simple theme: <code class="docutils literal notranslate"><span class="pre">auto</span></code>, <code class="docutils literal notranslate"><span class="pre">light</span></code>, <code class="docutils literal notranslate"><span class="pre">dark</span></code></p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">results_on_new_tab</span></code>:</dt><dd><p>Open result links in a new tab by default.</p>
</dd>
</dl>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation-apache.html">Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="../update-searxng.html">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="../api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="../buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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><a href="index.html">Settings</a>
<ul>
<li>Previous: <a href="settings_server.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a>
<li>Next: <a href="settings_redis.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></ul>
</li></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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/admin/settings/settings_ui.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../../_static/version_warning_offset.js"></script>
</body>
</html>

265
admin/update-searxng.html Normal file
View file

@ -0,0 +1,265 @@
<!DOCTYPE html>
<html lang="en">
<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>SearXNG maintenance &#8212; SearXNG Documentation (2023.8.11+905ce2a6f)</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=3c88bde0"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Answer CAPTCHA from servers IP" href="answer-captcha.html" />
<link rel="prev" title="Apache" href="installation-apache.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="answer-captcha.html" title="Answer CAPTCHA from servers IP"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-apache.html" title="Apache"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.8.11+905ce2a6f)</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="">SearXNG maintenance</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="searxng-maintenance">
<span id="id1"></span><h1>SearXNG maintenance<a class="headerlink" href="#searxng-maintenance" title="Permalink to this heading"></a></h1>
<aside class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/index.html#toolboxing"><span class="std std-ref">DevOps tooling box</span></a></p></li>
<li><p><a class="reference internal" href="installation-uwsgi.html#uwsgi-maintenance"><span class="std std-ref">uWSGI maintenance</span></a></p></li>
</ul>
</aside>
<nav class="contents local" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#how-to-update" id="id3">How to update</a></p></li>
<li><p><a class="reference internal" href="#how-to-inspect-debug" id="id4">How to inspect &amp; debug</a></p></li>
<li><p><a class="reference internal" href="#migrate-and-stay-tuned" id="id5">Migrate and stay tuned!</a></p>
<ul>
<li><p><a class="reference internal" href="#remove-obsolete-services" id="id6">remove obsolete services</a></p></li>
<li><p><a class="reference internal" href="#check-after-installation" id="id7">Check after Installation</a></p></li>
</ul>
</li>
</ul>
</nav>
<section id="how-to-update">
<span id="update-searxng"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this heading"></a></h2>
<p>How to update depends on the <a class="reference internal" href="installation.html#installation"><span class="std std-ref">Installation</span></a> method. If you have used the
<a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a>, use the <code class="docutils literal notranslate"><span class="pre">update</span></code> command from the <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>
script.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>update
</pre></div>
</div>
</section>
<section id="how-to-inspect-debug">
<span id="inspect-searxng"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">How to inspect &amp; debug</a><a class="headerlink" href="#how-to-inspect-debug" title="Permalink to this heading"></a></h2>
<p>How to debug depends on the <a class="reference internal" href="installation.html#installation"><span class="std std-ref">Installation</span></a> method. If you have used the
<a class="reference internal" href="installation-scripts.html#installation-scripts"><span class="std std-ref">Installation Script</span></a>, use the <code class="docutils literal notranslate"><span class="pre">inspect</span></code> command from the <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>
script.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>inspect
</pre></div>
</div>
</section>
<section id="migrate-and-stay-tuned">
<span id="id2"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Migrate and stay tuned!</a><a class="headerlink" href="#migrate-and-stay-tuned" title="Permalink to this heading"></a></h2>
<aside class="sidebar">
<p class="sidebar-title">info</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/searxng/searxng/pull/1332">PR 1332</a></p></li>
<li><p><a class="reference external" href="https://github.com/searxng/searxng/pull/456">PR 456</a></p></li>
<li><p><a class="reference external" href="https://github.com/searxng/searxng/pull/446#issuecomment-954730358">A comment about rolling release</a></p></li>
</ul>
</aside>
<p>SearXNG is a <em>rolling release</em>; each commit to the master branch is a release.
SearXNG is growing rapidly, the services and opportunities are change every now
and then, to name just a few:</p>
<ul class="simple">
<li><p>Bot protection has been switched from filtron to SearXNGs <a class="reference internal" href="settings/settings_server.html#limiter"><span class="std std-ref">limiter</span></a>, this requires a <a class="reference internal" href="settings/settings_redis.html#settings-redis"><span class="std std-ref">Redis</span></a> database.</p></li>
<li><p>The image proxy morty is no longer needed, it has been replaced by the
<a class="reference internal" href="settings/settings_server.html#image-proxy"><span class="std std-ref">image proxy</span></a> from SearXNG.</p></li>
<li><p>To save bandwith <a class="reference internal" href="settings/settings_ui.html#static-use-hash"><span class="std std-ref">cache busting</span></a> has been implemented.
To get in use, the <code class="docutils literal notranslate"><span class="pre">static-expires</span></code> needs to be set in the <a class="reference internal" href="installation-uwsgi.html#uwsgi-setup"><span class="std std-ref">uWSGI setup</span></a>.</p></li>
</ul>
<p>To stay tuned and get in use of the new features, instance maintainers have to
update the SearXNG code regularly (see <a class="reference internal" href="#update-searxng"><span class="std std-ref">How to update</span></a>). As the above
examples show, this is not always enough, sometimes services have to be set up
or reconfigured and sometimes services that are no longer needed should be
uninstalled.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>First of all: SearXNG is installed by the script <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>. If you
have old filtron, morty or searx setup you should consider complete
uninstall/reinstall.</p>
</div>
<p>Here you will find a list of changes that affect the infrastructure. Please
check to what extent it is necessary to update your installations:</p>
<dl class="simple">
<dt><a class="reference external" href="https://github.com/searxng/searxng/pull/1595">PR 1595</a>: <code class="docutils literal notranslate"><span class="pre">[fix]</span> <span class="pre">uWSGI:</span> <span class="pre">increase</span> <span class="pre">buffer-size</span></code></dt><dd><p>Re-install uWSGI (<a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>) or fix your uWSGI <code class="docutils literal notranslate"><span class="pre">searxng.ini</span></code>
file manually.</p>
</dd>
</dl>
<section id="remove-obsolete-services">
<h3><a class="toc-backref" href="#id6" role="doc-backlink">remove obsolete services</a><a class="headerlink" href="#remove-obsolete-services" title="Permalink to this heading"></a></h3>
<p>If your searx instance was installed <em>“Step by step”</em> or by the <em>“Installation
scripts”</em>, you need to undo the installation procedure completely. If you have
morty &amp; filtron installed, it is recommended to uninstall these services also.
In case of scripts, to uninstall use the scripts from the origin you installed
searx from or try:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/filtron.sh remove all
$ sudo -H ./utils/morty.sh remove all
$ sudo -H ./utils/searx.sh remove all
</pre></div>
</div>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>If you are migrate from searx take into account that the <code class="docutils literal notranslate"><span class="pre">.config.sh</span></code> is no
longer used.</p>
</div>
<p>If you upgrade from searx or from before <a class="reference external" href="https://github.com/searxng/searxng/pull/1332">PR 1332</a> has been merged and you
have filtron and/or morty installed, dont forget to remove HTTP sites.</p>
<p>Apache:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/filtron.sh apache remove
$ sudo -H ./utils/morty.sh apache remove
</pre></div>
</div>
<p>nginx:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/filtron.sh nginx remove
$ sudo -H ./utils/morty.sh nginx remove
</pre></div>
</div>
</section>
<section id="check-after-installation">
<h3><a class="toc-backref" href="#id7" role="doc-backlink">Check after Installation</a><a class="headerlink" href="#check-after-installation" title="Permalink to this heading"></a></h3>
<p>Once you have done your installation, you can run a SearXNG <em>check</em> procedure,
to see if there are some left overs. In this example there exists a <em>old</em>
<code class="docutils literal notranslate"><span class="pre">/etc/searx/settings.yml</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/searxng.sh instance check
SearXNG checks
--------------
ERROR: settings.yml in /etc/searx/ is deprecated, move file to folder /etc/searxng/
INFO: [OK] (old) account &#39;searx&#39; does not exists
INFO: [OK] (old) account &#39;filtron&#39; does not exists
INFO: [OK] (old) account &#39;morty&#39; does not exists
...
INFO searx.redisdb : connecting to Redis db=0 path=&#39;/usr/local/searxng-redis/run/redis.sock&#39;
INFO searx.redisdb : connected to Redis
</pre></div>
</div>
</section>
</section>
</section>
<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/searxng-wordmark.svg" alt="Logo"/>
</a></p>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Administrator documentation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="settings/index.html">Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-docker.html">Docker Container</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-scripts.html">Installation Script</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searxng.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html">uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html">NGINX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html">Apache</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">SearXNG maintenance</a></li>
<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from servers IP</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Developer documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
</ul>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://github.com/searxng/searxng/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="installation-apache.html" title="previous chapter">Apache</a>
<li>Next: <a href="answer-captcha.html" title="next chapter">Answer CAPTCHA from servers IP</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>document.getElementById('searchbox').style.display = "block"</script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/admin/update-searxng.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright SearXNG team.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>