How to Use FlareSolverr to Bypass Cloudflare in 2025

Ever tried to run a web scraper, only to hit a wall with Cloudflare’s dreaded “Just a moment…” screen? You're not alone—and trust me, it's frustrating.

I’ve spent more hours than I care to admit debugging scrapers, only to be stonewalled by Cloudflare’s anti-bot protections. That’s when I came across FlareSolverr. It’s not just another tool—it’s a genuine time-saver for developers who constantly find themselves locked out by bot defenses.

The Problem: Cloudflare defends millions of sites with aggressive bot-blocking mechanisms. These can stop automated tools dead in their tracks.

The Solution: FlareSolverr acts as a proxy server that mimics real browser behavior, helping you bypass Cloudflare and DDoS-GUARD restrictions without breaking a sweat.

The Proof: It quietly waits for requests, springs into action using Selenium and undetected-chromedriver, and handles challenges just like a human browser would.

In this guide, I’ll walk you through setting up FlareSolverr, wiring it into your Python projects, and dodging the most common errors along the way.

Why You Can Trust This Guide

I’ve worked closely with developers tackling Cloudflare’s roadblocks, and I’ve used FlareSolverr in real projects. This guide pulls together official documentation, battle-tested community tips, and firsthand troubleshooting experience into one complete package that actually works.

Step 1: Install FlareSolverr (Docker, Windows, or Linux)

Your best bet? Use Docker. It packages everything, including the necessary browser, and saves you from dependency headaches.

Docker is the smoothest way to get FlareSolverr running because the image comes pre-loaded with the Chromium browser.

  1. Install Docker
    • Head over to Docker’s official site and download the version for your OS.
    • Follow the install steps.
    • Reboot your system if needed.

Spin Up the Container

docker run -d \ --name=flaresolverr \ -p 8191:8191 \ -e LOG_LEVEL=info \ --restart unless-stopped \ ghcr.io/flaresolverr/flaresolverr:latest

Pull the FlareSolverr Image

docker pull flaresolverr/flaresolverr:latest

Verify Installation

docker --version

Heads-up: Debian users, make sure you’re running libseccomp2 version 2.5.x or newer.

Option B: Windows Installation

Prefer Windows? No problem. Here’s how to get FlareSolverr running natively:

  1. Visit the FlareSolverr Releases page
  2. Download the Windows x64 zip file
  3. Extract it to a convenient folder
  4. Run FlareSolverr.exe
  5. Approve any firewall prompts

Option C: Linux Installation from Source

If you’re running Linux and want to go the manual route:

# Install dependencies
sudo apt update
sudo apt install python3.11 chromium

# Clone repository
git clone https://github.com/FlareSolverr/FlareSolverr.git
cd FlareSolverr

# Install Python dependencies
pip install -r requirements.txt

# Run FlareSolverr
python src/flaresolverr.py

Step 2: Configure FlareSolverr Settings

You can fine-tune FlareSolverr behavior using environment variables. Here are the ones you’ll use the most:

Key Configuration Options

  • LOG_LEVEL: Set to debug to help troubleshoot issues
  • HEADLESS: Flip this to false if you want to see the browser in action (useful when debugging)
  • HOST: Usually 0.0.0.0
  • PORT: Defaults to 8191
  • BROWSER_TIMEOUT: Customize how long FlareSolverr waits for a site to load

Docker Example:

docker run -d \
  --name=flaresolverr \
  -p 8191:8191 \
  -e LOG_LEVEL=info \
  -e TZ=America/New_York \
  -e BROWSER_TIMEOUT=60000 \
  --restart unless-stopped \
  flaresolverr/flaresolverr:latest

Windows Example:

set LOG_LEVEL=debug
set BROWSER_TIMEOUT=120000
FlareSolverr.exe

Step 3: Test Your FlareSolverr Installation

Let’s make sure it’s actually running.

  1. Check the Response
    A working response should show:
    • status: "ok"
    • solution: including raw HTML and cookies

Try a Simple Request with cURL

curl -L -X POST 'http://localhost:8191/v1' \ -H 'Content-Type: application/json' \ --data-raw '{ "cmd": "request.get", "url": "http://www.google.com/", "maxTimeout": 60000 }'

Visit the Local Endpoint

http://localhost:8191

You should see a friendly message: “FlareSolverr is ready!”

Step 4: Integrate FlareSolverr with Python

Now the fun part—using it in your scripts.

Basic Python Integration

You’ll need the requests library. Install it with:

pip install requests

Simple Request Example

import requests
import json

# FlareSolverr endpoint
url = 'http://localhost:8191/v1'

# Request payload
data = {
    "cmd": "request.get",
    "url": "https://example-cloudflare-site.com",
    "maxTimeout": 60000  # 60 seconds
}

# Headers
headers = {'Content-Type': 'application/json'}

# Send POST request to FlareSolverr
response = requests.post(url, data=json.dumps(data), headers=headers)

# Handle response
if response.status_code == 200:
    result = response.json()
    if result['status'] == 'ok':
        html_content = result['solution']['response']
        cookies = result['solution']['cookies']
        print("Success! Retrieved HTML content")
    else:
        print(f"Error: {result['message']}")
else:
    print(f"Request failed with status code: {response.status_code}")

Advanced Example with Error Handling

import requests
import json
from time import sleep

