Connect WhatsApp via VPS or cloud server
Run the WaSMS app on a small Linux server that is always on, so no computer has to stay open.
Updated
On this page
If keeping your computer open all day is impractical, install the app on a small Linux server (a VPS) instead. It stays on all the time and starts again by itself after a restart.
1. Get a small Ubuntu VPS
You need a Linux VPS (Ubuntu, Debian, AlmaLinux, Rocky or CentOS, x86_64) with at least 1 GB of memory, from any hosting company you like. A small, inexpensive plan is enough.
2. Get your install command
- Open Channels in your dashboard.
- Click Connect WhatsApp.
- Switch to the On a VPS / Cloud tab.
- Copy the install command shown there. It already contains the two codes that tie the app to your organization, so nothing has to be typed by hand. Treat the command like a password.
3. Run the command on your server
Sign in to the server over SSH as root, paste the command and press Enter. It looks like this, with your own codes in place of the placeholders:
curl -sSL https://wasms.net/binaries/gateway/install.sh | sudo bash -s -- --pcode YOUR_CODE --key YOUR_KEY
The installer does the rest and asks one question:
- It downloads the app.
- It shows This server's public address and the address it detected, for example
http://YOUR_SERVER_IP:8787, then asks: Press Enter to use it, or type your own domain:. Press Enter, or type your own address such ashttps://gw.yourdomain.comif you have one pointing at this server. - It saves the settings and opens port 8787 in the server's firewall when one is active.
- It starts the app and says Running, and will auto-start on reboot.
If your hosting company has its own firewall in front of the server, also allow TCP 8787 there.
4. Scan the QR code
Go back to the dashboard. The Connect WhatsApp window notices the app by itself and shows the QR code. On your phone, open WhatsApp, tap Settings (or the three dots), then Linked devices, then Link a device, and point the phone at the code.
Would rather use your own computer? See Connect your WhatsApp: download, open, scan.
Updating the app on the server
Run the same install command from the dashboard again. It replaces the program, restarts the app, and your WhatsApp should stay connected (if it asks for a QR code, scan it again). It asks for the server address again, exactly as at install; press Enter to keep the one it detects.
Manage the app on the server
systemctl status wasms-gateway journalctl -u wasms-gateway -f systemctl restart wasms-gateway systemctl stop wasms-gatewayTroubleshooting
- curl: not found — install first:
apt update && apt install -y curl - Service starts but not Online — check logs:
journalctl -u wasms-gateway -n 100