Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM build without Docker #88

Closed
LeVraiRoiDHyrule opened this issue Feb 17, 2021 · 11 comments
Closed

ARM build without Docker #88

LeVraiRoiDHyrule opened this issue Feb 17, 2021 · 11 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@LeVraiRoiDHyrule
Copy link

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

@bmn001
Copy link

bmn001 commented Feb 18, 2021

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

@ilike2burnthing

This comment has been minimized.

@bmn001

This comment has been minimized.

@ilike2burnthing

This comment has been minimized.

@dmunozv04
Copy link

You can run flaresolverr on docker but keep the rest of your services normally. Personally, it works great

@LeVraiRoiDHyrule
Copy link
Author

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

@bmn001
Copy link

bmn001 commented Mar 8, 2021

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.

@ilike2burnthing
Copy link
Contributor

You can either manually update it or use Watchtower.

@dmunozv04
Copy link

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

@ngosang ngosang changed the title ARM build without Docker ? ARM build without Docker Mar 24, 2021
@ngosang ngosang added the enhancement New feature or request label Mar 24, 2021
@ngosang
Copy link
Member

ngosang commented Mar 24, 2021

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)

  1. Install chromium in the host OS: sudo apt-get install chromium
  2. 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
  1. Run npm install command to install FlareSolverr dependencies
  2. Run npm run build command to compile TypeScript code
  3. Run npm start command to start FlareSolverr

Let me know if it works for you. I will write the instructions in the Wiki.

@ngosang
Copy link
Member

ngosang commented Jan 6, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants