Recommended Free Tools
Yes—one Ubuntu VPS can run several MEAN applications reliably. Install the shared runtime and services once, then isolate each app with its own directory, environment file, Express port, PM2 process name, MongoDB database credentials and Nginx virtual host. Keep every Node service on localhost; Nginx alone accepts public HTTP and HTTPS traffic. Use one domain or subdomain per app for the simplest routing, and add TLS only after DNS points to the VPS.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
How the multi-app layout works
A MEAN deployment has four moving parts: MongoDB stores data, Express and Node.js run the API, Angular produces browser files, and Nginx serves those files while reverse-proxying API requests. The VPS can share one installation of Node.js, npm, Nginx, MongoDB and Git, but application identities must remain separate.
As an Amazon Associate I earn from qualifying purchases.
For each application, define all of the following:
- A private application directory and, where practical, a separate Unix user or deployment identity.
- An environment file containing only that app’s secrets and settings.
- A unique Express listen port, such as 4101 for the first API and 4102 for the second.
- A unique PM2 process name and working directory.
- A separate MongoDB database and least-privilege database user.
- An Nginx server block with its own hostname, Angular document root and proxy destination.
The public request path is therefore https://app-one.example.com/ to Nginx, static Angular files from the app-one build directory, and https://app-one.example.com/api/ to Express on 127.0.0.1:4101. App two follows the same pattern with a different hostname and port. This arrangement prevents port collisions and makes deployments, logs and rollbacks easier to identify.
DigitalOcean’s MEAN catalog recommends an Nginx server-block file for each site and a separate directory under /var/www. The procedure below uses /srv/apps, which keeps deployable application data distinct from the operating system while preserving the same one-directory-per-site principle.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
1. Provision and harden Ubuntu before deploying code
Create a deployment identity
Use a sudo-capable deployment user rather than performing routine work as root. Add your SSH public key, test a second administrative session, and only then disable password authentication if your access policy permits it. Keep emergency console access available through your VPS provider.
Patch the system and restrict the firewall
Apply security updates first:
sudo apt update
sudo apt full-upgrade
Allow SSH only from trusted administration networks, then allow the public web ports:
sudo ufw allow from YOUR_ADMIN_CIDR to any port 22 proto tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status verbose
Do not allow MongoDB’s port 27017 from the internet. With the services in this design, MongoDB and the Node APIs bind locally, so no inbound firewall rule is needed for either service.
2. Install the shared MEAN prerequisites once
Install a supported Node.js LTS release, npm, Nginx, MongoDB and Git using repositories appropriate for your Ubuntu release. Record the exact versions in deployment notes so a rebuild uses compatible packages. The current one-click MEAN image listed by DigitalOcean in 2026 includes Node.js 22.22.3 and MongoDB 8.0.17; those figures describe that image and can change, so do not assume they are universal package versions.
Check what is actually installed:
node --version
npm --version
nginx -v
mongosh --version
git --version
Enable the shared services at boot and start them:
sudo systemctl enable --now nginx
sudo systemctl enable --now mongod
Angular’s command-line tooling can be installed globally if your projects require it, but production deployment should use each project’s lockfile and declared build scripts. Avoid mixing dependency versions between applications merely because they share one server.
3. Create an isolated directory layout
A predictable layout makes permissions and Nginx roots unambiguous:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems/srv/apps/app-one/
├── backend/
├── frontend/
│ └── dist/
├── shared/
└── releases/
/srv/apps/app-two/
├── backend/
├── frontend/
│ └── dist/
├── shared/
└── releases/
Keep source and deployment configuration outside any directory that Nginx serves. Never put .env files, private keys, database dumps or Git metadata under a public Angular document root. A stricter installation gives each application its own Unix user; a shared deployment user is simpler but means a compromised app can potentially read another app’s files. Whichever model you choose, set ownership deliberately and use restrictive permissions for secrets:
sudo install -d -m 0750 -o appone -g appone /srv/apps/app-one
sudo install -d -m 0750 -o apptwo -g apptwo /srv/apps/app-two
sudo chmod 0600 /srv/apps/app-one/backend/.env
sudo chmod 0600 /srv/apps/app-two/backend/.env
Use a release directory or versioned deployment folders if you need atomic rollbacks. The active Angular dist directory and backend working directory should always point to a known release.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
4. Give every app its own MongoDB database and credentials
A single MongoDB daemon can serve multiple applications efficiently. Isolation comes from separate databases and users, not from giving every app unrestricted access to the server. Create one least-privilege account per application and use authenticated localhost connections such as:
mongodb://app1_user:[email protected]:27017/app1
Store the complete connection string in app-one’s protected environment file and create a different user, password and database name for app two. Bind MongoDB to localhost unless you have a documented private-network requirement. Never open port 27017 to the public internet.
Confirm authentication from the VPS using each app’s credentials before starting the API. Back up the databases and test a restore periodically; a backup that has never been restored is not a verified recovery plan.
5. Deploy each Express backend on a unique localhost port
Install from the lockfile
Clone or copy the backend into its application directory, then install production dependencies with the project’s lockfile:
cd /srv/apps/app-one/backend
npm ci --omit=dev
NODE_ENV=production npm run build
Use the project’s actual build command; some Express applications do not have a separate build step. Repeat the process in app two’s backend directory. Keep NODE_ENV=production in the PM2 environment as well as in any deployment shell.
Make the listener explicit
Your server should read the port from the environment and bind to localhost:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11const port = Number(process.env.PORT || 4101);
app.listen(port, '127.0.0.1', () => {
console.log(`API listening on ${port}`);
});
Assign 4101 to app one and 4102 to app two, or choose other unused high ports. The important rule is uniqueness. Test each API locally before involving Nginx:
curl -i http://127.0.0.1:4101/health
curl -i http://127.0.0.1:4102/health
A successful local response proves that the process, environment variables and MongoDB connection are working independently of DNS, certificates and proxy configuration.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
6. Build and place each Angular frontend
In each frontend project, configure the production API base URL to use that app’s own hostname and an /api prefix, or an equivalent environment-specific setting. A same-origin URL such as /api avoids hard-coding a private port into browser code.
cd /srv/apps/app-one/frontend
npm ci
npm run build -- --configuration production
Copy the generated dist output into app one’s release directory, and repeat for app two. Angular CLI output paths vary by project; inspect the resulting directory and use the exact folder containing index.html as the Nginx root. The browser should never request 127.0.0.1:4101 directly—on a user’s computer, that address means the user’s own computer, not your VPS.
7. Run all Node processes with PM2
PM2 is a Node-focused process manager that keeps applications alive, restarts them after crashes and can restore them after machine restarts. Its ecosystem file gives several applications reproducible working directories, names and environment variables.
module.exports = {
apps: [
{
name: 'app-one-api',
cwd: '/srv/apps/app-one/backend',
script: 'server.js',
env: { NODE_ENV: 'production', PORT: 4101 }
},
{
name: 'app-two-api',
cwd: '/srv/apps/app-two/backend',
script: 'server.js',
env: { NODE_ENV: 'production', PORT: 4102 }
}
]
};
Adjust script to the real entry point or use the project’s compiled output. Start and persist the processes:
pm2 start ecosystem.config.js
pm2 list
pm2 save
pm2 startup
PM2 prints a command from pm2 startup; run that command with the requested privileges, then run pm2 save again. Verify an individual process and its logs:
pm2 logs app-one-api
pm2 describe app-two-api
Use distinct process names. They make targeted restarts and log inspection safe:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →pm2 restart app-one-api
pm2 restart app-two-api
If your application loads secrets from .env, load them in the application or ecosystem configuration without committing them to Git. PM2’s ecosystem file itself should be protected if it contains credentials.
8. Configure one Nginx server block per domain
Each hostname gets a separate file in /etc/nginx/sites-available. The first block serves Angular’s static files and forwards only /api/ to app one’s private port:
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
server {
listen 80;
server_name app-one.example.com;
root /srv/apps/app-one/frontend/dist/app-one;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:4101/;
}
}
Create a second block with app two’s hostname, Angular root and port 4102:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →server {
listen 80;
server_name app-two.example.com;
root /srv/apps/app-two/frontend/dist/app-two;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:4102/;
}
}
The trailing slash in proxy_pass affects URI rewriting. With the shown configuration, Nginx removes the matching /api/ prefix before forwarding. Make your Express routes match that behavior—for example, route /users behind a public request to /api/users. If your backend expects the prefix to remain, change the proxy and route design together rather than guessing.
Enable the files and validate before reloading:
sudo ln -s /etc/nginx/sites-available/app-one /etc/nginx/sites-enabled/app-one
sudo ln -s /etc/nginx/sites-available/app-two /etc/nginx/sites-enabled/app-two
sudo nginx -t
sudo systemctl reload nginx
Nginx can serve static files, manage TLS and redirect traffic to a Node application. If an API uses WebSockets, add the appropriate HTTP/1.1 upgrade headers and timeout settings to that location; ordinary JSON APIs do not require them.
9. Point DNS to the VPS and enable HTTPS
Create an A record for each hostname pointing to the VPS’s IPv4 address and an AAAA record only when the VPS is correctly configured for IPv6. Wait for each name to resolve publicly before requesting a certificate. The domain must point to the VPS and ports 80 and 443 must be reachable for the usual Nginx certificate workflow.
Run Certbot’s Nginx integration for each hostname, select the option that redirects HTTP to HTTPS, and verify the resulting configuration:
Free tools Windows power users keep installed
One-click scans. No signup required.
sudo nginx -t
sudo systemctl reload nginx
sudo certbot renew --dry-run
Test both the browser URL and API URL after the certificate is installed. Keep certificate renewal monitored; a certificate that expires takes every app on that hostname offline even when the Node processes are healthy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Domain-per-app or path-per-app?
| Layout | Routing model | Main advantage | Main complication |
|---|---|---|---|
| Domain or subdomain per app | app-one.example.com and app-two.example.com |
Separate Nginx roots, API prefixes, cookies and certificates are easy to reason about. | Requires DNS records and a hostname for each application. |
| Path per app | example.com/app-one and example.com/app-two |
Can share one hostname and sometimes one certificate. | Angular must be built with the correct base path, asset URLs and client-side routing; API prefixes and cookie paths need careful coordination. |
Choose domain-per-app unless you have a strong reason to share a hostname. It minimizes rewrite rules and makes moving one application later less disruptive.
Isolation and service-management choices
| Decision | Simpler option | More isolated option | Trade-off |
|---|---|---|---|
| Unix identity | One deployment user | One user per application | Shared users reduce administration; separate users limit cross-app file access. |
| Node process manager | PM2 ecosystem file | One systemd service unit per API | PM2 is Node-focused and convenient for multiple processes; systemd is native to Ubuntu and integrates directly with service dependencies and journaling. |
| MongoDB placement | One MongoDB instance with separate databases | Separate database hosts | A shared instance uses fewer resources; separate hosts provide stronger fault isolation but add cost and operations. |
| Hosting model | All services on one VPS | Managed database or separate hosting | One VPS is economical and straightforward; splitting services improves resilience and reduces a single-server failure domain. |
PM2 and systemd are alternatives, not layers you must stack. If you choose systemd, create a unit per API with a distinct WorkingDirectory, EnvironmentFile and ExecStart, then enable each unit. Do not have both systemd and PM2 supervise the same process.
Best Value
Capacity: how many apps can one VPS run?
There is no authoritative universal maximum. Capacity depends on API concurrency, Angular build size, background jobs, MongoDB working sets, traffic spikes, memory limits and disk performance. Measure your own workload rather than counting domains. Watch CPU, memory, swap, disk latency, MongoDB connections and API response times under a realistic load test.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Leave headroom for operating-system updates, MongoDB maintenance, certificate renewal and a temporary traffic surge. If one application can exhaust memory or CPU, isolate it with process limits, move the database to managed infrastructure or place high-traffic applications on separate VPS instances.
Verification checklist after every deployment
- Resolve each hostname with DNS and confirm it returns the VPS address.
- Run
curl -i http://127.0.0.1:4101/healthand the equivalent command for every API. - Run
sudo nginx -tand inspectsystemctl status nginx. - Open each public HTTPS URL and confirm Angular client-side routes load after a hard refresh.
- Call each public API path and verify that it reaches the matching backend, not another app.
- Check
pm2 list, process uptime and logs for startup errors. - Confirm MongoDB authentication with each application’s own credentials.
- Inspect certificate expiry and run the supported renewal dry run.
- Verify that ports 4101 and 4102 are not publicly reachable; only 80 and 443 should be exposed for web traffic.
- Record the deployed commit, Node and MongoDB versions, environment-variable changes and rollback location.
Troubleshooting by symptom
Nginx returns 502 Bad Gateway
Check that the matching PM2 process is online, the configured port is correct and the API is listening on 127.0.0.1. Run a local curl against that port, then inspect pm2 logs. A backend crash, wrong cwd, missing production dependency or malformed environment variable is more likely than an Nginx networking failure when the listener is local.
Angular loads but API calls fail
Inspect the browser’s request URL. It should use the current hostname and /api/, not a development port or localhost. Then compare the Nginx location prefix, the trailing slash on proxy_pass and the Express route prefix. Check CORS only when the frontend and API are genuinely on different origins.
Every domain shows the same app
Confirm each request’s Host header reaches the intended server block, that every file has the correct server_name, and that the symlinks in sites-enabled point to the expected files. Run nginx -T to inspect the complete active configuration and remove a default catch-all block if it is intercepting requests.
HTTPS issuance fails
Verify public DNS, firewall access to port 80, the exact hostname in Nginx and the absence of a conflicting DNS record. Do not request a certificate for a name that has not yet resolved to this VPS.
The app works until reboot
Run pm2 save after the desired processes are online, execute the command printed by pm2 startup, reboot during a maintenance window and verify pm2 list. Also check that MongoDB and Nginx are enabled with systemd.
One app can read another app’s secrets
Review ownership and mode bits on directories and environment files, use separate Unix users, and keep secrets outside Nginx roots. Rotate any credential that may have been exposed; changing permissions does not invalidate a copied secret.
Backups, updates and safe operations
Back up each MongoDB database, protected environment files, Nginx server blocks and the PM2 ecosystem configuration. Store backups away from the VPS and perform a restore test on a separate environment. Before upgrading Node.js, MongoDB or application dependencies, capture versions and test one application at a time. Reload Nginx only after nginx -t succeeds, and use a staged release directory so a failed frontend build does not replace the last working build.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The durable pattern is simple: shared infrastructure, isolated application identities, private Node ports, authenticated per-app MongoDB access, one PM2 identity per API and one Nginx virtual host per domain. DNS and HTTPS complete the public path; monitoring, backups and restore drills keep the arrangement dependable after the initial installation.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




