FlareSolverr
FlareSolverr copied to clipboard
ARM build without Docker
Hi,
Nearly all my indexers began to use Cloudflare protection. I would like to be able to use FlareSolverr but I'm on Raspberry pi 4, so ARM. I don't use docker as I have no app where it would be useful. I would like to be able to use flaresolverr directly with Jackett without the need of Docker.
Is that currently possible ? If not, I would like to suggest making it possible.
Thanks in advance
I'm trying to do this too. I've got FlareSolverr successfully installed on a Pi (use the "source code / mac / dev" install directions) but it gives an error (but does not crash) when attempting to launch the browser/puppeteer.
Here's the installation steps I used (on a Pi 3):
sudo apt-get install npm
sudo npm install npm@latest -g
cd /opt/
sudo git clone https://github.com/FlareSolverr/FlareSolverr.git
cd FlareSolverr
sudo npm install
sudo npm run build
sudo npm run start
It launches just fine, but when I have Jackett submit a test query, I get a syntax error from FlareSolverr:
2021-02-17T22:41:17.756Z INFO REQ-1 Incoming request: POST /v1
2021-02-17T22:41:17.776Z INFO REQ-1 Params: {"maxTimeout":60000,"cmd":"request.get","url":"https://ext.to/search/?q=test&order=age&sort=desc","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.35"}
Error: Failed to launch the browser process!
/opt/FlareSolverr/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: 22: /opt/FlareSolverr/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: Syntax error: "(" unexpected
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/opt/FlareSolverr/node_modules/puppeteer/lib/launcher/BrowserRunner.js:159:20)
at Interface.helper_1.helper.addEventListener (/opt/FlareSolverr/node_modules/puppeteer/lib/launcher/BrowserRunner.js:149:65)
at Interface.emit (events.js:203:15)
at Interface.close (readline.js:397:8)
at Socket.onend (readline.js:173:10)
at Socket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
2021-02-17T22:41:18.123Z ERROR REQ-1 Failed to launch the browser process!
/opt/FlareSolverr/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: 22: /opt/FlareSolverr/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: Syntax error: "(" unexpected
"Puppeteer does not work on ARM based CPU." - https://github.com/FlareSolverr/FlareSolverr/pull/1
Ah I see. FlareSolver itself lists ARM as a supported architecture, but the puppeteer component does not support ARM.
Docker being the workaround for that (afaik, haven't actually tried it).
You can run flaresolverr on docker but keep the rest of your services normally. Personally, it works great
You can run flaresolverr on docker but keep the rest of your services normally. Personally, it works great
Yeah, I can but that's not optimal if I already have a lot of services without a single one in Docker, and adding docker to all my setup just for a service. I will try with that for now, but on the long term I would like to have a full non-docker ARM build if possible
You can run flaresolverr on docker but keep the rest of your services normally. Personally, it works great
Yeah, I can but that's not optimal if I already have a lot of services without a single one in Docker, and adding docker to all my setup just for a service. I will try with that for now, but on the long term I would like to have a full non-docker ARM build if possible
I'm in the same boat as you. For the benefit of others who are running into this, here's the steps I used to install both Docker and FlareSolverr on a Raspberry Pi.
First, install Docker:
sudo apt update && sudo apt upgrade -VV
sudo reboot
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
rm get-docker.sh
sudo usermod -aG docker pi
sudo reboot
Finally, install FlareSolverr:
docker pull ghcr.io/flaresolverr/flaresolverr:latest
docker run -d \
--name=flaresolverr \
-p 8191:8191 \
-e LOG_LEVEL=info \
--restart unless-stopped \
ghcr.io/flaresolverr/flaresolverr:latest
After a minute or two, FlareSolverr will be running on port 8191. It'll also be set to auto-run on every boot.
As for updating FlareSolverr, I'm not sure how to do that just yet. It might self-update? Or you might have to manually update the docker container every time there's a new release.
You can either manually update it or use Watchtower.
I think the issue with an arm build is not being able to package a version of the driver (that works as a proxy )that will surely work with flaresolverr. For example, the raspberrypi foundation have different chrome builds with some changes
FlareSolverr can run in ARM and ARM64 using the Docker images. This is the recommended way, because:
- You don't have to install Node and Chromium. Both packages are heavy and have a lot of dependencies. I have packed lightweight versions in the Docker image.
- Docker images are tested by me and they include stable versions of all required packages. Furthermore the Docker images work in all Linux distributions with Docker support.
- The overhead running Docker containers is low. I understand your concern but the Raspberry Pi 4 is more than capable of running dozens of Dockers.
If you want to install it from the source code you need to add more steps because Puppeteer is not able to install Chromium for ARM.
Instructions to install in ARM (not tested)
- Install chromium in the host OS:
sudo apt-get install chromium - Set the following environment variables. The Chomium path is just an example, find the chromium executable in your machine.
ENV PUPPETEER_PRODUCT=chrome \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
- Run
npm installcommand to install FlareSolverr dependencies - Run
npm run buildcommand to compile TypeScript code - Run
npm startcommand to start FlareSolverr
Let me know if it works for you. I will write the instructions in the Wiki.
I recommend you to install FlareSolverr v3 with Docker. It's also possible to install from source code, read the readme. We are not providing binaries for FlareSolverr v3 but I will think about. #660