2018-08-16 18:30:16 +00:00
# Searx
Self hosted metasearch. Prevent profiling by major search engines
## Inspiration / Further Reading
- [https://asciimoo.github.io/searx/ ](https://asciimoo.github.io/searx/ )
- [https://github.com/asciimoo/morty ](https://github.com/asciimoo/morty )
- [https://asciimoo.github.io/searx/user/own-instance.html ](https://asciimoo.github.io/searx/user/own-instance.html )
## Install / Update / Run Script
Setup a generic script that'll auto update Searx, build a container and launch it. You should only run this script at first launch and/or when you're looking for updates.
``` bash
mkdir -p /var/searx
chown root:root /var/searx
2018-09-17 20:29:55 +00:00
mkdir -p /scratch/docker/searx
cat > /scratch/docker/searx/searx.sh < < EOF
2018-08-16 18:30:16 +00:00
#!/bin/bash
ARCH=\`arch\`
if [ \$ARCH == "aarch64" ]
then
2019-01-15 17:04:03 +00:00
ARCH="arm64v8"
2018-08-16 18:30:16 +00:00
else
2019-01-15 17:04:03 +00:00
ARCH="arm32v7"
2018-08-16 18:30:16 +00:00
fi
2019-01-15 17:04:03 +00:00
docker pull registry.lollipopcloud.solutions/\$ARCH/searx:latest
2018-08-16 18:30:16 +00:00
docker stop searx
docker rm searx
docker run \\
--name searx \\
--restart unless-stopped \\
--net docker-private \\
--ip 172.30.8.8 \\
-e TZ=UTC \\
-e DEBUG=1 \\
2019-01-15 17:04:03 +00:00
-e BASE_URL=searx.kemonine.online \\
registry.lollipopcloud.solutions/\$ARCH/searx:latest
2018-08-16 18:30:16 +00:00
EOF
2018-09-17 20:29:55 +00:00
chmod a+x /scratch/docker/searx/searx.sh
2018-08-16 18:30:16 +00:00
```
## Run Searx
2018-09-17 20:29:55 +00:00
Simply execute ```/scratch/docker/searx/searx.sh``` to update/run Gogs.
2018-08-16 18:30:16 +00:00
## Serving Via Caddy
``` bash
cat > /etc/caddy/services/searx.conf < < EOF
# Searx proxy
2019-01-15 20:35:56 +00:00
searx.domain.tld {
tls user@domain.tld
2018-08-16 18:30:16 +00:00
redir 301 {
if {scheme} is http
/ https://searx.domain.tld{uri}
}
log /var/log/caddy/searx.log
proxy / 172.30.8.8:8888 {
transparent
}
}
EOF
```
## Update Unbound
``` bash
cat > /etc/unbound/local_zone/searx.conf < < EOF
local-data: "searx-insecure A 172.30.8.8"
local-data-ptr: "172.30.8.8 searx-insecure"
local-data: "searx-insecure.domain.tld A 172.30.8.8"
local-data-ptr: "172.30.8.8 searx-insecure.domain.tld"
local-data: "searx A 172.30.0.1"
local-data-ptr: "172.30.0.1 searx"
local-data: "searx.domain.tld A 172.30.0.1"
local-data-ptr: "172.30.0.1 searx.domain.tld"
EOF
```
2019-02-16 18:52:46 +00:00
## Configuration (Optional)
See [https://github.com/asciimoo/searx/blob/master/searx/settings.yml ](https://github.com/asciimoo/searx/blob/master/searx/settings.yml ) for additional details. You shouldn't need to run any configuration as the defaults are quite reasonable.