Managing a Running Bot
pywa cloud status [--bot <bot-id>]pywa cloud stop [--bot <bot-id>]pywa cloud start [--bot <bot-id>]pywa cloud restart [--bot <bot-id>]All four default to the linked bot if --bot is omitted, same as logs. None of
them rebuild anything — for that, see Deploying a Pywa Bot. The dashboard’s
Overview tab shows the same live status/health and has the same Stop/Start/Restart buttons, for
anyone who’d rather not reach for a terminal.
What actually happens
Section titled “What actually happens”statusis queried live, every time you run it — nothing is cached or tracked separately. Shows whether your bot is running, its current state (running, exited, restarting, …), how many times it’s restarted since it was deployed, and when it last started.stopstops your bot without discarding it, sostartcan resume it later with no rebuild.startresumes a stopped bot.restartstops and starts it in place. This does not pick up environment variable changes made since the last deploy — those needdeployagain, sincerestartreuses exactly what was already built and running, with whatever was injected at that time.
Crash recovery — what’s automatic, and what isn’t
Section titled “Crash recovery — what’s automatic, and what isn’t”Every deploy runs your bot with an automatic-restart policy. In practice:
- If your bot’s own process crashes or exits unexpectedly, it’s restarted automatically — nothing here needs to notice or act.
- If you
pywa cloud stopit deliberately, that’s respected and it stays stopped — it won’t fight you by restarting on its own. Onlystart(or a freshdeploy) brings it back. - If the platform itself restarts for any reason, the same policy brings your bot back up automatically once it’s running again.
What’s genuinely not covered yet: nobody is watching whether a running bot is actually
serving traffic correctly — “the process is alive” (which status shows you) and “the process is
working correctly” aren’t the same thing, and only the first is currently visible. If your bot is
running but silently broken (bad credentials, an unhandled exception in a specific handler, etc.),
status will still say running. Check Logs if something seems off despite a
healthy-looking status, or look at the line pywa cloud status prints about whether your bot is actually
answering requests, not just alive.