2020-03-02 18:00:19 +00:00
|
|
|
.. _installation basic:
|
|
|
|
|
|
|
|
=========================
|
|
|
|
Step by step installation
|
|
|
|
=========================
|
|
|
|
|
2023-06-30 16:07:02 +00:00
|
|
|
.. contents::
|
2020-03-02 18:00:19 +00:00
|
|
|
:depth: 2
|
|
|
|
:local:
|
|
|
|
:backlinks: entry
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
|
|
|
|
In this section we show the setup of a SearXNG instance that will be installed
|
|
|
|
by the :ref:`installation scripts`.
|
2020-03-02 18:00:19 +00:00
|
|
|
|
2020-03-04 11:22:20 +00:00
|
|
|
.. _install packages:
|
|
|
|
|
2020-03-02 18:00:19 +00:00
|
|
|
Install packages
|
|
|
|
================
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2020-03-02 18:00:19 +00:00
|
|
|
:start-after: START distro-packages
|
|
|
|
:end-before: END distro-packages
|
|
|
|
|
|
|
|
.. hint::
|
|
|
|
|
2021-11-18 17:27:26 +00:00
|
|
|
This installs also the packages needed by :ref:`searxng uwsgi`
|
2020-03-02 18:00:19 +00:00
|
|
|
|
2021-11-18 17:27:26 +00:00
|
|
|
.. _create searxng user:
|
2020-04-07 16:31:51 +00:00
|
|
|
|
2020-03-02 18:00:19 +00:00
|
|
|
Create user
|
|
|
|
===========
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2020-03-02 18:00:19 +00:00
|
|
|
:start-after: START create user
|
|
|
|
:end-before: END create user
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. _searxng-src:
|
2020-03-06 13:47:00 +00:00
|
|
|
|
2021-09-12 06:36:56 +00:00
|
|
|
Install SearXNG & dependencies
|
|
|
|
==============================
|
2020-03-03 18:57:15 +00:00
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
Start a interactive shell from new created user and clone SearXNG:
|
2020-03-02 18:00:19 +00:00
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2021-11-18 17:27:26 +00:00
|
|
|
:start-after: START clone searxng
|
|
|
|
:end-before: END clone searxng
|
2020-03-02 18:00:19 +00:00
|
|
|
|
|
|
|
In the same shell create *virtualenv*:
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2020-03-02 18:00:19 +00:00
|
|
|
:start-after: START create virtualenv
|
|
|
|
:end-before: END create virtualenv
|
|
|
|
|
2022-06-21 12:48:46 +00:00
|
|
|
To install SearXNG's dependencies, exit the SearXNG *bash* session you opened above
|
|
|
|
and start a new one. Before installing, check if your *virtualenv* was sourced
|
2020-03-02 18:00:19 +00:00
|
|
|
from the login (*~/.profile*):
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2020-03-02 18:00:19 +00:00
|
|
|
:start-after: START manage.sh update_packages
|
|
|
|
:end-before: END manage.sh update_packages
|
|
|
|
|
|
|
|
.. tip::
|
|
|
|
|
2021-04-09 13:56:59 +00:00
|
|
|
Open a second terminal for the configuration tasks and leave the ``(searx)$``
|
2020-03-02 18:00:19 +00:00
|
|
|
terminal open for the tasks below.
|
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
|
|
|
|
.. _use_default_settings.yml:
|
|
|
|
|
2020-03-02 18:00:19 +00:00
|
|
|
Configuration
|
2020-12-08 19:19:10 +00:00
|
|
|
=============
|
|
|
|
|
2021-01-02 18:56:26 +00:00
|
|
|
.. sidebar:: ``use_default_settings: True``
|
|
|
|
|
2023-06-30 16:07:02 +00:00
|
|
|
- :ref:`settings.yml`
|
2021-01-02 18:56:26 +00:00
|
|
|
- :ref:`settings location`
|
|
|
|
- :ref:`settings use_default_settings`
|
2021-10-11 08:56:50 +00:00
|
|
|
- :origin:`/etc/searxng/settings.yml <utils/templates/etc/searxng/settings.yml>`
|
2021-01-02 18:56:26 +00:00
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
To create a initial ``/etc/searxng/settings.yml`` we recommend to start with a
|
|
|
|
copy of the file :origin:`utils/templates/etc/searxng/settings.yml`. This setup
|
2021-01-02 18:56:26 +00:00
|
|
|
:ref:`use default settings <settings use_default_settings>` from
|
2022-06-14 08:02:50 +00:00
|
|
|
:origin:`searx/settings.yml` and is shown in the tab *"Use default settings"*
|
|
|
|
below. This setup:
|
2020-03-02 18:00:19 +00:00
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
- enables :ref:`limiter <limiter>` to protect against bots
|
|
|
|
- enables :ref:`image proxy <image_proxy>` for better privacy
|
2023-08-11 14:01:54 +00:00
|
|
|
- enables :ref:`cache busting <static_use_hash>` to save bandwidth
|
2020-03-02 18:00:19 +00:00
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
Modify the ``/etc/searxng/settings.yml`` to your needs:
|
2020-03-02 18:00:19 +00:00
|
|
|
|
2020-12-08 19:19:10 +00:00
|
|
|
.. tabs::
|
|
|
|
|
|
|
|
.. group-tab:: Use default settings
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. literalinclude:: ../../utils/templates/etc/searxng/settings.yml
|
|
|
|
:language: yaml
|
2024-05-05 18:43:45 +00:00
|
|
|
:end-before: # hostnames:
|
2022-06-14 08:02:50 +00:00
|
|
|
|
|
|
|
To see the entire file jump to :origin:`utils/templates/etc/searxng/settings.yml`
|
2020-12-08 19:19:10 +00:00
|
|
|
|
|
|
|
.. group-tab:: searx/settings.yml
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. literalinclude:: ../../searx/settings.yml
|
|
|
|
:language: yaml
|
2024-05-05 18:43:45 +00:00
|
|
|
:end-before: # hostnames:
|
2022-06-14 08:02:50 +00:00
|
|
|
|
|
|
|
To see the entire file jump to :origin:`searx/settings.yml`
|
|
|
|
|
|
|
|
For a *minimal setup* you need to set ``server:secret_key``.
|
|
|
|
|
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
|
|
|
:start-after: START searxng config
|
|
|
|
:end-before: END searxng config
|
2020-12-08 19:19:10 +00:00
|
|
|
|
|
|
|
|
2020-03-02 18:00:19 +00:00
|
|
|
Check
|
|
|
|
=====
|
|
|
|
|
2021-09-12 06:36:56 +00:00
|
|
|
To check your SearXNG setup, optional enable debugging and start the *webapp*.
|
2021-10-02 15:18:05 +00:00
|
|
|
SearXNG looks at the exported environment ``$SEARXNG_SETTINGS_PATH`` for a
|
2020-03-02 18:00:19 +00:00
|
|
|
configuration file.
|
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2021-11-18 17:27:26 +00:00
|
|
|
:start-after: START check searxng installation
|
|
|
|
:end-before: END check searxng installation
|
2020-03-02 18:00:19 +00:00
|
|
|
|
|
|
|
If everything works fine, hit ``[CTRL-C]`` to stop the *webapp* and disable the
|
2022-06-21 12:48:46 +00:00
|
|
|
debug option in ``settings.yml``. You can now exit SearXNG user bash session (enter exit
|
2021-09-12 06:36:56 +00:00
|
|
|
command twice). At this point SearXNG is not demonized; uwsgi allows this.
|
2020-03-02 18:00:19 +00:00
|
|
|
|