Connect WhatsApp via VPS or cloud server

Run the WaSMS gateway 24/7 on a small Linux VPS — no laptop required.

Last updated 2026-05-31

If keeping your computer open all day is impractical, install the gateway on a Linux VPS. It runs 24/7, auto-starts on reboot, and costs about $5-10/month.

1. Get a small Ubuntu VPS

You need a Linux VPS (Ubuntu/Debian/AlmaLinux/Rocky/CentOS, x86_64) with at least 1 GB RAM. Recommended:

  • Hetzner — ~4 EUR/month, very WhatsApp-friendly
  • Contabo — ~5 EUR/month
  • Vultr — $6/month, global
  • DigitalOcean — $6/month

Avoid: AWS, Google Cloud, Azure — Meta flags those IP ranges aggressively.

2. Open the dashboard

  1. Go to Dashboard → Channels.
  2. Click Connect WhatsApp.
  3. Switch to the On a VPS / Cloud tab.

3. SSH into your VPS and paste the one-liner

curl -sSL https://wasms.net/binaries/gateway/install.sh | sudo bash

The installer downloads the binary, sets up a systemd service for auto-start, and runs first-time setup.

4. Paste your credentials when prompted

The dashboard shows the credentials to copy:

  1. Provisioning code — identifies your workspace
  2. Secret key — authenticates the gateway

When asked for an ngrok authtoken, a VPS does not need one — just press Enter to use direct mode. Then enter your server's public URL, e.g. http://YOUR_SERVER_IP:8787 (the installer prints your detected IP) or https://gw.yourdomain.com if you run a reverse proxy with SSL. No ngrok account, no tunnel limits.

The installer opens port 8787 in ufw/firewalld automatically. If your provider has a cloud firewall (Hetzner/AWS security groups), also allow TCP 8787 there.

ngrok mode is still available for machines without a public IP (home PC / laptop) — get a free token at ngrok.com.

5. Scan the QR

Once setup finishes, return to the dashboard, click Connect WhatsApp, scan the QR with your phone.

Manage the gateway

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
  • Number gets banned — rare on Hetzner/Contabo/Vultr; common on AWS/GCP.

More in WhatsApp