settings.html 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>settings.yml &#8212; Searx Documentation (Searx-1.1.0.tex)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
  10. <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
  11. <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
  12. <script src="../_static/jquery.js"></script>
  13. <script src="../_static/underscore.js"></script>
  14. <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
  15. <script src="../_static/doctools.js"></script>
  16. <script src="../_static/sphinx_highlight.js"></script>
  17. <link rel="index" title="Index" href="../genindex.html" />
  18. <link rel="search" title="Search" href="../search.html" />
  19. <link rel="next" title="Administration API" href="api.html" />
  20. <link rel="prev" title="How to update" href="update-searx.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="../genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="../py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="api.html" title="Administration API"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="update-searx.html" title="How to update"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.1.0.tex)</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
  39. <li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
  40. </ul>
  41. </div>
  42. <div class="document">
  43. <div class="documentwrapper">
  44. <div class="bodywrapper">
  45. <div class="body" role="main">
  46. <section id="settings-yml">
  47. <span id="id1"></span><h1><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code><a class="headerlink" href="#settings-yml" title="Permalink to this heading">¶</a></h1>
  48. <p>This page describe the options possibilities of the <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">Origin: searx/settings.yml</a>
  49. file.</p>
  50. <aside class="sidebar">
  51. <p class="sidebar-title">Further reading ..</p>
  52. <ul class="simple">
  53. <li><p><a class="reference internal" href="installation-searx.html#use-default-settings-yml"><span class="std std-ref">Configuration</span></a></p></li>
  54. <li><p><a class="reference internal" href="../dev/search_api.html#search-api"><span class="std std-ref">Search API</span></a></p></li>
  55. </ul>
  56. </aside>
  57. <nav class="contents local" id="contents">
  58. <p class="topic-title">Contents</p>
  59. <ul class="simple">
  60. <li><p><a class="reference internal" href="#settings-yml-location" id="id2">settings.yml location</a></p></li>
  61. <li><p><a class="reference internal" href="#global-settings" id="id3">Global Settings</a></p>
  62. <ul>
  63. <li><p><a class="reference internal" href="#general" id="id4"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a></p></li>
  64. <li><p><a class="reference internal" href="#server" id="id5"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a></p></li>
  65. <li><p><a class="reference internal" href="#outgoing" id="id6"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a></p></li>
  66. <li><p><a class="reference internal" href="#locales" id="id7"><code class="docutils literal notranslate"><span class="pre">locales:</span></code></a></p></li>
  67. </ul>
  68. </li>
  69. <li><p><a class="reference internal" href="#engine-settings" id="id8">Engine settings</a></p></li>
  70. <li><p><a class="reference internal" href="#use-default-settings" id="id9">use_default_settings</a></p></li>
  71. </ul>
  72. </nav>
  73. <section id="settings-yml-location">
  74. <span id="settings-location"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">settings.yml location</a><a class="headerlink" href="#settings-yml-location" title="Permalink to this heading">¶</a></h2>
  75. <p>First, searx will try to load settings.yml from these locations:</p>
  76. <ol class="arabic simple">
  77. <li><p>the full path specified in the <code class="docutils literal notranslate"><span class="pre">SEARX_SETTINGS_PATH</span></code> environment variable.</p></li>
  78. <li><p><code class="docutils literal notranslate"><span class="pre">/etc/searx/settings.yml</span></code></p></li>
  79. </ol>
  80. <p>If these files don’t exist (or are empty or can’t be read), searx uses the
  81. <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">Origin: searx/settings.yml</a> file.</p>
  82. </section>
  83. <section id="global-settings">
  84. <span id="settings-global"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Global Settings</a><a class="headerlink" href="#global-settings" title="Permalink to this heading">¶</a></h2>
  85. <section id="general">
  86. <h3><a class="toc-backref" href="#id4" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">general:</span></code></a><a class="headerlink" href="#general" title="Permalink to this heading">¶</a></h3>
  87. <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">general</span><span class="p">:</span><span class="w"></span>
  88. <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"># Debug mode, only for development</span><span class="w"></span>
  89. <span class="w"> </span><span class="nt">instance_name </span><span class="p">:</span><span class="w"> </span><span class="s">&quot;searx&quot;</span><span class="w"> </span><span class="c1"># displayed name</span><span class="w"></span>
  90. <span class="w"> </span><span class="nt">git_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://github.com/searx/searx</span><span class="w"></span>
  91. <span class="w"> </span><span class="nt">git_branch</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">master</span><span class="w"></span>
  92. <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/searx/searx/issues</span><span class="w"></span>
  93. <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://searx.github.io/searx</span><span class="w"></span>
  94. <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>
  95. <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"># mailto:contact@example.com</span><span class="w"></span>
  96. <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/searx/searx/wiki</span><span class="w"></span>
  97. <span class="w"> </span><span class="nt">twitter_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://twitter.com/Searx_engine</span><span class="w"></span>
  98. </pre></div>
  99. </div>
  100. <dl class="simple">
  101. <dt><code class="docutils literal notranslate"><span class="pre">debug</span></code> :</dt><dd><p>Allow a more detailed log if you run searx directly. Display <em>detailed</em> error
  102. messages in the browser too, so this must be deactivated in production.</p>
  103. </dd>
  104. <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>
  105. </dd>
  106. <dt><code class="docutils literal notranslate"><span class="pre">git_url</span></code> and <code class="docutils literal notranslate"><span class="pre">git_branch</span></code>:</dt><dd><p>Changes this, to point to your searx fork (branch).</p>
  107. </dd>
  108. <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>
  109. </dd>
  110. <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>
  111. </dd>
  112. <dt><code class="docutils literal notranslate"><span class="pre">twitter_url</span></code>:</dt><dd><p>Link to your tweets (or <code class="docutils literal notranslate"><span class="pre">False</span></code>)</p>
  113. </dd>
  114. </dl>
  115. </section>
  116. <section id="server">
  117. <h3><a class="toc-backref" href="#id5" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">server:</span></code></a><a class="headerlink" href="#server" title="Permalink to this heading">¶</a></h3>
  118. <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">server</span><span class="p">:</span><span class="w"></span>
  119. <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>
  120. <span class="w"> </span><span class="nt">bind_address </span><span class="p">:</span><span class="w"> </span><span class="s">&quot;127.0.0.1&quot;</span><span class="w"> </span><span class="c1"># address to listen on</span><span class="w"></span>
  121. <span class="w"> </span><span class="nt">secret_key </span><span class="p">:</span><span class="w"> </span><span class="s">&quot;ultrasecretkey&quot;</span><span class="w"> </span><span class="c1"># change this!</span><span class="w"></span>
  122. <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"># set custom base_url (or False)</span><span class="w"></span>
  123. <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"># proxying image results through searx</span><span class="w"></span>
  124. <span class="w"> </span><span class="nt">default_locale </span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="c1"># default interface locale</span><span class="w"></span>
  125. <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">oscar</span><span class="w"> </span><span class="c1"># ui theme</span><span class="w"></span>
  126. <span class="w"> </span><span class="nt">default_http_headers</span><span class="p">:</span><span class="w"></span>
  127. <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>
  128. <span class="w"> </span><span class="nt">X-XSS-Protection </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1; mode=block</span><span class="w"></span>
  129. <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>
  130. <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>
  131. <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="w"></span>
  132. </pre></div>
  133. </div>
  134. <dl class="simple">
  135. <dt><code class="docutils literal notranslate"><span class="pre">port</span></code> &amp; <code class="docutils literal notranslate"><span class="pre">bind_address</span></code>:</dt><dd><p>Port number and <em>bind address</em> of the searx web application if you run it
  136. directly using <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">searx/webapp.py</span></code>. Doesn’t apply to searx running on
  137. Apache or Nginx.</p>
  138. </dd>
  139. <dt><code class="docutils literal notranslate"><span class="pre">secret_key</span></code> :</dt><dd><p>Used for cryptography purpose.</p>
  140. </dd>
  141. <dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code> :</dt><dd><p>The base URL where searx is deployed. Used to create correct inbound links.</p>
  142. </dd>
  143. <dt><code class="docutils literal notranslate"><span class="pre">image_proxy</span></code> :</dt><dd><p>Allow your instance of searx of being able to proxy images. Uses memory space.</p>
  144. </dd>
  145. <dt><code class="docutils literal notranslate"><span class="pre">default_locale</span></code> :</dt><dd><p>Searx interface language. If blank, the locale is detected by using the
  146. browser language. If it doesn’t work, or you are deploying a language
  147. specific instance of searx, a locale can be defined using an ISO language
  148. 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>
  149. </dd>
  150. <dt><code class="docutils literal notranslate"><span class="pre">default_theme</span></code> :</dt><dd><p>Name of the theme you want to use by default on your searx instance.</p>
  151. </dd>
  152. </dl>
  153. <dl class="simple">
  154. <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>
  155. </dd>
  156. </dl>
  157. </section>
  158. <section id="outgoing">
  159. <h3><a class="toc-backref" href="#id6" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">outgoing:</span></code></a><a class="headerlink" href="#outgoing" title="Permalink to this heading">¶</a></h3>
  160. <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="c1"># communication with search engines</span><span class="w"></span>
  161. <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>
  162. <span class="w"> </span><span class="c1"># max_request_timeout: 10.0 # the maximum timeout in seconds</span><span class="w"></span>
  163. <span class="w"> </span><span class="nt">useragent_suffix </span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="w"> </span><span class="c1"># information like an email address to the administrator</span><span class="w"></span>
  164. <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"># Number of different hosts</span><span class="w"></span>
  165. <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 simultaneous requests by host</span><span class="w"></span>
  166. <span class="c1"># uncomment below section if you want to use a proxy</span><span class="w"></span>
  167. <span class="c1"># proxies:</span><span class="w"></span>
  168. <span class="c1"># http:</span><span class="w"></span>
  169. <span class="c1"># - http://proxy1:8080</span><span class="w"></span>
  170. <span class="c1"># - http://proxy2:8080</span><span class="w"></span>
  171. <span class="c1"># https:</span><span class="w"></span>
  172. <span class="c1"># - http://proxy1:8080</span><span class="w"></span>
  173. <span class="c1"># - http://proxy2:8080</span><span class="w"></span>
  174. <span class="c1"># uncomment below section only if you have more than one network interface</span><span class="w"></span>
  175. <span class="c1"># which can be the source of outgoing search requests</span><span class="w"></span>
  176. <span class="c1"># source_ips:</span><span class="w"></span>
  177. <span class="c1"># - 1.1.1.1</span><span class="w"></span>
  178. <span class="c1"># - 1.1.1.2</span><span class="w"></span>
  179. </pre></div>
  180. </div>
  181. <dl class="simple">
  182. <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
  183. timeout will allow to wait for answers from slow engines, but in consequence
  184. will slow searx reactivity (the result page may take the time specified in the
  185. timeout to load). Can be override by <a class="reference internal" href="#settings-engine"><span class="std std-ref">Engine settings</span></a></p>
  186. </dd>
  187. <dt><code class="docutils literal notranslate"><span class="pre">useragent_suffix</span></code> :</dt><dd><p>Suffix to the user-agent searx uses to send requests to others engines. If an
  188. engine wish to block you, a contact info here may be useful to avoid that.</p>
  189. </dd>
  190. </dl>
  191. <dl class="simple">
  192. <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://requests.readthedocs.io/en/latest/user/advanced/#proxies">requests proxies</a>.
  193. If there are more than one proxy for one protocol (http, https),
  194. requests to the engines are distributed in a round-robin fashion.</p>
  195. <ul class="simple">
  196. <li><p>Proxy: <a class="reference external" href="https://2.python-requests.org/en/latest/user/advanced/#proxies">see</a>.</p></li>
  197. <li><p>SOCKS proxies are also supported: <a class="reference external" href="https://2.python-requests.org/en/latest/user/advanced/#socks">see</a></p></li>
  198. </ul>
  199. </dd>
  200. <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
  201. be made. This parameter is ignored when <code class="docutils literal notranslate"><span class="pre">proxies</span></code> is set.</p>
  202. </dd>
  203. </dl>
  204. </section>
  205. <section id="locales">
  206. <h3><a class="toc-backref" href="#id7" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">locales:</span></code></a><a class="headerlink" href="#locales" title="Permalink to this heading">¶</a></h3>
  207. <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">locales</span><span class="p">:</span><span class="w"></span>
  208. <span class="w"> </span><span class="nt">en </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">English</span><span class="w"></span>
  209. <span class="w"> </span><span class="nt">de </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Deutsch</span><span class="w"></span>
  210. <span class="w"> </span><span class="nt">he </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Hebrew</span><span class="w"></span>
  211. <span class="w"> </span><span class="nt">hu </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Magyar</span><span class="w"></span>
  212. <span class="w"> </span><span class="nt">fr </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Français</span><span class="w"></span>
  213. <span class="w"> </span><span class="nt">es </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Español</span><span class="w"></span>
  214. <span class="w"> </span><span class="nt">it </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Italiano</span><span class="w"></span>
  215. <span class="w"> </span><span class="nt">nl </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Nederlands</span><span class="w"></span>
  216. <span class="w"> </span><span class="nt">ja </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">日本語 (Japanese)</span><span class="w"></span>
  217. <span class="w"> </span><span class="nt">tr </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Türkçe</span><span class="w"></span>
  218. <span class="w"> </span><span class="nt">ru </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Russian</span><span class="w"></span>
  219. <span class="w"> </span><span class="nt">ro </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Romanian</span><span class="w"></span>
  220. </pre></div>
  221. </div>
  222. <dl class="simple">
  223. <dt><code class="docutils literal notranslate"><span class="pre">locales</span></code> :</dt><dd><p>Locales codes and their names. Available translations of searx interface.</p>
  224. </dd>
  225. </dl>
  226. </section>
  227. </section>
  228. <section id="engine-settings">
  229. <span id="settings-engine"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Engine settings</a><a class="headerlink" href="#engine-settings" title="Permalink to this heading">¶</a></h2>
  230. <aside class="sidebar">
  231. <p class="sidebar-title">Further reading ..</p>
  232. <ul class="simple">
  233. <li><p><a class="reference internal" href="../dev/engine_overview.html#engines-dev"><span class="std std-ref">Engine overview</span></a></p></li>
  234. </ul>
  235. </aside>
  236. <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">bing</span><span class="w"></span>
  237. <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">bing</span><span class="w"></span>
  238. <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">bi</span><span class="w"></span>
  239. <span class="w"> </span><span class="nt">base_url </span><span class="p">:</span><span class="w"> </span><span class="s">&#39;https://{language}.wikipedia.org/&#39;</span><span class="w"></span>
  240. <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>
  241. <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>
  242. <span class="w"> </span><span class="nt">api_key </span><span class="p">:</span><span class="w"> </span><span class="s">&#39;apikey&#39;</span><span class="w"></span>
  243. <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">True</span><span class="w"></span>
  244. <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>
  245. <span class="w"> </span><span class="c1">#proxies:</span><span class="w"></span>
  246. <span class="w"> </span><span class="c1"># http:</span><span class="w"></span>
  247. <span class="w"> </span><span class="c1"># - http://proxy1:8080</span><span class="w"></span>
  248. <span class="w"> </span><span class="c1"># - http://proxy2:8080</span><span class="w"></span>
  249. <span class="w"> </span><span class="c1"># https:</span><span class="w"></span>
  250. <span class="w"> </span><span class="c1"># - http://proxy1:8080</span><span class="w"></span>
  251. <span class="w"> </span><span class="c1"># - http://proxy2:8080</span><span class="w"></span>
  252. <span class="w"> </span><span class="c1"># - socks5://user:password@proxy3:1080</span><span class="w"></span>
  253. <span class="w"> </span><span class="c1"># - socks5h://user:password@proxy4:1080</span><span class="w"></span>
  254. </pre></div>
  255. </div>
  256. <dl>
  257. <dt><code class="docutils literal notranslate"><span class="pre">name</span></code> :</dt><dd><p>Name that will be used across searx to define this engine. In settings, on
  258. the result page…</p>
  259. </dd>
  260. <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
  261. search engine.</p>
  262. </dd>
  263. <dt><code class="docutils literal notranslate"><span class="pre">shortcut</span></code> :</dt><dd><p>Code used to execute bang requests (in this case using <code class="docutils literal notranslate"><span class="pre">!bi</span></code> or <code class="docutils literal notranslate"><span class="pre">?bi</span></code>)</p>
  264. </dd>
  265. <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
  266. use multiple sites using only one engine, or updating the site URL without
  267. touching at the code.</p>
  268. </dd>
  269. <dt><code class="docutils literal notranslate"><span class="pre">categories</span></code><span class="classifier">optional</span></dt><dd><p>Define in which categories this engine will be active. Most of the time, it is
  270. defined in the code of the engine, but in a few cases it is useful, like when
  271. describing multiple search engine using the same code.</p>
  272. </dd>
  273. <dt><code class="docutils literal notranslate"><span class="pre">timeout</span></code><span class="classifier">optional</span></dt><dd><p>Timeout of the search with the current search engine. <strong>Be careful, it will
  274. modify the global timeout of searx.</strong></p>
  275. </dd>
  276. <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
  277. is described in the file.</p>
  278. </dd>
  279. <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
  280. to manually activate it in the settings.</p>
  281. </dd>
  282. <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
  283. by using the full ISO code of language and country, like <code class="docutils literal notranslate"><span class="pre">fr_FR</span></code>, <code class="docutils literal notranslate"><span class="pre">en_US</span></code>,
  284. <code class="docutils literal notranslate"><span class="pre">de_DE</span></code>.</p>
  285. </dd>
  286. <dt><code class="docutils literal notranslate"><span class="pre">weigth</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">1</span></code></span></dt><dd><p>Weighting of the results of this engine.</p>
  287. </dd>
  288. <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>
  289. </dd>
  290. </dl>
  291. <div class="admonition note">
  292. <p class="admonition-title">Note</p>
  293. <p>A few more options are possible, but they are pretty specific to some
  294. engines, and so won’t be described here.</p>
  295. </div>
  296. </section>
  297. <section id="use-default-settings">
  298. <span id="settings-use-default-settings"></span><h2><a class="toc-backref" href="#id9" role="doc-backlink">use_default_settings</a><a class="headerlink" href="#use-default-settings" title="Permalink to this heading">¶</a></h2>
  299. <aside class="sidebar">
  300. <p class="sidebar-title"><code class="docutils literal notranslate"><span class="pre">use_default_settings:</span> <span class="pre">True</span></code></p>
  301. <ul class="simple">
  302. <li><p><a class="reference internal" href="#settings-location"><span class="std std-ref">settings.yml location</span></a></p></li>
  303. <li><p><a class="reference internal" href="installation-searx.html#use-default-settings-yml"><span class="std std-ref">Configuration</span></a></p></li>
  304. <li><p><a class="reference external" href="https://github.com/searx/searx/blob/master/utils/templates/etc/searx/use_default_settings.yml">/etc/searx/settings.yml</a></p></li>
  305. </ul>
  306. </aside>
  307. <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>
  308. and can relied on the default configuration <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">Origin: searx/settings.yml</a> using:</p>
  309. <blockquote>
  310. <div><p><code class="docutils literal notranslate"><span class="pre">use_default_settings:</span> <span class="pre">True</span></code></p>
  311. </div></blockquote>
  312. <dl>
  313. <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
  314. in <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">Origin: searx/settings.yml</a> with the exception of the <code class="docutils literal notranslate"><span class="pre">secret_key</span></code> and
  315. the <code class="docutils literal notranslate"><span class="pre">bind_address</span></code>:</p>
  316. <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="w"></span>
  317. <span class="nt">server</span><span class="p">:</span><span class="w"></span>
  318. <span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span><span class="w"></span>
  319. <span class="w"> </span><span class="nt">bind_address</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0.0.0.0&quot;</span><span class="w"></span>
  320. </pre></div>
  321. </div>
  322. </dd>
  323. <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
  324. similar way, the <code class="docutils literal notranslate"><span class="pre">engines</span></code> section is merged according to the engine
  325. <code class="docutils literal notranslate"><span class="pre">name</span></code>. In this example, searx will load all the engine and the arch linux
  326. wiki engine has a <a class="reference internal" href="../blog/private-engines.html#private-engines"><span class="std std-ref">token</span></a>:</p>
  327. <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="w"></span>
  328. <span class="nt">server</span><span class="p">:</span><span class="w"></span>
  329. <span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span><span class="w"></span>
  330. <span class="nt">engines</span><span class="p">:</span><span class="w"></span>
  331. <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>
  332. <span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span><span class="w"></span>
  333. </pre></div>
  334. </div>
  335. </dd>
  336. <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
  337. example is similar to the above one, but searx doesn’t load the the google
  338. engine:</p>
  339. <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>
  340. <span class="w"> </span><span class="nt">engines</span><span class="p">:</span><span class="w"></span>
  341. <span class="w"> </span><span class="nt">remove</span><span class="p">:</span><span class="w"></span>
  342. <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>
  343. <span class="nt">server</span><span class="p">:</span><span class="w"></span>
  344. <span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span><span class="w"></span>
  345. <span class="nt">engines</span><span class="p">:</span><span class="w"></span>
  346. <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>
  347. <span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span><span class="w"></span>
  348. </pre></div>
  349. </div>
  350. </dd>
  351. <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
  352. following example, searx has only two engines:</p>
  353. <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>
  354. <span class="w"> </span><span class="nt">engines</span><span class="p">:</span><span class="w"></span>
  355. <span class="w"> </span><span class="nt">keep_only</span><span class="p">:</span><span class="w"></span>
  356. <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>
  357. <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="w"></span>
  358. <span class="nt">server</span><span class="p">:</span><span class="w"></span>
  359. <span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA&quot;</span><span class="w"></span>
  360. <span class="nt">engines</span><span class="p">:</span><span class="w"></span>
  361. <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>
  362. <span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span><span class="w"></span>
  363. <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>
  364. <span class="w"> </span><span class="nt">tokens</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">&#39;$ecretValue&#39;</span><span class="p p-Indicator">]</span><span class="w"></span>
  365. </pre></div>
  366. </div>
  367. </dd>
  368. </dl>
  369. </section>
  370. </section>
  371. <div class="clearer"></div>
  372. </div>
  373. </div>
  374. </div>
  375. <span id="sidebar-top"></span>
  376. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  377. <div class="sphinxsidebarwrapper">
  378. <p class="logo"><a href="../index.html">
  379. <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
  380. </a></p>
  381. <h3>Project Links</h3>
  382. <ul>
  383. <li><a href="https://searx.github.io/searx/blog/index.html">Blog</a>
  384. <li><a href="https://github.com/searx/searx">Source</a>
  385. <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
  386. <li><a href="https://twitter.com/Searx_engine">Twitter</a>
  387. <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
  388. </ul><h3>Navigation</h3>
  389. <ul>
  390. <li><a href="../index.html">Overview</a>
  391. <ul>
  392. <li><a href="index.html">Administrator documentation</a>
  393. <ul>
  394. <li>Previous: <a href="update-searx.html" title="previous chapter">How to update</a>
  395. <li>Next: <a href="api.html" title="next chapter">Administration API</a></ul>
  396. </li>
  397. </ul>
  398. </li>
  399. </ul>
  400. <div id="searchbox" style="display: none" role="search">
  401. <h3 id="searchlabel">Quick search</h3>
  402. <div class="searchformwrapper">
  403. <form class="search" action="../search.html" method="get">
  404. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  405. <input type="submit" value="Go" />
  406. </form>
  407. </div>
  408. </div>
  409. <script>document.getElementById('searchbox').style.display = "block"</script>
  410. </div>
  411. </div>
  412. <div class="clearer"></div>
  413. </div>
  414. <div class="footer" role="contentinfo">
  415. &#169; Copyright 2015-2022, Adam Tauber, Noémi Ványi.
  416. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  417. </div>
  418. <script src="../_static/version_warning_offset.js"></script>
  419. </body>
  420. </html>