How to Deploy a Node.js Application on Hostinger (Step-by-Step Guide)
Hostinger vs. Contabo: Full Specifications Breakdown
Data verified from our lab benchmarks • Updated for 2026
| Feature / Metric | HostingerEditor's Choice UI | ContaboMax RAM Value |
|---|---|---|
| Starting Price | $2.99 / month (Web) | $4.99 / mo (VPS) | $5.50 / month (Cloud VPS S) |
| vCPU Cores | 1 to 8 vCPU (Dedicated resources) | 4 to 12 vCPU (High Core Count) |
| RAM Memory | 4 GB to 32 GB | 6 GB to 64 GB (Gigantic RAM) |
| Storage Technology | 50 GB – 400 GB NVMe SSD | 50 GB NVMe or 300 GB SSD |
| Traffic / Bandwidth | 4 TB to 32 TB | 32 TB Outgoing + Unlimited In |
| Control Panel & UI | hPanel (Ultra Modern & Easy) | cPanel, Plesk, Webmin, or CLI |
| Customer Support | 24/7 Live Chat & AI Support (Multi-lingual) | Email Ticket Support (German Business Hours) |
| Best For | Bloggers, WordPress Sites & Devs wanting easy UI | Heavy Database, Docker, Game Servers & SysAdmins |
| Money-Back Guarantee | 30-Day Money-Back Guarantee | 14-Day EU Statutory Cancellation |
| Official Links | Visit Hostinger | Visit Contabo |
The Rise of Full-Stack JavaScript Hosting
While Hostinger is celebrated for WordPress hosting, thousands of modern developers deploy full-stack Node.js, Express, Nest.js, and Next.js applications on Hostinger KVM VPS instances. In this guide, we walk through deploying a production-ready Node.js application managed by PM2 with an Nginx reverse proxy and automated Let's Encrypt SSL.
Step 1: Installing Node.js LTS via NodeSource
On your Hostinger Ubuntu VPS, install the latest Node.js 22 LTS runtime directly from upstream NodeSource:
# Download and execute NodeSource setup script
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
# Install Node.js and build essentials
sudo apt install -y nodejs build-essential
# Verify versions
node -v
npm -v
Step 2: Installing PM2 Production Process Manager
Never run a production Node.js application with bare node index.js. If an unhandled promise rejection or syntax error occurs, the process terminates immediately. PM2 provides clustering, daemonization, automatic restarts on failure, and server boot persistence:
sudo npm install -g pm2
Step 3: Cloning and Building Your Application
# Create application directory
sudo mkdir -p /var/www/my-node-app
sudo chown -R $USER:$USER /var/www/my-node-app
cd /var/www/my-node-app
# Clone your GitHub repository
git clone https://github.com/YourUsername/your-repo.git .
# Install dependencies and build production bundle
npm ci --omit=dev
npm run build
Step 4: Configuring PM2 Ecosystem File
Create an ecosystem.config.js file to define clustering and environment variables:
nano ecosystem.config.js
module.exports = {
apps: [
{
name: "node-app",
script: "npm",
args: "start",
instances: "max",
exec_mode: "cluster",
autorestart: true,
watch: false,
max_memory_restart: "1G",
env: {
NODE_ENV: "production",
PORT: 3000
}
}
]
};
Start the application and configure systemd startup scripts:
pm2 start ecosystem.config.js
pm2 save
pm2 startup systemd
Step 5: Routing Traffic via Nginx Reverse Proxy
Expose port 80/443 to the public Internet while keeping your Node.js application safely bound to localhost port 3000:
sudo nano /etc/nginx/sites-available/app.example.com
server {
listen 80;
server_name app.example.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
sudo ln -s /etc/nginx/sites-available/app.example.com /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d app.example.com
Summary
Your Node.js web application is now operating with automatic clustering across all CPU cores, SSL encryption, and automated restarts.
Editorial Verdict: Pros & Cons
What We Love (Pros)
- Deploy custom JavaScript/TypeScript backends without expensive PaaS services like Heroku
- Hostinger KVM VPS provides full root access, Node 20/22 support, and npm/pnpm tooling
- PM2 ensures zero-downtime hot reloading and automatic reboot persistence
Drawbacks (Cons)
- Shared hosting plans have limited Node.js execution hooks compared to dedicated KVM VPS
Written by Alex Vance
Cloud Infrastructure Architect
Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.
Recommended Next Reads
Hostinger vs Contabo VPS (2026): Real Benchmark Test & In-Depth Comparison
A comprehensive, benchmark-driven comparison between Hostinger and Contabo VPS. We tested Geekbench CPU scores, NVMe I/O, network latency, and hPanel vs CLI.
Hostinger Review (2026): Is It Truly the Best Web Hosting for the Price?
We stress-tested Hostinger's Premium and Cloud Startup plans across 180 days. Read our honest review covering uptime, LiteSpeed speed tests, and renewal fees.