LIVEReading: Run freeCodeCamp's Full Curriculum Locally on Your MachineTotal time: 12 minSteps: 5Worked first time: 35% LIVEReading: Run freeCodeCamp's Full Curriculum Locally on Your MachineTotal time: 12 minSteps: 5Worked first time: 35%
CBW
Run freeCodeCamp's Full Curriculum Locally on Your Machine
Spicygithub.com/freeCodeCamp/freeCodeCamp2026-07-20

Run freeCodeCamp's Full Curriculum Locally on Your Machine

Set up the entire freeCodeCamp learning platform on your own computer. Useful for contributors who want to test changes to lessons or the site itself.

// Build stats

  • Total time12 min
  • Number of steps5
  • DifficultySpicy
  • Worked first time35%
// Before you start

What you need

  • A computer running macOS, Linux, or Windows with WSL2
  • Node.js 20 or later installed (nodejs.org)
  • pnpm package manager installed (pnpm.io)
  • MongoDB 6 or later installed and running locally
  • Git installed (git-scm.com)
  • At least 8 GB of free disk space and 4 GB RAM
01
Step 1 of 5

Fork and clone the repository

5 min

You need your own copy of the code on GitHub before you can work with it. Forking creates a personal copy on GitHub; cloning downloads it to your computer. Replace YOUR_USERNAME with your actual GitHub username.

Terminal · mac
$ git clone https://github.com/YOUR_USERNAME/freeCodeCamp.git
$ cd freeCodeCamp
What you should see
A folder called freeCodeCamp appears in your current directory. Your terminal prompt moves into that folder.
This might happen

Clone takes a very long time or stalls

The repo is large. Use a wired connection if possible. If it times out, re-run the same git clone command — it will resume.

02
Step 2 of 5

Copy the environment config file

2 min

The project ships a sample config file with all the settings you need for local development. You copy it to create your real config file. You do not need to edit anything inside it to get the site running for the first time.

Terminal · mac
$ cp sample.env .env
What you should see
A new file called .env appears in the freeCodeCamp folder. No output is printed if the command succeeds.
This might happen

On Windows (outside WSL2) the cp command is not recognised

Run this instead: copy sample.env .env

03
Step 3 of 5

Install all dependencies

10 min

This downloads every library the project needs. pnpm is faster than npm and is what the project officially supports. Expect a lot of text scrolling past — that is normal.

Terminal · mac
$ pnpm install
What you should see
The last lines will say something like 'Done in Xs'. A node_modules folder is created.
This might happen

Errors about missing native build tools (node-gyp, python)

On Ubuntu/Debian run: sudo apt install build-essential python3. On macOS run: xcode-select --install. Then re-run pnpm install.

04
Step 4 of 5

Seed the local MongoDB database

5 min

The platform needs a database pre-filled with curriculum data and a test user account. This command creates all of that automatically. Make sure MongoDB is already running before you run this.

Terminal · mac
$ pnpm run seed
What you should see
You should see messages confirming that collections were created and documents were inserted. The command exits cleanly with no red error text.
This might happen

Connection refused or MongoDB not found

Start MongoDB first. On Linux/macOS: sudo systemctl start mongod or brew services start mongodb-community. Then re-run pnpm run seed.

05
Step 5 of 5

Start the development server

3 min

This command compiles the code and starts both the API server and the front-end. It takes a minute or two before the site is ready. Watch the terminal for a URL to open.

Terminal · mac
$ pnpm run develop
What you should see
You will eventually see lines like 'Client is ready at http://localhost:8000' and 'API is ready at http://localhost:3000'. Open http://localhost:8000 in your browser.
This might happen

Port 8000 or 3000 is already in use

Find and stop whatever is using those ports. On macOS/Linux: lsof -i :8000 then kill the listed PID. On Windows: netstat -ano | findstr :8000 then taskkill /PID <number> /F.

// Status

cooked. baked. worked.

A fully working local copy of freeCodeCamp running in your browser at http://localhost:8000, connected to a local database, ready for you to test curriculum changes or contribute fixes.

// the honest bit

The honest part

This guide is for contributors who want to run the platform locally to test edits — not for learners. If you just want to learn, go to freecodecamp.org and use it there for free with no setup. The local setup is a full developer environment with real complexity. Non-developers will likely hit friction with MongoDB setup, WSL2 on Windows, or native build tools. The freeCodeCamp contributing docs at contribute.freecodecamp.org are detailed and worth reading if anything breaks.