SearXNG Local Deployment and Configuration
CherryStudio supports web searches through SearXNG. SearXNG is an open-source project that can be deployed locally or on a server, so it is slightly different from other configuration methods that require an API provider.
SearXNG project link:SearXNG
Advantages of SearXNG
Open source and free, no API required
Relatively high privacy
Highly customizable
Local deployment
1. Direct Docker deployment
Because SearXNG does not require complex environment configuration, you do not need docker compose; you only need to provide an available port to deploy it. So the quickest way is to use Docker directly to pull the image and deploy it.
1. Download, install, and configure docker

After installation, choose an image storage path:

2. Search for and pull the SearXNG image
Enter in the search bar searxng :

Pull the image:


3. Run the image
After the pull succeeds, go to images page:

Select the pulled image and click Run:

Open the settings item to configure:

Use 8085 port as an example:

After the run succeeds, click the link to open SearXNG's frontend interface:

If this page appears, deployment succeeded:

Server deployment
Given that installing Docker on Windows is rather troublesome, users can deploy SearXNG on a server and also share it with others. However, unfortunately, SearXNG itself does not currently support authentication, which allows others to scan for and abuse your deployed instance through technical means.
For this reason, Cherry Studio now supports configuring HTTP Basic Authentication (RFC7617)If you want to expose your self-hosted SearXNG to the public internet, please be sure configure HTTP Basic Authentication through reverse proxy software such as Nginx. Below is a brief tutorial; you need basic Linux operations knowledge.
Deploy SearXNG
Similarly, still use Docker for deployment. Assume you have already followed the official tutorial to install the latest Docker CE on the server. The following provides an all-in-one command, suitable for a fresh installation on Debian systems:
If you need to change the local listening port or reuse an existing local nginx, you can edit docker-compose.yaml file, refer to the following:
Run docker compose up -d to start. Run docker compose logs -f searxng to view the logs.
Deploy Nginx reverse proxy and HTTP Basic Authentication
If you are using a server panel program such as BaoTa Panel or 1Panel, please refer to its documentation to add a website and configure the Nginx reverse proxy, then find where to modify the Nginx configuration file, modify it according to the example below:
Assuming the Nginx configuration file is saved in /etc/nginx/conf.d under that directory, we will save the password file in the same directory.
Execute the command (replace example_name,example_password with the username and password you plan to set):
Restart Nginx (reloading the configuration is also fine).
At this point, you can open the web page and it will already prompt you for a username and password. Enter the username and password you set earlier to see whether you can successfully enter the SearXNG search page, thereby checking whether the configuration is correct.

Cherry Studio related configuration
After SearXNG has been successfully deployed locally or on a server, next comes the CherryStudio configuration.
Go to the web search settings page and select Searxng:

Directly entering the locally deployed link shows verification failed; don't worry at this point:

Because after direct deployment, json return type is not configured by default, data cannot be fetched, so the configuration file needs to be modified.
Go back to Docker, go to the Files tab and find the tagged folder in the image:

Expand it and scroll further down, and you will find another tagged folder:

Continue expanding and find settings.yml configuration file:

Click to open the file editor:

Find line 78, and you can see that the only type is html

After adding the json type and saving, rerun the image


Go back to Cherry Studio to verify again, verification successful:

The address can be entered as local: http://localhost : port number You can also enter the Docker address:http://host.docker.internal : port number
If the user followed the previous example to deploy on a server and configured the reverse proxy correctly, json return type has already been enabled. After entering the address for verification, because HTTP Basic Authentication has been configured for the reverse proxy, the verification should return 401 error code:

Configure HTTP Basic Authentication in the client and enter the username and password set just now:

Perform verification; it should succeed.
Other configuration
At this point, SearXNG already has the default ability to search online; if you need to customize search engines, you need to configure them yourself
Note that the preferences here do not affect the configuration when the large model is called

If you need to configure the search engine used for large-model calls, set it in the configuration file:


Language configuration reference:

If the content is too long to edit directly, you can copy it into a local IDE, then paste it back into the configuration file after modifying it.
Common reasons for verification failure
Return format not added with json format
Add json to the return formats in the configuration file:

Search engine not configured correctly
Cherry Studio will by default select engines whose categories include both web and general for searching. By default it will select engines such as Google, but since Google and similar websites cannot be directly accessed from mainland China, this causes failure. Adding the following configuration forces searxng to use the baidu engine, which solves the problem:
Access rate too fast
The limiter configuration in searxng is blocking API access; try setting it to false in the settings:

Get help and submit feedback
If you encounter any questions, bugs, or have suggestions for feature improvements during configuration or use, please refer to Feedback and Suggestions for the official channels provided.
Last updated
Was this helpful?