Skip to content
Free website migration on every plan, done by our team.Learn more ›
Servers

How to host a Node.js app

Your options for hosting a Node.js app: shared hosting with a Node.js app manager, or a VPS with a process manager, reverse proxy and free SSL, step by step.

Short answer: Small Node.js apps can run on some shared hosting plans that include a Node.js app manager. For most production apps, use a VPS: install Node.js, run the app with a process manager such as PM2, put Nginx in front as a reverse proxy and add free SSL.

Option 1: shared hosting

Some cPanel servers offer Setup Node.js App, which runs your app behind the web server. It suits small apps and APIs. Ask us whether it's available for your plan.

  1. Secure the server. See first 10 things to do on a VPS.
  2. Install a current long-term-support version of Node.js.
  3. Upload your app and install dependencies.
  4. Run it with PM2 so it restarts automatically:
pm2 start app.js --name myapp
pm2 save
  1. Put Nginx in front to serve your domain and handle SSL. See Nginx as a reverse proxy.

Production checklist

  • Environment variables for secrets, not hard-coded values.
  • Logs that rotate.
  • Uptime monitoring. See website uptime monitoring.
  • Backups of databases and uploads.

Our Cloud VPS starts from $5.00 a month with full root access.

Frequently asked questions

Can I run Node.js and WordPress on the same server?

Yes, on a VPS, using a reverse proxy to route each domain.

Do I need Docker?

No, but it can help. See Docker on a VPS.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.