在wsl下安装searxng最简单的方法

在wsl下安装searxng最简单的方法

一、安装docker(略)

二、拉取docker searxng

bash 复制代码
sudo docker pull searxng/searxng

三、自定义配置文件

1.在当前账号主目录新建searxng目录,进入该目录

bash 复制代码
mkdir searxng
cd searxng

2.启动一个默认的searxng服务

bash 复制代码
sudo docker run -d --name searxng -p 8080:8080

3.复制已运行的容器中的settings.yml

bash 复制代码
docker cp 当前容器ID:/etc/searxng/settings.yml ./settings.yml

4.修改settings.yml文件

bash 复制代码
nano ./settings.yml

修改你需要改的配置:

如支持更多格式:

bash 复制代码
# formats: [html, csv, json, rss]
  formats:
    - html
    - json
    - rss
    - csv

或results_on_new_tab: true:

bash 复制代码
ui:
  # Custom static path - leave it blank if you didn't change
  static_path: ""
  # Custom templates path - leave it blank if you didn't change
  templates_path: ""
  # query_in_title: When true, the result page's titles contains the query
  # it decreases the privacy, since the browser can records the page titles.
  query_in_title: false
  # ui theme
  default_theme: simple
  # center the results ?
  center_alignment: false
  # URL prefix of the internet archive, don't forget trailing slash (if needed).
  # cache_url: "https://webcache.googleusercontent.com/search?q=cache:"
  # Default interface locale - leave blank to detect from browser information or
  # use codes from the 'locales' config section
  default_locale: ""
  # Open result links in a new tab by default
  results_on_new_tab: true
bash 复制代码
  # Is overwritten by ${SEARXNG_METHOD}
  method: "GET"

5.停止前删除当前searxng容器

bash 复制代码
docker stop 当前容器ID
docker rm 当前容器ID

6.使用自定义settings启动searxng容器

bash 复制代码
sudo docker run -d --name searxng -p 8080:8080 -v /home/当前WSL用户目录/searxng/:/etc/searxng searxng/searxng

这样就完成了自定义配置的searxng的配置和启动。

相关推荐
comedate4 天前
[WSL2] 解决 WSL2 中 Docker 部署的 SearXNG 重启后,localhost 不能用的问题
docker·wsl2·searxng
comedate2 个月前
【WSL】【OpenClaw】WSL 中配置 SearXNG 指南
wsl·searxng·openclaw·搜索引擎部署
❀͜͡傀儡师9 个月前
Docker部署搜索引擎SearXNG
运维·docker·容器·searxng
JayGboy1 年前
开源元搜索引擎SearXNG:使用Docker详细搭建部署与使用
搜索引擎·docker·容器·searxng