To simplify the installation and maintenance of a SearXNG instance you can use the script git://utils/searxng.sh.


In most cases you will install SearXNG simply by running the command:

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

The installation is described in chapter Step by step installation.

Command Help

The --help output of the script is largely self-explanatory:

  searxng.sh install    [all|user|pyenv|settings|uwsgi|redis|nginx|apache|searxng-src|packages|buildhost]
  searxng.sh remove     [all|user|pyenv|settings|uwsgi|redis|nginx|apache]
  searxng.sh instance   [cmd|update|check|localtest|inspect]
  all           : complete (de-) installation of the SearXNG service
  user          : service user 'searxng' (/usr/local/searxng)
  pyenv         : virtualenv (python) in /usr/local/searxng/searx-pyenv
  settings      : settings from /etc/searxng/settings.yml
  uwsgi         : SearXNG's uWSGI app searxng.ini
  redis         : build & install or remove a local redis server /usr/local/searxng-redis/run/redis.sock
  nginx         : HTTP site /etc/nginx/default.apps-available/searxng.conf
  apache        : HTTP site /etc/apache2/sites-available/searxng.conf
  searxng-src   : clone https://github.com/searxng/searxng into /usr/local/searxng/searxng-src
  packages      : installs packages from OS package manager required by SearXNG
  buildhost     : installs packages from OS package manager required by a SearXNG buildhost
  update        : update SearXNG instance (git fetch + reset & update settings.yml)
  check         : run checks from utils/searxng_check.py in the active installation
  inspect       : run some small tests and inspect SearXNG's server status and log
  get_setting   : get settings value from running SearXNG instance
  cmd           : run command in SearXNG instance's environment (e.g. bash)
  SEARXNG_UWSGI_SOCKET : /usr/local/searxng/run/socket
  GIT_URL              : https://github.com/searxng/searxng
  GIT_BRANCH           : master
  SEARXNG_URL          : http://fv-az778-652/searxng
  SEARXNG_PORT         : 8888