⬡ Node.js  ·  JavaScript Runtime  ·  v22 LTS

Get Node.js
running in minutes.

The complete interactive setup guide — pick your OS, follow the steps, and start building server-side JavaScript applications today.

scroll
22 LTSLatest stable release
~5 minSetup time
3 OSWindows · macOS · Linux
2M+npm packages

Choose your
operating system

Follow the step-by-step guide for your platform. Click each step to mark it complete.

progress
0%
1
Download the installer
Visit nodejs.org and download the LTS (Long Term Support) version — the most stable choice for production use.
✓ v22 LTS — Recommended v23 Current
url
https://nodejs.org/en/download
2
Run the MSI installer
Double-click the downloaded .msi file. Accept the license, keep defaults, and ensure "Add to PATH" is checked.
tip
# ✓ Check during install: # - Automatically install necessary tools # - Add Node.js to PATH (very important!)
3
Verify installation
Open Command Prompt or PowerShell and confirm both Node.js and npm are installed.
cmd / powershell
C:\> node --version v22.x.x C:\> npm --version 10.x.x
4
Create your first project
Initialize a new Node.js project and create a simple "Hello World" server.
cmd
mkdir my-app cd my-app npm init -y Wrote to C:\my-app\package.json
5
Run a Hello World server
Create server.js and run it to confirm everything works end-to-end.
server.js
const http = require('node:http'); const server = http.createServer((req, res) => { res.writeHead(200); res.end('Hello World!'); }); server.listen(3000, () => console.log('Running on http://localhost:3000') );
cmd
node server.js Running on http://localhost:3000
1
Install via Homebrew (recommended)
Homebrew is the easiest way to manage Node.js on macOS. If you don't have Homebrew, install it first.
terminal
# Install Homebrew if needed /bin/bash -c "$(curl -fsSL \ https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
terminal
brew install node ==> Downloading https://formulae.brew.sh/api/cask.jws.json ==> Installing node... ✓ node 22.x installed successfully
2
Alternative: Install via NVM
NVM (Node Version Manager) lets you switch between Node versions easily — great for working on multiple projects.
terminal
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash # Restart terminal, then: nvm install --lts nvm use --lts
3
Verify installation
Open Terminal and confirm both Node.js and npm are available.
terminal
$ node --version v22.x.x $ npm --version 10.x.x
4
Create & run Hello World
Create a project folder and launch your first Node.js server.
terminal
mkdir my-app && cd my-app npm init -y # create server.js then: node server.js Running on http://localhost:3000
1
Install via NodeSource (Ubuntu/Debian)
The NodeSource repository provides up-to-date packages for Debian-based distros.
bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt-get install -y nodejs
2
Install via NVM (any distro)
NVM works on any Linux distribution and makes version management painless.
bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash source ~/.bashrc nvm install --lts
3
Fedora / CentOS / RHEL
For Red Hat-based distributions, use the dnf or yum package manager.
bash
sudo dnf install nodejs npm
4
Verify & run Hello World
Confirm the installation and launch your first server.
bash
node --version && npm --version v22.x.x 10.x.x mkdir my-app && cd my-app && npm init -y ✓ package.json created

Try the
terminal

Simulate common Node.js commands. Type a command below or click a quick command.

node — bash — 80×24
Welcome to EasySetupNode Terminal Simulator
Type a command or click a quick command below.
 
$

What makes
Node.js special

The key ideas that set Node.js apart from traditional server-side environments.

Non-blocking I/O
Node.js uses an event-driven, non-blocking I/O model. While waiting for disk or network operations, the thread keeps serving other requests — enabling massive concurrency.
🔄
Event Loop
A single-threaded event loop processes callbacks, timers, and I/O events in phases. Understanding the loop is key to writing performant Node.js applications.
📦
NPM Ecosystem
npm hosts over 2 million packages. From HTTP frameworks like Express to testing tools and CLI utilities — if you need it, there's a package for it.
🧩
CommonJS & ESM
Node.js supports both CommonJS (require()) and ES Modules (import). Use "type":"module" in package.json for ESM.
🌐
V8 Engine
Built on Google's V8 JavaScript engine, Node.js compiles JavaScript directly to native machine code — delivering near-native performance without a browser.
🔧
package.json
The project manifest. It defines your app name, version, entry point, scripts, and dependencies. Every Node.js project starts with one — run npm init -y to generate it.

Essential npm
commands

The commands you'll use every day as a Node.js developer.

CommandDescription
npm init -yInitialize a new project with default package.json
npm install <pkg>Install a package and add to dependencies
npm install <pkg> -DInstall as a dev dependency (tests, build tools)
npm install -g <pkg>Install package globally (CLI tools)
npm installInstall all dependencies from package.json
npm uninstall <pkg>Remove a package
npm run <script>Run a script defined in package.json
npm startRun the start script (shorthand)
npm testRun the test script (shorthand)
npm updateUpdate all packages to latest compatible versions
npm listList installed packages in current project
npm outdatedShow packages with newer versions available
npm auditCheck for security vulnerabilities
npm publishPublish your package to the npm registry