FlareSolverr: A Complete Guide to Bypass Cloudflare (2025)

Rubén del Campo
Rubén del Campo
Updated: February 6, 2025 · 5 min read

Is your scraper getting blocked by Cloudflare's "under attack mode" or its browser verification challenges? FlareSolverr, a Cloudflare bypass solution, promises to help you get around it. But how far can it go?

In this tutorial, you'll learn how to set up FlareSolverr and use it as a reverse proxy to bypass Cloudflare protection.

Here's a breakdown of what you'll learn:

What Is FlareSolverr?

FlareSolverr is an open-source reverse proxy server library designed to bypass Cloudflare and DDoS-Guard protections. It emulates an actual browser that can solve challenges, pass security checks, and render website content.

FlareSolverr uses Python's Selenium and Undetected ChromeDriver under the hood, allowing it to mimic an actual browser and solve Cloudflare's challenges. As a reverse proxy, it uses a dedicated server to request on behalf of a client, such as the Requests library. It then returns the cookies to the client to bypass Cloudflare and obtain the site's HTML.

How to Use FlareSolverr

You can go about FlareSolverr's installation in different ways. We'll make it easy with step-by-step instructions.

But before that, let's try to access a website without FlareSolverr. For this example, we'll use the Cloudflare Challenge page.

To follow along, ensure you have the latest Python version installed, then install Requests using the following command:

Terminal
pip3 install requests

Import the Requests module, define the target URL, and request the target site. Then, print the response to verify it works:

Example
# pip3 install requests
import requests

# request the target website
response = requests.get("https://www.scrapingcourse.com/cloudflare-challenge")

# get the response HTML
if response.status_code != 200:
    print(f"An error occurred with status code {response.status_code}")
else:
    content = response.text
    print(content)

The request gets blocked with a 403 forbidden error, proving that the request is unauthorized:

Output
An error occurred with status code 403

The 403 error code means Cloudflare has detected and blocked your request.

Can FlareSolverr solve this problem? Let's find out.

Frustrated that your web scrapers are blocked once and again?
ZenRows API handles rotating proxies and headless browsers for you.
Try for FREE

Step 1: Install FlareSolverr With Docker, Jackett or Prowlarr

The easiest and most recommended approach to set up FlareSolverr is through a Docker container since the Chromium browser is with the image. However, you can also configure Prowlarr or Jackett.

For this tutorial, we'll show you the FlareSolverr Docker setup.

First, install and download a compatible Docker executable for your operating system. Then, run the installation package and follow the onscreen instructions. After the installation is complete, you may need to restart your computer.

To check if you've installed Docker correctly, enter the following command prompt in your terminal:

Terminal
docker

Start the Docker engine by double-clicking on the Docker Desktop icon, and you'll be ready to integrate FlareSolverr.

Next, download FlareSolverr from the Docker hub by running the following command in your terminal:

Terminal
docker pull flaresolverr/

If done correctly, you should see the FlareSolverr image in your Docker desktop's Images tab.

Docker Desktop
Click to open the image in full screen

Finally, create a new container for FlareSolverr to make it run as an isolated service on your system using the following command:

Terminal
docker create --name=flaresolverr -p 8191:8191 -v <PATH_TO_CONFIG_FILES> flaresolverr/flaresolverr

While the FlareSolverr Github repository doesn't explicitly mention the API endpoint URL, the default one is http://localhost:8191/v1 in most cases, as seen in the GitHub cURL example. Keep this URL with you because you'll use it to make a request to FlareSolverr so it can handle Cloudflare challenges.

However, if the FlareSolverr container runs on a different host or port, the URL would differ from the default above. You can inspect the container to see its host and port.

To ensure proper functionality, it's important to understand the following binding rules for FlareSolverr:

  • A FlareSolverr proxy will handle requests only if Prowlarr detects Cloudflare protection.
  • The proxy will only function if the proxy and the indexer share matching tags.
  • A proxy configured without tags or matching indexer tags will be automatically disabled.

Step 2: Run FlareSolverr

To run FlareSolverr, start your container using the following command, replacing <CONTAINER_NAME> with the actual name of your container (flaresolver in this case).

Terminal
docker start <CONTAINER_NAME>

To confirm you're running Flaresolverr correctly, visit http://localhost:8191/ on your web browser, and you should get a response similar to this:

Output
{
    "msg": "FlareSolverr is ready!",
    "version": "3.3.21",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
}

Your FlareSolverr server is now ready!

Step 3: Scrape With FlareSolverr

Now, let's see if FlareSolverr can bypass the previous Cloudflare protection. As mentioned, FlareSolverr serves as a reverse proxy that handles requests on behalf of a client. 

