summaryrefslogtreecommitdiff
path: root/docs/admin/installation-searx.rst
blob: 9e9157b8680c7985a9ea31a4d6f6fe47ed95ac4a (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.. _installation basic:

=========================
Step by step installation
=========================

.. contents:: Contents
   :depth: 2
   :local:
   :backlinks: entry

Step by step installation with virtualenv.  For Ubuntu, be sure to have enable
universe repository.

.. _install packages:

Install packages
================

.. kernel-include:: $DOCS_BUILD/includes/searx.rst
   :start-after: START distro-packages
   :end-before: END distro-packages

.. hint::

   This installs also the packages needed by :ref:`searx uwsgi`

.. _create searx user:

Create user
===========

.. kernel-include:: $DOCS_BUILD/includes/searx.rst
   :start-after: START create user
   :end-before: END create user

.. _searx-src:

Install SearXNG & dependencies
==============================

Start a interactive shell from new created user and clone searx:

.. kernel-include:: $DOCS_BUILD/includes/searx.rst
   :start-after: START clone searx
   :end-before: END clone searx

In the same shell create *virtualenv*:

.. kernel-include:: $DOCS_BUILD/includes/searx.rst
   :start-after: START create virtualenv
   :end-before: END create virtualenv

To install searx's dependencies, exit the SearXNG *bash* session you opened above
and restart a new.  Before install, first check if your *virtualenv* was sourced
from the login (*~/.profile*):

.. kernel-include:: $DOCS_BUILD/includes/searx.rst
   :start-after: START manage.sh update_packages
   :end-before: END manage.sh update_packages

.. tip::

   Open a second terminal for the configuration tasks and leave the ``(searx)$``
   terminal open for the tasks below.


.. _use_default_settings.yml:

Configuration
=============

.. sidebar:: ``use_default_settings: True``

   - :ref:`settings global`
   - :ref:`settings location`
   - :ref:`settings use_default_settings`
   - :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`

To create a initial ``/etc/searx/settings.yml`` you can start with a copy of the
file :origin:`utils/templates/etc/searx/use_default_settings.yml`.  This setup
:ref:`use default settings <settings use_default_settings>` from
:origin:`searx/settings.yml` and is recommended since :pull-searx:`2291` is merged.

For a *minimal setup*, configure like shown below – replace ``searx@$(uname
-n)`` with a name of your choice, set ``ultrasecretkey`` -- *and/or* edit
``/etc/searx/settings.yml`` to your needs.

.. kernel-include:: $DOCS_BUILD/includes/searx.rst
   :start-after: START searx config
   :end-before: END searx config

.. tabs::

  .. group-tab:: Use default settings

    .. literalinclude:: ../../utils/templates/etc/searx/settings.yml
       :language: yaml

  .. group-tab:: searx/settings.yml

    .. literalinclude:: ../../searx/settings.yml
       :language: yaml


Check
=====

To check your SearXNG setup, optional enable debugging and start the *webapp*.
SearXNG looks at the exported environment ``$SEARX_SETTINGS_PATH`` for a
configuration file.

.. kernel-include:: $DOCS_BUILD/includes/searx.rst
   :start-after: START check searx installation
   :end-before: END check searx installation

If everything works fine, hit ``[CTRL-C]`` to stop the *webapp* and disable the
debug option in ``settings.yml``. You can now exit SearXNG user bash (enter exit
command twice).  At this point SearXNG is not demonized; uwsgi allows this.