Suspect that Google practices censorship and shadowbanning, contributes to a less informed society and a weakened education system. To mitigate these effects, consider using SearXNG. Here are the steps to install on Linux Mint. You need a working python environment as searxng is written in python.
sudo -H apt-get install -y \
python3-dev python3-babel python3-venv python-is-python3 python3 \
uwsgi uwsgi-plugin-python3 \
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev \
redis-server apache2
Copy
sudo ln -s /usr/bin/python3 /usr/bin/python
Copy
First thing to do is create a searxng user and log into it.
sudo userdel -r searxng
sudo rm -rf /usr/local/searxng
sudo rm -rf /usr/local/searxng-redis
Copy
sudo useradd -m -s /bin/bash searxng
sudo passwd searxng
sudo usermod -aG sudo searxng
sudo su - searxng
Copy
Download SearXNG. Clone it to the /tmp folder and not the home folder.
git clone https://github.com/Immortality-IMT/searxng_custom_features.git
# git clone https://github.com/searxng/searxng.git
mv searxng_custom_features searxng
cd searxng
echo "export SEARXNG_SRC=$HOME/searxng" >> ~/.bashrc
source ~/.bashrc
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Copy
source /usr/local/searxng/searx-pyenv/bin/activate
pip install -U pip setuptools wheel pyyaml msgspec typing_extensions "numpy<2.0" httpx pygments whitenoise flask flask-babel markdown-it-py httpx-socks tomli valkey lxml python-dateutil typer isodate h2 fasttext
pip install -r requirements.txt
deactivate
Copy
The docs are available at https://docs.searxng.org/
The only supported operating systems are...
ubuntu-*|debian-*)
# For uWSGI debian uses the LSB init process; for each configuration
# file new uWSGI daemon instance is started with additional option.
service uwsgi status "${SERVICE_NAME}"
;;
arch-*)
systemctl --no-pager -l status "uwsgi@${SERVICE_NAME%.*}"
;;
fedora-*)
Copy
You then need to change every instances of
ubuntu-*|debian-*)
Copy
to
ubuntu-*|debian-*|linuxmint-*)
Copy
The file it gets its Linux installation name is /etc/os-release variable ID
echo $(source /etc/os-release; echo "$ID");
Copy
or
cat /etc/os-release
Copy
the files in reference are...
./utils/searxng.sh ./utils/lib.sh ./utils/lib_redis.sh
Here are some fast sed commands to do just that...
find . -type f -exec sed -i 's/ubuntu|debian)/ubuntu|debian|linuxmint)/g' {} +
Copy
find . -type f -exec sed -i 's/ubuntu-\* | debian-\*)/ubuntu-\* | debian-\*|linuxmint-\*)/g' {} +
Copy
Then make the directory in /usr/local
sudo mkdir -p /usr/local/searxng
sudo chown searxng:searxng /usr/local/searxng
Copy
Then run the installation script...
sudo -H ./utils/searxng.sh install all
Copy
Disable the searxng user login
sudo usermod searxng -s /sbin/nologin
Copy
http://url/searxng
Copy
Some commands:
sudo rm -rf /usr/local/searxng sudo rm -rf /usr/local/searxng-redis sudo userdel searxng sudo groupdel searxng usermod searxng -s /sbin/bash
# -- coding: utf-8; mode: apache --
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so
# LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so
#
# SetEnvIf Request_URI /searxng dontlog
# CustomLog /dev/null combined env=dontlog
<VirtualHost *:80>
ServerName search.imtcoin.com
#<Location /searxng>
<Location />
Require all granted
Order deny,allow
Deny from all
# Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
# add the trailing slash
RedirectMatch 308 /searxng$ /searxng/
ProxyPreserveHost On
ProxyPass unix:/usr/local/searxng/run/socket|uwsgi://uwsgi-uds-searxng/
ProxyPassReverse /
# see flaskfix.py
RequestHeader set X-Scheme %{REQUEST_SCHEME}s
# RequestHeader set X-Script-Name /searxng
# see limiter.py
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
RequestHeader append X-Forwarded-For %{REMOTE_ADDR}s
</Location>
# uWSGI serves the static files and in settings.yml we use::
#
# ui:
# static_use_hash: true
#
# Alias /searxng/static/ /usr/local/searxng/searxng-src/searx/static/
RewriteEngine on
RewriteCond %{SERVER_NAME} =search.imtcoin.com
RewriteRule https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName search.imtcoin.com
#<Location /searxng>
<Location />
Require all granted
Order deny,allow
Deny from all
# Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
# add the trailing slash
RedirectMatch 308 /searxng$ /searxng/
ProxyPreserveHost On
ProxyPass unix:/usr/local/searxng/run/socket|uwsgi://uwsgi-uds-searxng/
ProxyPassReverse /
# see flaskfix.py
RequestHeader set X-Scheme %{REQUEST_SCHEME}s
# RequestHeader set X-Script-Name /searxng
# see limiter.py
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
RequestHeader append X-Forwarded-For %{REMOTE_ADDR}s
</Location>
SSLEngine on
ErrorLog ${APACHE_LOG_DIR}/search.imtcoin.com-ssl-error.log
CustomLog ${APACHE_LOG_DIR}/search.imtcoin.com-ssl-access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
# uWSGI serves the static files and in settings.yml we use::
#
# ui:
# static_use_hash: true
#
# Alias /searxng/static/ /usr/local/searxng/searxng-src/searx/static/
SSLCertificateFile /etc/letsencrypt/live/search.imtcoin.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/search.imtcoin.com/privkey.pem
</VirtualHost>
Copy
pip install "numpy<2.0"
pip install typing_extensions
pip install httpx
pip install pygments
pip install whitenoise
pip install flask
pip install flask_babel
pip install markdown-it-py
pip install httpx_socks
pip install tomli
pip install valkey
pip install lxml
pip install python-dateutil
pip install typer
pip install isodate
pip install h2
pip install fasttext
Copy
Above as a single command
pip install "numpy<2.0" typing_extensions httpx pygments whitenoise flask flask-babel markdown-it-py httpx-socks tomli valkey lxml python-dateutil typer isodate h2 fasttext
Copy
Reset the environment
su - searxng
exit
Copy
sudo userdel -r searxng
sudo rm -rf /usr/local/searxng
sudo rm -rf /usr/local/searxng-redis
Copy