Published Updated What changed

How to Install Node.js (npm) on Windows, macOS and Linux: 2026 Guide with nvm, fnm and Volta

Node.js logo over Windows, macOS and Linux icons
Table of Contents

    The version to install today is Node.js 26 LTS (26.13.0, codename “Lithium”), which became LTS on October 28, 2026; Node 24 is still supported but now in maintenance. The fastest route: fnm install --lts on any system, or the LTS installer from nodejs.org.

    In this article I’ll show you how to install Node.js on Windows, macOS and Linux with recommendations updated for 2026. The interesting part: if you plan to work across multiple projects, installing the binary directly isn’t the best option — a version manager like fnm, nvm or Volta will save you a lot of headaches.

    What is Node.js?

    Node.js is an open-source runtime that executes JavaScript outside the browser, built on Chrome’s V8 engine. It lets you use JavaScript on the backend too (APIs, CLI tools, scripts) and is the foundation of virtually all modern frontend tooling: Vite, Webpack, ESLint, Prettier, Next.js, Astro, etc.

    Which version to install in 2026?

    Through Node 26, Node.js shipped two majors a year (April and October) and only even-numbered releases reached LTS. Where things stand:

    VersionStatus as of October 2026Recommended for
    Node 26Active LTS ✅ since Oct 28, 2026New projects and production
    Node 24Maintenance LTS since Oct 20, 2026 (end of life: April 2028)Existing production; plan the jump to 26
    Node 22Maintenance LTS (end of life: April 2027)Migrate before April 2027
    Node 20End of lifeMigrate as soon as possible
    Node 18 and belowEnd of lifeDo not install

    For any new project, install Node 26 LTS. If you’re coming from 24 or 22, Node 26: what breaks when you upgrade has the list sorted by impact.

    📌 Node 26 is the last release of the old model. Starting with Node 27 (release on April 22, 2027, with its alpha channel open since October 28, 2026) there will be one major a year and every release reaches LTS: the “even/odd” distinction goes away.

    Before downloading the official installer, consider using a version manager. Working across multiple projects with different Node versions (one legacy project on Node 22, another on 26) is the norm, not the exception. These are the three solid options in 2026 (and if you’re torn between them, I have a dedicated comparison: nvm vs fnm vs Volta):

    Written in Rust, cross-platform (Windows, macOS, Linux), extremely fast, and with automatic version switching by reading .nvmrc when you change directories.

    Installation on Windows (with winget):

    winget install Schniz.fnm
    

    Installation on macOS/Linux:

    curl -fsSL https://fnm.vercel.app/install | bash
    

    Usage:

    fnm install --lts        # installs the current LTS (Node 26)
    fnm use lts-latest
    fnm default lts-latest
    node --version
    

    Volta — version manager with per-project pinning

    Volta is the most popular alternative among JavaScript teams: it pins (pin) the Node version and package manager in package.json and respects them automatically. Ideal if you want the whole team to use the exact same version without any extra configuration.

    # Install Volta (Windows with winget)
    winget install Volta.Volta
    
    # Install and pin Node in a project
    volta install node@lts
    volta pin node@26
    

    nvm-windows / nvm

    The veteran option. nvm for macOS/Linux and nvm-windows for Windows. It works, but it’s noticeably slower than fnm and Volta. I’d only recommend it if you’ve been using it for years.

    Installation with the official installer

    If you prefer a straightforward setup without a version manager (perfectly valid for beginners or simple environments), download the installer from nodejs.org.

    Windows

    1. Go to nodejs.org and download the Windows Installer (.msi) for the LTS version (26.x since October 28, 2026).
    2. Run the .msi and accept the default values.
    3. The installer includes npm and, if you check the box, the Tools for Native Modules (Chocolatey + Python + Visual Studio Build Tools) required by some native dependencies.

    Verify:

    node --version    # should show v26.x.x
    npm --version
    

    Node.js installation verification

    macOS

    Three options, from most to least recommended:

    Option A — Homebrew:

    brew install node
    

    The node formula tracks the newest release, which is 26.x today. If a project needs the previous LTS, brew install node@24.

    Option B — fnm:

    brew install fnm
    fnm install --lts
    

    Option C — Official .pkg installer: download from nodejs.org and double-click. The simplest option, but the worst if you plan to use multiple versions.

    Linux (Ubuntu/Debian)

    # Using NodeSource (official)
    curl -fsSL https://deb.nodesource.com/setup_26.x | sudo -E bash -
    sudo apt-get install -y nodejs
    

    For Arch:

    sudo pacman -S nodejs npm
    

    On Arch, nodejs tracks the latest release (26.x today); nodejs-lts-krypton is Node 24 and nodejs-lts-jod is Node 22.

    For Fedora, RHEL and derivatives (NodeSource):

    curl -fsSL https://rpm.nodesource.com/setup_26.x | sudo bash -
    sudo dnf install -y nodejs
    

    Beyond npm: pnpm, Yarn and Bun

    npm ships with Node and works perfectly fine, but in 2026 many developers prefer alternatives:

    • pnpm: uses a global store with hard links to avoid duplicating packages. Install it with: npm install -g pnpm. It saves gigabytes and is noticeably faster on large projects.
    • Yarn: npm’s historical competitor. Yarn Berry (v4+) brings solid cache improvements and “Plug’n’Play” mode.
    • Bun: more than just a package manager — it’s also an alternative runtime to Node written in Zig. As a package manager it’s very fast (5–10× faster than npm); as a runtime it doesn’t yet replace Node in every scenario but it’s gaining ground.

    If you’re just getting started, stick with npm. When you get tired of long install times, try pnpm.

    Keeping npm and Node up to date

    Update npm:

    npm install -g npm@latest
    

    Update Node using a version manager (much easier than reinstalling):

    fnm install --lts
    fnm use lts-latest
    

    Verify the installation

    node --version    # v26.x.x
    npm --version     # 11.x or higher
    

    And test a one-liner HTTP server:

    node -e "require('http').createServer((_,r)=>r.end('Hello Node 26')).listen(3000)"
    

    Open http://localhost:3000 and you should see the greeting.

    Conclusion

    In 2026 the best way to install Node.js depends on your situation: if you just want one version and won’t be switching, the official installer works great; if you’re working seriously, install fnm or Volta and use them with Node 26 LTS. And consider switching to pnpm when you hit your first real monorepo project.

    Once you have Node ready, you can move on to any of the frameworks I cover on this blog: Best JavaScript Frameworks 2025–2026 or Astro.js in 2026.

    If this article helped you, feel free to share it. Cheers!

    Changes to this article

    • — Node 26 became LTS on October 28, 2026 (26.13.0, "Lithium") and Node 24 is in maintenance since October 20: every command now installs 26. Fixed the Arch package (nodejs-lts-iron, Node 20, no longer exists), the Fedora command (now via NodeSource) and the claim that Node shipped one major a year: through Node 26 it was two.
    Found it useful? Share it

    Found it useful? Get the next one by email

    Once a week: what breaks when you upgrade, AI for developers and what I'm building, with sources. No spam.

    By subscribing you accept our privacy policy.

    Search

    Tags

    Migration PHP AI Laravel JavaScript Tutorial Security Web Development Upgrade Best Practices SEO TypeScript OpenAI Backend Claude