utils/searx.sh
¶
To simplify installation and maintenance of a SearXNG instance you can use the script git://utils/searx.sh.
Install¶
In most cases you will install SearXNG simply by running the command:
sudo -H ./utils/searx.sh install all
The script adds a ${SERVICE_USER}
(default:searx
) and installs SearXNG
into this user account. The installation is described in chapter
Step by step installation.
Overview¶
The --help
output of the script is largely self-explanatory
(Common commands & environment):
INFO: not yet cloned: /usr/local/searx/searx-src
usage::
searx.sh shell
searx.sh install [all|check|init-src|dot-config|user|searx-src|pyenv|uwsgi|packages|settings|buildhost]
searx.sh reinstall all
searx.sh update [searx]
searx.sh remove [all|user|pyenv|searx-src]
searx.sh activate [service]
searx.sh deactivate [service]
searx.sh inspect [service|settings <key>]
searx.sh option [debug-[on|off]|image-proxy-[on|off]|result-proxy <url> <key>]
searx.sh apache [install|remove]
shell
start interactive shell from user searx
install / remove
:all: complete (de-) installation of SearXNG service
:user: add/remove service user 'searx' (/usr/local/searx)
:dot-config: copy ./config.sh to /usr/local/searx/searx-src
:searx-src: clone https://github.com/searxng/searxng
:init-src: copy files (SEARX_SRC_INIT_FILES) to /usr/local/searx/searx-src
:pyenv: create/remove virtualenv (python) in /usr/local/searx/searx-pyenv
:uwsgi: install SearXNG uWSGI application
:settings: reinstall settings from /etc/searxng/settings.yml
:packages: install needed packages from OS package manager
:buildhost: install packages from OS package manager needed by buildhosts
install
:check: check the SearXNG installation
reinstall:
:all: runs 'install/remove all'
update searx
Update SearXNG installation (/usr/local/searx)
activate service
activate and start service daemon (systemd unit)
deactivate service
stop and deactivate service daemon (systemd unit)
inspect
:service: run some small tests and inspect service's status and log
:settings: inspect YAML setting <key> from SearXNG instance (/usr/local/searx/searx-src)
option
set one of the available options
apache
:install: apache site with the SearXNG uwsgi app
:remove: apache site
---- sourced /home/runner/work/searxng/searxng/.config.sh
SERVICE_USER : searx
SERVICE_HOME : /usr/local/searx
---- SearXNG instance setup (status: missing-searx-clone)
SEARXNG_SETTINGS_PATH : /etc/searxng/settings.yml
SEARX_PYENV : /usr/local/searx/searx-pyenv
SEARX_SRC : /usr/local/searx/searx-src
SEARXNG_URL : http://fv-az445-316