How to Set Up a Local Dev Environment on Windows 11 with Node.js in 2026
Go from a fresh Windows 11 machine to a fully configured Node.js development environment with nvm, VS Code, Git, and WSL2 in under 30 minutes.
The Goal: A Professional Dev Setup in Under 30 Minutes
Setting up a development environment on Windows used to be frustrating. In 2026, the tooling has caught up. This guide gives you a reproducible, professional-grade Node.js environment using WSL2 for Linux compatibility, nvm for Node version management, VS Code as your editor, and Git for source control.
Step 1 — Install WSL2 and Ubuntu
Open PowerShell as Administrator and run the single-command installer:
wsl --install
Reboot when prompted. After reboot, Ubuntu launches and asks you to create a username and password. For a detailed walkthrough see the WSL2 setup tutorial.
Step 2 — Install Windows Terminal
Install Windows Terminal for the best shell experience:
winget install Microsoft.WindowsTerminal
Open it, select the Ubuntu profile, and you are in your Linux shell.
Step 3 — Install Git (Inside Ubuntu)
Git is almost certainly already installed on Ubuntu. Confirm and configure it:
git --version # should print git version 2.x
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main
Step 4 — Install nvm and Node.js
nvm (Node Version Manager) lets you install and switch between multiple Node.js versions without sudo or conflicts. Install it with the official script:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Close and reopen your terminal (or run source ~/.bashrc), then install the latest LTS version of Node:
nvm install --lts
nvm use --lts
node --version # e.g. v22.x.x
npm --version # e.g. 10.x.x
To pin a specific version for a project, add a .nvmrc file:
echo "22" > .nvmrc
nvm use
Step 5 — Install VS Code and the WSL Extension
Download VS Code from code.visualstudio.com and install it on Windows (not inside Ubuntu). Then install the WSL extension from the Extensions panel.
Now, from your Ubuntu terminal, open any project folder in VS Code:
cd ~/projects/my-app
code .
VS Code opens on Windows but runs its backend inside WSL2, giving you Linux terminal access, Linux file paths, and Linux tooling — all with a Windows GUI.
Step 6 — Create and Run a Node.js Project
Let's verify everything works end-to-end with a tiny Express server:
mkdir ~/projects/hello-node && cd ~/projects/hello-node
npm init -y
npm install express
// index.js
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('Hello from Node on Windows 11!'));
app.listen(3000, () => console.log('Listening on http://localhost:3000'));
node index.js
Open http://localhost:3000 in your Windows browser — WSL2 automatically forwards ports from Linux to Windows.
Step 7 — Set Up SSH Keys for GitHub
Generate an SSH key inside your Ubuntu shell:
ssh-keygen -t ed25519 -C "you@example.com"
cat ~/.ssh/id_ed25519.pub
Copy the output and add it to GitHub → Settings → SSH and GPG keys → New SSH key. Test the connection:
ssh -T git@github.com
# Hi yourusername! You've successfully authenticated.
Step 8 — Install Recommended VS Code Extensions
- ESLint — real-time JavaScript/TypeScript linting
- Prettier — automatic code formatting on save
- GitLens — supercharged Git annotations and history
- Thunder Client — lightweight REST API client inside VS Code
- Docker — manage containers without leaving the editor
Step 9 — (Optional) Install pnpm for Faster Package Management
pnpm is significantly faster than npm and uses a content-addressable store to save disk space across projects:
npm install -g pnpm
pnpm --version
Summary
You now have a complete, professional Node.js development environment on Windows 11: a real Linux kernel via WSL2, flexible Node version management with nvm, VS Code seamlessly bridging Windows and Linux, and Git connected to GitHub via SSH. This stack handles everything from small scripts to large production Next.js applications.