summaryrefslogtreecommitdiff
path: root/docs/admin
diff options
context:
space:
mode:
authorJohannes 'josch' Schauer <josch@debian.org>2020-02-01 01:11:55 +0100
committerJohannes 'josch' Schauer <josch@debian.org>2020-02-01 01:11:55 +0100
commit61b98ca52e8d48a6ad3b4baed5feb4b38ee53804 (patch)
tree9f7ab24aabb0a3b25d125df81fff058ab5e63fe9 /docs/admin
parent3e49246c2e44159486ea66fed3757cdb4e4d0c50 (diff)
New upstream version 0.16.0+dfsg1
Diffstat (limited to 'docs/admin')
-rw-r--r--docs/admin/api.rst96
-rw-r--r--docs/admin/arch_public.dot33
-rw-r--r--docs/admin/architecture.rst24
-rw-r--r--docs/admin/buildhosts.rst103
-rw-r--r--docs/admin/engines.rst71
-rw-r--r--docs/admin/filtron.rst148
-rw-r--r--docs/admin/index.rst16
-rw-r--r--docs/admin/installation.rst349
-rw-r--r--docs/admin/morty.rst26
-rw-r--r--docs/admin/plugins.rst39
-rw-r--r--docs/admin/settings.rst181
11 files changed, 1086 insertions, 0 deletions
diff --git a/docs/admin/api.rst b/docs/admin/api.rst
new file mode 100644
index 0000000..7804a86
--- /dev/null
+++ b/docs/admin/api.rst
@@ -0,0 +1,96 @@
+.. _adminapi:
+
+==================
+Administration API
+==================
+
+Get configuration data
+======================
+
+.. code:: http
+
+ GET /config HTTP/1.1
+
+Sample response
+---------------
+
+.. code:: json
+
+ {
+ "autocomplete": "",
+ "categories": [
+ "map",
+ "it",
+ "images",
+ ],
+ "default_locale": "",
+ "default_theme": "oscar",
+ "engines": [
+ {
+ "categories": [
+ "map"
+ ],
+ "enabled": true,
+ "name": "openstreetmap",
+ "shortcut": "osm"
+ },
+ {
+ "categories": [
+ "it"
+ ],
+ "enabled": true,
+ "name": "arch linux wiki",
+ "shortcut": "al"
+ },
+ {
+ "categories": [
+ "images"
+ ],
+ "enabled": true,
+ "name": "google images",
+ "shortcut": "goi"
+ },
+ {
+ "categories": [
+ "it"
+ ],
+ "enabled": false,
+ "name": "bitbucket",
+ "shortcut": "bb"
+ },
+ ],
+ "instance_name": "searx",
+ "locales": {
+ "de": "Deutsch (German)",
+ "en": "English",
+ "eo": "Esperanto (Esperanto)",
+ },
+ "plugins": [
+ {
+ "enabled": true,
+ "name": "HTTPS rewrite"
+ },
+ {
+ "enabled": false,
+ "name": "Vim-like hotkeys"
+ }
+ ],
+ "safe_search": 0
+ }
+
+
+Embed search bar
+================
+
+The search bar can be embedded into websites. Just paste the example into the
+HTML of the site. URL of the searx instance and values are customizable.
+
+.. code:: html
+
+ <form method="post" action="https://searx.me/">
+ <!-- search --> <input type="text" name="q" />
+ <!-- categories --> <input type="hidden" name="categories" value="general,social media" />
+ <!-- language --> <input type="hidden" name="lang" value="all" />
+ <!-- locale --> <input type="hidden" name="locale" value="en" />
+ <!-- date filter --> <input type="hidden" name="time_range" value="month" />
+ </form>
diff --git a/docs/admin/arch_public.dot b/docs/admin/arch_public.dot
new file mode 100644
index 0000000..a46c96d
--- /dev/null
+++ b/docs/admin/arch_public.dot
@@ -0,0 +1,33 @@
+digraph G {
+
+ node [style=filled, shape=box, fillcolor="#ffffcc", fontname="Sans"];
+ edge [fontname="Sans"];
+
+ browser [label="Browser", shape=Mdiamond];
+ rp [label="Reverse Proxy", href="url to configure reverse proxy"];
+ filtron [label="Filtron", href="https://github.com/asciimoo/filtron"];
+ morty [label="Morty", href="https://github.com/asciimoo/morty"];
+ static [label="Static files", href="url to configure static files"];
+ uwsgi [label="uwsgi", href="url to configure uwsgi"]
+ searx1 [label="Searx #1"];
+ searx2 [label="Searx #2"];
+ searx3 [label="Searx #3"];
+ searx4 [label="Searx #4"];
+
+ browser -> rp [label="HTTPS"]
+
+ subgraph cluster_searx {
+ label = "Searx instance" fontname="Sans";
+ bgcolor="#fafafa";
+ { rank=same; static rp };
+ rp -> morty [label="optional: images and HTML pages proxy"];
+ rp -> static [label="optional: reverse proxy serves directly static files"];
+ rp -> filtron [label="HTTP"];
+ filtron -> uwsgi [label="HTTP"];
+ uwsgi -> searx1;
+ uwsgi -> searx2;
+ uwsgi -> searx3;
+ uwsgi -> searx4;
+ }
+
+}
diff --git a/docs/admin/architecture.rst b/docs/admin/architecture.rst
new file mode 100644
index 0000000..7064a29
--- /dev/null
+++ b/docs/admin/architecture.rst
@@ -0,0 +1,24 @@
+.. _architecture:
+
+============
+Architecture
+============
+
+.. sidebar:: Needs work!
+
+ This article needs some work / Searx is a collaborative effort. If you have
+ any contribution, feel welcome to send us your :pull:`PR <../pulls>`, see
+ :ref:`how to contribute`.
+
+Herein you will find some hints and suggestions about typical architectures of
+searx infrastructures.
+
+We start with a contribution from :pull:`@dalf <1776#issuecomment-567917320>`.
+It shows a *reference* setup for public searx instances.
+
+.. _arch public:
+
+.. kernel-figure:: arch_public.dot
+ :alt: arch_public.dot
+
+ Reference architecture of a public searx setup.
diff --git a/docs/admin/buildhosts.rst b/docs/admin/buildhosts.rst
new file mode 100644
index 0000000..5260da0
--- /dev/null
+++ b/docs/admin/buildhosts.rst
@@ -0,0 +1,103 @@
+.. _buildhosts:
+
+==========
+Buildhosts
+==========
+
+.. sidebar:: This article needs some work
+
+ If you have any contribution send us your :pull:`PR <../pulls>`, see
+ :ref:`how to contribute`.
+
+To get best results from build, its recommend to install additional packages
+on build hosts.
+
+.. _docs build:
+
+Build docs
+==========
+
+.. _Graphviz: https://graphviz.gitlab.io
+.. _ImageMagick: https://www.imagemagick.org
+.. _XeTeX: https://tug.org/xetex/
+.. _dvisvgm: https://dvisvgm.de/
+
+.. sidebar:: Sphinx build needs
+
+ - ImageMagick_
+ - Graphviz_
+ - XeTeX_
+ - dvisvgm_
+
+Most of the sphinx requirements are installed from :origin:`setup.py` and the
+docs can be build from scratch with ``make docs``. For better math and image
+processing additional packages are needed. The XeTeX_ needed not only for PDF
+creation, its also needed for :ref:`math` when HTML output is build.
+
+To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
+as images (``sphinx.ext.imgmath`` extension). If your docs build (``make
+docs``) shows warnings like this::
+
+ WARNING: dot(1) not found, for better output quality install \
+ graphviz from http://www.graphviz.org
+ ..
+ WARNING: LaTeX command 'latex' cannot be run (needed for math \
+ display), check the imgmath_latex setting
+
+you need to install additional packages on your build host, to get better HTML
+output.
+
+.. _system requirements:
+
+.. tabs::
+
+ .. group-tab:: Ubuntu / debian
+
+ .. code-block:: sh
+
+ $ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
+
+ .. group-tab:: Arch Linux
+
+ .. code-block:: sh
+
+ $ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
+
+ .. group-tab:: Fedora / RHEL
+
+ .. code-block:: sh
+
+ $ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
+
+
+For PDF output you also need:
+
+.. tabs::
+
+ .. group-tab:: Ubuntu / debian
+
+ .. code:: sh
+
+ $ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
+
+ .. group-tab:: Arch Linux
+
+ .. code:: sh
+
+ $ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
+
+ .. group-tab:: Fedora / RHEL
+
+ .. code:: sh
+
+ $ sudo dnf install \
+ texlive-collection-fontsrecommended texlive-collection-latex \
+ dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
+
+.. _system requirements END:
+
+.. literalinclude:: ../conf.py
+ :language: python
+ :start-after: # sphinx.ext.imgmath setup
+ :end-before: # sphinx.ext.imgmath setup END
+
diff --git a/docs/admin/engines.rst b/docs/admin/engines.rst
new file mode 100644
index 0000000..4b78c8c
--- /dev/null
+++ b/docs/admin/engines.rst
@@ -0,0 +1,71 @@
+.. _engines generic:
+
+=======
+Engines
+=======
+
+.. sidebar:: Further reading ..
+
+ - :ref:`settings engine`
+ - :ref:`engine settings`
+ - :ref:`engine file`
+
+============= =========== ==================== ============
+:ref:`engine settings` :ref:`engine file`
+------------------------- ---------------------------------
+Name (cfg) Categories
+------------------------- ---------------------------------
+Engine .. Paging support **P**
+------------------------- -------------------- ------------
+Shortcut **S** Language support **L**
+Timeout **TO** Time range support **TR**
+Disabled **D** Offline **O**
+------------- ----------- -------------------- ------------
+Safe search **SS**
+------------- ----------- ---------------------------------
+Weigth **W**
+------------- ----------- ---------------------------------
+Disabled **D**
+============= =========== =================================
+
+Configuration defaults (at built time):
+
+.. _configured engines:
+
+.. jinja:: webapp
+
+ .. flat-table:: Engines configured at built time (defaults)
+ :header-rows: 1
+ :stub-columns: 2
+
+ * - Name (cfg)
+ - S
+ - Engine
+ - TO
+ - Categories
+ - P
+ - L
+ - SS
+ - D
+ - TR
+ - O
+ - W
+ - D
+
+ {% for name, mod in engines.items() %}
+
+ * - {{name}}
+ - !{{mod.shortcut}}
+ - {{mod.__name__}}
+ - {{mod.timeout}}
+ - {{", ".join(mod.categories)}}
+ - {{(mod.paging and "y") or ""}}
+ - {{(mod.language_support and "y") or ""}}
+ - {{(mod.safesearch and "y") or ""}}
+ - {{(mod.disabled and "y") or ""}}
+ - {{(mod.time_range_support and "y") or ""}}
+ - {{(mod.offline and "y") or ""}}
+ - {{mod.weight or 1 }}
+ - {{(mod.disabled and "y") or ""}}
+
+ {% endfor %}
diff --git a/docs/admin/filtron.rst b/docs/admin/filtron.rst
new file mode 100644
index 0000000..07dcb9b
--- /dev/null
+++ b/docs/admin/filtron.rst
@@ -0,0 +1,148 @@
+==========================
+How to protect an instance
+==========================
+
+Searx depens on external search services. To avoid the abuse of these services
+it is advised to limit the number of requests processed by searx.
+
+An application firewall, ``filtron`` solves exactly this problem. Information
+on how to install it can be found at the `project page of filtron
+<https://github.com/asciimoo/filtron>`__.
+
+
+Sample configuration of filtron
+===============================
+
+An example configuration can be find below. This configuration limits the access
+of:
+
+- scripts or applications (roboagent limit)
+- webcrawlers (botlimit)
+- IPs which send too many requests (IP limit)
+- too many json, csv, etc. requests (rss/json limit)
+- the same UserAgent of if too many requests (useragent limit)
+
+.. code:: json
+
+ [{
+ "name":"search request",
+ "filters":[
+ "Param:q",
+ "Path=^(/|/search)$"
+ ],
+ "interval":"<time-interval-in-sec (int)>",
+ "limit":"<max-request-number-in-interval (int)>",
+ "subrules":[
+ {
+ "name":"roboagent limit",
+ "interval":"<time-interval-in-sec (int)>",
+ "limit":"<max-request-number-in-interval (int)>",
+ "filters":[
+ "Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"
+ ],
+ "actions":[
+ {
+ "name":"block",
+ "params":{
+ "message":"Rate limit exceeded"
+ }
+ }
+ ]
+ },
+ {
+ "name":"botlimit",
+ "limit":0,
+ "stop":true,
+ "filters":[
+ "Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
+ ],
+ "actions":[
+ {
+ "name":"block",
+ "params":{
+ "message":"Rate limit exceeded"
+ }
+ }
+ ]
+ },
+ {
+ "name":"IP limit",
+ "interval":"<time-interval-in-sec (int)>",
+ "limit":"<max-request-number-in-interval (int)>",
+ "stop":true,
+ "aggregations":[
+ "Header:X-Forwarded-For"
+ ],
+ "actions":[
+ {
+ "name":"block",
+ "params":{
+ "message":"Rate limit exceeded"
+ }
+ }
+ ]
+ },
+ {
+ "name":"rss/json limit",
+ "interval":"<time-interval-in-sec (int)>",
+ "limit":"<max-request-number-in-interval (int)>",
+ "stop":true,
+ "filters":[
+ "Param:format=(csv|json|rss)"
+ ],
+ "actions":[
+ {
+ "name":"block",
+ "params":{
+ "message":"Rate limit exceeded"
+ }
+ }
+ ]
+ },
+ {
+ "name":"useragent limit",
+ "interval":"<time-interval-in-sec (int)>",
+ "limit":"<max-request-number-in-interval (int)>",
+ "aggregations":[
+ "Header:User-Agent"
+ ],
+ "actions":[
+ {
+ "name":"block",
+ "params":{
+ "message":"Rate limit exceeded"
+ }
+ }
+ ]
+ }
+ ]
+ }]
+
+
+
+Route request through filtron
+=============================
+
+Filtron can be started using the following command:
+
+.. code:: sh
+
+ $ filtron -rules rules.json
+
+It listens on ``127.0.0.1:4004`` and forwards filtered requests to
+``127.0.0.1:8888`` by default.
+
+Use it along with ``nginx`` with the following example configuration.
+
+.. code:: nginx
+
+ location / {
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Scheme $scheme;
+ proxy_pass http://127.0.0.1:4004/;
+ }
+
+Requests are coming from port 4004 going through filtron and then forwarded to
+port 8888 where a searx is being run.
diff --git a/docs/admin/index.rst b/docs/admin/index.rst
new file mode 100644
index 0000000..b3c7f51
--- /dev/null
+++ b/docs/admin/index.rst
@@ -0,0 +1,16 @@
+===========================
+Administrator documentation
+===========================
+
+.. toctree::
+ :maxdepth: 1
+
+ installation
+ settings
+ api
+ architecture
+ filtron
+ morty
+ engines
+ plugins
+ buildhosts
diff --git a/docs/admin/installation.rst b/docs/admin/installation.rst
new file mode 100644
index 0000000..15800fc
--- /dev/null
+++ b/docs/admin/installation.rst
@@ -0,0 +1,349 @@
+.. _installation:
+
+============
+Installation
+============
+
+.. contents::
+ :depth: 3
+
+Basic installation
+==================
+
+Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure
+to have enable universe repository.
+
+Install packages:
+
+.. code:: sh
+
+ $ sudo -H apt-get install \
+ git build-essential libxslt-dev \
+ python-dev python-virtualenv python-babel \
+ zlib1g-dev libffi-dev libssl-dev
+
+Install searx:
+
+.. code:: sh
+
+ cd /usr/local
+ sudo -H git clone https://github.com/asciimoo/searx.git
+ sudo -H useradd searx -d /usr/local/searx
+ sudo -H chown searx:searx -R /usr/local/searx
+
+Install dependencies in a virtualenv:
+
+.. code:: sh
+
+ cd /usr/local/searx
+ sudo -H -u searx -i
+
+.. code:: sh
+
+ (searx)$ virtualenv searx-ve
+ (searx)$ . ./searx-ve/bin/activate
+ (searx)$ ./manage.sh update_packages
+
+Configuration
+==============
+
+.. code:: sh
+
+ sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
+
+Edit searx/settings.yml if necessary.
+
+Check
+=====
+
+Start searx:
+
+.. code:: sh
+
+ python searx/webapp.py
+
+Go to http://localhost:8888
+
+If everything works fine, disable the debug option in settings.yml:
+
+.. code:: sh
+
+ sed -i -e "s/debug : True/debug : False/g" searx/settings.yml
+
+At this point searx is not demonized ; uwsgi allows this.
+
+You can exit the virtualenv and the searx user bash (enter exit command
+twice).
+
+uwsgi
+=====
+
+Install packages:
+
+.. code:: sh
+
+ sudo -H apt-get install \
+ uwsgi uwsgi-plugin-python
+
+Create the configuration file ``/etc/uwsgi/apps-available/searx.ini`` with this
+content:
+
+.. code:: ini
+
+ [uwsgi]
+ # Who will run the code
+ uid = searx
+ gid = searx
+
+ # disable logging for privacy
+ disable-logging = true
+
+ # Number of workers (usually CPU count)
+ workers = 4
+
+ # The right granted on the created socket
+ chmod-socket = 666
+
+ # Plugin to use and interpretor config
+ single-interpreter = true
+ master = true
+ plugin = python
+ lazy-apps = true
+ enable-threads = true
+
+ # Module to import
+ module = searx.webapp
+
+ # Support running the module from a webserver subdirectory.
+ route-run = fixpathinfo:
+
+ # Virtualenv and python path
+ virtualenv = /usr/local/searx/searx-ve/
+ pythonpath = /usr/local/searx/
+ chdir = /usr/local/searx/searx/
+
+Activate the uwsgi application and restart:
+
+.. code:: sh
+
+ cd /etc/uwsgi/apps-enabled
+ ln -s ../apps-available/searx.ini
+ /etc/init.d/uwsgi restart
+
+Web server
+==========
+
+with nginx
+----------
+
+If nginx is not installed (uwsgi will not work with the package
+nginx-light):
+
+.. code:: sh
+
+ sudo -H apt-get install nginx
+
+Hosted at /
+~~~~~~~~~~~
+
+Create the configuration file ``/etc/nginx/sites-available/searx`` with this
+content:
+
+.. code:: nginx
+
+ server {
+ listen 80;
+ server_name searx.example.com;
+ root /usr/local/searx/searx;
+
+ location /static {
+ }
+
+ location / {
+ include uwsgi_params;
+ uwsgi_pass unix:/run/uwsgi/app/searx/socket;
+ }
+ }
+
+Create a symlink to sites-enabled:
+
+.. code:: sh
+
+ sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
+
+Restart service:
+
+.. code:: sh
+
+ sudo -H service nginx restart
+ sudo -H service uwsgi restart
+
+from subdirectory URL (/searx)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Add this configuration in the server config file
+``/etc/nginx/sites-enabled/default``:
+
+.. code:: nginx
+
+ location /searx/static {
+ alias /usr/local/searx/searx/static;
+ }
+
+ location /searx {
+ uwsgi_param SCRIPT_NAME /searx;
+ include uwsgi_params;
+ uwsgi_pass unix:/run/uwsgi/app/searx/socket;
+ }
+
+
+**OR** using reverse proxy (Please, note that reverse proxy advised to be used
+in case of single-user or low-traffic instances.)
+
+.. code:: nginx
+
+ location /searx/static {
+ alias /usr/local/searx/searx/static;
+ }
+
+ location /searx {
+ proxy_pass http://127.0.0.1:8888;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Scheme $scheme;
+ proxy_set_header X-Script-Name /searx;
+ proxy_buffering off;
+ }
+
+
+Enable ``base_url`` in ``searx/settings.yml``
+
+.. code:: yaml
+
+ base_url : http://your.domain.tld/searx/
+
+Restart service:
+
+.. code:: sh
+
+ sudo -H service nginx restart
+ sudo -H service uwsgi restart
+
+disable logs
+^^^^^^^^^^^^
+
+for better privacy you can disable nginx logs about searx.
+
+how to proceed: below ``uwsgi_pass`` in ``/etc/nginx/sites-available/default``
+add:
+
+.. code:: nginx
+
+ access_log /dev/null;
+ error_log /dev/null;
+
+Restart service:
+
+.. code:: sh
+
+ sudo -H service nginx restart
+
+with apache
+-----------
+
+Add wsgi mod:
+
+.. code:: sh
+
+ sudo -H apt-get install libapache2-mod-uwsgi
+ sudo -H a2enmod uwsgi
+
+Add this configuration in the file ``/etc/apache2/apache2.conf``:
+
+.. code:: apache
+
+ <Location />
+ Options FollowSymLinks Indexes
+ SetHandler uwsgi-handler
+ uWSGISocket /run/uwsgi/app/searx/socket
+ </Location>
+
+Note that if your instance of searx is not at the root, you should change
+``<Location />`` by the location of your instance, like ``<Location /searx>``.
+
+Restart Apache:
+
+.. code:: sh
+
+ sudo -H /etc/init.d/apache2 restart
+
+disable logs
+~~~~~~~~~~~~
+
+For better privacy you can disable Apache logs.
+
+.. warning::
+
+ You can only disable logs for the whole (virtual) server not for a specific
+ path.
+
+Go back to ``/etc/apache2/apache2.conf`` and above ``<Location />`` add:
+
+.. code:: apache
+
+ CustomLog /dev/null combined
+
+Restart Apache:
+
+.. code:: sh
+
+ sudo -H /etc/init.d/apache2 restart
+
+How to update
+=============
+
+.. code:: sh
+
+ cd /usr/local/searx
+ sudo -H -u searx -i
+
+.. code:: sh
+
+ (searx)$ . ./searx-ve/bin/activate
+ (searx)$ git stash
+ (searx)$ git pull origin master
+ (searx)$ git stash apply
+ (searx)$ ./manage.sh update_packages
+
+.. code:: sh
+
+ sudo -H service uwsgi restart
+
+Docker
+======
+
+Make sure you have installed Docker. For instance, you can deploy searx like this:
+
+.. code:: sh
+
+ docker pull wonderfall/searx
+ docker run -d --name searx -p $PORT:8888 wonderfall/searx
+
+Go to ``http://localhost:$PORT``.
+
+See https://hub.docker.com/r/wonderfall/searx/ for more informations. It's also
+possible to build searx from the embedded Dockerfile.
+
+.. code:: sh
+
+ git clone https://github.com/asciimoo/searx.git
+ cd searx
+ docker build -t whatever/searx .
+
+References
+==========
+
+* https://about.okhin.fr/posts/Searx/ with some additions
+
+* How to: `Setup searx in a couple of hours with a free SSL certificate
+ <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
diff --git a/docs/admin/morty.rst b/docs/admin/morty.rst
new file mode 100644
index 0000000..7d7b344
--- /dev/null
+++ b/docs/admin/morty.rst
@@ -0,0 +1,26 @@
+=========================
+How to setup result proxy
+=========================
+
+.. _morty: https://github.com/asciimoo/morty
+.. _morty's README: https://github.com/asciimoo/morty
+
+By default searx can only act as an image proxy for result images, but it is
+possible to proxify all the result URLs with an external service, morty_.
+
+To use this feature, morty has to be installed and activated in searx's
+``settings.yml``.
+
+Add the following snippet to your ``settings.yml`` and restart searx:
+
+.. code:: yaml
+
+ result_proxy:
+ url : http://127.0.0.1:3000/
+ key : your_morty_proxy_key
+
+``url``
+ Is the address of the running morty service.
+
+``key``
+ Is an optional argument, see `morty's README`_ for more information.
diff --git a/docs/admin/plugins.rst b/docs/admin/plugins.rst
new file mode 100644
index 0000000..4ed9066
--- /dev/null
+++ b/docs/admin/plugins.rst
@@ -0,0 +1,39 @@
+.. _plugins generic:
+
+===============
+Plugins builtin
+===============
+
+.. sidebar:: Further reading ..
+
+ - :ref:`dev plugin`
+
+Configuration defaults (at built time):
+
+:DO: Default on
+
+.. _configured plugins:
+
+.. jinja:: webapp
+
+ .. flat-table:: Plugins configured at built time (defaults)
+ :header-rows: 1
+ :stub-columns: 1
+ :widths: 3 1 9
+
+ * - Name
+ - DO
+ - Description
+
+ JS & CSS dependencies
+
+ {% for plgin in plugins %}
+
+ * - {{plgin.name}}
+ - {{(plgin.default_on and "y") or ""}}
+ - {{plgin.description}}
+
+ {% for dep in (plgin.js_dependencies + plgin.css_dependencies) %}
+ | ``{{dep}}`` {% endfor %}
+
+ {% endfor %}
diff --git a/docs/admin/settings.rst b/docs/admin/settings.rst
new file mode 100644
index 0000000..0bfdcc6
--- /dev/null
+++ b/docs/admin/settings.rst
@@ -0,0 +1,181 @@
+.. _settings.yml:
+
+================
+``settings.yml``
+================
+
+.. sidebar:: Further reading ..
+
+ - :ref:`search API`
+
+This page describe the options possibilities of the settings.yml file.
+
+.. _settings global:
+
+Global Settings
+===============
+
+.. code:: yaml
+
+ server:
+ port : 8888
+ secret_key : "ultrasecretkey" # change this!
+ debug : False # debug mode, only for development
+ request_timeout : 2.0 # seconds
+ base_url : False # set custom base_url (or False)
+ themes_path : "" # custom ui themes path
+ default_theme : oscar # ui theme
+ useragent_suffix : "" # suffix of searx_useragent, could contain
+ # informations like admins email address
+ image_proxy : False # proxying image results through searx
+ default_locale : "" # default interface locale
+
+ # uncomment below section if you want to use a proxy
+
+ #outgoing_proxies :
+ # http : http://127.0.0.1:8080
+ # https: http://127.0.0.1:8080
+
+ # uncomment below section only if you have more than one network interface
+ # which can be the source of outgoing search requests
+
+ #source_ips:
+ # - 1.1.1.1
+ # - 1.1.1.2
+
+ locales:
+ en : English
+ de : Deutsch
+ he : Hebrew
+ hu : Magyar
+ fr : Français
+ es : Español
+ it : Italiano
+ nl : Nederlands
+ ja : 日本語 (Japanese)
+ tr : Türkçe
+ ru : Russian
+ ro : Romanian
+
+
+``port`` :
+ Port number 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`` :
+ Used for cryptography purpose.
+
+``debug`` :
+ Allow a more detailed log if you run searx directly. Display *detailed* error
+ messages in the browser too, so this must be deactivated in production.
+
+``request_timeout`` :
+ Global timeout of the requests made to others engines in seconds. A bigger
+ timeout will allow to wait for answers from slow engines, but in consequence
+ will slow searx reactivity (the result page may take the time specified in the
+ timeout to load)
+
+``base_url`` :
+ The base URL where searx is deployed. Used to create correct inbound links.
+
+``themes_path`` :
+ Path to where the themes are located. If you didn't develop anything, leave it
+ blank.
+
+``default_theme`` :
+ Name of the theme you want to use by default on you searx instance.
+
+``useragent_suffix`` :
+ Suffix to the user-agent searx uses to send requests to others engines. If an
+ engine wish to block you, a contact info here may be useful to avoid that.
+
+``image_proxy`` :
+ Allow your instance of searx of being able to proxy images. Uses memory space.
+
+``default_locale`` :
+ Aearx interface language. If blank, the locale is detected by using the
+ browser language. If it doesn't work, or you are deploying a language
+ specific instance of searx, a locale can be defined using an ISO language
+ code, like ``fr``, ``en``, ``de``.
+
+.. _requests proxies: http://docs.python-requests.org/en/latest/user/advanced/#proxies
+.. _PR SOCKS support: https://github.com/kennethreitz/requests/pull/478
+
+``outgoing_proxies`` :
+ Define a proxy you wish to use, see `requests proxies`_. SOCKS proxies are
+ not supported / see `PR SOCKS support`.
+
+``source_ips`` :
+ If you use multiple nework interfaces, define from which IP the requests must
+ be made.
+
+``locales`` :
+ Locales codes and their names. Available translations of searx interface.
+
+
+.. _settings engine:
+
+Engine settings
+===============
+
+.. sidebar:: Further reading ..
+
+ - :ref:`engines-dev`
+
+.. code:: yaml
+
+ - name : bing
+ engine : bing
+ shortcut : bi
+ base_url : 'https://{language}.wikipedia.org/'
+ categories : general
+ timeout : 3.0
+ api_key : 'apikey'
+ disabled : True
+ language : en_US
+
+``name`` :
+ Name that will be used accross searx to define this engine. In settings, on
+ the result page...
+
+``engine`` :
+ Name of the python file used to handle requests and responses to and from this
+ search engine.
+
+``shortcut`` :
+ Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
+
+``base_url`` : optional
+ Part of the URL that should be stable accross every request. Can be useful to
+ use multiple sites using only one engine, or updating the site URL without
+ touching at the code.
+
+``categories`` : optional
+ Define in which categories this engine will be active. Most of the time, it is
+ defined in the code of the engine, but in a few cases it is useful, like when
+ describing multiple search engine using the same code.
+
+``timeout`` : optional
+ Timeout of the search with the current search engine. **Be careful, it will
+ modify the global timeout of searx.**
+
+``api_key`` : optional
+ In a few cases, using an API needs the use of a secret key. How to obtain them
+ is described in the file.
+
+``disabled`` : optional
+ To disable by default the engine, but not deleting it. It will allow the user
+ to manually activate it in the settings.
+
+``language`` : optional
+ If you want to use another language for a specific engine, you can define it
+ by using the full ISO code of language and country, like ``fr_FR``, ``en_US``,
+ ``de_DE``.
+
+``weigth`` : default ``1``
+ Weighting of the results of this engine.
+
+.. note::
+
+ A few more options are possible, but they are pretty specific to some
+ engines, and so won't be described here.