searxng/docs/admin/installation-searxng.rst
2022-07-30 13:39:35 +02:00

3.7 KiB

Step by step installation

Contents

In this section we show the setup of a SearXNG instance that will be installed by the installation scripts.

Install packages

$DOCS_BUILD/includes/searxng.rst

Hint

This installs also the packages needed by searxng uwsgi

Create user

$DOCS_BUILD/includes/searxng.rst

Install SearXNG & dependencies

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

$DOCS_BUILD/includes/searxng.rst

In the same shell create virtualenv:

$DOCS_BUILD/includes/searxng.rst

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 from the login (~/.profile):

$DOCS_BUILD/includes/searxng.rst

Tip

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

Configuration

use_default_settings: True

  • settings global
  • settings location
  • settings use_default_settings
  • /etc/searxng/settings.yml <utils/templates/etc/searxng/settings.yml>

To create a initial /etc/searxng/settings.yml we recommend to start with a copy of the file utils/templates/etc/searxng/settings.yml. This setup use default settings <settings use_default_settings> from searx/settings.yml and is shown in the tab "Use default settings" below. This setup:

  • enables limiter <limiter> to protect against bots
  • enables image proxy <image_proxy> for better privacy
  • enables cache busting <static_use_hash> to save bandwith

Modify the /etc/searxng/settings.yml to your needs:

Use default settings

../../utils/templates/etc/searxng/settings.yml

To see the entire file jump to utils/templates/etc/searxng/settings.yml

searx/settings.yml

../../searx/settings.yml

To see the entire file jump to searx/settings.yml

For a minimal setup you need to set server:secret_key.

$DOCS_BUILD/includes/searxng.rst

Check

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

$DOCS_BUILD/includes/searxng.rst

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 session (enter exit command twice). At this point SearXNG is not demonized; uwsgi allows this.