Hi, I self-hosted SearXNG on the Termux app on my Android device. When I visited the “About” page at http://127.0.0.1:8888/info/en/about, I encountered an error message that said “Page not found.” I’m not sure what could be causing this issue, and I would appreciate any help or guidance.
How i installed it
-
pkg install -y python git libxml2 libxslt zlib libffi openssl openssl-tool build-essential binutils clang uwsgi
-
pip3 install wheel --upgrade setuptools cython pyyaml gunicorn
-
git clone https://github.com/searxng/searxng.git
-
cd searxng
-
pip3 install -r requirements.txt
-
python3 setup.py install
-
Changed the ULTRASECRETKEY and disabled wikidata and soundcloud
-
nano ~/.bash_profile and add
export SEARXNG_SETTINGS_PATH=~/searxng/searx/settings.yml
and save and restart termux -
cd ~searxng/searx
-
python3 webapp.py
-
Modified some files the most important utils/searxng.sh and utils/lib.sh remove mostly all codes and replace with codes that are not from other distro
I also forgot to mention that I edited the ‘searxng.sh’ and ‘lib.sh’ files in the ‘~searxng/utils’ directory, because they contained code that was intended for personal computers and was not compatible with Termux.
You are running a specific module of a project locally - not the whole project. The web server is an integral part - leaving it out makes you do a bit of the leg work: you’d need to figure out how the websites get built and deployed and then reverse engineer that for your android environment.
Personally I’m fascinated by that attempt and it could be an awesome learning opportunity. To be honest I don’t have the motivation to follow your path down this rabbit hole though.
If you decide to follow up I’d appreciate you giving updates from time to time about your insights! ♥
Just the “about” page has issues? The rest is fine? No messages on the console where you ran python?
Yes, the rest seems to be fine, but I think the issue with about is because I’m running it with Python, not a web server. There may be issues with the PC files being executed that are incompatible with Termux, so I need to modify the files to fit Termux compatibility.
Flask apps are usually run from gunicorn or something. What exactly did you modify on those shell scripts?
Termux doesn’t use systemctl or sudo, and there are many other commands that are not available. I modified the searxng.sh and lib.sh files because they were written for other operating systems like Ubuntu, Arch, Debian, and Fedora, but not specifically for Termux. So, I had to make some changes to make them work in Termux. I think I may have messed something up, though. I can send you the details of how I installed and configured it, or the files I modified, if that would be helpful.
What are you using for the web server? There should be logs somewhere
I’m not using a web server to run the Searxng web app, I’m simply running it directly using the ‘python3 webapp.py’ command.
I guess I don’t understand what is supposed to be serving the webapp to your client (browser) then without something like nginx or apache. I run searxng as well but I wouldn’t be able to access it, even on localhost, without a web server.
There a webapp.py in ~/searxng/searx right? it got py in the end so you run it with python
It’s a flask app. It will run an embedded server.
That’s interesting. So you would need to install flask as well I presume, right? Or does the script pull that in?
It’s embedded. The python app will serve http.
Maybe try the searxng matrix support chat, I think there might be a few developers around that could point you in right direction:
https://matrix.to/#/#searxng:matrix.org
They also have a Mirc support channel is that is more your cup of tea.
New Lemmy Post: SearXNG Error on Android (https://lemmy.world/post/10929701)
Tagging: #SelfHosted(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)
I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md