@@ -1,25 +1,28 @@
11Installation
22============
33
4−Step by step installation for Debian / Ubuntu with virtualenv.
4+Step by step installation for Debian/Ubuntu with virtualenv.
55
66Source: https://about.okhin.fr/posts/Searx/ with some additions
77
88How to: `Setup searx in a couple of hours with a free SSL
99certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
1010
11+.. contents::
12+ :depth: 3
13+
1114Basic installation
1215------------------
1316
1417For Ubuntu, be sure to have enable universe repository.
1518
16−Install packages :
19+Install packages:
1720
1821.. code:: sh
1922
2023 sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
2124
22−Install searx :
25+Install searx:
2326
2427.. code:: sh
2528
@@ -28,7 +31,7 @@ Install searx :
2831 sudo useradd searx -d /usr/local/searx
2932 sudo chown searx:searx -R /usr/local/searx
3033
31−Install dependencies in a virtualenv :
34+Install dependencies in a virtualenv:
3235
3336.. code:: sh
3437
@@ -36,8 +39,7 @@ Install dependencies in a virtualenv :
3639 cd /usr/local/searx
3740 virtualenv searx-ve
3841 . ./searx-ve/bin/activate
39− pip install -r requirements.txt
40− python setup.py install
42+ ./manage.sh update_packages
4143
4244Configuration
4345-------------
@@ -51,7 +53,7 @@ Edit searx/settings.yml if necessary.
5153Check
5254-----
5355
54−Start searx :
56+Start searx:
5557
5658.. code:: sh
5759
@@ -59,7 +61,7 @@ Start searx :
5961
6062Go to http://localhost:8888
6163
62−If everything works fine, disable the debug option in settings.yml :
64+If everything works fine, disable the debug option in settings.yml:
6365
6466.. code:: sh
6567
@@ -73,14 +75,14 @@ twice).
7375uwsgi
7476-----
7577
76−Install packages :
78+Install packages:
7779
7880.. code:: sh
7981
8082 sudo apt-get install uwsgi uwsgi-plugin-python
8183
8284Create the configuration file /etc/uwsgi/apps-available/searx.ini with
83−this content :
85+this content:
8486
8587::
8688
@@ -111,7 +113,7 @@ this content :
111113 pythonpath = /usr/local/searx/
112114 chdir = /usr/local/searx/searx/
113115
114−Activate the uwsgi application and restart :
116+Activate the uwsgi application and restart:
115117
116118.. code:: sh
117119
@@ -126,7 +128,7 @@ with nginx
126128^^^^^^^^^^
127129
128130If nginx is not installed (uwsgi will not work with the package
129−nginx-light) :
131+nginx-light):
130132
131133.. code:: sh
132134
@@ -136,7 +138,7 @@ Hosted at /
136138"""""""""""
137139
138140Create the configuration file /etc/nginx/sites-available/searx with this
139−content :
141+content:
140142
141143.. code:: nginx
142144
@@ -151,7 +153,7 @@ content :
151153 }
152154 }
153155
154−Restart service :
156+Restart service:
155157
156158.. code:: sh
157159
@@ -159,10 +161,10 @@ Restart service :
159161 sudo service uwsgi restart
160162
161163from subdirectory URL (/searx)
162−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164+""""""""""""""""""""""""""""""
163165
164166Add this configuration in the server config file
165−/etc/nginx/sites-available/default :
167+/etc/nginx/sites-available/default:
166168
167169.. code:: nginx
168170
@@ -183,7 +185,7 @@ Enable base\_url in searx/settings.yml
183185
184186 base_url : http://your.domain.tld/searx/
185187
186−Restart service :
188+Restart service:
187189
188190.. code:: sh
189191
@@ -195,7 +197,7 @@ disable logs
195197
196198for better privacy you can disable nginx logs about searx.
197199
198−how to proceed : below ``uwsgi_pass`` in
200+how to proceed: below ``uwsgi_pass`` in
199201/etc/nginx/sites-available/default add
200202
201203::
@@ -203,23 +205,23 @@ how to proceed : below ``uwsgi_pass`` in
203205 access_log /dev/null;
204206 error_log /dev/null;
205207
206−Restart service :
208+Restart service:
207209
208210.. code:: sh
209211
210212 sudo service nginx restart
211213
212214with apache
213−-----------
215+^^^^^^^^^^^
214216
215−Add wsgi mod :
217+Add wsgi mod:
216218
217219.. code:: sh
218220
219221 sudo apt-get install libapache2-mod-uwsgi
220222 sudo a2enmod uwsgi
221223
222−Add this configuration in the file /etc/apache2/apache2.conf :
224+Add this configuration in the file /etc/apache2/apache2.conf:
223225
224226.. code:: apache
225227
@@ -233,29 +235,29 @@ Note that if your instance of searx is not at the root, you should
233235change ``<Location />`` by the location of your instance, like
234236``<Location /searx>``.
235237
236−Restart Apache :
238+Restart Apache:
237239
238240.. code:: sh
239241
240242 sudo /etc/init.d/apache2 restart
241243
242244disable logs
243−------------
245+""""""""""""
244246
245247For better privacy you can disable Apache logs.
246248
247−WARNING : not tested
249+WARNING: not tested
248250
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
250252for a specific path.
251253
252−Go back to /etc/apache2/apache2.conf and above ``<Location />`` add :
254+Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
253255
254256.. code:: apache
255257
256258 CustomLog /dev/null combined
257259
258−Restart Apache :
260+Restart Apache:
259261
260262.. code:: sh
261263
@@ -272,6 +274,27 @@ How to update
272274 git stash
273275 git pull origin master
274276 git stash apply
275− pip install --upgrade -r requirements.txt
277+ ./manage.sh update_packages
276278 sudo service uwsgi restart
277279
280+Docker
281+------
282+
283+Make sure you have installed Docker. For instance, you can deploy searx like this:
284+
285+.. code:: sh
286+
287+ docker pull wonderfall/searx
288+ docker run -d --name searx -p $PORT:8888 wonderfall/searx
289+
290+Go to http://localhost:$PORT.
291+
292+See https://hub.docker.com/r/wonderfall/searx/ for more informations.
293+
294+It's also possible to build searx from the embedded Dockerfile.
295+
296+.. code:: sh
297+
298+ git clone https://github.com/asciimoo/searx.git
299+ cd searx
300+ docker build -t whatever/searx .