Deployment Guide

Server Requirements and Deployment Steps

Use this checklist to deploy the portal on VPS/cloud server with PHP, MySQL, Nginx, and Node.js WhatsApp service.

Minimum Server Requirements

  • CPU: 2 vCPU (4 vCPU recommended for heavy accounts)
  • RAM: 4 GB minimum (8 GB recommended)
  • Disk: 20 GB SSD minimum
  • OS: Ubuntu 22.04 LTS (recommended)
  • Node heap: run with higher memory for large sessions

Software Requirements

  • Nginx
  • PHP 8.1+ with extensions: mysqli, curl, mbstring, json, session
  • MySQL 8.0+ / MariaDB 10.6+
  • Node.js 18+ and npm
  • PM2 (recommended for Node process management)

1. Upload Project and Configure DB

  • Upload project files to web root (example: /var/www/whatsapp-panel).
  • Create database and user in MySQL.
  • Update DB credentials in db.php.
  • Open site once; schema auto-creates via auth.php.

2. Install Node Dependencies

  • Go to project folder.
  • Run npm install.
  • Ensure node/server.js runs without errors.
  • Set env if needed: retry/timeouts/heap tuning.

3. Run Node Service with PM2

  • pm2 start node/server.js --name whatsapp-panel-node
  • pm2 save
  • pm2 startup (enable auto-start on reboot)
  • Verify API: http://127.0.0.1:3000/health

4. Nginx Configuration (Important)

  • Set document root to project folder.
  • Use try_files $uri $uri/ /index.php?$query_string; for routing.
  • Pass PHP to php-fpm.
  • Reload Nginx after config update.

Required Writable Paths

  • uploads/
  • .wwebjs_auth/
  • .wwebjs_cache/
  • Ensure web user can read/write these folders.

Production Checklist

  • Enable HTTPS (SSL certificate)
  • Block direct public access to internal Node port 3000
  • Set regular DB backup and log rotation
  • Monitor PM2 process and server memory usage