Thanks to visit codestin.com
Credit goes to github.com

Skip to content

deevseek/wagateway

Repository files navigation

wagateway

WhatsApp Gateway - Deployment Guide

silahkan gunakan aplikasi saya tolong donasi seiklas nya di https://saweria.co/Adiiiii untuk saya hidup

Production Deployment Requirements

This WhatsApp Gateway application requires Chrome browser and system dependencies for WhatsApp Web.js to function properly. The current Replit development environment lacks these dependencies.

Deployment Options

1. Docker Deployment (Recommended)

The easiest way to deploy this application is using Docker, which includes all required dependencies.

# Build and run with Docker Compose
docker-compose up --build -d

# Or build and run manually
docker build -t whatsapp-gateway .
docker run -p 5000:5000 -e DATABASE_URL=your_db_url whatsapp-gateway

2. VPS/Cloud Server Deployment

Deploy to Ubuntu/Debian server with the following setup:

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

# Install Chrome and dependencies
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable

# Install additional dependencies
sudo apt-get install -y \
    libxss1 libgconf-2-4 libxtst6 libxrandr2 libasound2 \
    libpangocairo-1.0-0 libatk1.0-0 libcairo-gobject2 \
    libgtk-3-0 libgdk-pixbuf2.0-0

# Clone and setup application
git clone <your-repo>
cd whatsapp-gateway
npm install
npm run build
npm start

3. Platform-as-a-Service Deployment

Railway

  1. Connect your GitHub repository
  2. Set environment variable: CHROME_BIN=/usr/bin/google-chrome
  3. Use the provided Dockerfile for deployment

Render

  1. Create a new Web Service
  2. Connect your repository
  3. Use Docker environment
  4. Set environment variables as needed

DigitalOcean App Platform

  1. Create new app from GitHub
  2. Use Dockerfile build method
  3. Configure environment variables

Environment Variables

Required environment variables for production:

NODE_ENV=production
DATABASE_URL=your_postgresql_connection_string
CHROME_BIN=/usr/bin/google-chrome

Important Notes

  1. Security: The application requires elevated privileges for Chrome to run in headless mode
  2. Storage: WhatsApp sessions are stored in ./whatsapp-session directory - ensure this is persistent
  3. Resources: Chrome requires significant memory - allocate at least 1GB RAM
  4. Networking: Ensure port 5000 is accessible for the web interface

Testing the Deployment

After deployment, verify the setup:

  1. Access the web interface at your domain/IP:5000
  2. Click "Hubungkan WhatsApp (Real)" button
  3. You should see a real WhatsApp QR code for scanning
  4. Scan with your WhatsApp mobile app
  5. Verify connection in the dashboard

Troubleshooting

Chrome Launch Issues

  • Ensure all system dependencies are installed
  • Check Chrome binary path with which google-chrome
  • Verify user permissions for Chrome execution

Memory Issues

  • Increase container/server memory allocation
  • Monitor resource usage during operation

Network Issues

  • Ensure firewall allows traffic on port 5000
  • Check DNS and SSL configuration if using custom domain

Support

For deployment assistance or issues, refer to the main application documentation or create an issue in the repository.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages