⚡ WhatsApp Server Setup & Configuration
The WhatsApp Server is required to enable QR login, message sending, chatbot automation, and real-time communication. Important: Without this server, WhatsApp features will NOT work.1. Extract WhatsApp Server
Locate the file: whatsapp_server.zip Extract the file. After extraction, you will get: whatsapp-server/ Move it to your server: /home/whatsapp-server/ or /var/www/whatsapp-server/ Important: Do NOT place inside your Laravel project directory.2. Configure Server (config.js)
Open file: whatsapp-server/config.js Update your configuration: app_url must match your main domain: https://yourdomain.com/ Update database credentials (must be same as Laravel):- Database host
- Database name
- Database username
- Database password
3. Install Dependencies
Open terminal and run: cd whatsapp-server npm install4. Start Server
Run: node app.js Or (recommended): pm2 start app.js -i max Default server URL: http://localhost:80005. Connect in Laravel
Go to: Settings → API Integration → WhatsApp Unofficial- Set Status = Enable
- Enter WhatsApp Server URL
6. Verify Setup
- Go to User Dashboard
- Add WhatsApp account
- Scan QR code
Recommended Setup (No Port)
Instead of using: http://yourdomain.com:8000/ Use: https://ws.yourdomain.com This method is more stable and avoids port blocking issues.Troubleshooting
- QR not showing: Check server is running, check URL, restart server
- Cannot connect: Check firewall, port 8000, reverse proxy
- Disconnected: Use PM2, ensure stable server
Important Notes
- Node.js version must be 20 or higher
- Server must run 24/7
- Use same server as main application (recommended)
- Do NOT use localhost in production
Required Notice
You must complete all steps:- Extract and run WhatsApp Server
- Configure config.js correctly
- Enable WhatsApp Unofficial API in Laravel