Gateway Offline: Fast Fixes When Your WaSMS Gateway Drops
A six-step checklist to get your gateway back online, local or VPS
Gateway offline means WaSMS can't reach the process that actually talks to WhatsApp — so nothing sends and nothing arrives until it's back. Here's the fastest path to fixing it, in the order that resolves the most cases first.
Why gateway offline happens
A gateway can go offline for a handful of reasons: the process crashed, the machine lost its network connection, WhatsApp itself revoked the authorization, or the host it runs on ran out of memory. The six steps below check each of those, in the order most likely to be the actual cause.
Step 1: check gateway process
Before anything else, confirm whether the gateway process is even running.
# if you used pm2 (most common local/VPS setup)
pm2 status
# if you run it as a systemd service
systemctl status wasms-gateway
# if you run it in Docker
docker ps | grep wasms-gateway

If the process isn't listed at all, it crashed and didn't restart — jump to Step 5. If it's listed but marked "errored" or "stopped," check Step 4 for the reason before restarting blind.
Step 2: check network
A running process with no network path is functionally offline. Confirm the machine itself has internet access:
ping -c 3 8.8.8.8
curl -sI https://api.wasms.net
If pings fail but the machine was fine yesterday, check for an ISP outage (local gateway) or a VPS provider status page (VPS gateway) before assuming the gateway software is at fault. On a local PC, also check whether the machine went to sleep — a laptop that suspends overnight takes the gateway process down with it, which shows up the next morning as "offline" with nothing in the crash logs to explain why.
Step 3: reauthorize
Sometimes the process is running and the network is fine, but WhatsApp itself dropped the authorization — this looks identical to "offline" from the WaSMS side. Open Channels in your dashboard; if it's asking for a new QR scan, that's your answer.
Scan a fresh QR and you're reconnected. If the QR itself won't display, that's a different problem covered in WhatsApp QR not loading.
Step 4: check logs
The logs almost always say exactly what went wrong — worth reading before restarting anything.
pm2 logs wasms-gateway --lines 100
# or, for a systemd service
journalctl -u wasms-gateway -n 100

Look for the last few lines before it went quiet. Common patterns:
ECONNRESET/ETIMEDOUT— network blip, usually self-heals after a restart401orunauthorized— session expired, see WhatsApp session expired- Out-of-memory kill messages — the host ran out of RAM, worth checking VPS resource limits
Step 5: restart cleanly
A clean restart, not a kill-and-hope:
pm2 restart wasms-gateway
pm2 logs wasms-gateway --lines 20
Restart once and watch the logs for 20-30 seconds before deciding it didn't work. A gateway that reconnects to WhatsApp needs a few seconds to re-establish its session even when everything is healthy.
For a VPS that just rebooted (a common trigger for "why is my gateway offline"), confirm pm2 or your service manager is set to auto-start on boot, not just manually started once.
Step 6: reinstall
If restarting cleanly still doesn't bring it back and the logs don't point to a network or auth issue, a fresh install resolves most remaining cases — usually a corrupted local session file rather than anything with your account.
Follow the setup that matches your environment: connecting WhatsApp with a local gateway or connecting WhatsApp with a VPS gateway. Both walk through a clean install from scratch, and a fresh install takes less time than most people expect — usually well under ten minutes once the machine itself is confirmed healthy.
Before reinstalling, save your gateway's config file (API key, webhook URL) somewhere outside the install folder. A clean reinstall wipes local session data, but there's no reason to also lose your configuration and have to look it up again.