WhatsApp

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

  1. Open Channels in your dashboard.
  2. Click Connect WhatsApp.
  3. Switch to the On a VPS / Cloud tab.
  4. 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:

Copy and paste
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:

  1. It downloads the app.
  2. 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 as https://gw.yourdomain.com if you have one pointing at this server.
  3. It saves the settings and opens port 8787 in the server's firewall when one is active.
  4. 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

Copy and paste
systemctl status wasms-gateway journalctl -u wasms-gateway -f systemctl restart wasms-gateway systemctl stop wasms-gateway

Troubleshooting

  • curl: not found — install first: apt update && apt install -y curl
  • Service starts but not Online — check logs: journalctl -u wasms-gateway -n 100

Did this guide solve it?