Using the Requests library as an HTTP client, try accessing the previous Cloudflare-protected website using FlareSolverr.

Define the Flarsolverr API URL and set the request headers to accept a JSON payload. Define the payload and send a POST request to FlareSolverr's API. The API then requests the protected website on behalf of the client using the request.get command in the data payload:

Example
# pip3 install requests
import requests

# set FlareSolverr's server URL
url = "http://localhost:8191/v1"

# set the content type
headers = {"Content-Type": "application/json"}

# include the target URL in the request payload
data = {
    "cmd": "request.get",
    "url": "https://www.scrapingcourse.com/cloudflare-challenge",
    "maxTimeout": 60000,
}

response = requests.post(
    url,
    headers=headers,
    json=data,
)

# get the response HTML
if response.status_code != 200:
    content = response.json()
    print(content)
else:
    content = response.json()
    print(content)

Unfortunately, Flarsolverr returned an error, indicating it couldn't solve the Cloudflare challenge on the target page:

Output
{
    'status': 'error',
    'message': 'Error: Error solving the challenge. Timeout after 60.0 seconds.',
    'startTimestamp': 1737044009636,
    'endTimestamp': 1737044074959,
    'version': '3.3.21',
}

FlareSolverr Alternative: Easiest Way to Scrape Cloudflare Sites

Cloudflare frequently updates its protection to clamp down on open-source bypass solutions. Besides, as earlier noted, FlareSolverr's support team admits discontinuation solely because the tool couldn't solve the Cloudflare challenge anymore.

The good news is there's a way out.

The easiest way to bypass any anti-bot system at any scale is to use a web scraping solution, such as the ZenRows Universal Scraper API. 

ZenRows is the most reliable FlareSolverr alternative, providing all the toolkits required to bypass Cloudflare and other protections consistently. It features premium proxy rotation, optimized request headers, advanced evasion techniques, JavaScript rendering, anti-bot and CAPTCHA auto-bypass, and more. 

It takes only a single API call, and ZenRows handles all the technicalities under the hood, saving you the time and cost of losing valuable data.

To see how ZenRows works, let's use it to scrape the Cloudflare-protected website that blocked you earlier.

Sign up on ZenRows to open the Universal Scraper API Request Builder. Paste your target URL in the link box and activate Premium Proxies and JS Rendering.

building a scraper with zenrows
Click to open the image in full screen

Select Python as your programming language and choose the API connection mode. Copy the generated Python code and paste it into your script.

Here's the generated Python code:

scraper.py
# pip3 install requests
import requests

url = "https://www.scrapingcourse.com/cloudflare-challenge"
apikey = "<YOUR_ZENROWS_API_KEY>"
params = {
    "url": url,
    "apikey": apikey,
    "js_render": "true",
    "premium_proxy": "true",
}
response = requests.get("https://api.zenrows.com/v1/", params=params)
print(response.text)

The above code outputs the protected website's full-page HTML, proving you bypassed Cloudflare's challenge:

File
<html lang="en">
<head>
    <!-- ... -->
    <title>Cloudflare Challenge - ScrapingCourse.com</title>
    <!-- ... -->
</head>
<body>
    <!-- ... -->
    <h2>
        You bypassed the Cloudflare challenge! :D
    </h2>
    <!-- other content omitted for brevity -->
</body>
</html>

Congratulations! 🎉 You bypassed Cloudflare protection with the ZenRows Universal Scraper API.

Conclusion

In this article, you've seen how FlareSolverr fails against Cloudflare-protected pages. Its open-source nature makes it vulnerable to detection, as it can't keep up with Cloudflare's frequent updates.

We recommend using ZenRows, an all-in-one scraping solution, to scrape any protected website confidently. It's all you need to avoid unprecedented blocks at scale.

Try ZenRows for free now!

Frequent Questions

How Do I Set up Flaresolverr?

You can set up FlareSolverr using a Docker container. To do that, ensure you have Docker installed. Then, download FlareSolverr's Docker image and create a FlareSolverr container using the following command:

docker create \
--name=flaresolverr \
-p 8191:8191 \
-v /path/to/flaresolverr/config:/app/config \
flaresolverr/flaresolverr

Lastly, run FlareSolverr using docker start container_name in your terminal.

What Is the Default Port of FlareSolverr?

The default port of FlareSolverr is 8191. FlareSolverr maps your local machine to this port, allowing you to leverage its services outside the container. You can access FlareSolverr on your local machine by visiting http://localhost:8191.

Ready to get started?

Up to 1,000 URLs for free are waiting for you