langbrain/YuNoHost - Apps.md

48 lines
1015 B
Markdown

# SearxNG
SearxNG is a fork of searx, a meta search engine
Can be used with langchain
By default, the install only allows for HTML format,
So, after install, if you run `$ curl -kLX GET --data-urlencode q='langchain' -d format=json https://searxng.domain.tld`
You will get this message:
```
<!doctype html>
<html lang=en>
<title>403 Forbidden</title>
<h1>Forbidden</h1>
<p>You don&#39;t have the permission to access the requested resource. It is either read-protected or not readable by the server.</p>
```
So we need to allow the JSON format.
`# vim /opt/yunohost/searxng/searx/settings.yml`
By default, it's in readonly mode so you'll need to be logged in as root
On line 64:
```
formats:
- html
```
So we'll need to change it to
```
formats:
- html
- json
```
Then, we can restart the service with `# systemctl restart uwsgi-app@searxng.service`
From your local machine you can now test with `$ curl -kLX GET --data-urlencode q='langchain' -d format=json https://searxng.domain.tld`