Project

General

Profile

Wiki » History » Version 4

Gareth Eaton, 02/11/2023 03:40 PM

1 1 Gareth Eaton
h1. Build your own PRIVATE search engine - Using SearXNG
2
3
4
Setup a server running Ubuntu 20.04 or Debian 11
5
6
We was using Debian 11 in a Container hosted in Proxmox
7
8
Login as root and update.
9
10
<pre>
11
apt install && sudo apt upgrade -y
12
</pre>
13
14
Install Docker
15
16
<pre>
17
curl -fsSL https://get.docker.com -o get-docker.sh
18
sudo sh get-docker.sh
19
</pre>
20
21
Install docker-compose
22
23
<pre>
24
apt install docker-compose -y
25
</pre>
26
27
Now we can move to the directory where we want to install Searx and using git
28
NOTE: if you don’t have git installed install it – apt install git
29
30
<pre>
31
cd /usr/local
32
git clone https://github.com/searxng/searxng-docker.git
33
</pre>
34
35
Verify that it copied correctly in to your current directory
36
37
<pre>
38
ls
39
</pre>
40
41 2 Gareth Eaton
42 3 Gareth Eaton
!https://lightningcr.com/attachments/download/6/Docker-searxng.webp!
43 1 Gareth Eaton
44 4 Gareth Eaton
45
Now change in to the new directory
46
47
<pre>
48 1 Gareth Eaton
cd searxng-docker
49 4 Gareth Eaton
</pre>
50
51
adjust the content of the .env file
52
53
54
<pre>
55
nano .env
56
</pre>
57
58
Add you host name to SEARXING_HOSTNAME= your_host_name_here
59
60
If you want to use a SSL remove the # on the LETSENCRYPT= <email> and add you email address
61
62
exit the file using Ctrl+X hit “Y” and then “Enter”
63
64
Run this command to generate a key
65
66
<pre>
67
sed -i “s|ultrasecretkey|$(openssl rand -hex 32) |g” searxng/settings.yml
68
</pre>
69
70
Now to start SearX run this command
71
72
73
<pre>
74
sudo docker-compose up -d
75
</pre>
76
77
78
If you want to auto restart your on a reboot you will need to edit the docker-compose.yaml file
79
80
<pre>
81
nano docker-compose.yaml
82
</pre>
83
84
Add
85
<pre>
86
add restart: always
87
</pre>
88
89
 after the following
90
91
 environment:
92
– SEARXNG_HOSTNAME=${SEARXNG_HOSTNAME:-http://localhost:80}
93
– SEARXNG_TLS=${LETSENCRYPT_EMAIL:-internal}
94
95
..
96
97
tmpfs:
98
– /var/lib/redis
99
..
100
101
environment:
102
– SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
103
104
105
now restart SearX
106
107
<pre>
108
sudo docker-compose up -d
109
</pre>