← Volver al blog

How to Install Node.js on Ubuntu

  • Xernode
  • 1 min de lectura
  • 7 de abril de 2026
VPS ubuntu vps nodejs javascript install

Introduction

ode.js is a popular JavaScript runtime for building scalable server-side applications. This guide shows you how to install Node.js on your Ubuntu VPS.

Step-by-step Guide

  1. Update your package list
    • sudo apt update
  2. Install Node.js (from Ubuntu repositories)
    • sudo apt install -y nodejs
  3. (Recommended) Install npm (Node.js package manager)
    • sudo apt install -y npm
  4. (Optional) Check Node.js and npm versions
    • ode -v
    • pm -v
  5. (Alternative) Install Node.js using NodeSource (for latest version)
    • curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
    • sudo apt install -y nodejs

Recommendations

  • Use NodeSource for the latest Node.js version.
  • Keep Node.js and npm updated for security and compatibility.
  • Use nvm (Node Version Manager) if you need to manage multiple Node.js versions.

Call To Action

eed a reliable VPS for your Node.js projects? Check out our hosting plans: https://xernode.com/#pricing

Related Guides