MEAN Stack Hosting
MEAN hosting must support MongoDB, an Express API on Node.js and the Angular deployment model. Use a compatible host with process supervision, secure database access, HTTPS and recoverable backups. It need not be one Linux VPS: static frontend, API and database services can be separate. Select supported releases and size from measured workload, not a universal RAM claim.
For teams deploying a MEAN application, with runtime, database, process and capacity checks that distinguish platform support from an unrelated server-price row.
knowledge
- Read time
- 5 min
- Sections
- 7
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 14 November 2026.
What MEAN stack hosting is
MEAN combines MongoDB data storage, an Express API on Node.js and an Angular frontend. The host must support the required runtime and process model, but that can be a VPS, a managed platform or a compatible shared Node service with a separately hosted database.
- MongoDB — document database on 127.0.0.1:27017 with authentication enabled.
- Express — the HTTP layer inside your Node process, installed as a package rather than run as a service.
- Angular — compiled into static files in dist/ and served by Nginx.
- Node.js — the runtime for the API, supervised by PM2 so a crash restarts it.
Renting a server is the wrong purchase in two cases. A static Angular build with no API is a folder of files and runs on cheap shared hosting. A team with nobody to patch the operating system should rent a managed platform, because on this server the patching is yours.
What the server has to provide
Five things must exist before the app answers on port 443, and each one maps to a setting you can check from a terminal.
| Component | What to run | How you check it |
|---|---|---|
| Node.js runtime | A supported Active or Maintenance LTS release compatible with the app | node -v matches the reviewed deployment requirements |
| Process supervisor | PM2 with a startup hook saved | pm2 list shows online after a reboot |
| Reverse proxy | Nginx on 80 and 443, proxy_pass to 127.0.0.1:3000 | sudo nginx -t passes, page loads by domain |
| Database | MongoDB 7 bound to 127.0.0.1 with auth on | sudo ss -tlnp shows no public 27017 |
| Storage | Space for artifacts, database growth and recovery | Monitor actual storage use; no universal 40 GB or 20% rule applies |
The Node-specific workflow, including cluster mode behind PM2, sits on Node.js hosting.
How much RAM and CPU a MEAN app needs
Size MEAN hosting from the application, build process, database working set and measured traffic; no universal minimum or user capacity is established here. Node and MongoDB sharing a host compete for resources, but a slow query alone does not prove that a larger server is required.
| Input | Check |
|---|---|
| Node process | Heap, concurrency, startup and error behaviour |
| MongoDB | Working set, indexes, storage growth and backups |
| Angular build | Build-time memory and deployment artifact type |
| Proxy and TLS | Upstream routing, connection limits and renewal |
Confirm the Linux configuration and management quote before ordering. Published Windows cloud rows cannot be assumed to be compatible Linux MEAN packages.
Install Node.js, MongoDB, PM2 and Nginx on Ubuntu 22.04
This deployment outline assumes a supported Ubuntu server you administer. Use a currently supported Node LTS release compatible with the project, and MongoDB’s official repository instructions for the selected supported release and architecture.
- Review OS updates and resource requirements on the actual server before deployment. Do not apply unattended upgrades, arbitrary swap sizing or a reboot blindly to a live application.
- Install a supported Node.js LTS release through a trusted documented method. Do not execute an unreviewed network script as root merely to follow an old Node 20 example.
- Follow the official MongoDB 8.0 Ubuntu instructions for the supported OS and architecture; verify repository signing, service status and authenticated access before deployment.
- Deploy the code to /var/www/api with
git clone, runnpm ci, thennpm run buildfor the Angular bundle, thenpm2 start server.js --name api. - Run
pm2 startup, copy the command it prints, run that command, thenpm2 save. - Install Nginx with
sudo apt install -y nginx, putproxy_pass http://127.0.0.1:3000;in the server block, then runsudo nginx -tandsudo systemctl reload nginx.
You know it worked when curl -I http://127.0.0.1:3000 returns 200 and pm2 list shows the app online. Reboot once and check pm2 list again: if the app is still online without you starting it, the startup hook is correct.
Point the domain, add HTTPS and close the ports
Create an A record for the domain and for www at the server's IPv4 address, then wait until dig +short yourdomain.in returns that address. Request the certificate with sudo certbot --nginx -d yourdomain.in -d www.yourdomain.in, which rewrites the Nginx block to listen on 443.
Close everything else. Run sudo ufw allow OpenSSH, sudo ufw allow 'Nginx Full', then sudo ufw enable. MongoDB must stay private: sudo ss -tlnp | grep 27017 should show 127.0.0.1. If it shows 0.0.0.0, set bindIp in /etc/mongod.conf and restart mongod.
A 502 from Nginx means the proxy reached nothing: the Node process is down or listening on another port. Run pm2 logs api and curl -I http://127.0.0.1:3000, then make proxy_pass match the real port. A 404 on a deep Angular route is a different fault: add try_files $uri $uri/ /index.html; so the client router handles it.
When MEAN stack hosting is the wrong choice
Skip the server when Angular is the whole product. A build with no Express API is static files, and shared hosting serves them for a fraction of the cost. Skip it as well for an internal tool used by a handful of people, where a managed platform removes patching you would otherwise own.
Do not buy a larger server to fix one slow query. Add the index the query needs in MongoDB first. Move to a second machine only when the database working set no longer fits in memory beside the Node process.
MEAN stack hosting on WebJi® cloud servers
Confirm WebJi®’s actual MEAN hosting configuration, supported operating system and application-management scope in writing. Do not infer Ubuntu images, root access, database installation or migration entitlements from an unrelated cloud price row.
The Node.js hosting service is the matching starting point; VPS hosting may suit a self-managed stack. Ask separately about Node processes, MongoDB availability, backups, certificates and responsibility for Angular code.
Frequently asked questions
Can I run a MEAN stack on shared hosting?
Only if the plan supports the required Node process model and database access. Some shared services support Node apps, while others do not. A static Angular build can also be hosted separately from its API. Confirm the specific plan rather than rejecting all shared hosting.
How much RAM does a MEAN app need?
There is no measured universal RAM minimum in this guide. Evaluate Node, MongoDB, builds, backups and representative traffic together. Resource monitoring and query analysis should guide sizing; a server specification by itself does not guarantee production capacity.
Do I need a separate server for MongoDB?
Not for most apps. Keep MongoDB on the same server while its working set fits in RAM beside Node. Split it onto its own machine when memory stays full at normal traffic, or when a second application needs the same database.
How do I keep a Node app running after a reboot?
Run pm2 startup, execute the command it prints, then run pm2 save. Reboot the server and run pm2 list: the app must show online without you starting it by hand.
Why does Nginx return 502 for my MEAN app?
Nginx reached the proxy but nothing answered on the upstream port. Check pm2 list and run curl -I http://127.0.0.1:3000, then make the proxy_pass port match the port the Node process actually listens on.
Does WebJi® install the MEAN stack for me?
The cloud server is unmanaged for your application. WebJi® sets up the server and the network, and support answers by email 24/7 in Hindi and English with an average first reply under 60 minutes. Stack upgrades and application code are yours.
Last editorial update: 14 November 2026.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.