File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ GIT_COMMITTER_EMAIL=you@example.com
7979# The compose file runs a private SearXNG instance backing the `web_search`
8080# tool. SearXNG reads this as server.secret_key at app load and it overrides
8181# settings.yml. Set a strong random secret (e.g. `openssl rand -hex 32`). The
82- # instance is internal-only (no host port) but set it anyway — left unset,
83- # SearXNG runs with the "ultrasecretkey" sentinel and logs a warning.
82+ # instance is internal-only (no host port); if you leave SEARXNG_SECRET unset,
83+ # compose falls back to a static internal default so the sidecar still boots.
84+ # Do NOT set it to the literal "ultrasecretkey" — in production mode SearXNG
85+ # treats that sentinel as fatal and the worker exits on startup.
8486SEARXNG_SECRET = change-me-run-openssl-rand-hex-32
Original file line number Diff line number Diff line change @@ -137,10 +137,13 @@ services:
137137 environment :
138138 - SEARXNG_BASE_URL=http://searxng:8080/
139139 # SearXNG reads server.secret_key from this env var at app load, overriding
140- # settings.yml. Set SEARXNG_SECRET in .env. The fallback is the canonical
141- # "ultrasecretkey" sentinel so an unset secret triggers SearXNG's own
142- # "secret_key is not changed" warning rather than a silent weak literal.
143- - SEARXNG_SECRET=${SEARXNG_SECRET:-ultrasecretkey}
140+ # settings.yml. Set SEARXNG_SECRET in .env. The fallback must NOT be the
141+ # "ultrasecretkey" sentinel: in production (non-debug) mode SearXNG treats
142+ # that literal as FATAL — it logs "secret_key is not changed" and calls
143+ # sys.exit(1), so the worker dies and the container never serves. This
144+ # internal-only instance (no host port, single trusted consumer) is fine
145+ # with a static default; override it in .env for any exposed deployment.
146+ - SEARXNG_SECRET=${SEARXNG_SECRET:-odek-searxng-internal-default-override-in-env}
144147 volumes :
145148 - ./searxng/settings.yml:/etc/searxng/settings.yml:ro
146149 # SearXNG needs outbound internet to query upstream engines (Google, Bing,
Original file line number Diff line number Diff line change @@ -21,11 +21,12 @@ general:
2121server :
2222 # SearXNG reads server.secret_key from the SEARXNG_SECRET env var at app load
2323 # (searx/settings_defaults.py: environ_name='SEARXNG_SECRET'), which overrides
24- # this value — set SEARXNG_SECRET in .env. Keep this as the canonical
25- # "ultrasecretkey" placeholder so that, if SEARXNG_SECRET is ever left unset,
26- # SearXNG logs its built-in "secret_key is not changed" warning instead of
27- # silently running with a custom-but-weak literal.
28- secret_key : " ultrasecretkey"
24+ # this value — set SEARXNG_SECRET in .env. This must NOT be the literal
25+ # "ultrasecretkey": in production (non-debug) mode SearXNG treats that sentinel
26+ # as fatal (logs "secret_key is not changed" and exits the worker), so a
27+ # missing env override would crash startup. This is a private, internal-only
28+ # instance (single trusted consumer), so a static default is acceptable.
29+ secret_key : " odek-searxng-internal-default-override-in-env"
2930 bind_address : " 0.0.0.0"
3031 port : 8080
3132 # Single trusted consumer on a private network — disable the bot limiter
You can’t perform that action at this time.
0 commit comments