diff options
Diffstat (limited to 'admin')
27 files changed, 7466 insertions, 0 deletions
diff --git a/admin/answer-captcha.html b/admin/answer-captcha.html new file mode 100644 index 000000000..8b7385886 --- /dev/null +++ b/admin/answer-captcha.html @@ -0,0 +1,196 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 server’s IP — SearXNG Documentation (2025.1.6+6dab7fe78)</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 src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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="Favicons" href="searx.favicons.html" /> + <link rel="prev" title="SearXNG maintenance" href="update-searxng.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="searx.favicons.html" title="Favicons" + 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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Answer CAPTCHA from server’s 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 server’s IP<a class="headerlink" href="#answer-captcha-from-server-s-ip" title="Link to this heading">¶</a></h1> +<p>With a SSH tunnel we can send requests from server’s 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="extlink-man 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">server’s 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">desktop’s 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 server’s 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">Firefox’s network settings</span><a class="headerlink" href="#id1" title="Link to this image">¶</a></p> +</figcaption> +</figure> +</div></div> +<div class="admonition-man-ssh-manual admonition"> +<p class="admonition-title"><a class="extlink-man 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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="searx.favicons.html" title="next chapter">Favicons</a></ul> + </li> + </ul> + </li> +</ul> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/api.html b/admin/api.html new file mode 100644 index 000000000..9cece79dc --- /dev/null +++ b/admin/api.html @@ -0,0 +1,228 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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="Limiter" href="searx.limiter.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="searx.limiter.html" title="Limiter" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link to this heading">¶</a></h1> +<section id="get-configuration-data"> +<h2>Get configuration data<a class="headerlink" href="#get-configuration-data" title="Link 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="Link 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">"autocomplete"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"categories"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"map"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"it"</span><span class="p">,</span> +<span class="w"> </span><span class="s2">"images"</span><span class="p">,</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"default_locale"</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"default_theme"</span><span class="p">:</span><span class="w"> </span><span class="s2">"simple"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"engines"</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">"categories"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"map"</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"enabled"</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">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"openstreetmap"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"shortcut"</span><span class="p">:</span><span class="w"> </span><span class="s2">"osm"</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"categories"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"it"</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"enabled"</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">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"arch linux wiki"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"shortcut"</span><span class="p">:</span><span class="w"> </span><span class="s2">"al"</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"categories"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"images"</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"enabled"</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">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"google images"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"shortcut"</span><span class="p">:</span><span class="w"> </span><span class="s2">"goi"</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"categories"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span> +<span class="w"> </span><span class="s2">"it"</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"enabled"</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">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"bitbucket"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"shortcut"</span><span class="p">:</span><span class="w"> </span><span class="s2">"bb"</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="p">],</span> +<span class="w"> </span><span class="nt">"instance_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"searx"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"locales"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span> +<span class="w"> </span><span class="nt">"de"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Deutsch (German)"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"en"</span><span class="p">:</span><span class="w"> </span><span class="s2">"English"</span><span class="p">,</span> +<span class="w"> </span><span class="nt">"eo"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Esperanto (Esperanto)"</span><span class="p">,</span> +<span class="w"> </span><span class="p">},</span> +<span class="w"> </span><span class="nt">"plugins"</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">"enabled"</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">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"HTTPS rewrite"</span> +<span class="w"> </span><span class="p">}</span> +<span class="w"> </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="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="Link 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"><</span><span class="nt">form</span> <span class="na">method</span><span class="o">=</span><span class="s">"post"</span> <span class="na">action</span><span class="o">=</span><span class="s">"https://example.org/"</span><span class="p">></span> + <span class="cm"><!-- search --></span> <span class="p"><</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">"text"</span> <span class="na">name</span><span class="o">=</span><span class="s">"q"</span><span class="p">></span> + <span class="cm"><!-- categories --></span> <span class="p"><</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">"hidden"</span> <span class="na">name</span><span class="o">=</span><span class="s">"categories"</span> <span class="na">value</span><span class="o">=</span><span class="s">"general,social media"</span><span class="p">></span> + <span class="cm"><!-- language --></span> <span class="p"><</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">"hidden"</span> <span class="na">name</span><span class="o">=</span><span class="s">"lang"</span> <span class="na">value</span><span class="o">=</span><span class="s">"all"</span><span class="p">></span> + <span class="cm"><!-- locale --></span> <span class="p"><</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">"hidden"</span> <span class="na">name</span><span class="o">=</span><span class="s">"locale"</span> <span class="na">value</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span> + <span class="cm"><!-- date filter --></span> <span class="p"><</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">"hidden"</span> <span class="na">name</span><span class="o">=</span><span class="s">"time_range"</span> <span class="na">value</span><span class="o">=</span><span class="s">"month"</span><span class="p">></span> +<span class="p"></</span><span class="nt">form</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Administration API</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#get-configuration-data">Get configuration data</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#sample-response">Sample response</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#embed-search-bar">Embed search bar</a></li> +</ul> +</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="searx.limiter.html" title="previous chapter">Limiter</a> + <li>Next: <a href="architecture.html" title="next chapter">Architecture</a></ul> + </li> + </ul> + </li> +</ul> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/architecture.html b/admin/architecture.html new file mode 100644 index 000000000..7fa72fd77 --- /dev/null +++ b/admin/architecture.html @@ -0,0 +1,194 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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> & <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="Link 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="Link 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="extlink-origin 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">"SearXNG"</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">'duckduckgo'</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">"ultrasecretkey"</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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><ul> +<li class="toctree-l3"><a class="reference internal" href="#uwsgi-setup">uWSGI Setup</a></li> +</ul> +</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/buildhosts.html b/admin/buildhosts.html new file mode 100644 index 000000000..2e74de0ac --- /dev/null +++ b/admin/buildhosts.html @@ -0,0 +1,282 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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 src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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, it’s 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="Link 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">SearXNG’s 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 documentation 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="Link 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="extlink-origin 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, it’s 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 v8.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="extlink-origin 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">'imgmath'</span> +<span class="n">imgmath_image_format</span> <span class="o">=</span> <span class="s1">'svg'</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">'latex'</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="Link 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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><ul> +<li class="toctree-l3"><a class="reference internal" href="#build-and-development-tools">Build and Development tools</a></li> +<li class="toctree-l3"><a class="reference internal" href="#build-docs">Build docs</a></li> +<li class="toctree-l3"><a class="reference internal" href="#lint-shell-scripts">Lint shell scripts</a></li> +</ul> +</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/index.html b/admin/index.html new file mode 100644 index 000000000..8e5c0e1ba --- /dev/null +++ b/admin/index.html @@ -0,0 +1,229 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</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="Link 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 & 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">NGINX’s 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">Apache’s 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 & 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 server’s IP</a></li> +<li class="toctree-l1"><a class="reference internal" href="searx.favicons.html">Favicons</a><ul> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#infrastructure">Infrastructure</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#setting-up-the-cache">Setting up the cache</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html#proxy-configuration">Proxy configuration</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="searx.limiter.html">Limiter</a><ul> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#enable-limiter">Enable Limiter</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#configure-limiter">Configure Limiter</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#limiter-toml"><code class="docutils literal notranslate"><span class="pre">limiter.toml</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#implementation">Implementation</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#searx.limiter.initialize"><code class="docutils literal notranslate"><span class="pre">initialize()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#searx.limiter.is_installed"><code class="docutils literal notranslate"><span class="pre">is_installed()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#searx.limiter.pre_request"><code class="docutils literal notranslate"><span class="pre">pre_request()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html#searx.limiter.LIMITER_CFG_SCHEMA"><code class="docutils literal notranslate"><span class="pre">LIMITER_CFG_SCHEMA</span></code></a></li> +</ul> +</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/installation-apache.html b/admin/installation-apache.html new file mode 100644 index 000000000..9e2172d9c --- /dev/null +++ b/admin/installation-apache.html @@ -0,0 +1,481 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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 src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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">Debian’s 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">Apache’s 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="Link 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">"/srv/http"</span> +<span class="nt"><Directory</span><span class="w"> </span><span class="s">"/srv/http"</span><span class="nt">></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"></Directory></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">"/var/www/html"</span> +... +<span class="nt"><Directory</span><span class="w"> </span><span class="s">"/var/www"</span><span class="nt">></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"></Directory></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">Debian’s Apache layout</a><a class="headerlink" href="#debian-s-apache-layout" title="Link to this heading">¶</a></h3> +<p>Be aware, Debian’s 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="extlink-man reference external" href="https://manpages.debian.org/jump?q=apache2ctl">apache2ctl</a>: Apache HTTP server control interface</p></li> +<li><p><a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=a2enmod">a2enmod</a>, <a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=a2dismod">a2dismod</a>: switch on/off modules</p></li> +<li><p><a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=a2enconf">a2enconf</a>, <a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=a2disconf">a2disconf</a>: switch on/off configurations</p></li> +<li><p><a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=a2ensite">a2ensite</a>, <a class="extlink-man 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="Link to this heading">¶</a></h3> +<p>To load additional modules, in most distributions you have to uncomment 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">Debian’s 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">Debian’s Apache layout</span></a> uses <a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=a2enmod">a2enmod</a> and <a class="extlink-man 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="Link 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">Debian’s 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"><Location</span> <span class="pre">/searxng</span> <span class="pre">></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="extlink-man 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">Apache’s SearXNG site</a><a class="headerlink" href="#apache-s-searxng-site" title="Link 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> / don’t 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">/mod_ssl.so</span> +<span class="nb">LoadModule</span><span class="w"> </span>headers_module<span class="w"> </span><span class="sx">/mod_headers.so</span> +<span class="nb">LoadModule</span><span class="w"> </span>proxy_module<span class="w"> </span><span class="sx">/mod_proxy.so</span> +<span class="nb">LoadModule</span><span class="w"> </span>proxy_uwsgi_module<span class="w"> </span><span class="sx">/mod_proxy_uwsgi.so</span> +<span class="c"># LoadModule setenvif_module /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"><Location</span><span class="w"> </span><span class="s">/searxng</span><span class="nt">></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"></Location></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">/mod_ssl.so</span> +<span class="nb">LoadModule</span><span class="w"> </span>headers_module<span class="w"> </span><span class="sx">/mod_headers.so</span> +<span class="nb">LoadModule</span><span class="w"> </span>proxy_module<span class="w"> </span><span class="sx">/mod_proxy.so</span> +<span class="nb">LoadModule</span><span class="w"> </span>proxy_http_module<span class="w"> </span><span class="sx">/mod_proxy_http.so</span> +<span class="c"># LoadModule setenvif_module /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"><Location</span><span class="w"> </span><span class="s">/searxng</span><span class="nt">></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"></Location></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="Link 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">"/searxng"</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul> +<li class="toctree-l3"><a class="reference internal" href="#the-apache-http-server">The Apache HTTP server</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#debian-s-apache-layout">Debian’s Apache layout</a></li> +<li class="toctree-l4"><a class="reference internal" href="#apache-modules">Apache modules</a></li> +<li class="toctree-l4"><a class="reference internal" href="#apache-sites">Apache sites</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#apache-s-searxng-site">Apache’s SearXNG site</a></li> +<li class="toctree-l3"><a class="reference internal" href="#disable-logs">disable logs</a></li> +</ul> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/installation-docker.html b/admin/installation-docker.html new file mode 100644 index 000000000..c07d267cf --- /dev/null +++ b/admin/installation-docker.html @@ -0,0 +1,329 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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 @dockerhub</a></p></li> +<li><p><a class="extlink-origin 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>Alpine’s <code class="docutils literal notranslate"><span class="pre">/bin/sh</span></code> is <a class="extlink-man 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 @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="searx.limiter.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 bandwidth</p></li> +</ul> +<hr class="docutils" /> +<section id="get-docker"> +<h2>Get Docker<a class="headerlink" href="#get-docker" title="Link 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 don’t +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="Link 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="extlink-origin 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 @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 @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">"</span><span class="si">${</span><span class="nv">PWD</span><span class="si">}</span><span class="s2">/searxng:/etc/searxng"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span>-e<span class="w"> </span><span class="s2">"BASE_URL=http://localhost:</span><span class="nv">$PORT</span><span class="s2">/"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span>-e<span class="w"> </span><span class="s2">"INSTANCE_NAME=my-instance"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span>searxng/searxng +2f998....<span class="w"> </span><span class="c1"># container's ID</span> +</pre></div> +</div> +<p>The environment variables UWSGI_WORKERS and UWSGI_THREADS overwrite the default +number of UWSGI processes and UWSGI threads specified in <cite>/etc/searxng/uwsgi.ini</cite>.</p> +<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">"http://localhost:</span><span class="nv">$PORT</span><span class="s2">"</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 +stopped. 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">"/sbin/tini -- /usr/…"</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 won’t use docker anymore and want to get rid of all containers & 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="Link 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, Alpine’s <a class="reference external" href="https://wiki.ubuntu.com/DashAsBinSh">/bin/sh</a> is <a class="extlink-man 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="extlink-man reference external" href="https://manpages.debian.org/jump?q=bash">bash</a> is not installed. The +<a class="extlink-origin 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="Link to this heading">¶</a></h2> +<p>It’s also possible to build SearXNG from the embedded <a class="extlink-origin 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="Link 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="extlink-origin 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="extlink-origin 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)" +</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul> +<li class="toctree-l3"><a class="reference internal" href="#get-docker">Get Docker</a></li> +<li class="toctree-l3"><a class="reference internal" href="#searxng-searxng">searxng/searxng</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#shell-inside-container">shell inside container</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#build-the-image">Build the image</a></li> +<li class="toctree-l3"><a class="reference internal" href="#command-line">Command line</a></li> +</ul> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/installation-nginx.html b/admin/installation-nginx.html new file mode 100644 index 000000000..31886ac79 --- /dev/null +++ b/admin/installation-nginx.html @@ -0,0 +1,359 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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 src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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">NGINX’s 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="Link 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">NGINX’s SearXNG site</a><a class="headerlink" href="#nginx-s-searxng-site" title="Link 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="Link 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul> +<li class="toctree-l3"><a class="reference internal" href="#the-nginx-http-server">The nginx HTTP server</a></li> +<li class="toctree-l3"><a class="reference internal" href="#nginx-s-searxng-site">NGINX’s SearXNG site</a></li> +<li class="toctree-l3"><a class="reference internal" href="#disable-logs">Disable logs</a></li> +</ul> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/installation-scripts.html b/admin/installation-scripts.html new file mode 100644 index 000000000..32d4b5f0c --- /dev/null +++ b/admin/installation-scripts.html @@ -0,0 +1,193 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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 & 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/installation-searxng.html b/admin/installation-searxng.html new file mode 100644 index 000000000..02378f161 --- /dev/null +++ b/admin/installation-searxng.html @@ -0,0 +1,623 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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 src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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 & 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="Link 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="Link 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">"/usr/local/searxng"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span>--comment<span class="w"> </span><span class="s1">'Privacy-respecting metasearch engine'</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">"/usr/local/searxng"</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">"searxng:searxng"</span><span class="w"> </span><span class="s2">"/usr/local/searxng"</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 & dependencies</a><a class="headerlink" href="#install-searxng-dependencies" title="Link 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">"https://github.com/searxng/searxng"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span><span class="s2">"/usr/local/searxng/searxng-src"</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">"/usr/local/searxng/searx-pyenv"</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">". /usr/local/searxng/searx-pyenv/bin/activate"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span>>><span class="w"> </span><span class="s2">"/usr/local/searxng/.profile"</span> +</pre></div> +</div> +</div></div> +<p>To install SearXNG’s 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">&&</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>.11.10 + +<span class="c1"># update pip'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'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">"/usr/local/searxng/searxng-src"</span> +<span class="o">(</span>searxng<span class="o">)</span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>--use-pep517<span class="w"> </span>--no-build-isolation<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="Link 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="extlink-origin 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="extlink-origin 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="extlink-origin 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="searx.limiter.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 bandwidth</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">"SearXNG"</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">'duckduckgo'</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">"ultrasecretkey"</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">'Hash</span><span class="nv"> </span><span class="s">plugin'</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">'Self</span><span class="nv"> </span><span class="s">Information'</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">'Tracker</span><span class="nv"> </span><span class="s">URL</span><span class="nv"> </span><span class="s">remover'</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">'Ahmia</span><span class="nv"> </span><span class="s">blacklist'</span> +<span class="w"> </span><span class="c1"># - 'Hostnames plugin' # see 'hostnames' configuration below</span> +<span class="w"> </span><span class="c1"># - 'Open Access DOI rewrite'</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="extlink-origin 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">"SearXNG"</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="w"> </span><span class="c1"># expose stats in open metrics format at /metrics</span> +<span class="w"> </span><span class="c1"># leave empty to disable (no password set)</span> +<span class="w"> </span><span class="c1"># open_metrics: <password></span> +<span class="w"> </span><span class="nt">open_metrics</span><span class="p">:</span><span class="w"> </span><span class="s">''</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="w"> </span><span class="c1"># custom:</span> +<span class="w"> </span><span class="c1"># maintainer: "Jon Doe"</span> +<span class="w"> </span><span class="c1"># # Custom entries in the footer: [title]: [link]</span> +<span class="w"> </span><span class="c1"># links:</span> +<span class="w"> </span><span class="c1"># Uptime: https://uptime.searxng.org/history/darmarit-org</span> +<span class="w"> </span><span class="c1"># About: "https://searxng.org"</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: "dbpedia", "duckduckgo", "google", "yandex", "mwmbl",</span> +<span class="w"> </span><span class="c1"># "seznam", "startpage", "stract", "swisscows", "qwant", "wikipedia" - 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">""</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"># backend for the favicon near URL in search results.</span> +<span class="w"> </span><span class="c1"># Available resolvers: "allesedv", "duckduckgo", "google", "yandex" - leave blank to turn it off by default.</span> +<span class="w"> </span><span class="nt">favicon_resolver</span><span class="p">:</span><span class="w"> </span><span class="s">""</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 'languages.py'</span> +<span class="w"> </span><span class="nt">default_lang</span><span class="p">:</span><span class="w"> </span><span class="s">"auto"</span> +<span class="w"> </span><span class="c1"># max_page: 0 # if engine supports paging, 0 means unlimited numbers of pages</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 "Access denied" and "HTTP error [402, 403]"</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 "CAPTCHA"</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 "Too many request" and "HTTP error 429"</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"># Is overwritten by ${SEARXNG_PORT} 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">"127.0.0.1"</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"># "http://example.com/location"</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"># Is overwritten by ${SEARXNG_LIMITER}</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"># enable features designed only for public instances.</span> +<span class="w"> </span><span class="c1"># Is overwritten by ${SEARXNG_PUBLIC_INSTANCE}</span> +<span class="w"> </span><span class="nt">public_instance</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"># 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">"ultrasecretkey"</span><span class="w"> </span><span class="c1"># Is overwritten by ${SEARXNG_SECRET}</span> +<span class="w"> </span><span class="c1"># Proxy image results through SearXNG. Is overwritten by ${SEARXNG_IMAGE_PROXY}</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">"1.0"</span> +<span class="w"> </span><span class="c1"># POST queries are more secure as they don'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">"POST"</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-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://docs.searxng.org/admin/settings/settings_redis.html#settings-redis</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't change</span> +<span class="w"> </span><span class="nt">static_path</span><span class="p">:</span><span class="w"> </span><span class="s">""</span> +<span class="w"> </span><span class="c1"># Is overwritten by ${SEARXNG_STATIC_USE_HASH}.</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't change</span> +<span class="w"> </span><span class="nt">templates_path</span><span class="p">:</span><span class="w"> </span><span class="s">""</span> +<span class="w"> </span><span class="c1"># query_in_title: When true, the result page'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't forget trailing slash (if needed).</span> +<span class="w"> </span><span class="c1"># cache_url: "https://webcache.googleusercontent.com/search?q=cache:"</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 'locales' config section</span> +<span class="w"> </span><span class="nt">default_locale</span><span class="p">:</span><span class="w"> </span><span class="s">""</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="w"> </span><span class="c1"># Perform search immediately if a category selected.</span> +<span class="w"> </span><span class="c1"># Disable to select multiple categories at once and start the search manually.</span> +<span class="w"> </span><span class="nt">search_on_category_select</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"># Hotkeys: default or vim</span> +<span class="w"> </span><span class="nt">hotkeys</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">default</span> +<span class="w"> </span><span class="c1"># URL formatting: pretty, full or host</span> +<span class="w"> </span><span class="nt">url_formatting</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">pretty</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 "preferences".</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 "your_morty_proxy_key"</span> +<span class="c1"># # [true|false] enable the "proxy" 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">""</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</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"># - 'Basic Calculator'</span> +<span class="c1"># - 'Hash plugin'</span> +<span class="c1"># - 'Self Information'</span> +<span class="c1"># - 'Tracker URL remover'</span> +<span class="c1"># - 'Unit converter plugin'</span> +<span class="c1"># - 'Ahmia blacklist' # activation depends on outgoing.using_tor_proxy</span> +<span class="c1"># # these plugins are disabled if nothing is configured ..</span> +<span class="c1"># - 'Hostnames plugin' # see 'hostnames' configuration below</span> +<span class="c1"># - 'Open Access DOI rewrite'</span> +<span class="c1"># - 'Tor check plugin'</span> + +<span class="c1"># Configuration of the "Hostnames plugin":</span> +<span class="c1">#</span> +</pre></div> +</div> +<p>To see the entire file jump to <a class="extlink-origin 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">"/etc/searxng"</span> +$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>cp<span class="w"> </span><span class="s2">"/usr/local/searxng/searxng-src/utils/templates/etc/searxng/settings.yml"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span><span class="s2">"/etc/searxng/settings.yml"</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">"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"</span><span class="w"> </span><span class="se">\</span> +<span class="w"> </span><span class="s2">"/etc/searxng/settings.yml"</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="Link 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">"s/debug : False/debug : True/g"</span><span class="w"> </span><span class="s2">"/etc/searxng/settings.yml"</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">"/etc/searxng/settings.yml"</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">"s/debug : True/debug : False/g"</span><span class="w"> </span><span class="s2">"/etc/searxng/settings.yml"</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) +> HEAD / HTTP/1.1 +> Host: 127.0.0.1:8888 +> User-Agent: curl/7.68.0 +> Accept: */* +> +* Mark bundle as not supporting multiuse +* HTTP 1.0, assume close after body +< 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul> +<li class="toctree-l3"><a class="reference internal" href="#install-packages">Install packages</a></li> +<li class="toctree-l3"><a class="reference internal" href="#create-user">Create user</a></li> +<li class="toctree-l3"><a class="reference internal" href="#install-searxng-dependencies">Install SearXNG & dependencies</a></li> +<li class="toctree-l3"><a class="reference internal" href="#configuration">Configuration</a></li> +<li class="toctree-l3"><a class="reference internal" href="#check">Check</a></li> +</ul> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/installation-uwsgi.html b/admin/installation-uwsgi.html new file mode 100644 index 000000000..033a5106d --- /dev/null +++ b/admin/installation-uwsgi.html @@ -0,0 +1,640 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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 src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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">Debian’s 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="Link 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">&</span> <span class="n">start</span> <span class="n">SearXNG</span> <span class="n">instance</span> <span class="n">create</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">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">--></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">--></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="Link 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">Debian’s 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">Debian’s uWSGI layout</a><a class="headerlink" href="#debian-s-uwsgi-layout" title="Link to this heading">¶</a></h3> +<p>Be aware, Debian’s 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">Debian’s 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 'stop', then 'start' commands + * status | shows status of daemon instance (running/not running) + +'status' command must be issued with exactly one argument: '<confname>'. + +Controlling specific instances of uWSGI +======================================= + +You could control specific instance(s) by issuing: + + SYSTEMCTL_SKIP_REDIRECT=1 service uwsgi <command> <confname> <confname>... + +where: + * <command> is one of 'start', 'stop' etc. + * <confname> 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="Link 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 --> /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 --> /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 --> /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="Link 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 & 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"># Number of workers (usually CPU count)</span> +<span class="nv">workers</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>%k +<span class="nv">threads</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</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 day</span> +static-expires<span class="w"> </span><span class="o">=</span><span class="w"> </span>/*<span class="w"> </span><span class="m">86400</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 +</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"># Number of workers (usually CPU count)</span> +<span class="nv">workers</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>%k +<span class="nv">threads</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</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 day</span> +static-expires<span class="w"> </span><span class="o">=</span><span class="w"> </span>/*<span class="w"> </span><span class="m">86400</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 +</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 & 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"># Number of workers (usually CPU count)</span> +<span class="nv">workers</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>%k +<span class="nv">threads</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">4</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 day</span> +static-expires<span class="w"> </span><span class="o">=</span><span class="w"> </span>/*<span class="w"> </span><span class="m">86400</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 +</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="Link 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 won’t 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@uWSGI</a>) the feature <a class="reference external" href="https://github.com/unbit/uwsgi/pull/752">#752@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'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 '/usr/sbin/uwsgi --ini searxng.ini' +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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul> +<li class="toctree-l3"><a class="reference internal" href="#origin-uwsgi">Origin uWSGI</a></li> +<li class="toctree-l3"><a class="reference internal" href="#distributors">Distributors</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#debian-s-uwsgi-layout">Debian’s uWSGI layout</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#uwsgi-maintenance">uWSGI maintenance</a></li> +<li class="toctree-l3"><a class="reference internal" href="#uwsgi-setup">uWSGI setup</a></li> +<li class="toctree-l3"><a class="reference internal" href="#pitfalls-of-the-tyrant-mode">Pitfalls of the Tyrant mode</a></li> +</ul> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/installation.html b/admin/installation.html new file mode 100644 index 000000000..0cd1b9243 --- /dev/null +++ b/admin/installation.html @@ -0,0 +1,154 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link to this heading">¶</a></h1> +<p><em>You’re 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, it’s 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/plugins.html b/admin/plugins.html new file mode 100644 index 000000000..206e6e499 --- /dev/null +++ b/admin/plugins.html @@ -0,0 +1,201 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 23.1%" /> +<col style="width: 7.7%" /> +<col style="width: 69.2%" /> +</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 & CSS dependencies</p> +</th> +</tr> +</thead> +<tbody> +<tr class="row-even"><th class="stub"><p>Basic Calculator</p></th> +<td><p>y</p></td> +<td><p>Calculate mathematical expressions via the search bar</p></td> +</tr> +<tr class="row-odd"><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-even"><th class="stub"><p>Hostnames plugin</p></th> +<td></td> +<td><p>Rewrite hostnames, remove results or prioritize them based on the hostname</p></td> +</tr> +<tr class="row-odd"><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-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>Unit converter plugin</p></th> +<td><p>y</p></td> +<td><p>Convert between units</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/searx.favicons.html b/admin/searx.favicons.html new file mode 100644 index 000000000..bf5794e51 --- /dev/null +++ b/admin/searx.favicons.html @@ -0,0 +1,353 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Favicons — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Limiter" href="searx.limiter.html" /> + <link rel="prev" title="Answer CAPTCHA from server’s IP" href="answer-captcha.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="searx.limiter.html" title="Limiter" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="answer-captcha.html" title="Answer CAPTCHA from server’s IP" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Favicons</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="favicons"> +<span id="id1"></span><h1>Favicons<a class="headerlink" href="#favicons" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">warning</p> +<p>Don’t activate the favicons before reading the documentation.</p> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#infrastructure" id="id3">Infrastructure</a></p></li> +<li><p><a class="reference internal" href="#setting-up-the-cache" id="id4">Setting up the cache</a></p> +<ul> +<li><p><a class="reference internal" href="#maintenance-of-the-cache" id="id5">Maintenance of the cache</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#proxy-configuration" id="id6">Proxy configuration</a></p> +<ul> +<li><p><a class="reference internal" href="#register-resolvers" id="id7">Register resolvers</a></p></li> +</ul> +</li> +</ul> +</nav> +<p>Activating the favicons in SearXNG is very easy, but this <strong>generates a +significantly higher load</strong> in the client/server communication and increases +resources needed on the server.</p> +<p>To mitigate these disadvantages, various methods have been implemented, +including a <em>cache</em>. The cache must be parameterized according to your own +requirements and maintained regularly.</p> +<p>To activate favicons in SearXNG’s result list, set a default +<code class="docutils literal notranslate"><span class="pre">favicon_resolver</span></code> in the <a class="reference internal" href="settings/settings_search.html#settings-search"><span class="std std-ref">search</span></a> settings:</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">favicon_resolver</span><span class="p">:</span><span class="w"> </span><span class="s">"duckduckgo"</span> +</pre></div> +</div> +<p>By default and without any extensions, SearXNG serves these resolvers:</p> +<ul class="simple"> +<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">allesedv</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">yandex</span></code></p></li> +</ul> +<p>With the above setting favicons are displayed, the user has the option to +deactivate this feature in his settings. If the user is to have the option of +selecting from several <em>resolvers</em>, a further setting is required / but this +setting will be discussed <a class="reference internal" href="#register-resolvers"><span class="std std-ref">later</span></a> in this article, +first we have to setup the favicons cache.</p> +<section id="infrastructure"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Infrastructure</a><a class="headerlink" href="#infrastructure" title="Link to this heading">¶</a></h2> +<p>The infrastructure for providing the favicons essentially consists of three +parts:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../src/searx.favicons.html#module-searx.favicons.proxy" title="searx.favicons.proxy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Favicons-Proxy</span></code></a> (aka <em>proxy</em>)</p></li> +<li><p><a class="reference internal" href="../src/searx.favicons.html#module-searx.favicons.resolvers" title="searx.favicons.resolvers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Favicons-Resolvers</span></code></a> (aka <em>resolver</em>)</p></li> +<li><p><a class="reference internal" href="../src/searx.favicons.html#module-searx.favicons.cache" title="searx.favicons.cache"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Favicons-Cache</span></code></a> (aka <em>cache</em>)</p></li> +</ul> +<p>To protect the privacy of users, the favicons are provided via a <em>proxy</em>. This +<em>proxy</em> is automatically activated with the above activation of a <em>resolver</em>. +Additional requests are required to provide the favicons: firstly, the <em>proxy</em> +must process the incoming requests and secondly, the <em>resolver</em> must make +outgoing requests to obtain the favicons from external sources.</p> +<p>A <em>cache</em> has been developed to massively reduce both, incoming and outgoing +requests. This <em>cache</em> is also activated automatically with the above +activation of a <em>resolver</em>. In its defaults, however, the <em>cache</em> is minimal +and not well suitable for a production environment!</p> +</section> +<section id="setting-up-the-cache"> +<span id="favicon-cache-setup"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Setting up the cache</a><a class="headerlink" href="#setting-up-the-cache" title="Link to this heading">¶</a></h2> +<p>To parameterize the <em>cache</em> and more settings of the favicons infrastructure, a +<a class="reference external" href="https://toml.io/en/">TOML</a> configuration is created in the file <code class="docutils literal notranslate"><span class="pre">/etc/searxng/favicons.toml</span></code>.</p> +<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[favicons]</span> + +<span class="n">cfg_schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="c1"># config's schema version no.</span> + +<span class="k">[favicons.cache]</span> + +<span class="n">db_url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"/var/cache/searxng/faviconcache.db"</span><span class="w"> </span><span class="c1"># default: "/tmp/faviconcache.db"</span> +<span class="n">LIMIT_TOTAL_BYTES</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2147483648</span><span class="w"> </span><span class="c1"># 2 GB / default: 50 MB</span> +<span class="c1"># HOLD_TIME = 5184000 # 60 days / default: 30 days</span> +<span class="c1"># BLOB_MAX_BYTES = 40960 # 40 KB / default 20 KB</span> +<span class="c1"># MAINTENANCE_MODE = "off" # default: "auto"</span> +<span class="c1"># MAINTENANCE_PERIOD = 600 # 10min / default: 1h</span> +</pre></div> +</div> +<dl> +<dt><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.config.FaviconConfig.cfg_schema" title="searx.favicons.config.FaviconConfig.cfg_schema"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cfg_schema</span></code></a>:</dt><dd><p>Is required to trigger any processes required for future upgrades / don’t +change it.</p> +</dd> +<dt><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.cache.FaviconCacheConfig.db_url" title="searx.favicons.cache.FaviconCacheConfig.db_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cache.db_url</span></code></a>:</dt><dd><p>The path to the (<a class="reference external" href="https://www.sqlite.org/">SQLite</a>) database file. The default path is in the <a class="reference external" href="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s18.html">/tmp</a> +folder, which is deleted on every reboot and is therefore unsuitable for a +production environment. The <a class="reference external" href="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html">FHS</a> provides the folder for the +application cache</p> +<p>The <a class="reference external" href="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html">FHS</a> provides the folder <a class="reference external" href="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s05.html">/var/cache</a> for the cache of applications, so a +suitable storage location of SearXNG’s caches is folder <code class="docutils literal notranslate"><span class="pre">/var/cache/searxng</span></code>. +In container systems, a volume should be mounted for this folder and in a +standard installation (compare <a class="reference internal" href="installation-searxng.html#create-searxng-user"><span class="std std-ref">Create user</span></a>), the folder must be +created and the user under which the SearXNG process is running must be given +write permission to this folder.</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>mkdir<span class="w"> </span>/var/cache/searxng +$<span class="w"> </span>sudo<span class="w"> </span>chown<span class="w"> </span>root:searxng<span class="w"> </span>/var/cache/searxng/ +$<span class="w"> </span>sudo<span class="w"> </span>chmod<span class="w"> </span>g+w<span class="w"> </span>/var/cache/searxng/ +</pre></div> +</div> +</dd> +<dt><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.cache.FaviconCacheConfig.LIMIT_TOTAL_BYTES" title="searx.favicons.cache.FaviconCacheConfig.LIMIT_TOTAL_BYTES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cache.LIMIT_TOTAL_BYTES</span></code></a>:</dt><dd><p>Maximum of bytes stored in the cache of all blobs. The limit is only reached +at each maintenance interval after which the oldest BLOBs are deleted; the +limit is exceeded during the maintenance period.</p> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>If the maintenance period is too long or maintenance is switched +off completely, the cache grows uncontrollably.</p> +</div> +</dd> +</dl> +<p>SearXNG hosters can change other parameters of the cache as required:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.cache.FaviconCacheConfig.HOLD_TIME" title="searx.favicons.cache.FaviconCacheConfig.HOLD_TIME"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cache.HOLD_TIME</span></code></a></p></li> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.cache.FaviconCacheConfig.BLOB_MAX_BYTES" title="searx.favicons.cache.FaviconCacheConfig.BLOB_MAX_BYTES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cache.BLOB_MAX_BYTES</span></code></a></p></li> +</ul> +<section id="maintenance-of-the-cache"> +<h3><a class="toc-backref" href="#id5" role="doc-backlink">Maintenance of the cache</a><a class="headerlink" href="#maintenance-of-the-cache" title="Link to this heading">¶</a></h3> +<p>Regular maintenance of the cache is required! By default, regular maintenance +is triggered automatically as part of the client requests:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.cache.FaviconCacheConfig.MAINTENANCE_MODE" title="searx.favicons.cache.FaviconCacheConfig.MAINTENANCE_MODE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cache.MAINTENANCE_MODE</span></code></a> (default <code class="docutils literal notranslate"><span class="pre">auto</span></code>)</p></li> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.cache.FaviconCacheConfig.MAINTENANCE_PERIOD" title="searx.favicons.cache.FaviconCacheConfig.MAINTENANCE_PERIOD"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cache.MAINTENANCE_PERIOD</span></code></a> (default <code class="docutils literal notranslate"><span class="pre">6000</span></code> / 1h)</p></li> +</ul> +<p>As an alternative to maintenance as part of the client request process, it is +also possible to carry out maintenance using an external process. For example, +by creating a <a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=crontab">crontab</a> entry for maintenance:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>python<span class="w"> </span>-m<span class="w"> </span>searx.favicons<span class="w"> </span>cache<span class="w"> </span>maintenance +</pre></div> +</div> +<p>The following command can be used to display the state of the cache:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>python<span class="w"> </span>-m<span class="w"> </span>searx.favicons<span class="w"> </span>cache<span class="w"> </span>state +</pre></div> +</div> +</section> +</section> +<section id="proxy-configuration"> +<span id="favicon-proxy-setup"></span><h2><a class="toc-backref" href="#id6" role="doc-backlink">Proxy configuration</a><a class="headerlink" href="#proxy-configuration" title="Link to this heading">¶</a></h2> +<p>Most of the options of the <a class="reference internal" href="../src/searx.favicons.html#module-searx.favicons.proxy" title="searx.favicons.proxy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Favicons-Proxy</span></code></a> are +already set sensibly with settings from the <a class="reference internal" href="settings/index.html#searxng-settings-yml"><span class="std std-ref">settings.yml</span></a> and should not normally be adjusted.</p> +<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[favicons.proxy]</span> + +<span class="n">max_age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">5184000</span><span class="w"> </span><span class="c1"># 60 days / default: 7 days (604800 sec)</span> +</pre></div> +</div> +<dl class="simple"> +<dt><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.proxy.FaviconProxyConfig.max_age" title="searx.favicons.proxy.FaviconProxyConfig.max_age"><code class="xref py py-obj docutils literal notranslate"><span class="pre">max_age</span></code></a>:</dt><dd><p>The <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#response_directives">HTTP Cache-Control max-age</a> response directive indicates that the +response remains fresh until N seconds after the response is generated. This +setting therefore determines how long a favicon remains in the client’s cache. +As a rule, in the favicons infrastructure of SearXNG’s this setting only +affects favicons whose byte size exceeds <a class="reference internal" href="#favicon-cache-setup"><span class="std std-ref">BLOB_MAX_BYTES</span></a> (the other favicons that are already in the cache are embedded as +<a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs">data URL</a> in the <a class="reference internal" href="../src/searx.favicons.html#searx.favicons.proxy.favicon_url" title="searx.favicons.proxy.favicon_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">generated</span> <span class="pre">HTML</span></code></a>, +which can greatly reduce the number of additional requests).</p> +</dd> +</dl> +<section id="register-resolvers"> +<span id="id2"></span><h3><a class="toc-backref" href="#id7" role="doc-backlink">Register resolvers</a><a class="headerlink" href="#register-resolvers" title="Link to this heading">¶</a></h3> +<p>A <code class="xref py py-obj docutils literal notranslate"><span class="pre">resolver</span></code> is a function that obtains the favicon +from an external source. The resolver functions available to the user are +registered with their fully qualified name (<a class="reference external" href="https://en.wikipedia.org/wiki/Fully_qualified_name">FQN</a>) in a <code class="docutils literal notranslate"><span class="pre">resolver_map</span></code>.</p> +<p>If no <code class="docutils literal notranslate"><span class="pre">resolver_map</span></code> is defined in the <code class="docutils literal notranslate"><span class="pre">favicon.toml</span></code>, the favicon +infrastructure of SearXNG generates this <code class="docutils literal notranslate"><span class="pre">resolver_map</span></code> automatically +depending on the <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>. SearXNG would automatically generate the +following TOML configuration from the following YAML configuration:</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">favicon_resolver</span><span class="p">:</span><span class="w"> </span><span class="s">"duckduckgo"</span> +</pre></div> +</div> +<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[favicons.proxy.resolver_map]</span> + +<span class="s2">"duckduckgo"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"searx.favicons.resolvers.duckduckgo"</span> +</pre></div> +</div> +<p>If this automatism is not desired, then (and only then) a separate +<code class="docutils literal notranslate"><span class="pre">resolver_map</span></code> must be created. For example, to give the user two resolvers to +choose from, the following configuration could be used:</p> +<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[favicons.proxy.resolver_map]</span> + +<span class="s2">"duckduckgo"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"searx.favicons.resolvers.duckduckgo"</span> +<span class="s2">"allesedv"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"searx.favicons.resolvers.allesedv"</span> +<span class="c1"># "google" = "searx.favicons.resolvers.google"</span> +<span class="c1"># "yandex" = "searx.favicons.resolvers.yandex"</span> +</pre></div> +</div> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>With each resolver, the resource requirement increases significantly.</p> +</div> +<p>The number of resolvers increases:</p> +<ul class="simple"> +<li><p>the number of incoming/outgoing requests and</p></li> +<li><p>the number of favicons to be stored in the cache.</p></li> +</ul> +<p>In the following we list the resolvers available in the core of SearXNG, but via +the <a class="reference external" href="https://en.wikipedia.org/wiki/Fully_qualified_name">FQN</a> it is also possible to implement your own resolvers and integrate them +into the <em>proxy</em>:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.resolvers.duckduckgo" title="searx.favicons.resolvers.duckduckgo"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.favicons.resolvers.duckduckgo</span></code></a></p></li> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.resolvers.allesedv" title="searx.favicons.resolvers.allesedv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.favicons.resolvers.allesedv</span></code></a></p></li> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.resolvers.google" title="searx.favicons.resolvers.google"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.favicons.resolvers.google</span></code></a></p></li> +<li><p><a class="reference internal" href="../src/searx.favicons.html#searx.favicons.resolvers.yandex" title="searx.favicons.resolvers.yandex"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.favicons.resolvers.yandex</span></code></a></p></li> +</ul> +</section> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Favicons</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#infrastructure">Infrastructure</a></li> +<li class="toctree-l3"><a class="reference internal" href="#setting-up-the-cache">Setting up the cache</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#maintenance-of-the-cache">Maintenance of the cache</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#proxy-configuration">Proxy configuration</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#register-resolvers">Register resolvers</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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="answer-captcha.html" title="previous chapter">Answer CAPTCHA from server’s IP</a> + <li>Next: <a href="searx.limiter.html" title="next chapter">Limiter</a></ul> + </li> + </ul> + </li> +</ul> +<search 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> +</search> +<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/searx.favicons.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/searx.limiter.html b/admin/searx.limiter.html new file mode 100644 index 000000000..18739b37a --- /dev/null +++ b/admin/searx.limiter.html @@ -0,0 +1,296 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Limiter — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></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="Favicons" href="searx.favicons.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="searx.favicons.html" title="Favicons" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Limiter</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="limiter"> +<span id="id1"></span><h1>Limiter<a class="headerlink" href="#limiter" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<p>The limiter requires a <a class="reference internal" href="settings/settings_redis.html#settings-redis"><span class="std std-ref">Redis</span></a> database.</p> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#enable-limiter" id="id3">Enable Limiter</a></p></li> +<li><p><a class="reference internal" href="#configure-limiter" id="id4">Configure Limiter</a></p></li> +<li><p><a class="reference internal" href="#limiter-toml" id="id5"><code class="docutils literal notranslate"><span class="pre">limiter.toml</span></code></a></p></li> +<li><p><a class="reference internal" href="#implementation" id="id6">Implementation</a></p></li> +</ul> +</nav> +<p id="module-searx.limiter">Bot protection / IP rate limitation. The intention of rate limitation is to +limit suspicious requests from an IP. The motivation behind this is the fact +that SearXNG passes through requests from bots and is thus classified as a bot +itself. As a result, the SearXNG engine then receives a CAPTCHA or is blocked +by the search engine (the origin) in some other way.</p> +<p>To avoid blocking, the requests from bots to SearXNG must also be blocked, this +is the task of the limiter. To perform this task, the limiter uses the methods +from the <a class="reference internal" href="../src/searx.botdetection.html#botdetection"><span class="std std-ref">Bot Detection</span></a>:</p> +<ul class="simple"> +<li><p>Analysis of the HTTP header in the request / <a class="reference internal" href="../src/searx.botdetection.html#botdetection-probe-headers"><span class="std std-ref">Probe HTTP headers</span></a> +can be easily bypassed.</p></li> +<li><p>Block and pass lists in which IPs are listed / <a class="reference internal" href="../src/searx.botdetection.html#botdetection-ip-lists"><span class="std std-ref">IP lists</span></a> +are hard to maintain, since the IPs of bots are not all known and change over +the time.</p></li> +<li><p>Detection & dynamically <a class="reference internal" href="../src/searx.botdetection.html#botdetection-rate-limit"><span class="std std-ref">Rate limit</span></a> of bots based on the +behavior of the requests. For dynamically changeable IP lists a Redis +database is needed.</p></li> +</ul> +<p>The prerequisite for IP based methods is the correct determination of the IP of +the client. The IP of the client is determined via the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For">X-Forwarded-For</a> HTTP +header.</p> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>A correct setup of the HTTP request headers <code class="docutils literal notranslate"><span class="pre">X-Forwarded-For</span></code> and +<code class="docutils literal notranslate"><span class="pre">X-Real-IP</span></code> is essential to be able to assign a request to an IP correctly:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://docs.searxng.org/admin/installation-nginx.html#nginx-s-searxng-site">NGINX RequestHeader</a></p></li> +<li><p><a class="reference external" href="https://docs.searxng.org/admin/installation-apache.html#apache-s-searxng-site">Apache RequestHeader</a></p></li> +</ul> +</div> +<section id="enable-limiter"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Enable Limiter</a><a class="headerlink" href="#enable-limiter" title="Link to this heading">¶</a></h2> +<p>To enable the limiter activate:</p> +<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="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">limiter</span><span class="p p-Indicator">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"> </span><span class="c1"># rate limit the number of request on the instance, block some bots</span> +</pre></div> +</div> +<p>and set the redis-url connection. Check the value, it depends on your redis DB +(see <a class="reference internal" href="settings/settings_redis.html#settings-redis"><span class="std std-ref">redis:</span></a>), by example:</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> +</section> +<section id="configure-limiter"> +<h2><a class="toc-backref" href="#id4" role="doc-backlink">Configure Limiter</a><a class="headerlink" href="#configure-limiter" title="Link to this heading">¶</a></h2> +<p>The methods of <a class="reference internal" href="../src/searx.botdetection.html#botdetection"><span class="std std-ref">Bot Detection</span></a> the limiter uses are configured in a local +file <code class="docutils literal notranslate"><span class="pre">/etc/searxng/limiter.toml</span></code>. The defaults are shown in <a class="reference internal" href="#limiter-toml">limiter.toml</a> / +Don’t copy all values to your local configuration, just enable what you need by +overwriting the defaults. For instance to activate the <code class="docutils literal notranslate"><span class="pre">link_token</span></code> method in +the <a class="reference internal" href="../src/searx.botdetection.html#botdetection-ip-limit"><span class="std std-ref">Method ip_limit</span></a> you only need to set this option to <code class="docutils literal notranslate"><span class="pre">true</span></code>:</p> +<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="k">[botdetection.ip_limit]</span> +<span class="n">link_token</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span> +</pre></div> +</div> +</section> +<section id="limiter-toml"> +<span id="id2"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">limiter.toml</span></code></a><a class="headerlink" href="#limiter-toml" title="Link to this heading">¶</a></h2> +<p>In this file the limiter finds the configuration of the <a class="reference internal" href="../src/searx.botdetection.html#botdetection"><span class="std std-ref">Bot Detection</span></a>:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../src/searx.botdetection.html#botdetection-ip-lists"><span class="std std-ref">IP lists</span></a></p></li> +<li><p><a class="reference internal" href="../src/searx.botdetection.html#botdetection-rate-limit"><span class="std std-ref">Rate limit</span></a></p></li> +<li><p><a class="reference internal" href="../src/searx.botdetection.html#botdetection-probe-headers"><span class="std std-ref">Probe HTTP headers</span></a></p></li> +</ul> +<div class="code toml highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">real_ip</span><span class="p">]</span> + +<span class="c1"># Number of values to trust for X-Forwarded-For.</span> + +<span class="n">x_for</span> <span class="o">=</span> <span class="mi">1</span> + +<span class="c1"># The prefix defines the number of leading bits in an address that are compared</span> +<span class="c1"># to determine whether or not an address is part of a (client) network.</span> + +<span class="n">ipv4_prefix</span> <span class="o">=</span> <span class="mi">32</span> +<span class="n">ipv6_prefix</span> <span class="o">=</span> <span class="mi">48</span> + +<span class="p">[</span><span class="n">botdetection</span><span class="o">.</span><span class="n">ip_limit</span><span class="p">]</span> + +<span class="c1"># To get unlimited access in a local network, by default link-local addresses</span> +<span class="c1"># (networks) are not monitored by the ip_limit</span> +<span class="n">filter_link_local</span> <span class="o">=</span> <span class="n">false</span> + +<span class="c1"># activate link_token method in the ip_limit method</span> +<span class="n">link_token</span> <span class="o">=</span> <span class="n">false</span> + +<span class="p">[</span><span class="n">botdetection</span><span class="o">.</span><span class="n">ip_lists</span><span class="p">]</span> + +<span class="c1"># In the limiter, the ip_lists method has priority over all other methods -> if</span> +<span class="c1"># an IP is in the pass_ip list, it has unrestricted access and it is also not</span> +<span class="c1"># checked if e.g. the "user agent" suggests a bot (e.g. curl).</span> + +<span class="n">block_ip</span> <span class="o">=</span> <span class="p">[</span> + <span class="c1"># '93.184.216.34', # IPv4 of example.org</span> + <span class="c1"># '257.1.1.1', # invalid IP --> will be ignored, logged in ERROR class</span> +<span class="p">]</span> + +<span class="n">pass_ip</span> <span class="o">=</span> <span class="p">[</span> + <span class="c1"># '192.168.0.0/16', # IPv4 private network</span> + <span class="c1"># 'fe80::/10' # IPv6 linklocal / wins over botdetection.ip_limit.filter_link_local</span> +<span class="p">]</span> + +<span class="c1"># Activate passlist of (hardcoded) IPs from the SearXNG organization,</span> +<span class="c1"># e.g. `check.searx.space`.</span> +<span class="n">pass_searxng_org</span> <span class="o">=</span> <span class="n">true</span> +</pre></div> +</div> +</section> +<section id="implementation"> +<h2><a class="toc-backref" href="#id6" role="doc-backlink">Implementation</a><a class="headerlink" href="#implementation" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.limiter.initialize"> +<span class="sig-prename descclassname"><span class="pre">searx.limiter.</span></span><span class="sig-name descname"><span class="pre">initialize</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">app</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Flask" title="(in Flask v3.1.x)"><span class="pre">Flask</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">settings</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/limiter.html#initialize"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.limiter.initialize" title="Link to this definition">¶</a></dt> +<dd><p>Install the limiter</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.limiter.is_installed"> +<span class="sig-prename descclassname"><span class="pre">searx.limiter.</span></span><span class="sig-name descname"><span class="pre">is_installed</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/limiter.html#is_installed"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.limiter.is_installed" title="Link to this definition">¶</a></dt> +<dd><p>Returns <code class="docutils literal notranslate"><span class="pre">True</span></code> if limiter is active and a redis DB is available.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.limiter.pre_request"> +<span class="sig-prename descclassname"><span class="pre">searx.limiter.</span></span><span class="sig-name descname"><span class="pre">pre_request</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/searx/limiter.html#pre_request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.limiter.pre_request" title="Link to this definition">¶</a></dt> +<dd><p>See <a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Flask.before_request" title="(in Flask v3.1.x)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flask.Flask.before_request</span></code></a></p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.limiter.LIMITER_CFG_SCHEMA"> +<span class="sig-prename descclassname"><span class="pre">searx.limiter.</span></span><span class="sig-name descname"><span class="pre">LIMITER_CFG_SCHEMA</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">PosixPath('/home/runner/work/searxng/searxng/searx/limiter.toml')</span></em><a class="headerlink" href="#searx.limiter.LIMITER_CFG_SCHEMA" title="Link to this definition">¶</a></dt> +<dd><p>Base configuration (schema) of the botdetection.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Limiter</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#enable-limiter">Enable Limiter</a></li> +<li class="toctree-l3"><a class="reference internal" href="#configure-limiter">Configure Limiter</a></li> +<li class="toctree-l3"><a class="reference internal" href="#limiter-toml"><code class="docutils literal notranslate"><span class="pre">limiter.toml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#implementation">Implementation</a></li> +<li class="toctree-l3"><a class="reference internal" href="#searx.limiter.initialize"><code class="docutils literal notranslate"><span class="pre">initialize()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#searx.limiter.is_installed"><code class="docutils literal notranslate"><span class="pre">is_installed()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#searx.limiter.pre_request"><code class="docutils literal notranslate"><span class="pre">pre_request()</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#searx.limiter.LIMITER_CFG_SCHEMA"><code class="docutils literal notranslate"><span class="pre">LIMITER_CFG_SCHEMA</span></code></a></li> +</ul> +</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="searx.favicons.html" title="previous chapter">Favicons</a> + <li>Next: <a href="api.html" title="next chapter">Administration API</a></ul> + </li> + </ul> + </li> +</ul> +<search 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> +</search> +<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/searx.limiter.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/index.html b/admin/settings/index.html new file mode 100644 index 000000000..319fff521 --- /dev/null +++ b/admin/settings/index.html @@ -0,0 +1,183 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Administrator documentation</a> »</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"> +<span id="searxng-settings-yml"></span><h1>Settings<a class="headerlink" href="#settings" title="Link 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings.html b/admin/settings/settings.html new file mode 100644 index 000000000..cde25947e --- /dev/null +++ b/admin/settings/settings.html @@ -0,0 +1,261 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link to this heading">¶</a></h1> +<p>This page describe the options possibilities of the <a class="extlink-origin 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="Link 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 don’t exist (or are empty or can’t be read), SearXNG uses the +<a class="extlink-origin 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="Link 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="extlink-origin 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="extlink-origin 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="extlink-origin 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">"ultrasecretkey"</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">"0.0.0.0"</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">"ultrasecretkey"</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">'$ecretValue'</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 doesn’t 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">"ultrasecretkey"</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">'$ecretValue'</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">"ultrasecretkey"</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">'$ecretValue'</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">'$ecretValue'</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a><ul> +<li class="toctree-l4"><a class="reference internal" href="#settings-yml-location">settings.yml location</a></li> +<li class="toctree-l4"><a class="reference internal" href="#use-default-settings">use_default_settings</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_brand.html b/admin/settings/settings_brand.html new file mode 100644 index 000000000..d206a2db8 --- /dev/null +++ b/admin/settings/settings_brand.html @@ -0,0 +1,172 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_categories_as_tabs.html b/admin/settings/settings_categories_as_tabs.html new file mode 100644 index 000000000..c1be19877 --- /dev/null +++ b/admin/settings/settings_categories_as_tabs.html @@ -0,0 +1,177 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">categories_as_tabs:</span></code></a></li> +</ul> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_engine.html b/admin/settings/settings_engine.html new file mode 100644 index 000000000..914e99b12 --- /dev/null +++ b/admin/settings/settings_engine.html @@ -0,0 +1,359 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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">'https://{language}.example.com/'</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">'apikey'</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">'my-secret-token'</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 'outgoing:'</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 & 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="Link 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">'my-secret-token'</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 them. 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 one’s 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="Link 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">"de"</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a><ul> +<li class="toctree-l4"><a class="reference internal" href="#private-engines-tokens">Private Engines (<code class="docutils literal notranslate"><span class="pre">tokens</span></code>)</a></li> +<li class="toctree-l4"><a class="reference internal" href="#example-multilingual-search">Example: Multilingual Search</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_general.html b/admin/settings/settings_general.html new file mode 100644 index 000000000..ebe8c489c --- /dev/null +++ b/admin/settings/settings_general.html @@ -0,0 +1,187 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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">"SearXNG"</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> +<span class="w"> </span><span class="nt">open_metrics</span><span class="p">:</span><span class="w"> </span><span class="s">''</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> +<dt><code class="docutils literal notranslate"><span class="pre">open_metrics</span></code>:</dt><dd><p>Disabled by default. Set to a secret password to expose an +<a class="reference external" href="https://github.com/prometheus/OpenMetrics">OpenMetrics API</a> at <code class="docutils literal notranslate"><span class="pre">/metrics</span></code>, +e.g. for usage with Prometheus. The <code class="docutils literal notranslate"><span class="pre">/metrics</span></code> endpoint is using HTTP Basic Auth, +where the password is the value of <code class="docutils literal notranslate"><span class="pre">open_metrics</span></code> set above. The username used for +Basic Auth can be randomly chosen as only the password is being validated.</p> +</dd> +</dl> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_outgoing.html b/admin/settings/settings_outgoing.html new file mode 100644 index 000000000..49e91e19a --- /dev/null +++ b/admin/settings/settings_outgoing.html @@ -0,0 +1,245 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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">""</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_redis.html b/admin/settings/settings_redis.html new file mode 100644 index 000000000..f14eea595 --- /dev/null +++ b/admin/settings/settings_redis.html @@ -0,0 +1,193 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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 SearXNG. When using +sockets, don’t 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> & <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="Link 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">"</span><span class="si">${</span><span class="nv">USER</span><span class="si">}</span><span class="s2">"</span> +<span class="c1"># don't forget to logout & 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a><ul> +<li class="toctree-l4"><a class="reference internal" href="#redis-developer-notes">Redis Developer Notes</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_search.html b/admin/settings/settings_search.html new file mode 100644 index 000000000..473912e4a --- /dev/null +++ b/admin/settings/settings_search.html @@ -0,0 +1,249 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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">""</span> +<span class="w"> </span><span class="nt">favicon_resolver</span><span class="p">:</span><span class="w"> </span><span class="s">""</span> +<span class="w"> </span><span class="nt">default_lang</span><span class="p">:</span><span class="w"> </span><span class="s">""</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">mwmbl</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">favicon_resolver</span></code>:</dt><dd><p>To activate favicons in SearXNG’s result list select a default +favicon-resolver, leave blank to turn off the feature. Don’t activate the +favicons before reading the <a class="reference internal" href="../searx.favicons.html#favicons"><span class="std std-ref">Favicons documentation</span></a>.</p> +</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="extlink-origin 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="extlink-origin 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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_server.html b/admin/settings/settings_server.html new file mode 100644 index 000000000..841569372 --- /dev/null +++ b/admin/settings/settings_server.html @@ -0,0 +1,200 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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">"127.0.0.1"</span> +<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">"ultrasecretkey"</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">public_instance</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-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></span></dt><dd><p>The base URL where SearXNG is deployed. Used to create correct inbound links.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">port</span></code> & <code class="docutils literal notranslate"><span class="pre">bind_address</span></code>: <code class="docutils literal notranslate"><span class="pre">$SEARXNG_PORT</span></code> & <code class="docutils literal notranslate"><span class="pre">$SEARXNG_BIND_ADDRESS</span></code></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>. Doesn’t apply to a SearXNG +services running behind a proxy and using socket communications.</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> +<dt><code class="docutils literal notranslate"><span class="pre">limiter</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SEARXNG_LIMITER</span></code></span></dt><dd><p>Rate limit the number of request on the instance, block some bots. The +<a class="reference internal" href="../searx.limiter.html#limiter"><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> +<p id="public-instance"><code class="docutils literal notranslate"><span class="pre">public_instance</span></code> : <code class="docutils literal notranslate"><span class="pre">$SEARXNG_PUBLIC_INSTANCE</span></code></p> +<blockquote> +<div><p>Setting that allows to enable features specifically for public instances (not +needed for local usage). By set to <code class="docutils literal notranslate"><span class="pre">true</span></code> the following features are +activated:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../../src/searx.botdetection.html#module-searx.botdetection.link_token" title="searx.botdetection.link_token"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.botdetection.link_token</span></code></a> in the <a class="reference internal" href="../searx.limiter.html#limiter"><span class="std std-ref">Limiter</span></a></p></li> +</ul> +</div></blockquote> +<dl id="image-proxy"> +<dt><code class="docutils literal notranslate"><span class="pre">image_proxy</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SEARXNG_IMAGE_PROXY</span></code></span></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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_ui.html"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/settings/settings_ui.html b/admin/settings/settings_ui.html new file mode 100644 index 000000000..8b06783ed --- /dev/null +++ b/admin/settings/settings_ui.html @@ -0,0 +1,209 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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: — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../../_static/documentation_options.js?v=ef740023"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../../_static/describe_version.js?v=fa7f30d0"></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"> + <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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Administrator documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Settings</a> »</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="Link 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">""</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> +<span class="w"> </span><span class="nt">search_on_category_select</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">hotkeys</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">default</span> +<span class="w"> </span><span class="nt">url_formatting</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">pretty</span> +</pre></div> +</div> +<dl id="static-use-hash"> +<dt><code class="docutils literal notranslate"><span class="pre">static_use_hash</span></code><span class="classifier"><code class="docutils literal notranslate"><span class="pre">$SEARXNG_STATIC_USE_HASH</span></code></span></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 doesn’t 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 page’s 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="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/static/themes/simple/src/less/definitions.less">min-width: @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, don’t forget 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>, <code class="docutils literal notranslate"><span class="pre">black</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> +<dt><code class="docutils literal notranslate"><span class="pre">search_on_category_select</span></code>:</dt><dd><p>Perform search immediately if a category selected. Disable to select multiple categories.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">hotkeys</span></code>:</dt><dd><p>Hotkeys to use in the search interface: <code class="docutils literal notranslate"><span class="pre">default</span></code>, <code class="docutils literal notranslate"><span class="pre">vim</span></code> (Vim-like).</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">url_formatting</span></code>:</dt><dd><p>Formatting type to use for result URLs: <code class="docutils literal notranslate"><span class="pre">pretty</span></code>, <code class="docutils literal notranslate"><span class="pre">full</span></code> or <code class="docutils literal notranslate"><span class="pre">host</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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_engine.html"><code class="docutils literal notranslate"><span class="pre">engine:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_brand.html"><code class="docutils literal notranslate"><span class="pre">brand:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_general.html"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_search.html"><code class="docutils literal notranslate"><span class="pre">search:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_server.html"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">ui:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_redis.html"><code class="docutils literal notranslate"><span class="pre">redis:</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="settings_outgoing.html"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></li> +<li class="toctree-l3"><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> +</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 server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searx.limiter.html">Limiter</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> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/admin/update-searxng.html b/admin/update-searxng.html new file mode 100644 index 000000000..804164dc8 --- /dev/null +++ b/admin/update-searxng.html @@ -0,0 +1,273 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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 — SearXNG Documentation (2025.1.6+6dab7fe78)</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" /> + <script src="../_static/documentation_options.js?v=ef740023"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.6+6dab7fe78" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Answer CAPTCHA from server’s IP" href="answer-captcha.html" /> + <link rel="prev" title="Apache" href="installation-apache.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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 server’s 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 (2025.1.6+6dab7fe78)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> »</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="Link 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 & 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="Link 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 & debug</a><a class="headerlink" href="#how-to-inspect-debug" title="Link 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="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-pull reference external" href="https://github.com/searxng/searxng/pull/1332">PR 1332</a></p></li> +<li><p><a class="extlink-pull reference external" href="https://github.com/searxng/searxng/pull/456">PR 456</a></p></li> +<li><p><a class="extlink-pull 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 SearXNG’s <a class="reference internal" href="searx.limiter.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 bandwidth <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="extlink-pull 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="Link 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 & 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="extlink-pull reference external" href="https://github.com/searxng/searxng/pull/1332">PR 1332</a> has been merged and you +have filtron and/or morty installed, don’t 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="Link 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 'searx' does not exists +INFO: [OK] (old) account 'filtron' does not exists +INFO: [OK] (old) account 'morty' does not exists +... +INFO searx.redisdb : connecting to Redis db=0 path='/usr/local/searxng-redis/run/redis.sock' +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"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </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><ul> +<li class="toctree-l3"><a class="reference internal" href="#how-to-update">How to update</a></li> +<li class="toctree-l3"><a class="reference internal" href="#how-to-inspect-debug">How to inspect & debug</a></li> +<li class="toctree-l3"><a class="reference internal" href="#migrate-and-stay-tuned">Migrate and stay tuned!</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#remove-obsolete-services">remove obsolete services</a></li> +<li class="toctree-l4"><a class="reference internal" href="#check-after-installation">Check after Installation</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="answer-captcha.html">Answer CAPTCHA from server’s IP</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.favicons.html">Favicons</a></li> +<li class="toctree-l2"><a class="reference internal" href="searx.limiter.html">Limiter</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 server’s IP</a></ul> + </li> + </ul> + </li> +</ul> +<search 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> +</search> +<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"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file |