summaryrefslogtreecommitdiff
path: root/docs/utils/filtron.sh.rst
blob: e6d7d62512f86bbb5dd30b8709b08b57e40ee8bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.. _filtron.sh:

====================
``utils/filtron.sh``
====================

.. sidebar:: further reading

   - :ref:`installation`
   - :ref:`searx filtron`
   - :ref:`architecture`

.. _Go: https://golang.org/
.. _filtron: https://github.com/asciimoo/filtron
.. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md

To simplify installation and maintenance of a filtron instance you can use the
script :origin:`utils/filtron.sh`.  In most cases you will install filtron_
simply by running the command:

.. code::  bash

   sudo -H ./utils/filtron.sh install all

The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron_
into this user account:

#. Create a separated user account (``filtron``).
#. Download and install Go_ binary in users $HOME (``~filtron``).
#. Install filtron with the package management of Go_ (``go get -v -u
   github.com/asciimoo/filtron``)
#. Setup a proper rule configuration :origin:`[ref]
   <utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``).
#. Setup a systemd service unit :origin:`[ref]
   <utils/templates/lib/systemd/system/filtron.service>`
   (``/lib/systemd/system/filtron.service``).

.. _reverse proxy:

Public Reverse Proxy
====================

To install searx in your public HTTP server use:

.. code::  bash

   sudo -H ./utils/filtron.sh apache install

.. tabs::

   .. group-tab:: apache

      .. literalinclude:: ../../utils/templates/etc/apache2/sites-available/searx.conf:filtron
	 :language: apache

      .. tabs::

	 .. group-tab:: Ubuntu / debian

	       .. code-block:: sh

		  $ sudo -H a2enmod headers
		  $ sudo -H a2enmod proxy
		  $ sudo -H a2enmod proxy_http

.. _filtron.sh overview:

Overview
========

The ``--help`` output of the script is largely self-explanatory
(:ref:`toolboxing common`):

.. program-output:: ../utils/filtron.sh --help