Where is the SearxNG Configuration File Located in Vane? A Complete Guide
The SearxNG configuration file in Vane is located at searxng/settings.yml in the repository, which gets copied to /etc/searxng/settings.yml inside the Docker container at runtime.
Vane is an open-source metasearch engine that bundles SearxNG as its core search component. Understanding where the SearxNG configuration file resides—both in the source code and the deployed container—is essential for customizing search engines, adjusting privacy settings, or debugging deployment issues.
Default SearxNG Configuration File Location in the Vane Repository
In the Vane codebase, the default SearxNG configuration ships as a static YAML file. You can find the master configuration at:
searxng/settings.yml
This file contains the base settings for SearxNG, including enabled search engines, instance preferences, and UI configurations. When you clone the ItzCrazyKns/Vane repository, this path represents the source of truth for SearxNG behavior before any Docker packaging occurs.
How Vane Deploys the SearxNG Configuration File in Docker
Vane containerizes SearxNG using Docker, which requires copying the configuration from the repository into the container filesystem and pointing the application to it at runtime.
Dockerfile Configuration
During the image build process, the Dockerfile copies the settings file from the repository into the container's /etc/searxng/ directory:
# Dockerfile (lines 46-49)
COPY searxng/settings.yml /etc/searxng/settings.yml
This ensures the configuration is baked into the image at /etc/searxng/settings.yml, making it available to the SearxNG process when the container starts.
Runtime Environment Variables
To ensure SearxNG actually loads this file, Vane uses an entrypoint.sh script that sets the SEARXNG_SETTINGS_PATH environment variable before launching the application:
# entrypoint.sh (line 6)
export SEARXNG_SETTINGS_PATH='/etc/searxng/settings.yml'
exec /usr/local/searxng/searx-pyenv/bin/python -m flask run ...
This explicit path declaration overrides any default SearxNG configuration locations, ensuring the Vane-bundled settings take precedence.
Accessing SearxNG Configuration Within Vane's TypeScript Code
Vane wraps SearxNG with a TypeScript abstraction layer that handles URL construction and API communication. While the configuration file itself is consumed by the Python-based SearxNG process, the Vane application references the search endpoint through its own configuration registry.
In src/lib/searxng.ts, the wrapper retrieves the base URL from Vane's server-side configuration:
// src/lib/searxng.ts
import { getConfig } from '@/lib/config/serverRegistry';
function getSearxngURL(): string {
// The base URL is taken from the Vane configuration (search.searxngURL)
return getConfig('search.searxngURL');
}
The actual settings.yml values—such as enabled engines, timeouts, and privacy settings—are read directly by the SearxNG Flask application running inside the Docker container, not by the TypeScript wrapper.
Modifying the SearxNG Configuration File in Vane
To customize SearxNG behavior in Vane:
- Edit the
searxng/settings.ymlfile in the repository root - Rebuild the Docker image to copy your changes into
/etc/searxng/settings.yml - Alternatively, mount a custom
settings.ymlas a volume at/etc/searxng/settings.ymlwhen running the container to override the baked-in configuration without rebuilding
Key sections to modify in settings.yml include the engines list (to enable/disable search providers), server settings (for bind addresses and ports), and ui configurations for theming.
Summary
- The SearxNG configuration file in Vane is located at
searxng/settings.ymlin the repository source code - During Docker builds, this file is copied to
/etc/searxng/settings.ymlinside the container - The
entrypoint.shscript setsSEARXNG_SETTINGS_PATHto point SearxNG to this configuration at runtime - Vane's TypeScript wrapper in
src/lib/searxng.tscommunicates with the configured SearxNG instance but does not parse the YAML configuration directly
Frequently Asked Questions
Where is the SearxNG config file stored in Vane's Docker container?
Inside the running Docker container, the SearxNG configuration file is located at /etc/searxng/settings.yml. This path is established during the image build process when the Dockerfile copies the file from the repository's searxng/settings.yml path into the container filesystem.
How does Vane tell SearxNG where to find its configuration?
Vane uses the SEARXNG_SETTINGS_PATH environment variable to specify the configuration location. The entrypoint.sh script exports this variable with the value /etc/searxng/settings.yml before launching the SearxNG Flask application, ensuring the process reads from the correct YAML file rather than default locations.
Can I customize the SearxNG settings in Vane without rebuilding the Docker image?
Yes, you can customize SearxNG settings without rebuilding by mounting a custom settings.yml file as a Docker volume. When running the container, map your local configuration file to /etc/searxng/settings.yml using the -v flag (e.g., -v /path/to/custom/settings.yml:/etc/searxng/settings.yml). This overrides the baked-in configuration at runtime.
Which Vane source files interact with the SearxNG configuration?
The primary files are searxng/settings.yml (the configuration itself), Dockerfile (copies the config into the image), and entrypoint.sh (sets the environment variable). On the TypeScript side, src/lib/searxng.ts contains the API wrapper that communicates with the SearxNG instance configured by these files, while src/lib/config/serverRegistry.ts manages the base URL configuration that points to the SearxNG service.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →