Node.js 24
This image provides a clean Ubuntu 24.04 environment with Node.js 24 LTS and PM2 pre-installed. It is designed for deploying Node.js applications that need to run persistently as a managed process.
Software included
Section titled “Software included”| Component | Version |
|---|---|
| Node.js | 24.x (LTS) |
| npm | Bundled with Node.js |
| PM2 | Latest stable |
| Ubuntu | 24.04 LTS |
Getting started
Section titled “Getting started”1. Connect to your VM
Section titled “1. Connect to your VM”ssh ubuntu@<your-vm-ip>2. Verify the installation
Section titled “2. Verify the installation”There is no first-boot configuration. Node.js and PM2 are ready immediately.
node --versionnpm --versionpm2 --version3. Deploy your application
Section titled “3. Deploy your application”Upload your application files to the VM, then start your app with PM2:
# Start your apppm2 start app.js --name my-app
# Save the process list so it survives rebootspm2 savepm2 startupRun the command that pm2 startup outputs to register PM2 with systemd.
Managing your application with PM2
Section titled “Managing your application with PM2”# List running processespm2 list
# View logspm2 logs my-app
# Restartpm2 restart my-app
# Stoppm2 stop my-app
# Delete from PM2pm2 delete my-appSecurity
Section titled “Security”No application ports are open by default. UFW is enabled and allows SSH (port 22) only.
To allow traffic on your application’s port:
sudo ufw allow <your-app-port>/tcpFor a web application, consider placing it behind Nginx or Caddy as a reverse proxy so you can serve HTTPS on port 443 and proxy requests to your Node.js app internally.