How to Self-Host Firecrawl with Docker
Self-hosting Firecrawl with Docker gives you a local crawl-to-markdown API. The official repo provides docker-compose and images. This guide walks through setup and when to use Firecrawl Cloud instead.
Prerequisites
- Docker and Docker Compose
- 8 GB RAM minimum — API (8 GB) + Playwright (4 GB) + Redis, RabbitMQ, Postgres
- 20+ GB disk for images and data
For production, use a Liquid Web VPS with 16 GB RAM. See Docker on Liquid Web.
Step 1: Clone and Configure
git clone https://github.com/mendableai/firecrawl.git
cd firecrawl
Create .env from the template:
cp apps/api/.env.example .env
Edit .env:
# Required
PORT=3002
HOST=0.0.0.0
USE_DB_AUTHENTICATION=false
# Change this if deployment is public
BULL_AUTH_KEY=CHANGEME
Optional:
# AI features (/extract, JSON format)
OPENAI_API_KEY=sk-...
# Proxy for scraping
PROXY_SERVER=http://proxy.example.com:8080
Step 2: Build and Run
docker compose build
docker compose up
Services:
- api — Main API on port 3002
- playwright-service — Browser rendering (Chromium)
- redis — Caching and rate limiting
- rabbitmq — Message queue
- nuq-postgres — Data storage
The API is available at http://localhost:3002.
Step 3: First API Call
Scrape a single URL:
curl -X POST http://localhost:3002/v2/scrape \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com"}'
Crawl with recursion:
curl -X POST http://localhost:3002/v2/crawl \
-H 'Content-Type: application/json' \
-d '{"url": "https://docs.firecrawl.dev"}'
Step 4: Queue Admin UI
With BULL_AUTH_KEY set, view the Bull queue panel at:
http://localhost:3002/admin/{BULL_AUTH_KEY}/queues
Self-Hosted vs Cloud
| Feature | Self-hosted | Cloud |
|---|---|---|
/scrape, /crawl | Yes | Yes |
/agent, /browser | No | Yes |
| Screenshots | Yes (Playwright) | Yes |
| Fire-engine (IP blocks, anti-bot) | No | Yes |
| Local LLMs (Ollama) | Yes (experimental) | No |
| Maintenance | You | Firecrawl |
Self-hosting fits teams that need data locality or custom Playwright config. For anti-bot targets and zero ops, use Firecrawl Cloud.
Resource Requirements
| Component | CPU | RAM |
|---|---|---|
| API + worker | 4 cores | 8 GB |
| Playwright service | 2 cores | 4 GB |
| Redis, RabbitMQ, Postgres | 1 core | 1–2 GB |
| Total | 4+ cores | 12+ GB |
Scale down for light use; the docker-compose defaults may work on 8 GB but can be tight.
Troubleshooting
Containers exit immediately — Check docker compose logs api playwright-service. Ensure Redis and RabbitMQ are up before the API.
Supabase warnings — Normal for self-hosted. Scraping works. Supabase is for auth and advanced logging.
Playwright timeout — Increase mem_limit for playwright-service. Ensure the service is reachable at http://playwright-service:3000/scrape.
Try the scrape endpoint locally. For production, deploy on a 16 GB VPS. For zero ops, use Firecrawl Cloud.
Yes. Clone the repo, set .env, run docker compose up. Requires Docker, 8GB+ RAM. Cloud has /agent and Fire-engine.
Docker, 8 GB RAM minimum (12 GB recommended). API + Playwright + Redis + RabbitMQ + Postgres.
git pull in the repo, docker compose build, docker compose up -d. Check release notes for schema or env changes.




