Server Requirements

Before installing Mongo My Admin, ensure your server meets the following minimum requirements:

Requirement Minimum Recommended
Node.js 18.x 20.x or higher
MongoDB 5.0 7.0 or higher
npm 8.x 10.x or higher
RAM 1 GB 2 GB or more
Storage 1 GB 5 GB or more
CPU 1 Core 2+ Cores

MongoDB Server

You need access to a MongoDB server (local, Atlas, or self-hosted). The application creates actual databases on this server, so ensure your MongoDB user has dbAdminAnyDatabase and userAdminAnyDatabase roles.

Quick Start

Get up and running in minutes with these steps:

Extract the Package

Extract the downloaded zip file to your desired location:

# Create directory
mkdir mongo-my-admin
cd mongo-my-admin

# Extract files
unzip mongo-my-admin.zip -d .

Install Dependencies

Install all required Node.js packages:

npm install

This will install all dependencies listed in package.json.

Configure Environment

Copy the example environment file and configure it:

# Copy example file
cp .env.example .env

# Edit the file with your settings
nano .env

See the Environment Setup page for detailed configuration options.

Build for Production

Build the Next.js application for production:

npm run build

This compiles the application and optimizes it for production use.

Start the Server

Start the production server:

npm start

The application will be available at http://localhost:6008

Default Access URLs

Company Admin: http://localhost:6008/
SaaS Admin: http://localhost:6008/saas
API: http://localhost:6008/api/v1

Database Seeding

After configuring your .env file, you must seed the database with initial data before using the platform. Seeding creates the admin user, default packages, demo company, payment gateways, email templates, and platform settings.

Run the Seed Script

# Run the primary seed script
node server/scripts/seed.js

Seed Script Output

You should see success messages for each step:
✓ Admin created
✓ Packages created
✓ Demo company created
✓ Settings configured
✓ Seeding complete!

What Gets Seeded

The seed script creates the following data:

Data Details
SaaS Super Admin Login: super-admin@gmail.com / BetaZen@2023
3 Subscription Packages Starter (3 DBs, 5GB), Professional (10 DBs, 50GB), Enterprise (Unlimited)
Demo Company "Demo Company" with admin user, active Pro subscription (1 year)
Company Admin User Login: admin@gmail.com / BetaZen@2023
Payment Gateways Razorpay, PhonePe, Paytm, Manual (all configured with placeholder keys)
Email Templates Welcome, Subscription Activated, Expiring, Password Reset, Payment Success
Platform Settings Site name, security settings, GST/tax configuration
Demo Payment Records Sample payment and subscription records for the demo company
Sample Invoices 4 invoices (2 paid, 1 pending, 1 overdue) for demonstration

Warning: Seed Cleans Data

The seed script deletes existing data (except admin users) before inserting. Only run it on a fresh installation or when you want to reset the platform to default state.

Alternative: Minimal Seeder

For a minimal setup without demo data (only creates admin, packages, and settings):

# Run minimal seeder (non-destructive, won't overwrite existing data)
node server/seeders/adminSeeder.js

Prefix Migration Script

If you need to update existing company prefixes to the 12-digit format:

# Update company prefixes (safe, non-destructive)
node server/scripts/migrate-prefixes.js

Default Login Credentials

After seeding, use these credentials to log into the platform:

SaaS Super Admin

Field Value
Panel URL https://yourdomain.com/saas
Email super-admin@gmail.com
Password BetaZen@2023

Company Admin (Demo Company)

Field Value
Panel URL https://yourdomain.com
Email admin@gmail.com
Password BetaZen@2023

Security: Change Default Passwords

Change both admin passwords immediately after first login. Go to Profile → Change Password in each panel. Default credentials are a security risk in production.

Complete Setup Flow

Here is the recommended order after installation:

Seed the Database

Run node server/scripts/seed.js to populate initial data.

Build & Start

Run npm run build then npm start (or use PM2 for production).

Login as SaaS Admin

Go to /saas and login with super-admin@gmail.com. Change password, configure payment gateways, update email settings, and customize the landing page.

Login as Company Admin

Go to the root URL and login with admin@gmail.com. Change password, create databases, and start managing.

Configure for Production

Set up SSL, configure your domain in .env, switch payment gateways to live mode, and set up proper SMTP email credentials.

cPanel Installation

Deploy Mongo My Admin on shared hosting using cPanel with Node.js support (requires cPanel with Phusion Passenger).

Prerequisites

Upload Files

Upload the extracted files to your cPanel account using File Manager or FTP:

  • Upload to a directory like /home/username/mongo-my-admin
  • Or upload to public_html if using as main domain

Setup Node.js Application

In cPanel, go to "Setup Node.js App":

  1. Click "Create Application"
  2. Select Node.js version 18 or higher
  3. Set Application Mode to Production
  4. Set Application Root to your folder path
  5. Set Application URL (your domain or subdomain)
  6. Set Application Startup File to server.js

Configure Environment Variables

In the Node.js app settings, add environment variables:

NODE_ENV = production
PORT = (leave empty, Passenger handles this)
MONGODB_URI = mongodb+srv://user:pass@cluster.mongodb.net/db
JWT_SECRET = your-secret-key
...

Install Dependencies & Build

Click "Run NPM Install" in cPanel. Then SSH into your account:

# SSH into server
ssh username@yourserver.com

# Navigate to app directory
cd /home/username/mongo-my-admin

# Build the application
npm run build

Start/Restart Application

In cPanel Node.js App settings, click "Restart" to start the application.

cPanel Limitations

WebSocket functionality may be limited on some shared hosting. For full WebSocket support (real-time migration progress, etc.), consider VPS hosting.

VPS Installation

Deploy on a VPS (DigitalOcean, AWS, Linode, etc.) for full control and performance.

Initial Server Setup

# Update system packages
sudo apt update && sudo apt upgrade -y

# Install Node.js 20.x
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Verify installation
node --version
npm --version

# Install PM2 globally (process manager)
sudo npm install -g pm2

Application Setup

# Create app directory
sudo mkdir -p /var/www/mongo-my-admin
cd /var/www/mongo-my-admin

# Extract or clone your files here
# Then set proper permissions
sudo chown -R $USER:$USER /var/www/mongo-my-admin

# Install dependencies
npm install

# Configure environment
cp .env.example .env
nano .env

# Build application
npm run build

Run with PM2

# Start with PM2
pm2 start npm --name "mongo-my-admin" -- start

# Save PM2 configuration
pm2 save

# Setup PM2 to start on boot
pm2 startup

# View logs
pm2 logs mongo-my-admin

# Monitor
pm2 monit

Nginx Reverse Proxy (Recommended)

Configure Nginx as a reverse proxy for better performance and SSL:

# Install Nginx
sudo apt install nginx -y

# Create site configuration
sudo nano /etc/nginx/sites-available/mongo-my-admin

Add the following configuration:

