10% Discount Only BDIX VPS And Turbo Hosting Limited Offer
00 : 00 : 00
UHBD10
Node.js Hosting in Bangladesh

Node.js Hosting in Bangladesh: Deploy Express or Next.js

  • By Anis Ur Rahman
  • 23 Nov, 2026

Need Node.js hosting in Bangladesh for an Express API or a Next.js site? You can run it in three ways: cPanel's Setup Node.js App, a VPS with PM2 and Nginx, or Docker on an EasyPanel VPS. The right pick depends on your app's size, how much control you want, and where your database lives.

Below, you'll see when each option makes sense, how to deploy step by step, and how to fix the errors people hit most often.

Key takeaway: which Node.js hosting should you pick?

  • Small Express API, low traffic, no root needed? Shared cPanel hosting with Setup Node.js App works.

  • Next.js, WebSockets, background jobs, or growing traffic? Use a VPS with PM2 + Nginx.

  • Want Git-based deploys without writing Nginx configs? Use Docker on an EasyPanel VPS.

  • Database: keep MongoDB close to your app server, either on the same server or in the nearest MongoDB Atlas region.

What should Node.js hosting include?

Before you pay for any plan, check that it gives you these five things. Missing even one can block a deploy later.

  • A current Node.js LTS version, with a way to switch versions

  • SSH or terminal access, so you can run npm commands

  • A process manager (PM2 on a VPS, or Passenger on cPanel) that restarts your app if it crashes

  • MongoDB access, either on the server or through a remote connection

  • Free SSL (usually Let's Encrypt) for your domain

Can I host a Node.js app on shared cPanel hosting?

Yes, if your host has turned on CloudLinux's Node.js Selector. In cPanel, you'll find it as Setup Node.js App in the Software section.

From there, you pick a Node.js version, set the app folder and startup file (for example, app.js), install packages from package.json, and start or restart the app. Behind the scenes, Phusion Passenger runs the app for you. You don't install PM2 or Nginx yourself.

Not every cPanel plan has this tool switched on. Before you choose a plan, ask your host three things: Is Setup Node.js App enabled, which Node.js versions can you pick, and what CPU and memory limits apply to your app?

It's a good fit for:

  • A small Express REST API or webhook receiver

  • A Telegram or WhatsApp bot backend

  • A student or portfolio MERN project (MongoDB, Express, React, Node.js)

Know the limits before you start:

  • Memory caps. Shared accounts have resource limits. npm install, or a Next.js build, can hit them, so building on your own computer and uploading the output is often easier.

  • No root access. You can't install system packages or tune the server.

  • Long-running work. Queues, workers, and WebSockets may not run reliably. Ask your host before you build around them.

Node.js on cPanel vs on a VPS: which is better?

cPanel is easier and cheaper to start. A VPS wins once you need full control, Next.js, or steady performance under load.

Factor

cPanel (Setup Node.js App)

VPS (PM2 + Nginx)

Setup effort

Click-based, a few minutes

Manual, about an hour the first time

Root access

No

Yes

Process manager

Passenger (managed for you)

PM2 (you control it)

Next.js support

Possible, but builds can hit memory limits

Full support

WebSockets / workers

Limited, check with your host

Yes

Best for

Small APIs, learning projects

Production apps, SaaS, e-commerce

Think of cPanel as a furnished room: you move in and start working. A VPS is an empty flat. It takes more work upfront, but every choice is yours. For a wider look beyond Node.js, see our guide to shared vs. VPS hosting in Bangladesh.

New to how the MERN pieces connect? Our MERN stack hosting explained guide covers the basics.

How do I deploy Next.js on a VPS with PM2 and Nginx?

Build the app, run it with PM2 on a local port, then put Nginx in front of it as a reverse proxy with SSL.

The same steps work for an Express app. Just swap the start command for node server.js or npm start.

Step 1: Install Node.js, PM2 and Nginx

On a fresh Ubuntu VPS, install a Node.js LTS release (through NodeSource or nvm), then run:

sudo apt update && sudo apt install -y nginx
sudo npm install -g pm2

Step 2: Build your Next.js app

Clone your repo, then run npm ci and npm run build. Then npm run start runs Next.js as a standard Node.js server. The Next.js docs say this kind of deployment supports all Next.js features. Some still need extra setup in production, though. For example, if you run more than one copy of the app, you need a shared cache. Check the self-hosting guide for your Next.js version.

Want a smaller deploy? Add output: 'standalone' to next.config.js. Next.js then creates a .next/standalone folder with a minimal server.js. It does not copy the public and .next/static folders, so copy those in yourself. The Next.js output docs explain this in detail.

Step 3: Start the app with PM2

pm2 start npm --name "myapp" -- start
# or, for a standalone build:
PORT=3000 pm2 start .next/standalone/server.js --name myapp

PM2 restarts the app if it crashes and keeps its logs. View them with pm2 logs myapp.

Step 4: Point Nginx at the app

Create /etc/nginx/sites-available/myapp:
# Sets the Connection header: "upgrade" for WebSocket requests, "close" for normal ones
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}
server {
    listen 80;
    server_name example.com.bd www.example.com.bd;
    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Enable the site, test the config, and reload Nginx:

sudo ln -s /etc/nginx/sites-available/myapp /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

The map block sits outside the server block because Nginx only allows map at the http level. Files in sites-enabled are loaded at that level. With the map in place, WebSocket requests are upgraded, and normal HTTP requests pass through as usual. If you already have the same map in another site file, don't define it twice.

Step 5: Add free SSL

Install Certbot and run sudo certbot --nginx -d example.com.bd -d www.example.com.bd. Certbot gets a free Let's Encrypt certificate, updates your Nginx config, and sets up automatic renewal.

How do I keep a Node app running after reboot?

Run pm2 startup, run the command it prints, then run pm2 save.

pm2 startup      # prints a sudo command - copy and run it
pm2 save         # saves the current list of apps

pm2 startup registers PM2 as a system service (systemd on Ubuntu). pm2 save records which apps are running, so PM2 can bring them back on boot. You need both commands. Skip either one, and your app stays offline after a reboot.

Two things people often miss:

  • Run pm2 save again every time you add or remove an app.

  • If you use nvm and switch to a new Node.js version, the startup service may still point to the old path. If it does, run pm2 unstartup, then pm2 startup again, and run the new command it prints. That rebuilds the systemd service.

Need to bring saved apps back by hand? Use pm2 resurrect. The official PM2 startup guide lists every option.

Common Node.js deploy errors and quick fixes

Most failed deploys come down to a stopped app, a wrong port, or too little memory. Start with these checks:

  • 502 Bad Gateway (Nginx): Nginx can't reach your app. Run pm2 status to see if it's online, then check that the port in proxy_pass matches the port your app listens on.

  • 503 Service Unavailable (cPanel): The app failed to start. Check that the startup file name in Setup Node.js App is correct, then read the app's error log.

  • EADDRINUSE: Another process already uses that port. Often it's an old copy of the same app. Run pm2 list and delete the duplicate.

  • "JavaScript heap out of memory" during the next build: The server ran out of RAM. Add swap space, build on your own computer, or move to a plan with more memory.

Can I deploy with Docker or EasyPanel instead?

Yes. EasyPanel puts a web dashboard on top of Docker, so you can deploy Express or Next.js from a Git repo or a Dockerfile without editing Nginx files.

It suits you if you:

  • Run several apps (frontend, API, admin panel) on one server

  • Want each app isolated in its own container

  • Prefer a dashboard to SSH for daily work

For Next.js, a Dockerfile built on the standalone output keeps the image small. Next.js publishes an official Docker example you can start from.

Our EasyPanel VPS hosting runs Ubuntu 24.04 LTS on NVMe SSD storage, with full root access, a dedicated IPv4 address, and Docker ready to use.

Where should I host MongoDB for a Bangladeshi audience?

Put MongoDB as close to your Node.js server as you can. Every API call waits for the database, so the gap between app and database matters more than the gap between user and database.

You have three practical options:

  1. The same server as your app. This gives the lowest latency and no extra bill. The trade-offs:

    • Your app and database share the same CPU, RAM, and disk, so a busy database can slow the app.

    • If the server goes down, both go down together.

    • You handle backups, updates, and database security yourself.

  2. MongoDB Atlas in a nearby region. At the time of writing, Atlas's AWS region list includes Mumbai, Hyderabad, and Singapore. Which regions and cluster tiers you get depends on the cloud provider (AWS, Google Cloud or Azure) and plan you choose, so check the current list in Atlas when you create the cluster. Then test the real latency from your app server, because network routes don't always follow the map.

  3. A MERN hosting plan with MongoDB support. This works well when you want the app and database managed in one place.

The mistake to avoid: an app server in Bangladesh talking to an Atlas cluster in the US. Every query crosses the world twice, and pages feel slow even on a fast server.

Best hosting for MERN stack in 2026: local host, DigitalOcean or Vercel?

Global platforms like DigitalOcean and Vercel are strong choices, but a Bangladesh-focused host is often simpler and cheaper for local projects.

Compare them on four points:

  • Billing: Global providers bill in USD and typically need an international card. A local host bills in BDT. Ask which payment methods are accepted.

  • Support: Local support works in your time zone and can help in Bangla.

  • Server location: Ask where the server actually sits (Bangladesh, BDIX-connected, or Singapore), then test the speed from your users' mobile and broadband networks. If most of your users are in Bangladesh, a BDIX-connected VPS is worth testing.

  • Fit for MERN: Vercel is built by the team behind Next.js and suits frontends well. A full MERN app with a long-running Express API and MongoDB usually fits a VPS or a MERN plan better.

UmmahHostBD's MERN stack hosting plans include Node.js, MongoDB support, and terminal access. At the time of writing, plans start at ৳250/month (MERN Stack v1: 2 GB RAM, 2 CPU cores). Prices can change, so check the plan page before you order.

Next steps

Start small on MERN stack hosting. Move to an EasyPanel VPS when you want Docker and more control. For the bigger picture, read Top MERN Stack Hosting Explained for Developers.

Frequently Asked Questions

Is Node.js hosting available in Bangladesh?

Yes. Node.js hosting in BD comes in three forms: cPanel plans with Setup Node.js App, VPS servers, and Docker-based panels like EasyPanel.

Do I need a VPS to run Next.js?

Not always, but a VPS is the most reliable choice. Next.js builds use a lot of memory and can go past shared hosting limits.

What is PM2 used for?

PM2 is a process manager for Node.js. It keeps your app running, restarts it after a crash, stores logs, and brings apps back after a server reboot.

Why put Nginx in front of Node.js?

Nginx handles SSL, domain routing, and static files, then forwards requests to your Node app on a local port. This setup is called a reverse proxy.

Can I run MongoDB on the same VPS as my app?

Yes, and it gives the lowest latency. The catch is that the app and database share one server's resources and go down together. If you do it, turn on authentication, block public access to the database port (27017 by default), and schedule regular backups.

Anis Ur Rahman

Author By

Anis Ur Rahman

Anis Ur Rahman writes domain and web hosting–related articles on behalf of Ummah Host BD. He works with domain name selection, web hosting, BDIX hosting, and website performance, and creates informational guides based on practical experience to help users make informed decisions. His writing focuses on providing reliable, easy-to-understand, and decision-supportive content.

Social Share :