Selfhosting SearXNG

Some details bout SearXNG

Page content

SearXNG is a free and open-source federated metasearch engine that was forked from Searx. The SearXNG project on github has more then 15k stars.

It aggregates search results from over 70 different search engines and services, presenting them in a single, comprehensive list.

I realy loved how it works with perplexica.

searxng This nice image of pc componentsis produced by AI model Flux 1 dev.

SearXNG Key Features.

Key features of SearXNG include:

  1. Privacy-focused: SearXNG does not collect user information, track searches, or create user profiles.

  2. Customizable: Users can personalize search settings, themes, and choose which search engines to use.

  3. Self-hosted option: It can be installed on a local network or personal computer for complete control over the search engine and associated data.

  4. Open-source: The platform invites collaboration and community-driven development.

  5. Ad-free experience: SearXNG does not serve advertisements or tracking content.

  6. Tor compatibility: Search queries can be routed through the Tor network for enhanced anonymity.

SearXNG offers categorical searching, allowing users to separate results into standard categories like “Web,” “Images,” “Videos,” and “News,” as well as non-standard categories such as “Social Media,” “Music,” “Files,” “IT,” and “Science”.

The metasearch engine removes private data from requests sent to search services and result pages, ensuring user privacy. It can be accessed through public or private instances, with a list of public instances available at searx.space.

Selfhosting SearXNG

SearXNG is a free and open-source metasearch engine that can be installed on your own server or personal computer. Self-hosting SearXNG offers several benefits:

  1. Privacy control: You have full control over your search data and can ensure it’s not being collected or shared.
  2. Customization: You can personalize settings, themes, and choose which search engines to use.
  3. Ad-free experience: SearXNG doesn’t serve advertisements or tracking content.

However, there are some considerations when self-hosting SearXNG:

  1. Privacy trade-off: If you’re the only user of your self-hosted instance, your searches may be more easily identifiable by the underlying search engines.
  2. Technical knowledge: Setting up and maintaining a self-hosted instance requires some technical skills.
  3. Resource requirements: You’ll need a server or computer to run the SearXNG instance.

To self-host SearXNG, you can use Docker for easy installation and management. The process typically involves:

  1. Setting up a server or container environment
  2. Cloning the SearXNG Docker repository
  3. Configuring the application
  4. Running the Docker container

While self-hosting offers control and customization, it’s important to weigh the privacy implications and technical requirements before deciding to self-host SearXNG.

SearXNG techincal requirements for self-hosting

SearXNG can be hosted on a variety of hardware configurations, from small single-board computers to more powerful servers. The hardware requirements for hosting SearXNG are relatively modest:

  1. Processor: A 64-bit system is recommended. Even a single core can be sufficient for small-scale usage.

  2. RAM: Minimum 512MB, with 2GB or more recommended for better performance.

  3. Storage: The Docker container takes up about 300MB of space. Additional storage may be needed depending on usage and logging requirements.

  4. Network: A stable internet connection is necessary, but bandwidth requirements depend on the number of users.

These specifications can support a small to medium-sized SearXNG instance. For example:

  • A Raspberry Pi 4 can comfortably run SearXNG.
  • Some users successfully host SearXNG on virtual private servers (VPS) with as little as 1 vCPU and 512MB RAM.

However, the actual requirements may vary depending on factors such as:

  • Number of concurrent users
  • Search volume
  • Enabled features and plugins

For larger deployments or higher performance, you may want to consider more powerful hardware. It’s always a good practice to monitor your instance’s performance and adjust resources as needed.

SearXNG integration

While SearXNG is primarily a privacy-focused metasearch engine, it does not have direct integration capabilities with home automation systems. SearXNG is designed for web searching and is not inherently part of home automation ecosystems.

However, there are some indirect ways SearXNG could potentially be used in conjunction with home automation:

  1. API Integration: SearXNG can be configured to output results in JSON format, which could theoretically be used by other applications or systems.

  2. Custom Applications: Developers could potentially create custom applications that utilize SearXNG’s search capabilities and integrate them with home automation systems, though this would require significant development effort.

  3. Information Retrieval: SearXNG could be used as a privacy-respecting search tool to find information about home automation systems or troubleshooting, but this would be a manual process rather than an automated integration.

It’s important to note that SearXNG is not designed as a home automation tool. For comprehensive home automation integration, you might consider platforms specifically designed for this purpose, such as:

  • Home Assistant: An open-source home automation platform that can integrate various smart home devices and systems.
  • Hubitat: A hub that can handle Z-Wave, Zigbee, and Wi-Fi devices to solve interoperability issues.
  • Apple HomeKit: For those using Apple devices, this can provide integration for various smart home products.

These platforms are better suited for bringing together different home automation systems and devices into a unified interface and control system.

SearXNG as a part of Perplexica deployment

SearXNG plays a crucial role as part of Perplexica, functioning as the underlying search engine that powers Perplexica’s AI-enhanced search capabilities. Here’s how SearXNG integrates with Perplexica:

  1. Search Foundation: SearXNG serves as the base search engine for Perplexica, aggregating results from over 70 different search engines and services.

  2. Privacy Focus: Perplexica leverages SearXNG’s privacy-first approach, ensuring user searches are not tracked or profiled.

  3. Integration Process: When installing Perplexica, SearXNG is automatically included in the setup. Users don’t need to install SearXNG separately unless they want a standalone version.

  4. Workflow: When a user submits a query to Perplexica, the following process occurs:

    • The natural language query is converted to keywords using a language model (e.g., Llama 3.1).
    • These keywords are then passed to SearXNG for the actual search.
    • SearXNG returns the results to Perplexica.
    • Perplexica formats and presents the results to the user.
  5. Local Deployment: Both Perplexica and SearXNG can be installed locally, allowing users to run a privacy-focused AI search engine on their own hardware.

  6. Customization: Users can configure SearXNG within Perplexica, including setting up JSON format for integration with other tools or applications.

By combining SearXNG’s robust search capabilities with AI-powered features, Perplexica aims to provide a comprehensive, privacy-respecting alternative to commercial AI search engines like Perplexity or Google’s AI search.

SearXNG and privacy

SearXNG ensures privacy through multiple mechanisms:

  1. Removal of private data: SearXNG removes private information from search requests in three ways:

    • Eliminating private data from requests sent to search services
    • Not forwarding third-party content (e.g., advertisements) through search services
    • Removing private data from requests going to result pages
  2. Anonymization: SearXNG generates a random browser profile for every request and doesn’t send cookies to external search engines.

  3. IP protection: The IP address seen by search engines is that of the SearXNG instance, not the user’s. SearXNG can be configured to use proxies or Tor for additional IP protection.

  4. No data collection: SearXNG does not collect personal data, ensuring users’ searches remain confidential.

  5. No ads or tracking: Unlike most search services, SearXNG doesn’t serve advertisements or tracking content, preventing private data from being forwarded to third parties.

  6. Result page privacy: Both the referring page and search query are hidden from the visited result pages.

  7. Customization without cookies: Users can personalize settings without relying on cookies, enhancing privacy.

  8. Open-source nature: Being open-source allows for community scrutiny and verification of privacy claims.

By implementing these measures, SearXNG provides a privacy-focused search experience where only the query, selected language, and necessary technical parameters are transmitted to search engines.