Node.js runs JavaScript on the server side, outside the browser. Its asynchronous I/O model makes it a good choice for APIs, real-time services, chats, webhooks, and microservices. Using one language on both the frontend and backend is an added advantage for teams that don't have a strict separation of specializations.
Deploying Node.js manually isn't difficult, but it takes time: Node.js itself, npm, PM2 for process management, Nginx as a reverse proxy, and configuration setup. The marketplace image deploys this entire stack in 1–2 minutes. Connect via SSH and everything is already up and running.
What you will need
A VPS with 1–2 vCPU and 1–2 GB of RAM
A domain, if you plan to issue an SSL certificate
Deploying a server from the marketplace
In the marketplace, find the Node.js image and click Deploy. Choose a configuration:
CPU: 1–2 vCPU
RAM: 1–2 GB (enough for most Node.js applications)
Disk: 20–40 GB SSD
Set a password or attach an SSH key, then click create. The server will be ready in 1–2 minutes.
Connecting via SSH and viewing the application data
Linux / macOS:
ssh root@SERVER_IPWindows - PowerShell or PuTTY:
ssh root@SERVER_IPAfter logging in, the terminal will display a welcome message with information about the environment: the Node.js version, the npm version, and commands for managing the application via PM2.

SSH login - welcome message with Node.js and npm versions and PM2 commands
Basic commands for working with PM2:
# List of running processes
sudo -u node pm2 list
# Application logs
sudo -u node pm2 logs hello-world
# Restart after code changes
sudo -u node pm2 restart hello-worldThe application data is stored in the file /root/.password_credentials. View it with the command:
cat /root/.password_credentials

Output of cat /root/.password_credentials - APP_PATH and APP_USER
The file contains:
APP_PATH - the path to the Node.js application directory
APP_USER - the user under which the application runs
By default, the application is located in /var/www/nodejs.
Opening the application in a browser
In your browser, go to the server's IP address:
http://SERVER_IP

Browser with the server address - the Node.js application is running over HTTP
If an SSL certificate has not been set up yet, the site works over HTTP. The browser may show a security warning - this is normal until a certificate is issued.
After opening the address, you will see the template hello-world - the application that comes with the image. You can replace it with your own project right away.

The Node.js application start page in the browser
To deploy your own application, copy the files to the working directory and restart PM2:
# Upload via scp
scp -r ./myapp/* root@SERVER_IP:/var/www/nodejs/
# Restart the application
sudo -u node pm2 restart hello-worldIssuing an SSL certificate
Before setting up SSL, make sure your domain points to the server's IP address. Create an A record in DNS:
A yourdomain.com → SERVER_IP
Once the DNS record has propagated, run Certbot:
certbot --nginxThe wizard will ask several questions:
An email address for certificate expiration notifications
Acceptance of the Let's Encrypt terms - enter
YThe domain or subdomain - enter it without
http://andwww
For example: yourdomain.com or api.example.org

Certbot issues an SSL certificate - the interactive certbot --nginx wizard
Certbot will find the Nginx configuration on its own, issue the certificate, and set up an automatic redirect from HTTP to HTTPS. Once it finishes, the application is available at https://yourdomain.com.
The certificate is renewed automatically via cron - you don't need to do anything manually.
Application structure
The image deploys a standard Node.js project structure:
/var/www/nodejs/
├── app.js # Entry point
├── package.json # Dependencies and scripts
├── package-lock.json
└── node_modules/ # Installed packagesNginx accepts incoming requests on ports 80/443 and proxies them to the Node.js process. PM2 keeps the process running, automatically restarts it if it crashes, and restores it after a server reboot.
Managing the application with PM2
# List all processes
sudo -u node pm2 list
# Real-time logs
sudo -u node pm2 logs hello-world
# Restart
sudo -u node pm2 restart hello-world
# Stop / start
sudo -u node pm2 stop hello-world
sudo -u node pm2 start hello-world
# Status of a specific process
sudo -u node pm2 show hello-worldWhen updating dependencies:
cd /var/www/nodejs
npm install
sudo -u node pm2 restart hello-worldReplacing hello-world with your own application
The template hello-world application is a starting point. To run your own project:
# Copy project files
cp -r /path/to/myproject/* /var/www/nodejs/
# Install dependencies
cd /var/www/nodejs
npm install
# Restart PM2
sudo -u node pm2 restart hello-worldIf your entry point is not called app.js, update the PM2 config:
sudo -u node pm2 delete hello-world
sudo -u node pm2 start /var/www/nodejs/server.js --name myapp
sudo -u node pm2 saveEnvironment variables
Secrets and settings should not be stored in code. For Node.js, the standard approach is a .env file and the dotenv package:
npm install dotenvIn the application code:
require('dotenv').config();
const PORT = process.env.PORT || 3000;
const DB_URL = process.env.DATABASE_URL;Add .env to .gitignore so that secrets don't end up in the repository.
What to set up next
Connect a database. Node.js works with PostgreSQL via pg or Prisma, with MongoDB via mongoose, and with Redis via ioredis. The choice depends on the type of data and the load.
Set up monitoring. pm2 monit shows CPU and memory usage in real time. For production, it is useful to add external monitoring and alerts for process crashes.
Close the application port in the firewall. PM2 listens on port 3000 (or another), but this port should be closed to the outside - traffic should go only through Nginx on 80/443.
The marketplace image eliminates the routine of initial deployment: Node.js, PM2, and Nginx are already configured and running. Replace the template with your own code, get an SSL certificate with a single command, and your application is ready to go.


