@@ -1,25 +1,28 @@
1Installation
1Installation
2============
2============
4−Step by step installation for Debian / Ubuntu with virtualenv.
4+Step by step installation for Debian/Ubuntu with virtualenv.
6Source: https://about.okhin.fr/posts/Searx/ with some additions
6Source: https://about.okhin.fr/posts/Searx/ with some additions
8How to: `Setup searx in a couple of hours with a free SSL
8How to: `Setup searx in a couple of hours with a free SSL
9certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
9certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
11Basic installation
14Basic installation
12------------------
15------------------
14For Ubuntu, be sure to have enable universe repository.
17For Ubuntu, be sure to have enable universe repository.
16−Install packages :
19+Install packages:
18.. code:: sh
21.. code:: sh
20 sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
23 sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
22−Install searx :
25+Install searx:
24.. code:: sh
27.. code:: sh
@@ -28,7 +31,7 @@ Install searx :
28 sudo useradd searx -d /usr/local/searx
31 sudo useradd searx -d /usr/local/searx
29 sudo chown searx:searx -R /usr/local/searx
32 sudo chown searx:searx -R /usr/local/searx
31−Install dependencies in a virtualenv :
34+Install dependencies in a virtualenv:
33.. code:: sh
36.. code:: sh
@@ -36,8 +39,7 @@ Install dependencies in a virtualenv :
36 cd /usr/local/searx
39 cd /usr/local/searx
37 virtualenv searx-ve
40 virtualenv searx-ve
38 . ./searx-ve/bin/activate
41 . ./searx-ve/bin/activate
39− pip install -r requirements.txt
42+ ./manage.sh update_packages
40− python setup.py install
42Configuration
44Configuration
43-------------
45-------------
@@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
54−Start searx :
56+Start searx:
56.. code:: sh
58.. code:: sh
@@ -59,7 +61,7 @@ Start searx :
60Go to http://localhost:8888
62Go to http://localhost:8888
62−If everything works fine, disable the debug option in settings.yml :
64+If everything works fine, disable the debug option in settings.yml:
64.. code:: sh
66.. code:: sh
@@ -73,14 +75,14 @@ twice).
76−Install packages :
78+Install packages:
78.. code:: sh
80.. code:: sh
80 sudo apt-get install uwsgi uwsgi-plugin-python
82 sudo apt-get install uwsgi uwsgi-plugin-python
82Create the configuration file /etc/uwsgi/apps-available/searx.ini with
84Create the configuration file /etc/uwsgi/apps-available/searx.ini with
83−this content :
85+this content:
@@ -111,7 +113,7 @@ this content :
111 pythonpath = /usr/local/searx/
113 pythonpath = /usr/local/searx/
112 chdir = /usr/local/searx/searx/
114 chdir = /usr/local/searx/searx/
114−Activate the uwsgi application and restart :
116+Activate the uwsgi application and restart:
116.. code:: sh
118.. code:: sh
@@ -126,7 +128,7 @@ with nginx
126^^^^^^^^^^
128^^^^^^^^^^
128If nginx is not installed (uwsgi will not work with the package
130If nginx is not installed (uwsgi will not work with the package
129−nginx-light) :
131+nginx-light):
131.. code:: sh
133.. code:: sh
@@ -136,7 +138,7 @@ Hosted at /
136"""""""""""
138"""""""""""
138Create the configuration file /etc/nginx/sites-available/searx with this
140Create the configuration file /etc/nginx/sites-available/searx with this
139−content :
141+content:
141.. code:: nginx
143.. code:: nginx
@@ -151,7 +153,7 @@ content :
154−Restart service :
156+Restart service:
156.. code:: sh
158.. code:: sh
@@ -159,10 +161,10 @@ Restart service :
159 sudo service uwsgi restart
161 sudo service uwsgi restart
161from subdirectory URL (/searx)
163from subdirectory URL (/searx)
162−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164+""""""""""""""""""""""""""""""
164Add this configuration in the server config file
166Add this configuration in the server config file
165−/etc/nginx/sites-available/default :
167+/etc/nginx/sites-available/default:
167.. code:: nginx
169.. code:: nginx
@@ -183,7 +185,7 @@ Enable base\_url in searx/settings.yml
184 base_url : http://your.domain.tld/searx/
186 base_url : http://your.domain.tld/searx/
186−Restart service :
188+Restart service:
188.. code:: sh
190.. code:: sh
@@ -195,7 +197,7 @@ disable logs
196for better privacy you can disable nginx logs about searx.
198for better privacy you can disable nginx logs about searx.
198−how to proceed : below ``uwsgi_pass`` in
200+how to proceed: below ``uwsgi_pass`` in
199/etc/nginx/sites-available/default add
201/etc/nginx/sites-available/default add
@@ -203,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
203 access_log /dev/null;
205 access_log /dev/null;
204 error_log /dev/null;
206 error_log /dev/null;
206−Restart service :
208+Restart service:
208.. code:: sh
210.. code:: sh
210 sudo service nginx restart
212 sudo service nginx restart
212with apache
214with apache
213−-----------
215+^^^^^^^^^^^
215−Add wsgi mod :
217+Add wsgi mod:
217.. code:: sh
219.. code:: sh
219 sudo apt-get install libapache2-mod-uwsgi
221 sudo apt-get install libapache2-mod-uwsgi
220 sudo a2enmod uwsgi
222 sudo a2enmod uwsgi
222−Add this configuration in the file /etc/apache2/apache2.conf :
224+Add this configuration in the file /etc/apache2/apache2.conf:
224.. code:: apache
226.. code:: apache
@@ -233,29 +235,29 @@ Note that if your instance of searx is not at the root, you should
233change ``<Location />`` by the location of your instance, like
235change ``<Location />`` by the location of your instance, like
234``<Location /searx>``.
236``<Location /searx>``.
236−Restart Apache :
238+Restart Apache:
238.. code:: sh
240.. code:: sh
240 sudo /etc/init.d/apache2 restart
242 sudo /etc/init.d/apache2 restart
242disable logs
244disable logs
243−------------
245+""""""""""""
245For better privacy you can disable Apache logs.
247For better privacy you can disable Apache logs.
247−WARNING : not tested
249+WARNING: not tested
249−WARNING : you can only disable logs for the whole (virtual) server not
251+WARNING: you can only disable logs for the whole (virtual) server not
250for a specific path.
252for a specific path.
252−Go back to /etc/apache2/apache2.conf and above ``<Location />`` add :
254+Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
254.. code:: apache
256.. code:: apache
256 CustomLog /dev/null combined
258 CustomLog /dev/null combined
258−Restart Apache :
260+Restart Apache:
260.. code:: sh
262.. code:: sh
@@ -272,6 +274,27 @@ How to update
272 git stash
274 git stash
273 git pull origin master
275 git pull origin master
274 git stash apply
276 git stash apply
275− pip install --upgrade -r requirements.txt
277+ ./manage.sh update_packages
276 sudo service uwsgi restart
278 sudo service uwsgi restart
283+Make sure you have installed Docker. For instance, you can deploy searx like this:
287+ docker pull wonderfall/searx
288+ docker run -d --name searx -p $PORT:8888 wonderfall/searx
290+Go to http://localhost:$PORT.
292+See https://hub.docker.com/r/wonderfall/searx/ for more informations.
294+It's also possible to build searx from the embedded Dockerfile.
298+ git clone https://github.com/asciimoo/searx.git
300+ docker build -t whatever/searx .