class FlareSolverrClient:
    def __init__(self, host='localhost', port=8191):
        self.base_url = f'http://{host}:{port}/v1'
        self.headers = {'Content-Type': 'application/json'}
    
    def solve_challenge(self, target_url, max_timeout=60000, retry_count=3):
        """
        Solve Cloudflare challenge for the given URL
        """
        payload = {
            "cmd": "request.get",
            "url": target_url,
            "maxTimeout": max_timeout
        }
        
        for attempt in range(retry_count):
            try:
                response = requests.post(
                    self.base_url, 
                    headers=self.headers,
                    json=payload,
                    timeout=max_timeout/1000 + 10  # Add buffer to timeout
                )
                
                if response.status_code == 200:
                    result = response.json()
                    
                    if result['status'] == 'ok':
                        return {
                            'success': True,
                            'html': result['solution']['response'],
                            'cookies': result['solution']['cookies'],
                            'user_agent': result['solution']['userAgent']
                        }
                    else:
                        print(f"Attempt {attempt + 1} failed: {result['message']}")
                else:
                    print(f"HTTP error {response.status_code}")
                    
            except Exception as e:
                print(f"Error on attempt {attempt + 1}: {str(e)}")
            
            if attempt < retry_count - 1:
                sleep(5)  # Wait before retry
        
        return {'success': False, 'error': 'Max retries exceeded'}

# Usage
client = FlareSolverrClient()
result = client.solve_challenge('https://example-cloudflare-site.com')

if result['success']:
    print("Successfully bypassed Cloudflare!")
    # Use the HTML content
    html = result['html']
    # Use the cookies for subsequent requests
    cookies = result['cookies']

Using Retrieved Cookies

Want to keep using the cookies FlareSolverr gives you for other requests? Here’s how:

# Convert FlareSolverr cookies to requests format
def convert_cookies(flaresolverr_cookies):
    cookie_dict = {}
    for cookie in flaresolverr_cookies:
        cookie_dict[cookie['name']] = cookie['value']
    return cookie_dict

# Use cookies in subsequent requests
if result['success']:
    cookies = convert_cookies(result['cookies'])
    user_agent = result['user_agent']
    
    # Make request with the obtained cookies
    response = requests.get(
        'https://example-cloudflare-site.com/api/data',
        cookies=cookies,
        headers={'User-Agent': user_agent}
    )

Step 5: Handle Common Errors and Troubleshooting

Timeout Errors

“Timeout after 60.0 seconds” is the top complaint.

What to do:

  1. Always update FlareSolverr—Cloudflare changes often

Disable IPv6 if Docker’s having issues:

--sysctl net.ipv6.conf.all.disable_ipv6=1

Increase the timeout

"maxTimeout": 120000

Chrome Not Found

This usually means the browser isn’t installed or properly linked.

  • Use the official Docker image (already includes Chrome)
  • Or manually install Chromium on Linux/Windows

CAPTCHA Challenges

FlareSolverr doesn’t solve CAPTCHAs. Period.

Here’s how to deal:

  • Rotate your proxy or IP address
  • Try again later
  • Look into commercial CAPTCHA solvers

Running Out of RAM

Browsers eat memory fast.

Fix: Don’t bombard FlareSolverr with concurrent requests. Use a queue or throttle system.

Advanced Tips

Using Proxies

You can route traffic through a proxy like so:

data = {
    "cmd": "request.get",
    "url": "https://example.com",
    "maxTimeout": 60000,
    "proxy": {
        "url": "http://proxy-server:8080"
    }
}

Session Management

Need to make multiple requests with the same session (like logging in)? FlareSolverr supports sessions:

# Create session
create_session_data = {
    "cmd": "sessions.create",
    "session": "my-session-id"
}

# Use session for requests
request_data = {
    "cmd": "request.get",
    "url": "https://example.com",
    "session": "my-session-id",
    "maxTimeout": 60000
}

# Destroy session when done
destroy_session_data = {
    "cmd": "sessions.destroy",
    "session": "my-session-id"
}

Important Limitations

Before you bet your whole stack on FlareSolverr, know this:

  1. Cloudflare updates frequently—FlareSolverr can break overnight
  2. CAPTCHA? You're on your own
  3. It’s resource-hungry under load
  4. It’s not currently functional for all sites—and likely won’t be fixed long-term

Alternative Solutions

If FlareSolverr doesn’t cut it:

  1. Use commercial scrapers like ZenRows
  2. Try smart proxy networks that handle anti-bot systems for you
  3. Go direct with tools like Selenium or Playwright and add stealth tactics

Final Thoughts

FlareSolverr is one of the better tools out there for scraping through Cloudflare, but it’s not magic. You’ll get the most out of it by understanding how it works, what it can and can’t do, and how to troubleshoot when things go sideways.

By now, you should be able to:

  • Get FlareSolverr up and running
  • Plug it into your Python projects
  • Handle common challenges without panic
  • Know when to switch gears and try another solution

And of course—scrape responsibly. Always check the site’s terms of service and robots.txt file before diving in.

Marius Bernard

Marius Bernard

Marius Bernard is a Product Advisor, Technical SEO, & Brand Ambassador at Roundproxies. He was the lead author for the SEO chapter of the 2024 Web and a reviewer for the 2023 SEO chapter.