Running locally
Learn how to run Firecrawl locally to run on your own and/or contribute to the project.
Welcome to Firecrawl 🔥! Here are some instructions on how to get the project locally so you can run it on your own and contribute.
If you’re contributing, note that the process is similar to other open-source repos, i.e., fork Firecrawl, make changes, run tests, PR.
If you have any questions or would like help getting on board, join our Discord community here for more information or submit an issue on Github here!
Running the project locally
First, start by installing dependencies:
- node.js instructions
- pnpm instructions
- redis instructions
Set environment variables in a .env
file in the /apps/api/
directory. You can copy over the template in .env.example
.
To start, we won’t set up authentication, or any optional sub services (pdf parsing, JS blocking support, AI features)
Installing dependencies
First, install the dependencies using pnpm.
Running the project
You’re going to need to open 3 terminals for running the services. Here is a video guide accurate as of Oct 2024 (optional: 4 terminals for running the services and testing).
Terminal 1 - setting up redis
Run the command anywhere within your project
Terminal 2 - setting up workers
Now, navigate to the apps/api/ directory and run:
This will start the workers who are responsible for processing crawl jobs.
Terminal 3 - setting up the main server
To do this, navigate to the apps/api/ directory. If you haven’t installed pnpm already, you can do so here: https://pnpm.io/installation
Next, run your server with:
(Optional) Terminal 4 - sending our first request
Alright, now let’s send our first request.
This should return the response Hello, world!
If you’d like to test the crawl endpoint, you can run this
Tests:
The best way to do this is run the test with npm run test:local-no-auth
if you’d like to run the tests without authentication.
If you’d like to run the tests with authentication, run npm run test:prod