<h2><aclass="toc-backref"href="#id1">Origin uWSGI</a><aclass="headerlink"href="#origin-uwsgi"title="Permalink to this headline">¶</a></h2>
<p>How uWSGI is implemented by distributors is different. uWSGI itself
recommend two methods</p>
<p><aclass="reference external"href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html">systemd.unit</a> template files as described here <aclass="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>
<blockquote>
<div><p>There is one <aclass="reference external"href="http://0pointer.de/blog/projects/instances.html">systemd unit template</a> and one <aclass="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 searx.ini as example:</p>
<p>The <aclass="reference external"href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a> mode which fits for maintaining a large range of uwsgi apps.</p>
<blockquote>
<div><p>The Emperor mode is a special uWSGI instance that will monitor specific
events. The Emperor mode (service) is started by a (common, not template)
systemd unit. The Emperor service will scan specific directories for <aclass="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 searx.ini as
example:</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span>to start a new searx instance create --> /etc/uwsgi.d/searx.ini
to reload the instance edit timestamp --> touch /etc/uwsgi.d/searx.ini
to stop instance remove ini --> rm /etc/uwsgi.d/searx.ini
</pre></div>
</div>
</div></blockquote>
</div>
<divclass="section"id="distributors">
<h2><aclass="toc-backref"href="#id2">Distributors</a><aclass="headerlink"href="#distributors"title="Permalink to this headline">¶</a></h2>
<p>The <aclass="reference external"href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a> mode and <aclass="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 is the packaging of
plugins (if so, compare <aclass="reference internal"href="installation-searx.html#install-packages"><spanclass="std std-ref">Install packages</span></a>) and what the default python
interpreter is (python2 vs. python3).</p>
<p>Fedora starts a Emperor by default, while archlinux does not start any uwsgi
service by default. Worth to know; debian (ubuntu) follow a complete different
approach. <em>debian</em>: your are familiar with the apache infrastructure? .. they
do similar for the uWSGI infrastructure (with less comfort), the folders are:</p>
<p>The <aclass="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>
<p>My experience is, that this command is a bit buggy.</p>
</div>
<divclass="section"id="alltogether">
<spanid="uwsgi-configuration"></span><h2><aclass="toc-backref"href="#id3">Alltogether</a><aclass="headerlink"href="#alltogether"title="Permalink to this headline">¶</a></h2>
<p>Create the configuration ini-file according to your distribution (see below) and
restart the uwsgi application.</p>
<divclass="sphinx-tabs docutils container">
<divclass="ui top attached tabular menu sphinx-menu docutils container">