MERN Stack VPS HostingMongoDB, Express, React and Node.js Together
Host the whole MERN app on one server: NGINX serves the React build, Express runs under PM2 and MongoDB listens only on localhost. We install and secure the stack; you deploy your code over SSH.
Full root & SSH NVMe storage Daily backups Anti-DDoS 99.9% uptime SLA 11 locations
-
Reserved vCores and RAM
Node and MongoDB share resources that are yours alone.
-
Database on the same server
No separate hosted-database bill for small and mid-size apps.
-
NVMe storage
Fast MongoDB reads and writes, quick React builds.
-
Daily backups
Automatic backup of the previous 24 hours.
Why Host a MERN App on a VPS
A MERN app often means three bills: front-end hosting, an API platform and a managed database. A VPS runs all of it on one server you control.
-
One server, one bill
The React build, the Express API and MongoDB run side by side, which suits most apps until they need to scale out.
-
MongoDB under your control
Choose the MongoDB version, size the WiredTiger cache and keep data in the region you pick.
-
No cold starts or timeouts
The API is a long-running Node process, so WebSockets, background jobs and long requests behave as they do on your machine.
-
Room to split later
When load grows, move MongoDB to its own VPS and change one connection string in the API.
How a MERN App Runs on One VPS
React is built into static files. Only the API and the database run as processes.
Request from a browser or app (HTTPS)
-
Front end
React (static build)
The npm run build output, served by NGINX, with client-side routes falling back to index.html.
-
Reverse proxy
NGINX
Handles HTTPS, serves the React files and forwards /api requests to Express.
-
API
Node.js + Express under PM2
Your API on a local port, restarted automatically and started on boot.
-
Database
MongoDB
Bound to localhost with authentication on; the API connects with its own user.
Worth knowing
- Serving React and the API from one domain avoids CORS configuration.
- Never expose MongoDB's port 27017 to the internet; automated scans look for open databases.
- Keep the connection string and JWT secrets in an environment file, never in the React build.
- Using Next.js instead of plain React? It runs as a Node process too.
What You Can Run on a MERN VPS
-
SaaS dashboards
Logged-in apps with a React front end, an Express API and user data in MongoDB.
-
Marketplaces and booking apps
Listings, search and bookings stored as flexible MongoDB documents.
-
Real-time apps
Chat and live updates with Socket.IO running beside the Express API.
-
MVPs and prototypes
Ship a full product on one server and split it up when it grows.
-
Internal business tools
CRMs, admin panels and reporting apps for your team.
-
MEAN and MEVN variants
The same layout works with Angular or Vue in place of React.
VPS Plans for MERN Apps
MongoDB likes memory, so VPS-2 with 8 GB RAM is the usual start for a production MERN app. VPS-1 suits development, staging and small apps.
VPS-1
Small websites, APIs, bots and development servers.
- 2 vCores
- 4 GB RAM
- 40 GB NVMe
- 500 Mbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
VPS-2
Production apps, WordPress and online stores.
- 4 vCores
- 8 GB RAM
- 75 GB NVMe
- 1 Gbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
VPS-3
Busy stores, SaaS products and several projects.
- 6 vCores
- 12 GB RAM
- 100 GB NVMe
- 2 Gbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
VPS-4
High-traffic apps, large databases and agencies.
- 8 vCores
- 24 GB RAM
- 200 GB NVMe
- 3 Gbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
* Unlimited traffic in Europe and North America. In Mumbai, Singapore and Sydney a monthly allowance applies (VPS-1 500 GB, VPS-2/VPS-3 1 TB, VPS-4 3 TB), then speed is limited to 10 Mbps until the next month.
Which Plan for Your MERN App
MongoDB and Node share the server: give MongoDB room for its working set and Node room for its processes.
| Workload | Start with | Why |
|---|---|---|
| Development or staging | VPS-1 2 vCores · 4 GB RAM | The API, MongoDB and builds with light traffic. |
| Production app, small to mid-size data | VPS-2 4 vCores · 8 GB RAM | 8 GB keeps MongoDB indexes in memory beside the API. |
| Busy app with Socket.IO or workers | VPS-3 6 vCores · 12 GB RAM | More vCores for PM2 cluster mode and background jobs. |
| Large dataset or several apps | VPS-4 8 vCores · 24 GB RAM | 24 GB RAM, or move MongoDB to its own VPS. |
A starting point, not a limit: every plan upgrades in place, keeping your data, IP address and configuration.
Where to Host a MERN App
One VPS compared with the usual mix of hosted services.
| Feature | Separate hosted services | MERN on one VPS |
|---|---|---|
| React front end | Static hosting service | NGINX on your VPS |
| Express API | App platform, billed per instance | PM2 on your VPS |
| MongoDB | Hosted database, billed by tier | MongoDB on your VPS |
| Bills | Usually several | One fixed monthly plan |
| Idle sleep and cold starts | Common on lower tiers | None: processes stay up |
| Server administration | Handled by the provider | Yours, after our free setup |
| See Plans |
Your First MERN Deploy
Build the React app, start the API under PM2 and let NGINX serve both.
-
Clone the project
One repository with client and server folders.
-
Build the React front end
NGINX serves the build folder.
-
Start the API
Install server dependencies and run Express under PM2.
-
Check it
Confirm the API answers through NGINX.
# 1. Clone the project
git clone [email protected]:you/mern-app.git ~/app && cd ~/app
# 2. Build the React front end
cd client && npm ci && npm run build
# 3. Start the API
cd ../server && npm ci --omit=dev
pm2 start server.js --name api && pm2 save
# 4. Check it
curl -I https://example.com/api/health
Example commands; adjust names, paths and versions to your project. Deploying and maintaining your application is yours to do (or ask us for a quote).
Installed and Secured Before You Log In
The VPS is unmanaged: after handover the server is yours to run. Before that, our engineers do the first setup once, free, so you start from a hardened server with MERN Stack in place.
-
Choose a plan and location
Pick the resources you need and the datacentre closest to your users.
-
Tell us your MERN Stack setup
Versions, database and domain: at order or right after.
-
We install and secure it
Server hardened, MERN Stack installed and tested, HTTPS on your domain.
-
You take over with root
SSH access to a working server, ready for your code and data.
Your MERN stack
- Node.js LTS and PM2 with startup on boot
- MongoDB with authentication on, bound to localhost
- A MongoDB user for your app
- NGINX set up to serve a React build and proxy /api to Express
- HTTPS with Let's Encrypt on your domain
Yours to run after handover
- Ongoing server administration
- Application maintenance and updates
- Debugging your code
- Migrating existing sites or data
Not included in the free setup, but we can quote for it. No control panel by default: CloudPanel, HestiaCP or Virtualmin on request at no cost; cPanel and Plesk need their own licence.
Platform Specs and Locations
The same KVM platform on every plan; only the CPU, RAM, storage and port speed change.
| Virtualisation | KVM with reserved vCores and RAM |
|---|---|
| Storage | NVMe SSD on every plan |
| Network | Dedicated IPv4 and IPv6, 500 Mbps to 3 Gbps per plan |
| Operating systems | Ubuntu 26.04, 24.04 and 22.04 LTS · Debian 13, 12 and 11 · AlmaLinux · Rocky Linux · Fedora · FreeBSD |
| Access | Full root over SSH, key-based login |
| Backups | Automatic daily backup of the previous 24 hours; snapshots and longer retention on request |
| Protection | Always-on anti-DDoS mitigation |
| Availability | 99.9% uptime SLA |
Secured before we hand it over
- Non-root sudo user created for daily work
- SSH key login, password login for root disabled
- Firewall (UFW) open only for the ports you use
- Fail2ban blocking repeated login attempts
- Automatic security updates enabled
- Free Let's Encrypt SSL on your domain
- Timezone, swap and hostname configured
Asia-Pacific
- Mumbai
- Singapore
- Sydney
Europe
- London
- Limburg
- Roubaix
- Gravelines
- Strasbourg
- Milan
- Warsaw
North America
- Beauharnois
Availability per location changes with demand; we confirm your location before setup. In Mumbai, Singapore and Sydney each plan includes a monthly traffic allowance (VPS-1 500 GB, VPS-2 and VPS-3 1 TB, VPS-4 3 TB); beyond it, speed is limited to 10 Mbps until the next month.
Who a MERN VPS Suits
-
Full-stack JavaScript developers
You build with React and Express and want to run the whole thing yourself.
-
Startups shipping an MVP
One server for the whole product while you learn what users need.
-
Teams leaving free tiers
Apps that have outgrown free database and hosting limits.
Security and Performance for MERN
Security
- Keep MongoDB on localhost with authentication on, and one user per application.
- Validate input in Express so query operators in JSON bodies cannot cause NoSQL injection.
- Set helmet headers and a CORS policy that allows only your own domain.
- Anything in the React bundle is public: no secrets or private keys in front-end code.
Performance
- Give the WiredTiger cache enough RAM and leave room for Node.
- Create indexes for the queries your API runs and check them with explain().
- Let NGINX serve the hashed React files with long cache headers.
- Run the API in PM2 cluster mode to use every vCore.
Questions Before You Deploy
Not covered here? Ask an engineer before you order.
Run Your MERN App on One Server
Pick a plan and tell us your Node and MongoDB versions. We hand over NGINX, PM2 and MongoDB installed and secured.