Skip to content

Retained SearXNG settings do not inherit current image defaults #6054

Description

@RaresKeY

Prerequisites

Install Method

Docker (docker compose up)

Operating System

Linux

Steps to Reproduce

  1. Check out current dev and start the bundled SearXNG service with a genuinely empty /etc/searxng volume. Confirm that the generated settings contain top-level use_default_settings: true and the service returns HTTP 200.
  2. Stop that isolated test deployment and create a separate SearXNG settings volume containing a valid retained custom settings.yml with representative server.secret_key and search settings, but without a top-level use_default_settings key.
  3. Start the current pinned SearXNG image through the current Compose entrypoint while reusing that retained volume.
  4. Request the SearXNG root endpoint and inspect the service log.

Expected Behaviour

Retained valid custom settings inherit the current image defaults during an upgrade, SearXNG returns HTTP 200, and the existing settings volume, custom values, comments, and secret remain intact.

Actual Behaviour

The current entrypoint rewrites only absent, empty, or narrowly recognized legacy settings. Other nonempty retained files are passed through unchanged, so a file without use_default_settings: true does not inherit keys required by the current image. The root endpoint returns HTTP 500 with KeyError: 'default_doi_resolver', and Odysseus remains blocked on the SearXNG healthcheck.

Logs / Screenshots

KeyError: 'default_doi_resolver'

The same retained file returns HTTP 200 after adding top-level use_default_settings: true. A separate fresh/empty configuration run also returns HTTP 200 on the same current-dev commit and image.

Model / Backend (if relevant)

Bundled SearXNG image 2026.5.31-7159b8aed.

Are you willing to submit a fix?

Yes — I can open a focused PR.

Additional Information

The fix should detect retained nonempty settings that lack the top-level inheritance key and add use_default_settings: true without replacing the rest of the file or deleting the named volume. It should be atomic, idempotent, preserve representative custom configuration and secrets byte-for-byte apart from the inserted key, cover all maintained Compose variants, and leave an explicit existing use_default_settings value untouched. Focused tests should cover both fresh generated settings and retained custom settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions