summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/admin/engines/settings.rst37
-rw-r--r--docs/dev/makefile.rst10
-rw-r--r--searx/settings.yml20
-rw-r--r--utils/brand.env8
-rw-r--r--utils/build_env.py15
-rwxr-xr-xutils/lxc.sh2
-rwxr-xr-xutils/morty.sh3
-rw-r--r--utils/templates/etc/searx/settings.yml2
8 files changed, 59 insertions, 38 deletions
diff --git a/docs/admin/engines/settings.rst b/docs/admin/engines/settings.rst
index 7325ea3ba..cab4ee493 100644
--- a/docs/admin/engines/settings.rst
+++ b/docs/admin/engines/settings.rst
@@ -42,9 +42,6 @@ Global Settings
``brand:``
------------
-If you change a value in this section, don't forget to rebuild instance's
-environment (:ref:`utils/brand.env <make buildenv>`)
-
.. code:: yaml
brand:
@@ -55,19 +52,24 @@ environment (:ref:`utils/brand.env <make buildenv>`)
public_instances: https://searx.space
wiki_url: https://github.com/searxng/searxng/wiki
-``git_url`` & ``git_branch`` : :ref:`buildenv GIT_URL & GIT_BRANCH<make buildenv>`
+.. sidebar:: buildenv
+
+ Changing a value tagged by :ref:`buildenv <make buildenv>`, needs to
+ rebuild instance's environment :ref:`utils/brand.env <make buildenv>`.
+
+``git_url`` & ``git_branch`` : :ref:`buildenv GIT_URL & GIT_BRANCH <make buildenv>`
Changes this, to point to your searx fork (branch).
-``issue_url`` : :ref:`buildenv ISSUE_URL<make buildenv>`
+``issue_url`` :
If you host your own issue tracker change this URL.
-``docs_url`` : :ref:`buildenv DOCS_URL<make buildenv>`
+``docs_url`` :
If you host your own documentation change this URL.
-``public_instances`` : :ref:`buildenv PUBLIC_INSTANCES<make buildenv>`
+``public_instances`` :
If you host your own https://searx.space change this URL.
-``wiki_url`` : :ref:`buildenv WIKI_URL<make buildenv>`
+``wiki_url`` :
Link to your wiki (or ``false``)
.. _settings global general:
@@ -98,10 +100,10 @@ environment (:ref:`utils/brand.env <make buildenv>`)
.. code:: yaml
server:
+ base_url: false # set custom base_url (or false)
port: 8888
bind_address: "127.0.0.1" # address to listen on
secret_key: "ultrasecretkey" # change this!
- base_url: false # set custom base_url (or false)
image_proxy: false # proxying image results through searx
default_locale: "" # default interface locale
default_theme: oscar # ui theme
@@ -112,19 +114,24 @@ environment (:ref:`utils/brand.env <make buildenv>`)
X-Robots-Tag : noindex, nofollow
Referrer-Policy : no-referrer
-``port`` & ``bind_address``: ``$SEARX_PORT`` & ``$SEARX_BIND_ADDRESS``
- Port number and *bind address* of the searx web application if you run it
- directly using ``python searx/webapp.py``. Doesn't apply to searx running on
- Apache or Nginx.
+.. sidebar:: buildenv
-``secret_key`` : ``$SEARX_SECRET``
- Used for cryptography purpose.
+ Changing a value tagged by :ref:`buildenv <make buildenv>`, needs to
+ rebuild instance's environment :ref:`utils/brand.env <make buildenv>`.
``base_url`` : :ref:`buildenv SEARX_URL <make buildenv>`
The base URL where searx is deployed. Used to create correct inbound links.
If you change the value, don't forget to rebuild instance's environment
(:ref:`utils/brand.env <make buildenv>`)
+``port`` & ``bind_address``: :ref:`buildenv SEARX_PORT & SEARX_BIND_ADDRESS <make buildenv>`
+ Port number and *bind address* of the searx web application if you run it
+ directly using ``python searx/webapp.py``. Doesn't apply to searx running on
+ Apache or Nginx.
+
+``secret_key`` : ``$SEARX_SECRET``
+ Used for cryptography purpose.
+
``image_proxy`` :
Allow your instance of searx of being able to proxy images. Uses memory space.
diff --git a/docs/dev/makefile.rst b/docs/dev/makefile.rst
index 2c10181be..5bf3c13b2 100644
--- a/docs/dev/makefile.rst
+++ b/docs/dev/makefile.rst
@@ -104,6 +104,16 @@ The ``make buildenv`` target will update the *build environment* in:
- :origin:`utils/brand.env`
+Tasks running outside of an *installed instance*, need the following settings
+from the YAML configuration:
+
+- ``GIT_URL`` from :ref:`brand.git_url <settings global brand>`
+- ``GIT_BRANCH`` from :ref:`brand.git_branch <settings global brand>`
+
+- ``SEARX_URL`` from :ref:`server.base_url <settings global server>` (aka
+ ``PUBLIC_URL``)
+- ``SEARX_BIND_ADDRESS`` from :ref:`server.bind_address <settings global server>`
+- ``SEARX_PORT`` from :ref:`server.port <settings global server>`
.. _make run:
diff --git a/searx/settings.yml b/searx/settings.yml
index 8b642d668..a951b862b 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -4,15 +4,16 @@ general:
contact_url: false # mailto:contact@example.com
brand:
- # If you change a value in this section don't forget to rebuild instance's
- # enviroment (make buildenv)
- git_url: https://github.com/searxng/searxng
- git_branch: master
- issue_url: https://github.com/searxng/searxng/issues
new_issue_url: https://github.com/searxng/searxng/issues/new
docs_url: https://searxng.github.io/searxng
public_instances: https://searx.space
wiki_url: https://github.com/searxng/searxng/wiki
+ issue_url: https://github.com/searxng/searxng/issues
+
+ # If you change a value below don't forget to rebuild instance's enviroment
+ # (make buildenv)
+ git_url: https://github.com/searxng/searxng
+ git_branch: master
search:
# Filter results. 0: None, 1: Moderate, 2: Strict
@@ -32,13 +33,14 @@ search:
formats: [html, csv, json, rss]
server:
+ # If you change port, bind_address or base_url don't forget to rebuild
+ # instance's enviroment (make buildenv)
port: 8888
bind_address: "127.0.0.1"
+ base_url: false # Possible values: false or "https://example.org/location".
- # Set custom base_url. Possible values: false or "https://example.org/location"
- # If you change base_url don't forget to rebuild instance's enviroment (make
- # buildenv) port & address to listen on
- base_url: false
+ # If your instance owns a /etc/searx/settings.yml file, then set the following
+ # values there.
secret_key: "ultrasecretkey" # change this!
# Proxying image results through searx
diff --git a/utils/brand.env b/utils/brand.env
index a8491d15d..2075a2bf4 100644
--- a/utils/brand.env
+++ b/utils/brand.env
@@ -1,7 +1,5 @@
-export SEARX_URL=''
export GIT_URL='https://github.com/searxng/searxng'
export GIT_BRANCH='master'
-export ISSUE_URL='https://github.com/searxng/searxng/issues'
-export DOCS_URL='https://searxng.github.io/searxng'
-export PUBLIC_INSTANCES='https://searx.space'
-export WIKI_URL='https://github.com/searxng/searxng/wiki'
+export SEARX_URL=''
+export SEARX_PORT='8888'
+export SEARX_BIND_ADDRESS='127.0.0.1'
diff --git a/utils/build_env.py b/utils/build_env.py
index 52ca94611..28674f923 100644
--- a/utils/build_env.py
+++ b/utils/build_env.py
@@ -23,14 +23,19 @@ def _env(*arg, **kwargs):
val = ''
return val
+# If you add or remove variables here, do not forgett to update:
+# - docs/admin/engines/settings.rst
+# - /docs/dev/makefile.rst (section make buildenv)
+
name_val = [
- ('SEARX_URL' , 'server.base_url'),
+
('GIT_URL' , 'brand.git_url'),
('GIT_BRANCH' , 'brand.git_branch'),
- ('ISSUE_URL' , 'brand.issue_url'),
- ('DOCS_URL' , 'brand.docs_url'),
- ('PUBLIC_INSTANCES' , 'brand.public_instances'),
- ('WIKI_URL' , 'brand.wiki_url'),
+
+ ('SEARX_URL' , 'server.base_url'),
+ ('SEARX_PORT' , 'server.port'),
+ ('SEARX_BIND_ADDRESS' , 'server.bind_address'),
+
]
brand_env = 'utils' + sep + 'brand.env'
diff --git a/utils/lxc.sh b/utils/lxc.sh
index f94e9841a..9a79606ca 100755
--- a/utils/lxc.sh
+++ b/utils/lxc.sh
@@ -568,7 +568,7 @@ check_connectivity() {
info_msg "Most often the connectivity is blocked by a docker installation:"
info_msg "Whenever docker is started (reboot) it sets the iptables policy "
info_msg "for the FORWARD chain to DROP, see:"
- info_msg " ${DOCS_URL}/utils/lxc.sh.html#internet-connectivity-docker"
+ info_msg " https://searxng.github.io/searxng/utils/lxc.sh.html#internet-connectivity-docker"
iptables-save | grep ":FORWARD"
fi
return $ret_val
diff --git a/utils/morty.sh b/utils/morty.sh
index ccf920273..8be0e6ba6 100755
--- a/utils/morty.sh
+++ b/utils/morty.sh
@@ -12,7 +12,6 @@ source "${REPO_ROOT}/utils/lib_install.sh"
MORTY_LISTEN="${MORTY_LISTEN:-127.0.0.1:3000}"
PUBLIC_URL_PATH_MORTY="${PUBLIC_URL_PATH_MORTY:-/morty/}"
-
PUBLIC_URL_MORTY="${PUBLIC_URL_MORTY:-$(echo "$PUBLIC_URL" | sed -e's,^\(.*://[^/]*\).*,\1,g')${PUBLIC_URL_PATH_MORTY}}"
# shellcheck disable=SC2034
@@ -111,7 +110,7 @@ info_searx() {
# shellcheck disable=SC1117
cat <<EOF
To activate result and image proxy in SearXNG read:
- ${DOCS_URL}/admin/morty.html
+ https://searxng.github.io/searxng/admin/morty.html
Check settings in file ${SEARX_SETTINGS_PATH} ...
result_proxy:
url : ${PUBLIC_URL_MORTY}
diff --git a/utils/templates/etc/searx/settings.yml b/utils/templates/etc/searx/settings.yml
index 8fb29319f..5320b0b2c 100644
--- a/utils/templates/etc/searx/settings.yml
+++ b/utils/templates/etc/searx/settings.yml
@@ -1,6 +1,6 @@
# SearXNG settings, before editing this file read:
#
-# ${DOCS_URL}/admin/engines/settings.html
+# https://searxng.github.io/searxng/admin/engines/settings.html
use_default_settings: true