Update web_search.md

This commit is contained in:
Silentoplayz 2024-12-24 11:23:28 -05:00
parent 3b1bd84893
commit 6cc9d4f258

View File

@ -125,7 +125,7 @@ sed -i 's/formats: \[\"html\"\/]/formats: [\"html\", \"json\"]/' searxng-docker/
Generate a secret key for your SearXNG instance:
```bash
sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng/settings.yml
sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng-docker/searxng/settings.yml
```
Windows users can use the following powershell script to generate the secret key:
@ -134,7 +134,7 @@ Windows users can use the following powershell script to generate the secret key
$randomBytes = New-Object byte[] 32
(New-Object Security.Cryptography.RNGCryptoServiceProvider).GetBytes($randomBytes)
$secretKey = -join ($randomBytes | ForEach-Object { "{0:x2}" -f $_ })
(Get-Content searxng/settings.yml) -replace 'ultrasecretkey', $secretKey | Set-Content searxng/settings.yml
(Get-Content searxng-docker/searxng/settings.yml) -replace 'ultrasecretkey', $secretKey | Set-Content searxng-docker/searxng/settings.yml
```
Update the port number in the `server` section to match the one you set earlier (in this case, `8080`):
@ -286,7 +286,7 @@ Next, add the following to SearXNG's `docker-compose.yaml` file:
services:
searxng:
container_name: searxng
image: searxng/searxng:latest
image: docker.io/searxng/searxng:latest
ports:
- "8080:8080"
volumes:
@ -321,7 +321,7 @@ On the first run, you must remove `cap_drop: - ALL` from the `docker-compose.yam
Alternatively, you can run SearXNG directly using `docker run`:
```bash
docker run --name searxng --env-file .env -v ./searxng:/etc/searxng:rw -p 8080:8080 --restart unless-stopped --cap-drop ALL --cap-add CHOWN --cap-add SETGID --cap-add SETUID --cap-add DAC_OVERRIDE --log-driver json-file --log-opt max-size=1m,max-file=1 searxng/searxng:latest
docker run --name searxng --env-file .env -v ./searxng:/etc/searxng:rw -p 8080:8080 --restart unless-stopped --cap-drop ALL --cap-add CHOWN --cap-add SETGID --cap-add SETUID --cap-add DAC_OVERRIDE --log-driver json-file --log-opt max-size=1m,max-file=1 docker.io/searxng/searxng:latest
```
## 3. Confirm Connectivity