---
title: 'Node.js — server-side JavaScript | Zomro'
description: 'Install Node.js to develop fast server-side applications and APIs in JavaScript. A ready-to-use environment with npm, asynchronous I/O, and REST API.'
image: 'https://zomro.com/static/site/images/logo/logo-white.png?v=1796123538'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [Marketplace](https://zomro.com/marketplace)
  * Node.js 



![Node.js icon](https://cdn.zomro.com/uploads/marketplace/instruction/nodejs_450_transparent.png)

# Node.js

Version

latest

OS

Ubuntu

[ deploy Node.js ](https://cp.zomro.com/cart?name=Essential%20Intel&location=17&datacenter=17&dc=netherlands-3&period=1&category=shared_cpu&type=premium&isMarketplaceOrder=true&imageId=591b5192-a5cb-4c7e-bb81-c7d7eda91915&id=7752&service=instances)

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_IP

**Windows - PowerShell or PuTTY:**
    
    
    ssh root@SERVER_IP

After 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.

![Instructions for installing Node.js for developing fast server-side applications and APIs using JavaScript.](https://cdn.zomro.com/uploads/blog/a48%40server-panel.net/2026/07/30/image_q50.jpg)

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-world

The application data is stored in the file `/root/.password_credentials`. View it with the command:
    
    
    cat /root/.password_credentials

![Instructions for installing Node.js for developing fast server-side applications and APIs using JavaScript.](https://cdn.zomro.com/uploads/blog/a48%40server-panel.net/2026/07/30/image_ACajtDf_q50.jpg)

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

![Instructions for installing Node.js for developing fast server-side applications and APIs using JavaScript.](https://cdn.zomro.com/uploads/blog/a48%40server-panel.net/2026/07/30/image_qKgyr2K_q50.jpg)

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.

![Instructions for installing Node.js for developing fast server-side applications and APIs using JavaScript.](https://cdn.zomro.com/uploads/blog/a48%40server-panel.net/2026/07/30/image_1bHEt60_q50.jpg)

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-world

## Issuing 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 --nginx

The wizard will ask several questions:

  1. An email address for certificate expiration notifications

  2. Acceptance of the Let's Encrypt terms - enter `Y`

  3. The domain or subdomain - enter it without `http://` and `www`




For example: `yourdomain.com` or `api.example.org`

![Instructions for installing Node.js for developing fast server-side applications and APIs using JavaScript.](https://cdn.zomro.com/uploads/blog/a48%40server-panel.net/2026/07/30/image_ONE5L1V_q50.jpg)

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 packages

Nginx 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-world

When updating dependencies:
    
    
    cd /var/www/nodejs
    npm install
    sudo -u node pm2 restart hello-world

## Replacing 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-world

If 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 save

## Environment 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 dotenv

In 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.
