
Configure PROXY_SERVER and credentials for self-hosted Firecrawl
When you self-host Firecrawl for a Retrieval-Augmented Generation (RAG) ingestion pipeline, outbound requests run from both the API server and its companion Playwright browser service. Leaving proxy variables blank sends every fetch directly from your host VM or Kubernetes node, exposing your origin server IP and concentrating all target traffic onto one datacenter address.
In Firecrawl's official self-hosted environment template (apps/api/.env.example), proxy support is configured through four dedicated variables: PROXY_SERVER, PROXY_USERNAME, PROXY_PASSWORD, and BLOCK_MEDIA.
Always check that both the api and playwright-service containers reload when editing your root .env file, and keep live credentials in deployment secrets rather than committing real passwords into git:
- Reload running containers cleanly with docker compose up -d --force-recreate api playwright-service after updating .env.
- Set BLOCK_MEDIA=true on text-focused RAG jobs so Playwright skips large images and media streams over metered residential gigabytes.
- IPMusk proxy connections authenticate via username and password only; IP allowlisting is not supported.
PROXY_SERVER=http://gate.ipmusk.com:31212
PROXY_USERNAME=USERNAME
PROXY_PASSWORD=PASSWORD
BLOCK_MEDIA=trueSplit RAG sources between Rotating Residential and Static ISP
Not every URL in a RAG knowledge base behaves the same. Public documentation portals and high-volume web discovery workloads hit different rate limits than partner dashboards or regional knowledge bases that expect consistent session cookies.
Matching the right IPMusk proxy line to each job keeps traffic bills predictable and prevents rotation from breaking stateful sessions:
| RAG ingestion pattern | Recommended IPMusk product | Key routing behavior |
|---|---|---|
| Public docs, changelogs, and wide HTML discovery | Rotating Residential (from $2.99 for 1 GB Trial; down to $0.80/GB at 1,000 GB) | Connects via gate.ipmusk.com:31212 with rotating or 1/3/10/30-min sticky exits; country and available state targeting |
| Authorized portals, partner feeds, or long cookie sessions | Static ISP (Native ISP or ISP from $3.99/IP per 30 days) | Assigned dedicated IP with host/port per resource, unmetered traffic, 30 or 90 day manual or balance-capped renewal |
| Permissive internal-facing mirrors or uptime polls | Datacenter (from $2.99/IP per 30 days) | Lowest-cost unmetered hosting-provider IP when targets accept datacenter ASNs |
For country or available state selection on IPMusk Rotating Residential, use the generated username parameters from your workspace Connect screen or build_proxy_url via MCP.
Separate 407 auth bugs from 403/429 blocks before writing to vector DB
Before scheduling automated RAG refreshes across hundreds of URLs, validate your exact proxy host, port, username, and password independently so a credential typo never gets confused with target rate limiting.
Run IPMusk's free Proxy Checker (/tools/proxy-checker) against your chosen line, or validate the placeholder environment shape locally with Python without making a live fetch:
- HTTP 407 Proxy Authentication Required: stop the batch immediately and verify PROXY_USERNAME, PROXY_PASSWORD, and port match your active 30-day residential plan or Static ISP resource.
- HTTP 403 Forbidden: separate gateway rules from destination access policies (/blog/proxy-403-forbidden) rather than looping retries infinitely.
- HTTP 429 Too Many Requests: honor Retry-After headers and bound crawl concurrency (/blog/proxy-429-too-many-requests) so empty or error pages are never chunked into your vector index.
import os
from urllib.parse import urlsplit
server = os.environ.get("PROXY_SERVER", "http://gate.ipmusk.com:31212")
user = os.environ.get("PROXY_USERNAME", "USERNAME")
pwd = os.environ.get("PROXY_PASSWORD", "PASSWORD")
parsed = urlsplit(server)
assert parsed.scheme in {"http", "https", "socks5"} and parsed.hostname and parsed.port
assert bool(user and pwd)
print({"scheme": parsed.scheme, "host": parsed.hostname, "port": parsed.port})Sources checked
- Firecrawl self-hosted environment template (PROXY_SERVER, PROXY_USERNAME, PROXY_PASSWORD, BLOCK_MEDIA): raw.githubusercontent.com/firecrawl/firecrawl/main/apps/api/.env.example and github.com/firecrawl/firecrawl
- Firecrawl self-hosting documentation: docs.firecrawl.dev/contributing/self-host
- IPMusk proxy line documentation and pricing: ipmusk.com/pricing/residential, ipmusk.com/pricing/isp, and ipmusk.com/pricing/datacenter
- IPMusk proxy diagnostics and troubleshooting guides: ipmusk.com/tools/proxy-checker, ipmusk.com/blog/proxy-403-forbidden, and ipmusk.com/blog/proxy-429-too-many-requests
All documentation and repository templates verified HTTP 200 on December 1, 2026.