server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:6008;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        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_cache_bypass $http_upgrade;
    }

    # Handle WebSocket connections
    location /socket.io/ {
        proxy_pass http://127.0.0.1:6008;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
# Enable site
sudo ln -s /etc/nginx/sites-available/mongo-my-admin /etc/nginx/sites-enabled/

# Test configuration
sudo nginx -t

# Restart Nginx
sudo systemctl restart nginx

Docker Installation

Deploy using Docker for easy containerization and portability.

Dockerfile

Create a Dockerfile in your project root:

FROM node:20-alpine

WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies
RUN npm ci --only=production

# Copy application files
COPY . .

# Build Next.js
RUN npm run build

# Expose port
EXPOSE 6008

# Start server
CMD ["npm", "start"]

Docker Compose

Create a docker-compose.yml file:

version: '3.8'

services:
  app:
    build: .
    ports:
      - "6008:6008"
    environment:
      - NODE_ENV=production
      - PORT=6008
      - MONGODB_URI=mongodb://mongo:27017/mongo_saas
      - JWT_SECRET=your-secret-key
    depends_on:
      - mongo
    restart: unless-stopped

  mongo:
    image: mongo:7
    volumes:
      - mongo_data:/data/db
    restart: unless-stopped

volumes:
  mongo_data:

Build and Run

# Build and start containers
docker-compose up -d --build

# View logs
docker-compose logs -f app

# Stop containers
docker-compose down

SSL Certificate Setup

Secure your installation with HTTPS using Let's Encrypt (free SSL).

Using Certbot (Nginx)

# Install Certbot
sudo apt install certbot python3-certbot-nginx -y

# Obtain certificate
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

# Auto-renewal is set up automatically
# Test renewal
sudo certbot renew --dry-run

Update Environment

After SSL is set up, update your .env file:

COMPANY_ADMIN_URL=https://yourdomain.com
SAAS_ADMIN_URL=https://yourdomain.com/saas
API_BASE_URL=https://yourdomain.com

Updating to a New Version

When a new version of Mongo My Admin is released, follow these steps to update safely.

Always Backup First

Create a backup of your database and .env file before updating.

Step-by-Step Update

Backup Your Data

Create backups of your database and configuration:

# Backup your database
mongodump --uri="your_mongodb_uri" --out=./backup/$(date +%Y%m%d)

# Backup your .env file
cp .env .env.backup

# Backup uploads folder (logos, images)
cp -r uploads uploads.backup

Stop the Application

Stop the running application before replacing files:

# If using PM2
pm2 stop mongo-my-admin

# If using systemd
sudo systemctl stop mongo-my-admin

Replace Application Files

Extract the new version files, keeping your configuration:

# Extract new version to a temporary folder
mkdir temp-update
unzip mongo-my-admin-v2.0.zip -d temp-update

# Copy new files (excluding .env and uploads)
rsync -av --exclude='.env' --exclude='uploads/' --exclude='node_modules/' temp-update/ /var/www/mongo-my-admin/

# Clean up
rm -rf temp-update

Check for New Environment Variables

Compare your .env with the new .env.example for any new required variables:

# Compare env files
diff .env .env.example

Add any new variables from .env.example to your .env file.

Install Dependencies

Install new or updated packages:

npm install

Rebuild the Application

Build the updated Next.js application:

npm run build

Run Migration Scripts (If Needed)

Check the release notes for any required migration scripts:

# Example: prefix migration (if upgrading from older version)
node server/scripts/migrate-prefixes.js

Restart the Application

Start the updated application:

# If using PM2
pm2 restart mongo-my-admin

# If using systemd
sudo systemctl start mongo-my-admin

# Verify it's running
pm2 logs mongo-my-admin --lines 20

Clear Browser Cache

After updating, clear your browser cache and cookies to ensure the latest frontend assets are loaded.

Rollback If Needed

If the update causes issues, restore from your backup:

# Stop the application
pm2 stop mongo-my-admin

# Restore database from backup
mongorestore --uri="your_mongodb_uri" --drop ./backup/20240115

# Restore .env file
cp .env.backup .env

# Restore uploads
cp -r uploads.backup/* uploads/

# Reinstall and rebuild
npm install
npm run build

# Restart
pm2 restart mongo-my-admin

Do NOT Re-run Seed Script

When updating, do NOT run node server/scripts/seed.js again. The seed script deletes existing data. Only run it on fresh installations or to completely reset the platform.

Troubleshooting

Common Issues

Error: EACCES permission denied

Fix npm permissions:
sudo chown -R $(whoami) ~/.npm

MongoDB Connection Failed

Check your MONGODB_URI in .env file. Ensure the MongoDB server is running and accessible from your server. For Atlas, whitelist your server IP.

Port Already in Use

Change the port in .env file:
PORT=3000
Or kill the process using the port:
sudo lsof -i :6008
sudo kill -9 PID

Build Fails with Memory Error

Increase Node.js memory limit:
NODE_OPTIONS="--max-old-space-size=4096" npm run build

Verify Installation

# Check if server is running
curl http://localhost:6008/api/v1/health

# Check PM2 status
pm2 status

# View real-time logs
pm2 logs mongo-my-admin --lines 100

Need Help?

If you encounter issues not covered here, please contact support through CodeCanyon with details about your server environment and error messages.