Appearance
Self-Hosting Guide
Updated Feb 2026Deploy Firecrawl on your own infrastructure using Docker Compose. Self-hosting gives you full control over data and the core scraping engine.
What You Get (and Don't Get)
Included
- Full scrape, crawl, map, and search functionality
- JSON extraction (with your own LLM key)
- Batch scraping
- Change tracking
- All output formats (markdown, HTML, screenshot, etc.)
- Local LLM support via Ollama
Not Included (Cloud Only)
- Fire-engine (advanced anti-bot, IP blocking circumvention)
/agentendpoint (Spark-1 models)/browserendpoint (remote browser sandbox)- Enhanced proxy infrastructure
- Usage dashboard
Prerequisites
| Requirement | Notes |
|---|---|
| Docker | Install from docs.docker.com/get-docker |
| Docker Compose | Included with Docker Desktop; install separately on Linux |
| 4GB+ RAM | Recommended minimum for comfortable operation |
| LLM API Key | OpenAI or Ollama for JSON extraction features (optional) |
Quick Start
1. Clone the Repository
bash
git clone https://github.com/mendableai/firecrawl.git
cd firecrawl2. Create Environment File
Copy the example environment file and configure it:
bash
cp apps/api/.env.example .env3. Build and Start
bash
docker compose build
docker compose upThe API will be accessible at http://localhost:3002.
4. Verify Installation
bash
curl -X POST http://localhost:3002/v2/crawl \
-H 'Content-Type: application/json' \
-d '{"url": "https://docs.firecrawl.dev"}'Full Environment Variables Reference
Create a .env file in the project root with these variables.
Required Variables
bash
# API Server
PORT=3002
HOST=0.0.0.0
# Authentication (set false for local dev)
USE_DB_AUTHENTICATION=false
# Bull Queue Management
BULL_AUTH_KEY=CHANGEMELLM Configuration (Pick One)
bash
OPENAI_API_KEY=sk-your-openai-keybash
OLLAMA_BASE_URL=http://localhost:11434/api
MODEL_NAME=deepseek-r1:7b
MODEL_EMBEDDING_NAME=nomic-embed-textbash
OPENAI_BASE_URL=https://your-provider.com/v1
OPENAI_API_KEY=your-key
MODEL_NAME=your-modelLLM Required for These Features
Without an LLM provider configured, the following features will not work:
- JSON format extraction on scrape
/extractAPI endpoint- Summary format
- Branding format
- Change tracking (JSON field compare mode)
Proxy Configuration (Optional)
bash
PROXY_SERVER=0.1.2.3:1234
PROXY_USERNAME=user
PROXY_PASSWORD=passSearch API (Optional)
bash
# SearXNG instance for /search endpoint
SEARXNG_ENDPOINT=http://your.searxng.serverResource Limits (Optional)
bash
# Fraction of system resources (0.0 - 1.0)
MAX_CPU=0.8
MAX_RAM=0.8Additional Services (Optional)
bash
# LlamaParse for advanced PDF parsing
LLAMAPARSE_API_KEY=your-llamaparse-key
# Slack notifications
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/your/webhook/url
# Analytics
POSTHOG_API_KEY=your-posthog-key
POSTHOG_HOST=https://app.posthog.com
# Allow webhooks to localhost (dev only)
ALLOW_LOCAL_WEBHOOKS=trueComplete .env Template
bash
# ========== REQUIRED ==========
PORT=3002
HOST=0.0.0.0
USE_DB_AUTHENTICATION=false
BULL_AUTH_KEY=CHANGEME
# ========== LLM (choose one) ==========
# OpenAI
OPENAI_API_KEY=
# Ollama
# OLLAMA_BASE_URL=http://localhost:11434/api
# MODEL_NAME=deepseek-r1:7b
# MODEL_EMBEDDING_NAME=nomic-embed-text
# OpenAI-compatible
# OPENAI_BASE_URL=
# MODEL_NAME=
# ========== PROXY (optional) ==========
# PROXY_SERVER=
# PROXY_USERNAME=
# PROXY_PASSWORD=
# ========== SEARCH (optional) ==========
# SEARXNG_ENDPOINT=
# ========== RESOURCES (optional) ==========
# MAX_CPU=0.8
# MAX_RAM=0.8
# ========== SERVICES (optional) ==========
# LLAMAPARSE_API_KEY=
# SLACK_WEBHOOK_URL=
# POSTHOG_API_KEY=
# POSTHOG_HOST=
# ALLOW_LOCAL_WEBHOOKS=falseServices Architecture
Self-hosted Firecrawl runs these containers via Docker Compose:
| Service | Purpose | Required |
|---|---|---|
| Firecrawl API | Main API server on port 3002 | Yes |
| Redis | Job queue management and caching | Yes |
| Playwright | Browser rendering for JavaScript-heavy pages | Yes (included) |
| LLM Provider | Powers JSON extraction, summaries, branding | Optional |
| SearXNG | Self-hosted search engine for /search endpoint | Optional |
Ollama Setup (Local LLM)
Run AI-powered features without external API calls using Ollama.
1. Install Ollama
bash
# Linux/macOS
curl -fsSL https://ollama.com/install.sh | sh
# Windows — download from https://ollama.com/download2. Pull Models
bash
# Text generation model
ollama pull deepseek-r1:7b
# Embedding model
ollama pull nomic-embed-text3. Configure .env
bash
OLLAMA_BASE_URL=http://host.docker.internal:11434/api
MODEL_NAME=deepseek-r1:7b
MODEL_EMBEDDING_NAME=nomic-embed-textDocker Network Note
Use host.docker.internal instead of localhost when Ollama runs on the host machine and Firecrawl runs in Docker. On Linux, you may need --add-host=host.docker.internal:host-gateway in your Docker Compose config.
TypeScript Playwright Service
For improved browser rendering, switch to the TypeScript Playwright service:
1. Update docker-compose.yml
yaml
playwright-service:
build: apps/playwright-service-ts
# ... rest of config2. Update .env
bash
PLAYWRIGHT_MICROSERVICE_URL=http://localhost:3000/scrape3. Rebuild
bash
docker compose build playwright-service
docker compose up -dQueue Manager
Monitor job queues through the built-in Bull Board dashboard:
http://localhost:3002/admin/{BULL_AUTH_KEY}/queuesReplace {BULL_AUTH_KEY} with the value from your .env file. The dashboard shows:
- Active, waiting, completed, and failed jobs
- Job details and error messages
- Queue throughput metrics
- Retry controls
Kubernetes Deployment
For production cluster deployments, refer to the Kubernetes installation guide in the repository:
examples/kubernetes-cluster-install/README.mdSee: GitHub - Kubernetes Install
Troubleshooting
"Supabase client is not configured"
Expected in self-hosted setups. This warning appears because Supabase is used for authentication in the cloud version. With USE_DB_AUTHENTICATION=false, this message is harmless. Core scraping and crawling work normally.
"Bypassing authentication"
Expected in self-hosted setups. Similar to the Supabase warning, this reflects that cloud authentication is not configured. All API endpoints function normally without it.
Docker Container Failures
bash
# Check container logs
docker compose logs firecrawl-api
docker compose logs redis
docker compose logs playwright-service
# Restart specific service
docker compose restart firecrawl-api
# Full rebuild
docker compose down
docker compose build --no-cache
docker compose upRedis Connection Errors
- Verify Redis container is running:
docker compose ps - Check Redis logs:
docker compose logs redis - Ensure no port conflicts on 6379
- Verify
REDIS_URLandREDIS_RATE_LIMIT_URLare correct in.env - Check firewall rules allow container-to-container communication
API Not Responding
- Confirm the API container is running:
docker compose ps - Verify
PORTandHOSTsettings in.env - Check for port conflicts:
lsof -i :3002(Linux/macOS) ornetstat -ano | findstr 3002(Windows) - Review API logs:
docker compose logs firecrawl-api - Test connectivity:
curl http://localhost:3002/v2/health
LLM Features Not Working
- Verify your LLM API key is set correctly in
.env - For Ollama: confirm it is running (
ollama list) and models are pulled - For Ollama in Docker: use
host.docker.internalnotlocalhost - Test Ollama directly:
curl http://localhost:11434/api/generate -d '{"model":"deepseek-r1:7b","prompt":"test"}'
Memory Issues
If containers crash due to OOM:
bash
# Increase Docker memory limit (Docker Desktop > Settings > Resources)
# Or set resource limits in .env
MAX_CPU=0.8
MAX_RAM=0.8Updating
Pull the latest changes and rebuild:
bash
cd firecrawl
git pull origin main
docker compose down
docker compose build
docker compose up -dAdditional Resources
| Resource | Link |
|---|---|
| Self-host docs | SELF_HOST.md in repository root |
| Full documentation | docs.firecrawl.dev/llms.txt |
| Discord support | discord.gg/gSmWdAkdwd |
| GitHub Issues | github.com/mendableai/firecrawl/issues |
Next: Contribution Guide -->