
Before purchasing hosting, make sure to ask two things: first, about node server installation, as not all hosting services provide this. Second, inquire about Cronjob support for automatically restarting the node server if it stops due to a server reboot.
Upload the whatsmail-main.zip file to the File Manager at the domain path or folder where your domain is directed.
Do not place the source files directly in the public_html directory without any folder. Instead, point your domain to another path or within a folder in public_html. This is because some hosting providers restrict running node servers if the script is located in this directory.
Extract the zip file you just uploaded until it looks like the image below.
Follow these steps to create a database in your Cpanel:
Open the domain or URL where the script was uploaded, then run the script installation. The Web Installation section will guide you through the application installation process.
Follow these steps to run the node server on Cpanel:
WHATSAPP_SERVER_URL='http://127.0.0.1:43123'
WHATSAPP_HOST="127.0.0.1"
WHATSAPP_PORT=43123
RECONNECT_INTERVAL=5000
MAX_RETRIES=5
Pay attention to port 43123. You need to ask which port can be used and ensure that it does not conflict with other users. It's recommended to use ports above 40000 with a random number to avoid clashes.
Go to the Cronjob page in your Cpanel, then enter the following code:
/usr/local/bin/php /home/public_html/yourdomain.com/artisan schedule:run >> /dev/null 2>&1
Replace yourdomain.com with your domain folder path. Refer to the image below for guidance: