This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
Adding a dockerized SearX to Firefox's search engines list results in a wrong port for queries afterwards, always 8080 #3527
Unanswered
areksobiczewski
asked this question in
Installation issue: Docker
Replies: 1 comment
-
Today I checked whether SearxNG suffers form the problems mentioned above. It doesn't. Everything woks fine there. Just for referencje - a docker run rutine I've used for SearxNG: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem:
SearX like many other search engines can be added to Firefox's list of search engines. To do that in SearX one must right click on the URL bar when visiting one's SearX (local) instance and chose "add to Firefox". Then in theory one can start using one's SearX instance.
The problem arises when the instance one has chosen uses a different port than the default 8080 SearX proposes. I'm reffering to a scenario when one is hosting SearX for oneself as a docker container. Regardless of the port chosen for SearX to be available there (values privided via docker run), the process of adding that SearX to Firefox as a search engine always results in defaulting to 8080 port for search queries coming from Firefox afterwards. If working properly, SearX would be added to Firefox as a search engine with a port number one has chosen for it. Moreover, the situation remain the same if the env var
BASE_URL=http://localhost:PORT/
containing one's chosen port number is provided for the container.Maybe the whole situation reffers to SearX docker image only.
EDIT: Also something else strange happens. Saving any settings when using port other than 8080 results in SearX not saving them because it tries to communicate with 8080! It seems that 8080 is being forced in many places.
My guess is that the 8080 port is somehow hardcoded in the process of adding SearX as an engine to Firefox. Whereas the behavour should be either respecting the URL with which Firefox is adding a new search engine or SearX somehow semi-hardcode that and manage via the its BASE_URL env var (look next).
How to replicate:
That should be easy to replicate. Just install SearX as a container with my bellow docker run command and try to add it as a search engine to Firefox, then try to make some queries. Can't be done if the port you've chosen for SearX is different than 8080.
Software version: 1.1.0-69-75b859d2
The newest one od Docker Hub as for today in the official repo there.
My docker run command is:
docker run -d -v MOUNT:/etc/searx -p 6130:8080 -e BASE_URL=http://localhost:6130/ --name=searx searx/searx
The problem remains unsolved whatever value I put in the BASE_URL env var, and the 8080 is the default port SearX listens to when installed as a docker container - one can only map to it without rebuilding the container.
That value could be as well
-e BASE_URL=http://localhost:8080/
Beta Was this translation helpful? Give feedback.
All reactions