Skip to content

[Bug]: docker image rejects connections over IPv6 #1928

@atomic-carpenter

Description

@atomic-carpenter

crawl4ai version

latest

Expected Behavior

curl -v http://localhost:11235/dashboard should work.

The example in the README should work: https://github.com/unclecode/crawl4ai#quick-test

Current Behavior

curl -v http://localhost:11235/dashboard fails with

curl: (56) Recv failure: Connection reset by peer

The example fails with:

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

Based on the logs produced by crawl4ai, the service only listens on IPv4 addresses by default:

[2026-04-21 22:15:47 +0000] [8] [INFO] Listening at: http://0.0.0.0:11235 (8)

curl, requests and any well-behaved client try to use IPv6 by default (this is the correct behaviour as per rfc8305). The host is reachable, the connection is refused, and the client aborts.

The solution is for the docker container to listen on IPv6 by default. When listening on IPv6, Linux implicitly sets up a listener for IPv4 too, so this would not break compatibility with any setup which relies on IPv4 connectivity.

Is this reproducible?

Yes

Inputs Causing the Bug

n/a

Steps to Reproduce

curl -v http://localhost:11235/crawl

Code snippets

# This is the example from README.

# Submit a crawl job
response = requests.post(
    "http://localhost:11235/crawl",
    json={"urls": ["http://example.com"], "priority": 10},
)
if response.status_code == 200:
    print("Crawl job submitted successfully.")

if "results" in response.json():
    results = response.json()["results"]
    print("Crawl job completed. Results:")
    for result in results:
        print(result)
else:
    task_id = response.json()["task_id"]
    print(f"Crawl job submitted. Task ID:: {task_id}")
    result = requests.get(f"http://loc

OS

Linux

Python version

3.14

Browser

n/a

Browser version

n/a

Error logs & Screenshots (if applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⚙ DoneBug fix, enhancement, FR that's completed pending release🐞 BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions