MEVN Full-Stack on Ubuntu Server
MEVN is a modern full-stack JavaScript framework combining MongoDB, Express.js, Vue.js, and Node.js for building fast, scalable web applications. At GlobalSolutions we have pre-configured this complete MEVN stack on Ubuntu Server, hardened it for secure production use, and made it instantly deployable on AWS EC2 or similar cloud platforms.
Accessing Your MEVN Instance
After launching the Ubuntu Server image from AWS Marketplace / your provider:
- Connect via SSH:
ssh ubuntu@your-public-ip(use your .pem key) - Default user: ubuntu (sudo rights, no password required with key)
Installed Software & Paths
| Component | Software | Version | Installation Path / Notes |
|---|---|---|---|
| Database | MongoDB Community | 7.0.x | Running on localhost:27017Data: /var/lib/mongodb |
| Backend | Node.js + Express.js | Node 20.x LTS Express 4.19.x | ~/server (sample backend app pre-installed) |
| Frontend | Vue.js 3 + Vite | Vue 3.4.x | ~/client (sample frontend app pre-installed) |
| Web Server | Nginx | 1.24.x | /etc/nginxConfigured as reverse proxy |
Important: The sample backend in
~/server is pre-configured to seamlessly connect to the local MongoDB server (no extra setup needed).
Default Configuration & Credentials
- MongoDB: No root password set by default — run
mongoand create admin user immediately. - Backend port: 3000 (Express API)
- Frontend dev port: 5173 (Vue dev server)
- Nginx: Serves production frontend on port 80 and proxies
/api→ backend on 3000 - Environment:
~/server/.envalready points tomongodb://localhost:27017/mevn_db
Finding Your Instance Details
- Public IP: Check cloud console or run
curl ifconfig.me - Hostname:
hostname - Running services:
systemctl status mongod nginx
Getting Started with Your Sample MEVN Apps
All services start automatically on boot. The backend and frontend are fully functional sample applications.
Quick Commands (after SSH)
# Check services
systemctl status mongod nginx
pm2 list # Backend is managed by PM2
# Backend (Express + MongoDB)
cd ~/server
npm start # or pm2 restart server
# Frontend (Vue)
cd ~/client
npm run dev # development[](http://IP:5173)
# or for production:
npm run build
# (Nginx already serves the built files from ~/client/dist)
# Test the full stack
curl http://localhost/api/health # should return success
Nginx Configuration (already set up)
Nginx is pre-configured to:
- Serve the Vue frontend on port 80[](http://your-ip)
- Proxy all
/api/*requests to the Express backend on port 3000
To reload: sudo nginx -t && sudo systemctl reload nginx
Making Your MEVN App Publicly Accessible
- Allow ports 80 & 443 in your cloud security group
- Point your domain A record to the public IP
- For HTTPS:
sudo apt install certbot python3-certbot-nginxthensudo certbot --nginx
Security Recommendation: Change MongoDB admin password immediately and restrict port 27017 to localhost only.
Support
For any questions or customizations with this MEVN Ubuntu offering, please contact support@yourcompany.com.