Hosting a WhatsApp Bot
A WhatsApp Cloud API bot is a web server that Meta calls. That sets what any host has to provide.
What the host must provide
Section titled “What the host must provide”- A public HTTPS URL that Meta can reach.
localhostand plain HTTP do not work, so a bot on your laptop needs a tunnel (see Local Development) or a deployed server. - Webhook verification. When you register the URL, Meta sends a
GETwith a verify token and expects the challenge echoed back. pywa answers this for you once the URL reaches your bot; the usual cause of “verification failed” is that the URL does not reach the bot, or the token differs. - Signature checking. Meta signs every webhook
POSTwith your app secret. pywa verifies it; do not disable it. - An always-on process. Messages arrive when users send them. Hosts that sleep or scale to zero can miss or delay webhooks and lose the conversation state held in memory.
- Secrets. The access token, phone number ID and app secret belong in environment variables, not in code.
Your options
Section titled “Your options”Any host that gives you an always-on process and a public HTTPS URL can run a pywa bot: a VPS behind a reverse proxy, or a general platform such as Render, Railway or Fly.io. You then configure the webhook URL and verify token in the Meta app yourself and manage restarts, logs and TLS.
Pywa Cloud is built for this one job. pywa deploy uploads the project, builds it and runs it in its own
container with a stable public webhook URL; the Meta verification handshake and phone number connection are
handled for you (pywa cloud connect), and pywa cloud logs, status, restart and rollback are built in.
Each bot runs isolated from other customers’ bots.
Getting started
Section titled “Getting started”pip install pywa-cloud-clipywa loginpywa deploypywa cloud connectFull walkthrough: Quick Start. Using a coding agent: Deploying with an AI Agent. Webhook problems: Troubleshooting.