System requirements
| Requirement | Version |
|---|---|
| Node.js | ^24 |
| npm | Bundled with Node.js |
| Git | Any recent version |
The required Node.js version is declared in
package.json under the "engines" field. Using a different major version may cause unexpected build or runtime errors.Two ways to get started
- Local setup
- GitHub Codespaces
Set up the full development environment on your own machine. This gives you the most control and the fastest feedback loop for code changes.
Install Node.js 24
Download the Node.js 24 LTS installer from nodejs.org and run it.If you use a Node.js version manager like
nodenv or nvm, switch to Node.js 24 before continuing.Verify your installation:Install dependencies
Use
npm ci for a clean, reproducible install. This reads package-lock.json exactly and does not modify it.Run
npm ci again any time you pull changes that update package-lock.json. You do not need to run it on every pull — only when dependencies change.Build static assets
The build step compiles JavaScript bundles and CSS files using Next.js with webpack.This step is required before starting the server for the first time. Like
npm ci, you only need to re-run it when the build configuration changes — not on every code change.Verify your setup
Start the development server to confirm everything is working:Open http://localhost:4000 in your browser. You should see the GitHub Docs site running locally.Press Ctrl+C to stop the server.
Environment variables
The repository ships with a.env.example file that documents optional environment variables for local development. Copy it to a new .env file and fill in values as needed:
| Variable | Default | Description |
|---|---|---|
ELASTICSEARCH_URL | (unset — proxies to production) | URL of a local Elasticsearch instance for search. |
ENABLED_LANGUAGES | en | Comma-separated list of language codes to serve. |
TRANSLATIONS_ROOT | (unset) | Path to a local translations repository. |
HYDRO_ENDPOINT | (unset) | Endpoint for sending analytics events in local development. |
ENABLE_FASTLY_TESTING | (unset) | Set to true to enable the /fastly-cache-test debugging route. |
When
ELASTICSEARCH_URL is not set, the application proxies search requests to the production Elasticsearch endpoint. You only need a local Elasticsearch instance if you’re working on search functionality.