private-engines.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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>How to create private engines &#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="Run shell commands from your instance" href="command-engine.html" />
  20. <link rel="prev" title="Recoll" href="engines/recoll.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="command-engine.html" title="Run shell commands from your instance"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="engines/recoll.html" title="Recoll"
  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="">How to create private engines</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="how-to-create-private-engines">
  47. <h1>How to create private engines<a class="headerlink" href="#how-to-create-private-engines" title="Permalink to this heading">¶</a></h1>
  48. <p>If you are running your public searx instance, you might want to restrict access
  49. to some engines. Maybe you are afraid of bots might abusing the engine. Or the
  50. engine might return private results you do not want to share with strangers.</p>
  51. <section id="server-side-configuration">
  52. <h2>Server side configuration<a class="headerlink" href="#server-side-configuration" title="Permalink to this heading">¶</a></h2>
  53. <p>You can make any engine private by setting a list of tokens in your settings.yml
  54. file. In the following example, we set two different tokens that provide access
  55. to the engine.</p>
  56. <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">my-private-google</span><span class="w"></span>
  57. <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>
  58. <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">pgo</span><span class="w"></span>
  59. <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;my-secret-token-1&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;my-secret-token-2&#39;</span><span class="p p-Indicator">]</span><span class="w"></span>
  60. </pre></div>
  61. </div>
  62. <p>To access the private engine, you must distribute the tokens to your searx
  63. users. It is up to you how you let them know what the access token is you
  64. created.</p>
  65. </section>
  66. <section id="client-side-configuration">
  67. <h2>Client side configuration<a class="headerlink" href="#client-side-configuration" title="Permalink to this heading">¶</a></h2>
  68. <p>As a searx instance user, you can add any number of access tokens on the
  69. Preferences page. You have to set a comma separated lists of strings in “Engine
  70. tokens” input, then save your new preferences.</p>
  71. <a class="reference internal image-reference" href="../_images/prefernces-private.png"><img alt="location of token textarea" class="align-center" src="../_images/prefernces-private.png" style="width: 600px;" /></a>
  72. <p>Once the Preferences page is loaded again, you can see the information of the
  73. private engines you got access to. If you cannot see the expected engines in the
  74. engines list, double check your token. If there is no issue with the token,
  75. contact your instance administrator.</p>
  76. </section>
  77. </section>
  78. <div class="clearer"></div>
  79. </div>
  80. </div>
  81. </div>
  82. <span id="sidebar-top"></span>
  83. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  84. <div class="sphinxsidebarwrapper">
  85. <p class="logo"><a href="../index.html">
  86. <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
  87. </a></p>
  88. <h3>Project Links</h3>
  89. <ul>
  90. <li><a href="https://searx.github.io/searx/blog/index.html">Blog</a>
  91. <li><a href="https://github.com/searx/searx">Source</a>
  92. <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
  93. <li><a href="https://twitter.com/Searx_engine">Twitter</a>
  94. <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
  95. </ul><h3>Navigation</h3>
  96. <ul>
  97. <li><a href="../index.html">Overview</a>
  98. <ul>
  99. <li><a href="index.html">Administrator documentation</a>
  100. <ul>
  101. <li>Previous: <a href="engines/recoll.html" title="previous chapter">Recoll</a>
  102. <li>Next: <a href="command-engine.html" title="next chapter">Run shell commands from your instance</a></ul>
  103. </li>
  104. </ul>
  105. </li>
  106. </ul>
  107. <div id="searchbox" style="display: none" role="search">
  108. <h3 id="searchlabel">Quick search</h3>
  109. <div class="searchformwrapper">
  110. <form class="search" action="../search.html" method="get">
  111. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  112. <input type="submit" value="Go" />
  113. </form>
  114. </div>
  115. </div>
  116. <script>document.getElementById('searchbox').style.display = "block"</script>
  117. </div>
  118. </div>
  119. <div class="clearer"></div>
  120. </div>
  121. <div class="footer" role="contentinfo">
  122. &#169; Copyright 2015-2022, Adam Tauber, Noémi Ványi.
  123. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  124. </div>
  125. <script src="../_static/version_warning_offset.js"></script>
  126. </body>
  127. </html>