Firecrawl’s self-hosted deployment is configured entirely through environment variables in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/firecrawl/firecrawl/llms.txt
Use this file to discover all available pages before exploring further.
.env file.
Core Configuration
These settings control the basic operation of your Firecrawl instance.Server Settings
- PORT: The port on which the API server will listen (default: 3002)
- HOST: The host address to bind to (use 0.0.0.0 to accept connections from any IP)
The PORT is used by both the main API server and worker liveness check endpoint.
Authentication
- USE_DB_AUTHENTICATION: Enable or disable API key authentication (default: false)
- To enable authentication, you need to set up Supabase (see Supabase Configuration)
Service Configuration
These settings are typically auto-configured by Docker Compose, but can be customized for advanced deployments.Redis
- REDIS_URL: Connection URL for the main Redis instance used for job queuing
- REDIS_RATE_LIMIT_URL: Connection URL for Redis instance used for rate limiting
PostgreSQL
Playwright Service
AI Features
Enable AI-powered features like JSON extraction and structured data output.OpenAI
- JSON format extraction on scrape endpoint
- Structured data extraction
- Image alt text generation
OpenAI-Compatible APIs
Ollama (Experimental)
- OLLAMA_BASE_URL: URL of your Ollama instance
- MODEL_NAME: The model to use for text generation
- MODEL_EMBEDDING_NAME: The model to use for embeddings
Ollama support is experimental. Some features may not work as expected.
Proxy Configuration
Configure proxy settings for outbound requests.- PROXY_SERVER: Can be a full URL (e.g.,
http://0.1.2.3:1234) or just an IP and port combo (e.g.,0.1.2.3:1234) - PROXY_USERNAME: Username for proxy authentication (leave commented if unauthenticated)
- PROXY_PASSWORD: Password for proxy authentication (leave commented if unauthenticated)
Search API Configuration
By default, the/search API uses Google search. You can configure it to use SearXNG instead.
- SEARXNG_ENDPOINT: URL of your SearXNG server with JSON format enabled
- SEARXNG_ENGINES: Customize which search engines to use (optional)
- SEARXNG_CATEGORIES: Customize search categories (optional, defaults should work fine)
Performance and Resource Limits
Configure worker concurrency and system resource thresholds.Worker Configuration
These settings are defined in the Docker Compose file and control worker behavior:- NUM_WORKERS_PER_QUEUE: Number of worker processes per queue (default: 8)
- CRAWL_CONCURRENT_REQUESTS: Maximum concurrent requests during a crawl (default: 10)
- MAX_CONCURRENT_JOBS: Maximum number of jobs that can run simultaneously (default: 5)
- BROWSER_POOL_SIZE: Number of browser instances to pool (default: 5)
System Resource Thresholds
- MAX_CPU: Maximum CPU usage threshold (0.0-1.0). Worker will reject new jobs when CPU usage exceeds this value (default: 0.8 or 80%)
- MAX_RAM: Maximum RAM usage threshold (0.0-1.0). Worker will reject new jobs when memory usage exceeds this value (default: 0.8 or 80%)
Docker Resource Limits
Thedocker-compose.yaml file defines resource limits for each service:
API Service:
Increase these limits if you have more CPU cores or RAM available. Adjust based on your workload and infrastructure.
Advanced Configuration
Admin UI
http://localhost:3002/admin/{BULL_AUTH_KEY}/queues.
PDF Parsing
Webhooks
Monitoring
Supabase Configuration
Right now it’s not possible to configure Supabase in self-hosted instances. These settings are reserved for future use.
Test API Key
Troubleshooting
Supabase Client Errors
Symptom:Authentication Bypass Warning
Symptom:USE_DB_AUTHENTICATION=false. This is expected for self-hosted instances. You should be able to scrape and crawl with no problems.
Docker Container Failures
Symptom: Docker containers exit unexpectedly or fail to start. Solution:- Ensure all required environment variables are set correctly in the
.envfile - Verify that all Docker services defined in
docker-compose.yamlare correctly configured - Check that necessary images are available
Redis Connection Issues
Symptom: Errors related to connecting to Redis, such as timeouts or “Connection refused”. Solution:- Ensure that the Redis service is up and running in your Docker environment
- Verify that
REDIS_URLandREDIS_RATE_LIMIT_URLin your.envfile point toredis://redis:6379 - Check network settings and firewall rules that may block the connection to the Redis port
API Endpoint Not Responding
Symptom: API requests to the Firecrawl instance timeout or return no response. Solution:- Ensure that the Firecrawl service is running by checking the Docker container status
- Verify that the
PORTandHOSTsettings in your.envfile are correct - Check that no other service is using the same port
- Verify the network configuration to ensure the host is accessible from the client making the API request
Environment Variables Reference
Here’s a complete example.env file with all available options: