6 <meta charset="utf-8" />
7 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8 <meta name="viewport" content="width=device-width, initial-scale=1">
9 <title>Admin’s tooling box — Searx Documentation (Searx-1.0.0.tex)</title>
10 <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
11 <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
12 <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
13 <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
14 <script src="../_static/jquery.js"></script>
15 <script src="../_static/underscore.js"></script>
16 <script src="../_static/doctools.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="utils/searx.sh" href="searx.sh.html" />
20 <link rel="prev" title="searx_extra/standalone_searx.py" href="../searx_extra/standalone_searx.py.html" />
22 <div class="related" role="navigation" aria-label="related navigation">
25 <li class="right" style="margin-right: 10px">
26 <a href="../genindex.html" title="General Index"
27 accesskey="I">index</a></li>
29 <a href="../py-modindex.html" title="Python Module Index"
32 <a href="searx.sh.html" title="utils/searx.sh"
33 accesskey="N">next</a> |</li>
35 <a href="../searx_extra/standalone_searx.py.html" title="searx_extra/standalone_searx.py"
36 accesskey="P">previous</a> |</li>
37 <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> »</li>
38 <li class="nav-item nav-item-this"><a href="">Admin’s tooling box</a></li>
42 <div class="document">
43 <div class="documentwrapper">
44 <div class="bodywrapper">
45 <div class="body" role="main">
47 <div class="section" id="admin-s-tooling-box">
48<span id="toolboxing"></span><span id="searx-utils"></span><h1>Admin’s tooling box<a class="headerlink" href="#admin-s-tooling-box" title="Permalink to this headline">¶</a></h1>
49<p>In the folder <a class="reference external" href="https://github.com/searx/searx/blob/master/utils/">git://utils/</a> we maintain some tools useful for administrators.</p>
50<div class="toctree-wrapper compound">
51<p class="caption" role="heading"><span class="caption-text">Contents</span></p>
53<li class="toctree-l1"><a class="reference internal" href="searx.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code></a><ul>
54<li class="toctree-l2"><a class="reference internal" href="searx.sh.html#install">Install</a></li>
55<li class="toctree-l2"><a class="reference internal" href="searx.sh.html#overview">Overview</a></li>
58<li class="toctree-l1"><a class="reference internal" href="filtron.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code></a><ul>
59<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#create-user">Create user</a></li>
60<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#install-go">Install go</a></li>
61<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#install-filtron">Install filtron</a></li>
62<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#overview">Overview</a></li>
65<li class="toctree-l1"><a class="reference internal" href="morty.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a><ul>
66<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#create-user">Create user</a></li>
67<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#install-go">Install go</a></li>
68<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#install-morty">Install morty</a></li>
69<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#overview">Overview</a></li>
72<li class="toctree-l1"><a class="reference internal" href="lxc.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a><ul>
73<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#install-suite">Install suite</a></li>
74<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#running-commands">Running commands</a></li>
75<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#setup-searx-buildhost">Setup searx buildhost</a></li>
76<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#overview">Overview</a></li>
77<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#searx-suite">searx suite</a></li>
82<div class="section" id="common-commands-environment">
83<span id="toolboxing-common"></span><h2>Common commands & environment<a class="headerlink" href="#common-commands-environment" title="Permalink to this headline">¶</a></h2>
84<p>Scripts to maintain services often dispose of common commands and environments.</p>
86<dt><code class="docutils literal notranslate"><span class="pre">shell</span></code><span class="classifier">command</span></dt><dd><p>Opens a shell from the service user <code class="docutils literal notranslate"><span class="pre">${SERVICE_USSR}</span></code>, very helpful for
89<dt><code class="docutils literal notranslate"><span class="pre">inspect</span> <span class="pre">service</span></code><span class="classifier">command</span></dt><dd><p>Shows status and log of the service, most often you have a option to enable
90more verbose debug logs. Very helpful for debugging, but be careful not to
91enable debugging in a production environment!</p>
93<dt><code class="docutils literal notranslate"><span class="pre">FORCE_TIMEOUT</span></code><span class="classifier">environment</span></dt><dd><p>Sets timeout for interactive prompts. If you want to run a script in batch
94job, with defaults choices, set <code class="docutils literal notranslate"><span class="pre">FORCE_TIMEOUT=0</span></code>. By example; to install a
95reverse proxy for filtron on all containers of the <a class="reference internal" href="lxc.sh.html#lxc-searx-env"><span class="std std-ref">searx suite</span></a> use</p>
96<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh apache install
102<div class="section" id="tooling-box-setup">
103<span id="toolboxing-setup"></span><h2>Tooling box setup<a class="headerlink" href="#tooling-box-setup" title="Permalink to this headline">¶</a></h2>
104<p>The main setup is done in the <a class="reference external" href="https://github.com/searx/searx/blob/master/.config.sh">git://.config.sh</a> (read also <a class="reference internal" href="../admin/settings.html#settings-global"><span class="std std-ref">Global Settings</span></a>).</p>
105<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># -*- coding: utf-8; mode: sh -*-</span>
106<span class="c1"># SPDX-License-Identifier: AGPL-3.0-or-later</span>
107<span class="c1"># shellcheck shell=bash disable=SC2034</span>
108<span class="c1">#</span>
109<span class="c1"># This environment is used by ./utils scripts like filtron.sh or searx.sh. The</span>
110<span class="c1"># default values are *most flexible* and *best maintained*, you normally not</span>
111<span class="c1"># need to change the defaults (except PUBLIC_URL).</span>
112<span class="c1">#</span>
113<span class="c1"># Before you change any value here you have to uninstall any previous</span>
114<span class="c1"># installation. Further is it recommended to backup your changes simply by</span>
115<span class="c1"># adding them to you local brand (git branch)::</span>
116<span class="c1">#</span>
117<span class="c1"># git add .config</span>
119<span class="c1"># The public URL of the searx instance: PUBLIC_URL="https://mydomain.xy/searx"</span>
120<span class="c1"># The default is taken from ./utils/brand.env.</span>
122<span class="nv">PUBLIC_URL</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">SEARX_URL</span><span class="si">}</span><span class="s2">"</span>
124<span class="k">if</span> <span class="o">[[</span> <span class="si">${</span><span class="nv">PUBLIC_URL</span><span class="si">}</span> <span class="o">==</span> <span class="s2">"https://searx.me"</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
125 <span class="c1"># hint: Linux containers do not have DNS entries, lets use IPs</span>
126 <span class="nv">PUBLIC_URL</span><span class="o">=</span><span class="s2">"http://</span><span class="k">$(</span>primary_ip<span class="k">)</span><span class="s2">/searx"</span>
127<span class="k">fi</span>
129<span class="c1"># searx.sh</span>
130<span class="c1"># ---------</span>
132<span class="c1"># SEARX_INTERNAL_URL="127.0.0.1:8888"</span>
133<span class="c1"># SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml"</span>
135<span class="c1"># Only change, if you maintain a searx brand in your searx fork (GIT_URL) which</span>
136<span class="c1"># is not hold by branch 'master'. The branch has to be a local branch, in the</span>
137<span class="c1"># repository from which you install (which is most often the case). If you want</span>
138<span class="c1"># to install branch 'foo', don't forget to run 'git branch foo origin/foo' once.</span>
139<span class="c1"># GIT_BRANCH="${GIT_BRANCH:-master}"</span>
141<span class="c1"># filtron.sh</span>
142<span class="c1"># ----------</span>
144<span class="c1"># FILTRON_API="127.0.0.1:4005"</span>
145<span class="c1"># FILTRON_LISTEN="127.0.0.1:4004"</span>
146<span class="c1"># FILTRON_TARGET="127.0.0.1:8888"</span>
148<span class="c1"># morty.sh</span>
149<span class="c1"># --------</span>
151<span class="c1"># morty listen address</span>
152<span class="c1"># MORTY_LISTEN="127.0.0.1:3000"</span>
153<span class="c1"># PUBLIC_URL_PATH_MORTY="/morty/"</span>
155<span class="c1"># system services</span>
156<span class="c1"># ---------------</span>
158<span class="c1"># Common $HOME folder of the service accounts</span>
159<span class="c1"># SERVICE_HOME_BASE="/usr/local"</span>
161<span class="c1"># **experimental**: Set SERVICE_USER to run all services by one account, but be</span>
162<span class="c1"># aware that removing discrete components might conflict!</span>
163<span class="c1"># SERVICE_USER=searx</span>
170 <div class="clearer"></div>
174 <span id="sidebar-top"></span>
175 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
176 <div class="sphinxsidebarwrapper">
179 <p class="logo"><a href="../index.html">
180 <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
184 <h3>Project Links</h3>
186 <li><a href="blog/index.html">Blog</a>
188 <li><a href="https://github.com/searx/searx">Source</a>
190 <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
192 <li><a href="https://searx.space">Public instances</a>
194 <li><a href="https://twitter.com/Searx_engine">Twitter</a>
196 <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
197 </ul><h3>Navigation</h3>
199 <li><a href="../index.html">Overview</a>
201 <li>Previous: <a href="../searx_extra/standalone_searx.py.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">searx_extra/standalone_searx.py</span></code></a>
202 <li>Next: <a href="searx.sh.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code></a>
206<div id="searchbox" style="display: none" role="search">
207 <h3 id="searchlabel">Quick search</h3>
208 <div class="searchformwrapper">
209 <form class="search" action="../search.html" method="get">
210 <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
211 <input type="submit" value="Go" />
215<script>$('#searchbox').show(0);</script>
218 <div class="clearer"></div>
221 <div class="footer" role="contentinfo">
222 © Copyright 2015-2021, Adam Tauber, Noémi Ványi.
223 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
225 <script src="../_static/version_warning_offset.js"></script>
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list